/* 
   DMR Costruzioni S.R.L - Premium Style
   Palette: Navy Blue & Construction Orange
*/

:root {
    --primary: #f39c12;
    /* Construction Orange */
    --primary-dark: #e67e22;
    --secondary: #1a2a3a;
    /* Deep Navy */
    --secondary-light: #2c3e50;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --border-radius: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Basics */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.btn,
.nav-link,
.logo {
    font-family: 'Montserrat', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-white {
    color: var(--white);
}

.mt-5 {
    margin-top: 3rem;
}

.text-muted {
    color: var(--text-light);
}

/* Typography */
.section-subtitle {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 10px;
    border-radius: 2px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-outline {
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--secondary);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--secondary);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-nav:hover {
    background: var(--primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--secondary);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: url('../assets/hero-bg.jpg') center/cover no-repeat fixed;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 42, 58, 0.9) 0%, rgba(26, 42, 58, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

/* Trust Bar */
.trust-bar {
    background: var(--primary);
    padding: 40px 0;
    position: relative;
    z-index: 10;
    margin-top: -80px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.trust-bar .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.trust-item {
    display: flex;
    align-items: center;
    color: var(--white);
    gap: 15px;
}

.trust-item i {
    font-size: 2.5rem;
    opacity: 0.8;
}

.trust-item div {
    display: flex;
    flex-direction: column;
}

.trust-item strong {
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

.trust-item span {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--primary);
    color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.experience-badge .years {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.founders-list {
    margin-top: 30px;
}

.founders-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.founders-list i {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 5px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--primary);
}

.icon-box {
    width: 70px;
    height: 70px;
    background: rgba(243, 156, 18, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    transition: var(--transition);
}

.service-card:hover .icon-box {
    background: var(--primary);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--secondary);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 250px;
    background: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.placeholder-img {
    background: var(--secondary-light);
    color: var(--white);
    text-align: center;
    padding: 20px;
    font-weight: 600;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.project-info .category {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Partners */
.partners-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 40px;
}

.partner-logo {
    max-height: 50px;
    opacity: 0.6;
    filter: grayscale(100%);
    transition: var(--transition);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}

/* Contact Section */
.contact-section {
    padding-bottom: 0;
}

.contact-wrapper {
    display: flex;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.contact-info {
    flex: 1;
    background: var(--secondary);
    padding: 60px;
    color: var(--white);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.contact-detail {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.contact-detail i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-top: 5px;
}

.contact-form-wrapper {
    flex: 1.5;
    background: var(--white);
    padding: 60px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.form-checkbox {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding-top: 80px;
    margin-top: 100px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
    /* filter: brightness(0) invert(1); REMOVED to keep original colors */
    background: rgba(255, 255, 255, 0.9);
    /* Slight background to ensure visibility */
    padding: 5px;
    border-radius: 4px;
}

.footer h4 {
    margin-bottom: 20px;
    color: var(--primary);
    margin-bottom: 10px;
}

.footer a:hover {
    color: var(--primary);
}

.footer-bottom {
    background: #111c26;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.4s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-left,
.reveal-right,
.reveal-bottom {
    opacity: 0;
    transition: all 0.8s ease-out;
}

.reveal-left {
    transform: translateX(-50px);
}

.reveal-right {
    transform: translateX(50px);
}

.reveal-bottom {
    transform: translateY(50px);
}

.active {
    opacity: 1;
    transform: translate(0);

    .trust-bar {
        margin-top: 0;
        padding: 40px 20px;
    }

    .about-image {
        margin-bottom: 50px;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: 0.4s;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 20px 0;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Form Messages */
.success-msg {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
}

.error-msg {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
}

.map-container iframe {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 250px;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 5px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Mobile Form Fix */
@media (max-width: 768px) {
    .contact-form-wrapper iframe {
        height: 1100px !important;
        display: block;
    }
}

/* Partner Logo Normalization */
.partner-logo {
    height: 60px !important;
    max-height: 60px !important;
    width: auto;
    object-fit: contain;
    margin: 0 15px;
}
/* Enhanced Mobile Form Fix */
@media (max-width: 992px) {
    .contact-wrapper {
        flex-direction: column !important;
        display: flex !important;
    }
    .contact-form-wrapper {
        width: 100% !important;
        overflow: visible !important;
        display: block !important;
    }
    .contact-form-wrapper iframe {
        width: 100% !important;
        height: 1200px !important;
        display: block !important;
    }
}
