/* =========================================
   VARIABILI E RESET
   ========================================= */
:root {
    --primary-blue: #012659;    /* Il tuo Blu Navy esatto */
    --accent-gold: #8F795F;     /* Il tuo Oro/Marrone esatto */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px; /* Era 90px, aggiornato alla nuova altezza */
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   HEADER & NAV
   ========================================= */
.header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 110px; /* Header leggermente più alto */
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    height: 85px; /* Logo ingrandito */
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
    position: relative;
}

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

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

.btn-nav {
    background-color: var(--primary-blue);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
}
.btn-nav:hover {
    background-color: var(--accent-gold);
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(1, 38, 89, 0.9), rgba(1, 38, 89, 0.8)), url('img/sfondo1.jpg') center/cover no-repeat;    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 110px; /* Compensa l'header */
}

.hero-content {
    color: white;
    max-width: 800px;
}

.hero-title {
    color: white;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: #eeeeee;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--accent-gold);
    color: white;
}

.btn-primary:hover {
    background-color: #75614b; /* Tono più scuro dell'oro */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* =========================================
   SEZIONI GENERALI
   ========================================= */
.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--primary-blue);
    color: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.divider {
    height: 4px;
    width: 60px;
    background-color: var(--accent-gold);
    margin: 0 auto;
    border-radius: 2px;
}

/* =========================================
   CHI SIAMO
   ========================================= */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.text-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

.rounded-img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* =========================================
   SERVIZI
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 8px;
    /* 1. Ombra più marcata e diffusa */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); 
    /* 2. Bordo grigio chiarissimo per staccare dallo sfondo */
    border: 1px solid #eaeaea; 
    border-top: 4px solid transparent; /* Mantiene l'effetto hover */
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--accent-gold);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* =========================================
   PROGETTI
   ========================================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%; /* Forza la card a occupare tutta l'altezza disponibile */
}


.project-logo-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.project-logo-container img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Fa sì che questa parte occupi tutto lo spazio rimanente */
    justify-content: space-between; /* Spinge il link "Leggi tutto" in fondo */
    width: 100%;
}

.project-content p {
    font-size: 0.95rem; /* Leggermente più grande per leggibilità */
    color: var(--text-light);
    text-align: justify;
    margin-bottom: 1.5rem;
    line-height: 1.6; /* Più respiro, uguale al resto del sito */
    flex-grow: 1;
    font-family: var(--font-body); /* Forza il font Manrope */
}

.read-more {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-blue); /* Usiamo il blu aziendale invece del blu acceso */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-heading); /* Usa il font dei titoli per staccare un po' */
    transition: var(--transition);
}

.read-more:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* Quadro Sinottico */
.synoptic-list {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.synoptic-list h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-blue);
}

.synoptic-list ul {
    list-style-position: inside;
    color: var(--text-light);
}

.synoptic-list li {
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.synoptic-list li::marker {
    color: var(--accent-gold);
}

/* =========================================
   CONTATTI (Senza Form)
   ========================================= */
.contact-centered {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    color: white;
}

.contact-centered h3 {
    color: var(--accent-gold);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.contact-centered p {
    color: #cccccc;
    font-size: 1.1rem;
    line-height: 1.6;
}

.big-email {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 700;
    color: white !important;
    background-color: var(--accent-gold);
    padding: 1rem 2rem;
    border-radius: 6px;
    margin-top: 1rem;
    transition: var(--transition);
    text-decoration: none;
}

.big-email:hover {
    background-color: #75614b; /* Tono più scuro dell'oro */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .big-email {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: #011936; /* Blu molto scuro */
    padding: 2.5rem 0;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.footer-logo {
    height: 60px;
    margin: 0 auto 1rem auto;
    opacity: 0.9;
}

/* =========================================
   PAGINE DI DETTAGLIO PROGETTI
   ========================================= */
.project-hero {
    background: linear-gradient(rgba(1, 38, 89, 0.9), rgba(1, 38, 89, 0.8)), url('img/foto2.jpg') center/cover no-repeat;    padding: 200px 0 120px 0; /* Spazio extra per l'header fisso */
    text-align: center;
    color: white;
}

.project-hero .hero-title {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.project-hero .hero-subtitle {
    font-size: 1.2rem;
    color: #eeeeee;
    margin-bottom: 2rem;
}

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

.btn-outline:hover {
    background: var(--accent-gold);
    color: white;
}

.project-detail-content {
    max-width: 900px; /* Rende il testo più leggibile */
    margin: 0 auto;
}

.project-detail-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.project-detail-content p {
    color: var(--text-light);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.lead-text {
    font-size: 1.15rem;
    color: var(--text-dark) !important;
    font-weight: 600;
    border-left: 4px solid var(--accent-gold);
    padding-left: 1.5rem;
    margin-bottom: 2rem !important;
}

.custom-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.custom-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

.custom-list li::before {
    content: "•";
    color: var(--accent-gold);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.project-links-box {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-blue);
}

.project-links-box p {
    margin-bottom: 0.5rem;
}

.project-links-box a {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: underline;
}

.project-links-box a:hover {
    color: var(--accent-gold);
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.info-item strong {
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.3rem;
}

@media (max-width: 768px) {
    .project-hero { padding: 140px 0 60px 0; }
    .project-hero .hero-title { font-size: 2rem; }
}

/* Stili per l'immagine all'interno dei progetti */
.project-image-container {
    margin: 2.5rem 0;
    text-align: center;
}

.project-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.image-caption {
    font-size: 0.85rem !important;
    color: #888 !important;
    margin-top: 0.8rem !important;
    font-style: italic;
}

/* Stili per i servizi dettagliati */
.services-list {
    margin-top: 1.5rem;
}

.service-detail {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--accent-gold);
}

.service-detail h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    color: var(--primary-blue);
}

/* =========================================
   PARTNERS (Progetti)
   ========================================= */
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.partner-logo {
    flex: 0 0 auto;
    width: 120px; /* Larghezza fissa per ogni logo */
    height: 80px; /* Altezza fissa per mantenere l'allineamento */
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Adatta l'immagine senza deformarla */
    filter: grayscale(100%); /* Effetto elegante: loghi in bianco e nero */
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo img:hover {
    filter: grayscale(0%); /* Al passaggio del mouse tornano a colori */
    opacity: 1;
    transform: scale(1.05);
}

/* Responsive per i loghi partner */
@media (max-width: 768px) {
    .partners-grid {
        gap: 1.5rem;
        padding: 1rem;
    }
    .partner-logo {
        width: 90px;
        height: 60px;
    }
}

/* =========================================
   BANNER COOKIE
   ========================================= */
.cookie-banner {
    position: fixed;
    bottom: 20px; /* Staccato dal bordo inferiore */
    left: 50%;
    transform: translateX(-50%); /* Centrato orizzontalmente */
    width: 95%;
    max-width: 900px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); /* Ombra importante per farlo "galleggiare" */
    z-index: 9999;
    border-radius: 8px;
    border-left: 5px solid var(--accent-gold); /* Dettaglio di colore */
    display: none; /* Nascosto di default */
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 20px; opacity: 1; }
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.5;
    color: var(--text-light);
}

.cookie-content a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: underline;
}

.cookie-content a:hover {
    color: var(--accent-gold);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Stile specifico per i bottoni del banner */
.cookie-buttons .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.cookie-buttons .btn-outline {
    border: 2px solid var(--text-light);
    color: var(--text-light);
    background: transparent;
}

.cookie-buttons .btn-outline:hover {
    background: #eee;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 0;
        width: 100%;
        border-radius: 8px 8px 0 0;
        padding: 1.5rem;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Footer links */
.footer-links {
    margin-top: 1rem;
    font-size: 0.85rem;
}
.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--accent-gold);
}
.footer-links span {
    margin: 0 10px;
    color: #444;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px; 
    left: 0; 
    right: 0; /* Usa left e right a 0 per centrare senza sforare */
    margin: 0 auto; /* Centra il blocco orizzontalmente */
    width: 90%; /* Larghezza leggermente ridotta per sicurezza */
    max-width: 900px;
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); 
    z-index: 9999;
    border-radius: 8px;
    border-left: 5px solid var(--accent-gold); 
    display: none; 
}

.cookie-banner.show {
    display: block !important; /* Mostra il banner */
    /* Se non c'è, aggiungi anche: */
    opacity: 1 !important;
    visibility: visible !important;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   RESPONSIVE (Mobile)
   ========================================= */
@media (max-width: 992px) {
    .content-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem; }
    
    .hamburger { display: block; }
    
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 110px; 
        flex-direction: column;
        background-color: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        padding: 2rem 0;
        gap: 1.5rem;
    }

    .nav-menu.active { left: 0; }
    
    .logo { height: 60px; }
}