/* ===== CSS Variables ===== */
:root {
    --primary: #1a3a5c;
    --primary-dark: #0f2840;
    --primary-light: #2a5a8c;
    --secondary: #c9a962;
    --secondary-light: #e0c989;
    --accent: #d4af37;
    --dark: #1a1a1a;
    --gray-900: #2d2d2d;
    --gray-800: #3d3d3d;
    --gray-700: #4a4a4a;
    --gray-600: #6b6b6b;
    --gray-500: #8a8a8a;
    --gray-400: #a3a3a3;
    --gray-300: #d1d1d1;
    --gray-200: #e5e5e5;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-gold: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ===== Utilities ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--secondary);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 20px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--gray-600);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 58, 92, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 58, 92, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-full {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background: var(--white);
    padding: 12px 0;
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: var(--radius-sm);
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    transition: var(--transition);
}

.header.scrolled .logo-text {
    color: var(--dark);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--white);
    position: relative;
    transition: var(--transition);
}

.header.scrolled .nav-link {
    color: var(--gray-700);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-cta {
    padding: 10px 24px;
    background: var(--secondary);
    color: var(--white) !important;
    border-radius: var(--radius-sm);
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--accent);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.header.scrolled .nav-toggle span {
    background: var(--dark);
}

/* Hamburger diventa bianco quando menu è aperto */
.nav-toggle.active span {
    background: var(--white);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a3a5c 0%, #0a1929 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(201, 169, 98, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 120px 0 80px;
}

.hero-subtitle {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 6px;
    color: var(--secondary);
    margin-bottom: 12px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--secondary);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(12px); opacity: 0.3; }
}

/* ===== Stats ===== */
.stats {
    background: var(--primary-dark);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Servizi ===== */
.servizi {
    padding: 100px 0;
    background: #c9c9c9;
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.servizio-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.servizio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.servizio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.servizio-card:hover::before {
    transform: scaleX(1);
}

.servizio-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.1) 0%, rgba(201, 169, 98, 0.1) 100%);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.servizio-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.servizio-title {
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.servizio-description {
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.7;
}

.servizio-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.servizio-link::after {
    content: '\2192';
    transition: var(--transition);
}

.servizio-link:hover::after {
    transform: translateX(4px);
}

/* ===== Chi Siamo ===== */
.chi-siamo {
    padding: 100px 0;
}

.chi-siamo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.chi-siamo-image {
    position: relative;
}

.image-placeholder {
    aspect-ratio: 4/5;
    background-image: url('img/home1.jpg');
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder svg {
    width: 120px;
    height: 120px;
    color: var(--gray-400);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 160px;
    height: 160px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
}

.experience-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
}

.experience-text {
    font-size: 0.75rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    max-width: 100px;
}

.chi-siamo-content .section-tag,
.chi-siamo-content .section-title {
    text-align: left;
}

.chi-siamo-text {
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.8;
}

.chi-siamo-list {
    margin: 30px 0;
}

.chi-siamo-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--gray-700);
    font-weight: 500;
}

.chi-siamo-list svg {
    width: 20px;
    height: 20px;
    color: var(--secondary);
    flex-shrink: 0;
}

/* ===== Progetti ===== */
.progetti {
    padding: 100px 0;
    background: var(--gray-100);
}

.progetti-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 20px;
}

.progetto-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
}

.progetto-card.progetto-large {
    grid-column: span 2;
    grid-row: span 2;
}

.progetto-image {
    width: 100%;
    height: 100%;
}

.progetto-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.progetto-card:nth-child(2) .progetto-placeholder {
    background: linear-gradient(135deg, #2a5a8c 0%, #1a3a5c 100%);
}

.progetto-card:nth-child(3) .progetto-placeholder {
    background: linear-gradient(135deg, #3a6a9c 0%, #2a5a8c 100%);
}

.progetto-card:nth-child(4) .progetto-placeholder {
    background: linear-gradient(135deg, #1a4a7c 0%, #0f2840 100%);
}

.progetto-card:nth-child(5) .progetto-placeholder {
    background: linear-gradient(135deg, #2a4a6c 0%, #1a3a5c 100%);
}

.progetto-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.progetto-card:hover .progetto-overlay {
    transform: translateY(0);
    opacity: 1;
}

.progetto-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    margin-bottom: 8px;
}

.progetto-title {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 8px;
}

.progetto-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== CTA ===== */
.cta {
    padding: 100px 0;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 20px;
}

.cta-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

/* ===== Contatti ===== */
.contatti {
    padding: 100px 0;
}

.contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contatti-info .section-tag,
.contatti-info .section-title {
    text-align: left;
}

.contatti-description {
    color: var(--gray-600);
    margin-bottom: 40px;
    line-height: 1.8;
}

.contatti-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contatto-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contatto-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.1) 0%, rgba(201, 169, 98, 0.1) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.contatto-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.contatto-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contatto-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
}

.contatto-value {
    font-size: 1rem;
    color: var(--gray-700);
    font-weight: 500;
}

.contatti-form-wrapper {
    background: var(--gray-100);
    padding: 50px;
    border-radius: var(--radius-xl);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    color: var(--gray-700);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-privacy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-privacy input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.form-privacy label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--gray-600);
    margin-bottom: 0;
}

.form-privacy a {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-description {
    color: var(--gray-500);
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--white);
    margin-bottom: 24px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--secondary);
}

.footer-contact p {
    color: var(--gray-500);
    font-size: 0.95rem;
    line-height: 1.8;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 30px 0;
    color: var(--gray-600);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 30px;
}

.footer-legal a {
    color: var(--gray-600);
}

.footer-legal a:hover {
    color: var(--secondary);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .servizi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .progetti-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .progetto-card.progetto-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .chi-siamo-grid,
    .contatti-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header {
        padding: 12px 0;
    }

    .nav-toggle {
        display: flex;
        z-index: 1002;
        position: relative;
    }

    /* Hamburger to X animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .logo {
        gap: 8px;
    }

    /* Menu fullscreen */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: 100vh;
        background: var(--gradient-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px;
        gap: 30px;
        box-shadow: none;
        transition: var(--transition-slow);
        opacity: 0;
        visibility: hidden;
        z-index: 1001;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-link {
        color: var(--white) !important;
        font-size: 1.5rem;
        font-weight: 500;
        text-align: center;
    }

    .nav-link::after {
        background: var(--secondary);
    }

    .nav-link.active {
        color: var(--secondary) !important;
    }

    .nav-link-cta {
        margin-top: 20px;
        padding: 14px 30px;
        font-size: 1.1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .servizi-grid {
        grid-template-columns: 1fr;
    }

    .progetti-grid {
        grid-template-columns: 1fr;
    }

    .progetto-card.progetto-large {
        grid-column: span 1;
    }

    .progetto-card {
        height: 250px;
    }

    .experience-badge {
        width: 120px;
        height: 120px;
        bottom: -20px;
        right: -20px;
    }

    .experience-number {
        font-size: 2rem;
    }

    .contatti-form-wrapper {
        padding: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Footer mobile - tutto centrato */
    .footer {
        padding: 50px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .footer-description {
        max-width: 300px;
        margin: 0 auto;
    }

    .footer-links {
        text-align: center;
    }

    .footer-links h4,
    .footer-contact h4 {
        text-align: center;
        margin-bottom: 15px;
    }

    .footer-links ul {
        align-items: center;
    }

    .footer-contact {
        text-align: center;
    }

    .footer-contact p {
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px 0;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header {
        padding: 10px 0;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-toggle span {
        width: 24px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    .hero-description {
        font-size: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .servizio-card {
        padding: 25px;
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .section-description {
        font-size: 0.95rem;
    }

    .footer-brand .logo-text {
        font-size: 1.1rem;
    }

    .footer-description {
        font-size: 0.9rem;
    }
}

/* ===== Header Dark (for internal pages) ===== */
.header-dark {
    background: var(--primary-dark);
}

.header-dark .logo-text {
    color: var(--white);
}

.header-dark .nav-link {
    color: var(--white);
}

.header-dark.scrolled {
    background: var(--white);
}

.header-dark.scrolled .logo-text {
    color: var(--dark);
}

.header-dark.scrolled .nav-link {
    color: var(--gray-700);
}

/* ===== Page Header ===== */
.page-header {
    padding: 180px 20px 80px;
    background: var(--gradient-primary);
    text-align: center;
}

.page-header .container {
    padding: 0 20px;
}

.page-header .section-tag {
    color: var(--secondary);
}

.page-title {
    font-size: clamp(1.8rem, 5vw, 4rem);
    color: var(--white);
    margin-bottom: 20px;
    word-wrap: break-word;
}

.page-description {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    padding: 0 10px;
}

/* ===== Realizzazioni Page ===== */
.realizzazioni-section {
    padding: 80px 0;
}

.realizzazioni-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
}

/* Sidebar */
.settori-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray-500);
    margin-bottom: 24px;
    padding-left: 20px;
}

.settori-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settore-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-600);
    background: transparent;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.settore-indicator {
    width: 4px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 2px;
    transition: var(--transition);
}

.settore-link:hover {
    color: var(--primary);
    background: var(--gray-100);
}

.settore-link:hover .settore-indicator {
    background: var(--primary-light);
}

.settore-link.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(26, 58, 92, 0.1) 0%, rgba(201, 169, 98, 0.1) 100%);
    font-weight: 600;
}

.settore-link.active .settore-indicator {
    background: var(--gradient-gold);
}

.sidebar-cta {
    margin-top: 40px;
    padding: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.sidebar-cta p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 16px;
    line-height: 1.6;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.8rem;
}

/* Realizzazioni Content */
.realizzazioni-content {
    min-height: 600px;
}

.settore-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.settore-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.settore-header {
    margin-bottom: 40px;
}

.settore-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.settore-description {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.8;
    max-width: 700px;
}

.progetti-grid-page {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.progetto-card-page {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.progetto-card-page:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.progetto-image-page {
    aspect-ratio: 1536 / 1024; /* Proporzioni immagini AI */
    overflow: hidden;
}

.progetto-placeholder-page {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: var(--transition);
}

.progetto-card-page:hover .progetto-placeholder-page {
    transform: scale(1.05);
}

/* Different gradients for variety */
.civile-1 { background-image: url('img/ab1/1.png'); }
.civile-2 { background-image: url('img/ab2/1.png'); }
.civile-3 { background-image: url('img/ab3/1.png'); }
.civile-4 { background-image: url('img/ab4r/1.png'); }
.industriale-1 { background-image: url('img/in1/1.png'); }
.industriale-2 { background-image: url('img/in2/1.png'); }
.industriale-3 { background-image: url('img/in3/1.png'); }
.pubblici-1 { background-image: url('img/lp1/1.jpg'); }
.pubblici-2 { background-image: url('img/lp2/1.jpg'); }
.pubblici-3 { background-image: url('img/lp3/2.jpg'); }
.ristrutturazione-1 { background-image: url('img/ris1/1.png'); }
.ristrutturazione-2 { background-image: url('img/ris2/1.png'); }
.ristrutturazione-3 { background-image: url('img/ris3/1.png'); }
.lottizzazione-1 { background-image: url('img/lot1/1.jpg'); }
.zootecnia-1 { background-image: url('img/z1/1.png'); }
.zootecnia-2 { background-image: url('img/z2/1.png'); }

.progetto-card-page {
    cursor: pointer;
}

.progetto-info {
    padding: 24px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.progetto-card-page:hover .progetto-info {
    background: var(--gradient-gold);
}

.progetto-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--secondary);
    transition: var(--transition);
}

.progetto-card-page:hover .progetto-info h3 {
    color: var(--primary-dark);
}

.progetto-info p {
    font-size: 0.9rem;
    color: var(--white);
    transition: var(--transition);
}

.progetto-card-page:hover .progetto-info p {
    color: var(--primary);
}

/* ===== Lightbox / Slider ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-main {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
}

/* Thumbnails a sinistra */
.lightbox-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 70vh;
    overflow: hidden;
    flex-shrink: 0;
}

.lightbox-thumb {
    width: 80px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
    flex-shrink: 0;
}

.lightbox-thumb:hover {
    opacity: 0.8;
}

.lightbox-thumb.active {
    opacity: 1;
    border: 2px solid var(--secondary);
}

/* Immagine principale */
.lightbox-image-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Info e controlli sotto l'immagine */
.lightbox-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    padding: 0 10px;
}

.lightbox-info {
    text-align: left;
    color: var(--white);
}

.lightbox-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
    color: var(--secondary);
}

.lightbox-location {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

.lightbox-counter {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

/* Frecce in basso a destra */
.lightbox-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lightbox-nav {
    width: 50px;
    height: 50px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-nav:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.lightbox-nav svg {
    width: 24px;
    height: 24px;
    color: var(--dark);
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
    background: var(--white);
    transform: none;
}

/* Pulsante chiudi */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10001;
}

.lightbox-close:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    color: var(--dark);
}

/* Responsive Lightbox - Tablet Landscape */
@media (max-width: 1024px) {
    .lightbox-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
        padding: 10px;
    }

    .lightbox-main {
        gap: 15px;
    }

    .lightbox-thumbnails {
        max-height: 55vh;
    }

    .lightbox-thumb {
        width: 60px;
        height: 40px;
    }

    .lightbox-image {
        max-height: 55vh;
    }

    .lightbox-title {
        font-size: 1.2rem;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
    }
}

/* Responsive Lightbox - Tablet Portrait */
@media (max-width: 768px) {
    .lightbox {
        padding: 10px;
    }

    .lightbox-content {
        width: 100%;
        max-height: 100%;
        padding: 0;
        justify-content: flex-start;
    }

    .lightbox-main {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    /* Immagine prima, thumbnails dopo */
    .lightbox-image-container {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .lightbox-image {
        max-height: 45vh;
        max-width: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    /* Thumbnails orizzontali sotto l'immagine */
    .lightbox-thumbnails {
        order: 2;
        flex-direction: row;
        max-height: none;
        width: 100%;
        overflow-x: hidden;
        overflow-y: hidden;
        gap: 8px;
        padding: 8px 0;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .lightbox-thumb {
        width: 55px;
        height: 37px;
        flex-shrink: 0;
    }

    /* Info e controlli sotto */
    .lightbox-bottom {
        order: 3;
        flex-direction: column;
        gap: 12px;
        align-items: center;
        margin-top: 10px;
        padding: 0;
        width: 100%;
    }

    .lightbox-info {
        text-align: center;
        width: 100%;
    }

    .lightbox-title {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }

    .lightbox-location {
        font-size: 0.85rem;
    }

    .lightbox-counter {
        font-size: 0.8rem;
        margin-top: 2px;
    }

    .lightbox-controls {
        justify-content: center;
        gap: 15px;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
    }

    .lightbox-nav svg {
        width: 22px;
        height: 22px;
    }

    .lightbox-close {
        position: fixed;
        top: 15px;
        right: 15px;
        width: 44px;
        height: 44px;
        z-index: 10002;
    }

    .lightbox-close svg {
        width: 22px;
        height: 22px;
    }
}

/* Responsive Lightbox - Phone */
@media (max-width: 480px) {
    .lightbox {
        padding: 5px;
    }

    .lightbox-content {
        padding-top: 50px;
    }

    .lightbox-image {
        max-height: 40vh;
    }

    .lightbox-thumbnails {
        gap: 6px;
        padding: 6px 0;
    }

    .lightbox-thumb {
        width: 48px;
        height: 32px;
    }

    .lightbox-bottom {
        gap: 10px;
        margin-top: 8px;
    }

    .lightbox-title {
        font-size: 1rem;
    }

    .lightbox-location {
        font-size: 0.8rem;
    }

    .lightbox-counter {
        font-size: 0.75rem;
    }

    .lightbox-controls {
        gap: 12px;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }

    .lightbox-close svg {
        width: 20px;
        height: 20px;
    }
}

/* Responsive Lightbox - Small Phone */
@media (max-width: 360px) {
    .lightbox-content {
        padding-top: 45px;
    }

    .lightbox-image {
        max-height: 35vh;
    }

    .lightbox-thumb {
        width: 42px;
        height: 28px;
    }

    .lightbox-title {
        font-size: 0.9rem;
    }

    .lightbox-location {
        font-size: 0.75rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-close {
        width: 36px;
        height: 36px;
    }
}

/* Landscape mode per telefoni */
@media (max-width: 900px) and (orientation: landscape) {
    .lightbox-content {
        padding-top: 10px;
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .lightbox-main {
        flex-direction: row;
        flex: 1;
        max-height: 85vh;
    }

    .lightbox-thumbnails {
        flex-direction: column;
        order: 0;
        max-height: 80vh;
        width: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .lightbox-thumb {
        width: 50px;
        height: 33px;
    }

    .lightbox-image-container {
        order: 1;
        flex: 1;
    }

    .lightbox-image {
        max-height: 75vh;
    }

    .lightbox-bottom {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        flex-direction: row;
        width: auto;
        gap: 20px;
        background: rgba(0, 0, 0, 0.7);
        padding: 10px 20px;
        border-radius: var(--radius-md);
        margin-top: 0;
    }

    .lightbox-info {
        text-align: left;
    }

    .lightbox-close {
        top: 5px;
        right: 5px;
        width: 36px;
        height: 36px;
    }
}

/* ===== Contatti Page ===== */
.contatti-page {
    padding: 80px 0;
}

.contatti-page .contatti-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
}

.contatti-info-title {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.contatti-intro {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contatti-page .contatti-details {
    margin-bottom: 40px;
}

.contatti-extra {
    padding: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
}

.extra-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.extra-item:last-child {
    border-bottom: none;
}

.extra-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.extra-value {
    font-weight: 500;
    color: var(--gray-700);
}

.contatto-value a {
    color: var(--primary);
}

.contatto-value a:hover {
    color: var(--secondary);
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn-icon {
    width: 18px;
    height: 18px;
    margin-left: 10px;
}

/* Map Section */
.map-section {
    position: relative;
}

.map-container {
    position: relative;
    height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(30%);
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

.map-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 300px;
}

.map-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.map-card p {
    color: var(--gray-600);
    margin-bottom: 20px;
    line-height: 1.6;
}


/* ===== Responsive for New Pages ===== */
@media (max-width: 1024px) {
    .realizzazioni-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .settori-sidebar {
        position: relative;
        top: 0;
    }

    .settori-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .settore-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .settore-indicator {
        display: none;
    }

    .sidebar-cta {
        display: none;
    }

    .contatti-page .contatti-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 120px 15px 50px;
    }

    .page-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }

    .page-description {
        font-size: 0.95rem;
        padding: 0 5px;
    }

    /* Realizzazioni - cards a tutta larghezza */
    .progetti-grid-page {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .realizzazioni-container {
        padding: 0 15px;
    }

    /* Menu settori - griglia che wrappa */
    .settori-menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        overflow-x: visible;
        flex-wrap: wrap;
        padding-bottom: 0;
    }

    .settore-link {
        white-space: normal;
        text-align: center;
        justify-content: center;
        padding: 12px 10px;
        font-size: 0.8rem;
        background: var(--gray-100);
        border-radius: var(--radius-md);
    }

    .settore-link.active {
        background: var(--primary);
        color: var(--white);
    }

    .settore-header {
        padding: 0 5px;
    }

    .settore-title {
        font-size: 1.6rem;
        text-align: center;
    }

    .settore-description {
        font-size: 0.9rem;
        text-align: center;
    }

    /* Cards progetto - aspect ratio ridotto per mobile */
    .progetto-card-page {
        margin: 0;
        border-radius: var(--radius-md);
    }

    .progetto-image-page {
        aspect-ratio: 16 / 10;
    }

    .progetto-info {
        padding: 15px;
    }

    .progetto-info h3 {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .progetto-info p {
        font-size: 0.85rem;
    }

    .map-overlay {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        padding: 20px;
    }

    .map-card {
        max-width: 100%;
    }

    .map-container {
        height: auto;
    }

    .map-container iframe {
        height: 300px;
    }

    .sidebar-title {
        text-align: center;
        padding-left: 0;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 100px 12px 35px;
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-description {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .realizzazioni-container {
        padding: 0 10px;
        gap: 20px;
    }

    .realizzazioni-section {
        padding: 30px 0;
    }

    /* Menu settori - 3 colonne su telefono piccolo */
    .settori-menu {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .settore-link {
        padding: 10px 6px;
        font-size: 0.7rem;
    }

    .settore-title {
        font-size: 1.4rem;
    }

    .settore-description {
        font-size: 0.85rem;
    }

    .progetti-grid-page {
        gap: 15px;
    }

    .progetto-image-page {
        aspect-ratio: 4 / 3;
    }

    .progetto-info {
        padding: 12px;
    }

    .progetto-info h3 {
        font-size: 0.95rem;
        margin-bottom: 3px;
    }

    .progetto-info p {
        font-size: 0.8rem;
    }

    .sidebar-title {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 360px) {
    .page-header {
        padding: 90px 10px 30px;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .settori-menu {
        grid-template-columns: repeat(2, 1fr);
    }

    .settore-link {
        padding: 10px 8px;
        font-size: 0.75rem;
    }

    .progetto-info h3 {
        font-size: 0.9rem;
    }
}
