@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Inter:wght@300;400&display=swap');

:root {
    --blu-notte: #1A3554;
    --oro: #C9A86A;
    --oro-chiaro: #e8d3a4;
    --bianco: #ffffff;
    --sfondo-esterno: #f4f4f4;
}

/* SCROLLBAR */
body::-webkit-scrollbar { width: 8px; }
body::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
body::-webkit-scrollbar-thumb { background: var(--oro); border-radius: 4px; }
body::-webkit-scrollbar-thumb:hover { background: var(--oro-chiaro); }

/* BODY */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--sfondo-esterno);
    font-family: 'Inter', serif;
    transition: opacity 0.35s ease;
}

/* WRAPPER GENERALE */
.page-wrapper {
    background: var(--blu-notte);
    max-width: 1100px;
    min-height: calc(100vh - 40px);
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 0 40px rgba(0,0,0,0.25);
    position: relative;
    padding-bottom: 45px;
}

/* ============================================
   HOMEPAGE
============================================ */

.home-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 0;
}

.hero-home {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 40px;
}

.logo-homepage {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.titolo-studio {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    letter-spacing: 6px;
    color: var(--bianco);
    margin: 0;
}

.sottotitolo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    letter-spacing: 10px;
    margin-top: 20px;
    color: var(--oro);
}

/* ============================================
   HEADER — MENU DESKTOP
============================================ */

.header {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    padding: 25px 60px;
    display: flex;
    justify-content: flex-end;
    z-index: 1000;
}

.menu a {
    color: var(--oro);
    text-decoration: none;
    margin-left: 32px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    letter-spacing: 2px;
    position: relative;
    transition: color 0.35s ease, letter-spacing 0.35s ease;
}

.menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 1px;
    background-color: var(--oro);
    transition: width 0.45s ease;
}

.menu a:hover {
    color: var(--oro-chiaro);
    letter-spacing: 2.8px;
}

.menu a:hover::after { width: 100%; }

/* ============================================
   LOGO MINI (pagine interne)
============================================ */

.logo-mini {
    position: absolute;
    top: 28px;
    left: 40px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2000;
}

.logo-mini-line1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--bianco);
    transition: color 0.3s ease;
}

.logo-mini-line2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    letter-spacing: 6px;
    color: var(--oro);
    transition: color 0.3s ease;
}

.logo-mini:hover .logo-mini-line1,
.logo-mini:hover .logo-mini-line2 {
    color: var(--oro-chiaro);
}

/* ============================================
   TITOLO PAGINE INTERNE
============================================ */

.hero-internal {
    padding-top: 120px;
    padding-bottom: 50px;
    text-align: center;
}

.hero-internal h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    letter-spacing: 6px;
    color: #ffffff;
    margin: 0;
}

/* ============================================
   CONTATTI
============================================ */

.contatti-wrapper {
    min-height: calc(100vh - 40px);
    overflow: hidden;
    padding-bottom: 0 !important;
}

.mappa-box {
    width: 95%;
    max-width: 1000px;
    height: 230px;
    border: 2px solid var(--oro);
    border-radius: 6px;
    overflow: hidden;
    margin: -25px auto 20px auto;
}

.contatti-info {
    text-align: center;
    margin-top: 6px;
}

.indirizzo-oro {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--oro);
    margin-bottom: 8px;
}

.riga-contatti {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.etichetta {
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    color: white;
}

.link-oro,
.whatsapp-link {
    position: relative;
    color: var(--oro);
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    letter-spacing: 1px;
    transition: color 0.35s ease;
}

.link-oro::after,
.whatsapp-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0%;
    height: 1px;
    background-color: var(--oro);
    transition: width 0.45s ease;
}

.link-oro:hover,
.whatsapp-link:hover {
    color: var(--oro-chiaro);
}

.link-oro:hover::after,
.whatsapp-link:hover::after {
    width: 100%;
}

.whatsapp-icona {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    margin-bottom: -4px;
}

.nota-appuntamento {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    color: white;
    font-style: italic;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nota-colloquio {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    color: var(--bianco);
    font-style: italic;
    line-height: 1.35;
    padding: 0 20px;
}

/* ============================================
   PROFESSIONISTA — DESKTOP
============================================ */

.pagina-professionista .profilo-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    width: 70%;
    margin: 0 auto;
    padding: 40px 0;
}

.pagina-professionista .riquadro-foto {
    width: 260px;
    height: 340px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    flex-shrink: 0;
}

.pagina-professionista .bio-testo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    line-height: 1.7;
    color: var(--bianco);
    text-align: justify;
    max-width: 700px;
}

.pagina-professionista .bio-titolo {
    font-size: 26px;
    margin-bottom: 25px;
    color: var(--oro);
    font-weight: 600;
    white-space: nowrap; /* Mantiene tutto su una riga */
}

.pagina-professionista .bio-testo p {
    margin-bottom: 22px;
}

/* Evidenziazioni oro */
.oro-evidenza {
    color: var(--oro);
    font-weight: 600;
    letter-spacing: 0.3px;
}



/* ============================================
   PROFESSIONISTA — MOBILE (OTTIMIZZATO)
============================================ */

@media (max-width: 880px) {

    /* Impila tutto in verticale */
    .pagina-professionista .profilo-wrapper {
        display: block;
        width: 90%;
        margin: 0 auto;
        padding: 20px 0 40px 0;
    }

    /* Foto centrata e ridimensionata */
    .pagina-professionista .riquadro-foto {
        width: 180px;
        height: 240px;
        margin: 0 auto 25px auto;
    }

    /* Testo leggibile su smartphone */
    .pagina-professionista .bio-testo {
        font-size: 17px;
        line-height: 1.55;
        width: 100%;
    }

    .pagina-professionista .bio-titolo {
        font-size: 22px;
        text-align: center;
        margin-bottom: 20px;
        white-space: normal; /* Permette il capo su mobile */
    }

    .pagina-professionista .bio-testo p {
        margin-bottom: 18px;
    }
}

/* ============================================
   FOTO PROFESSIONISTA – STILE STUDIO LEGALE
   ============================================ */

.pagina-professionista .riquadro-foto {
  width: 260px;
  height: 340px;

  background-color: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(201, 168, 106, 0.75);
  border-radius: 4px;

  overflow: hidden;          /* impedisce sbordamenti */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  /* micro profondità istituzionale */
  box-shadow: 0 0 0 1px rgba(201, 168, 106, 0.25);
}

.pagina-professionista .riquadro-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* riempie il riquadro senza deformare */
  display: block;            /* elimina spazi anomali */
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 880px) {
  .pagina-professionista .riquadro-foto {
    width: 180px;
    height: 240px;
    margin: 0 auto 25px auto;
  }
}

/* ============================================
   COMPETENZE
============================================ */

.competenze-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.competenze-elenco {
    width: 80%;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 25px;
    row-gap: 6px;
}

.elenco-oro p {
    position: relative;
    padding-left: 22px;
    cursor: pointer;
    transition: color 0.3s ease;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    color: var(--bianco);
}

.elenco-oro p::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--oro);
    font-size: 22px;
}

.elenco-oro p:hover {
    color: var(--oro-chiaro);
}

/* ============================================
   MODAL COMPETENZE — DESKTOP
============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 26, 47, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 6000;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal-box {
    background: var(--blu-notte);
    border: 2px solid var(--oro);
    padding: 35px 45px;
    width: 60%;
    max-width: 700px;
    border-radius: 6px;
    position: relative;
}

.modal-title {
    color: var(--oro);
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
}

.modal-line {
    width: 100%;
    height: 1px;
    background: var(--oro);
    margin: 12px 0 20px 0;
}

.modal-text {
    color: var(--bianco);
    font-family: 'Cormorant Garamond', serif;
    font-size: 19px;
    line-height: 1.7;
    text-align: justify;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 30px;
    color: var(--oro);
    cursor: pointer;
}

/* ============================================
   MODAL COMPETENZE — MOBILE OTTIMIZZATO
============================================ */

@media (max-width: 880px) {

    .modal-box {
        width: 88%;
        max-height: 80vh;
        padding: 26px 22px;
        overflow-y: auto;
        border-width: 1.6px;
    }

    .modal-title {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 10px;
        text-align: center;
    }

    .modal-line {
        margin: 10px 0 18px 0;
    }

    .modal-text {
        font-size: 17px;
        line-height: 1.55;
        text-align: justify;
    }

    .modal-close {
        font-size: 28px;
        top: 10px;
        right: 14px;
    }
}

/* ============================================
   ARTICOLI — BLOCCO TESTO CENTRATO E OTTIMIZZATO
============================================ */

.pagina-articoli .articoli-testo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 260px); /* spazio calibrato tra header e footer */
    padding: 0 20px;
    text-align: center;
}

.pagina-articoli .articoli-testo p {
    font-family: 'Cormorant Garamond', serif; /* stile istituzionale */
    font-size: 17px;                          /* più piccolo ma elegante */
    font-style: italic;                       /* corsivo */
    color: var(--bianco);                     /* ripristina bianco */
    letter-spacing: 1px;                      /* eleganza */
    line-height: 1.55;
    margin: 0;
    padding: 0;
    max-width: 600px;
}

/* ============================================
   FOOTER
============================================ */

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 18px 0 22px 0;
    text-align: center;
}

.footer-line {
    width: 86%;
    max-width: 960px;
    height: 1px;
    background: rgba(201,168,106,0.45);
    margin: 0 auto 4px auto;
}

.footer-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 12px;
    color: var(--oro);
    letter-spacing: 1.8px;
}

/* ============================================
   WHATSAPP FISSO
============================================ */

.whatsapp-floating {
    position: fixed;
    bottom: 20px;
    right: 90px;
    z-index: 5000;
}

.whatsapp-floating-icon {
    width: 72px;
    height: 72px;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.whatsapp-floating:hover .whatsapp-floating-icon {
    transform: scale(1.06);
    filter: drop-shadow(0 0 8px rgba(201,168,106,0.55));
}

/* ============================================
   FIX SPAZI VUOTI E SCROLLBAR
============================================ */

.pagina-competenze .page-wrapper,
.pagina-articoli .page-wrapper {
    padding-bottom: 0 !important;
}

.pagina-competenze,
.pagina-articoli {
    overflow-y: hidden;
}

.pagina-articoli .hero-internal {
    padding-bottom: 20px !important;
}

/* ============================================
   NASCONDI HAMBURGER SU DESKTOP (FIX DEFINITIVO)
============================================ */

#hamburger,
#mobileMenu {
    display: none;
}

/* ============================================
   MENU HAMBURGER — MOBILE ELEGANTE (DEFINITIVO)
============================================ */

@media (max-width: 880px) {

    /* Nasconde il menu desktop */
    .menu {
        display: none;
    }

    /* ICONA HAMBURGER */
    #hamburger {
        display: flex;
        position: absolute;
        top: 28px;
        right: 40px;
        width: 34px;
        height: 26px;
        cursor: pointer;
        z-index: 9999; /* sempre sopra tutto */
        flex-direction: column;
        justify-content: space-between;
    }

    #hamburger span {
        display: block;
        height: 3px;
        background: var(--oro);
        border-radius: 2px;
        transition: all 0.35s ease;
    }

    /* MENU MOBILE OVERLAY */
    #mobileMenu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: rgba(10, 26, 47, 0.97);
        box-shadow: -4px 0 18px rgba(0,0,0,0.45);
        padding: 80px 40px;
        flex-direction: column;
        gap: 28px;
        transition: right 0.45s ease;
        z-index: 9998; /* subito sotto l’hamburger */
    }

    #mobileMenu.open {
        right: 0;
    }

    /* LINK MENU MOBILE */
    #mobileMenu a {
        color: var(--oro);
        font-family: 'Cormorant Garamond', serif;
        font-size: 22px;
        letter-spacing: 2px;
        text-decoration: none;
        position: relative;
        transition: color 0.35s ease;
    }

    #mobileMenu a::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0%;
        height: 1px;
        background: var(--oro);
        transition: width 0.45s ease;
    }

    #mobileMenu a:hover {
        color: var(--oro-chiaro);
    }

    #mobileMenu a:hover::after {
        width: 100%;
    }

    /* BOTTONE CHIUSURA (X) */
    #mobileClose {
        position: absolute;
        top: 28px;
        right: 32px;
        font-size: 34px;
        color: var(--oro);
        cursor: pointer;
        z-index: 10000; /* sopra hamburger e menu */
    }

    /* Nasconde l’hamburger quando il menu è aperto */
    #mobileMenu.open ~ #hamburger {
        display: none !important;
    }

    /* ADATTAMENTI INTERNI */
    .profilo-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        margin-bottom: 40px;
        position: relative;
        z-index: 1; /* evita sovrapposizioni con il menu */
    }

    .riquadro-foto {
        width: 260px;
        height: 330px;
    }

    .bio-testo {
        font-size: 18px;
        padding-bottom: 20px;
    }

    .competenze-elenco {
        grid-template-columns: 1fr;
        row-gap: 10px;
        width: 86%;
    }

    .hero-internal {
        padding-top: 110px;
        padding-bottom: 40px;
    }

    .whatsapp-floating {
        right: 20px;
    }
}