/* VARIABILI COLORI E FONT */
:root {
    --primary-navy: #333333;      /* Grigio Scuro Istituzionale */
    --primary-dark: #222222;      /* Grigio Notte per hover/footer */
    --accent-gold: #d4af37;       /* Oro Pallido per dettagli */
    --text-graphite: #4b4b4b;     /* Grigio per testi */
    --bg-light: #f8f9fa;          /* Sfondo sezioni chiare */
    --white: #ffffff;
    
    --font-serif: 'Playfair Display', serif; /* Per Titoli */
    --font-sans: 'Lato', sans-serif;         /* Per Testi */
}

/* RESET E BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--text-graphite);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--primary-navy);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

/* HEADER & NAVIGAZIONE */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-navy);
}

.logo-icon {
    /* Simulazione icona colonna */
    width: 25px;
    height: 35px;
    background-color: var(--primary-navy);
    border-radius: 2px;
    position: relative;
}

.logo-icon::after {
    content: ""; /* Qui andrebbe l'SVG o il negativo */
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 2px; height: 20px;
    background-color: var(--white);
}

.accent {
    color: var(--accent-gold);
    font-style: italic;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-list a {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-list a:hover {
    color: var(--accent-gold);
}

.btn-contact {
    background-color: var(--primary-navy);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
}

.btn-contact:hover {
    background-color: var(--primary-dark);
}

/* HAMBURGER MENU (MOBILE) */
.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-navy);
    margin: 5px 0;
}

/* HERO SECTION */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(51, 51, 51, 0.85), rgba(51, 51, 51, 0.7)), url('https://images.unsplash.com/photo-1505664194779-8beaceb93744?auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    color: var(--white);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 4px;
    font-weight: 700;
    margin: 0 10px;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--primary-navy);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #e5c145;
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-navy);
}

/* SEZIONE INTRO E TITOLI */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin: 20px auto;
}

.intro-text p {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* TEAM CARDS */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.team-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    text-align: center;
}

.team-card:hover {
    transform: translateY(-10px);
}

.card-img {
    width: 100%;
    height: 300px;        /* Altezza fissa per allinearli tutti */
    object-fit: cover;    /* Taglia l'immagine se necessario per riempire lo spazio */
    object-position: top; /* Mantiene il focus sul volto (parte alta) */
    display: block;
}


.card-body {
    padding: 25px;
}

.card-body h3 {
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.card-body .role {
    display: block;
    color: var(--accent-gold);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* FOOTER */
.main-footer {
    background-color: var(--primary-navy);
    color: var(--white);
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* MEDIA QUERIES (RESPONSIVE) */
@media (max-width: 768px) {
    .nav-list {
        display: none; /* Nascondi menu su mobile */
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-list.active {
        display: flex; /* Mostra quando attivo */
    }

    .hamburger {
        display: block; /* Mostra hamburger su mobile */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}
.logo-img {
    height: 50px; /* Altezza fissa per stare bene nella barra */
    width: auto;  /* La larghezza si adatta in automatico */
    margin-right: 15px; /* Spazio tra logo e testo */
}

/* --- AGGIUNTE PER PAGINE INTERNE --- */

/* Testata ridotta per pagine interne */
.page-header {
    background: linear-gradient(rgba(51, 51, 51, 0.9), rgba(51, 51, 51, 0.9)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    height: 40vh; /* Più bassa della home */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 60px;
}

.page-header h1 {
    color: var(--white);
    font-size: 3rem;
}

/* Griglia Aree di Pratica */
.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.practice-card {
    background: var(--white);
    padding: 40px 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.practice-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.practice-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background-color: var(--accent-gold);
    opacity: 0;
    transition: 0.3s;
}

.practice-card:hover::before {
    opacity: 1;
}

.practice-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.date {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

/* Modulo Contatti */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info-box {
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 40px;
    border-radius: 8px;
}

.contact-info-box h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.info-item {
    margin-bottom: 25px;
}

.info-item strong {
    display: block;
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
}

.form-control:focus {
    border-color: var(--primary-navy);
    outline: none;
}

.lawyer-section {
    margin-bottom: 100px;
}

.lawyer-section:last-child {
    margin-bottom: 0;
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-navy);
    color: var(--white);
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    display: none; /* Hidden by default, shown via JS */
}

.cookie-banner.show {
    display: block;
}

.cookie-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-banner a {
    color: var(--accent-gold);
    text-decoration: underline;
}

.cookie-banner .btn {
    white-space: nowrap;
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* TIMELINE */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--accent-gold);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateX(0);
    transition: all 0.8s ease-out;
}

.timeline-item.left {
    left: 0;
    text-align: right;
    transform: translateX(-100px);
}

.timeline-item.right {
    left: 50%;
    text-align: left;
    transform: translateX(100px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item.left.visible {
    animation: slideInLeft 0.8s ease-out forwards;
}

.timeline-item.right.visible {
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-gold);
    border: 2px solid var(--white);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item.left::after {
    right: -6px;
}

.timeline-item.right::after {
    left: -6px;
}

.timeline-year {
    font-weight: 700;
    color: var(--primary-navy);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.timeline-content {
    margin: 0;
    padding: 0;
}

/* Responsive per contatti */
@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cookie-banner .btn {
        width: 100%;
    }

    .timeline::after {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 50px;
    }

    .timeline-item::after {
        left: 14px !important;
        right: auto !important;
    }

    .timeline-content {
        padding-left: 10px;
        margin-left: 10px;
    }
}
