/* ==========================================================================
   SISTEMA CENTRALE CSS - STUDIO NOTARILE COLOSIMO
   Core, Home, Approfondimenti, Header, Navigazione & Team
   (Versione Ottimizzata Mobile & Desktop)
   ========================================================================== */

/* ==========================================================================
   1. BASE TARGA ISTITUZIONALE GLOBALE & HERO
   ========================================================================== */
.targa-studio {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 50px;
    background: #ffffff !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
    border-top: 5px solid #c5a059 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    position: relative;
    -webkit-transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    -moz-transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform, box-shadow;
    transform: translateZ(0);
}

.targa-studio:hover {
    transform: scale(1.015) !important;
    box-shadow: 0 25px 50px rgba(26, 42, 64, 0.14) !important;
}

.targa-statica:hover {
    transform: none !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important;
}

.targa-studio::after {
    content: "";
    display: block;
    width: 100%;
    height: 54px;
    margin-top: auto;
    background: linear-gradient(165deg, #0f1b29 0%, #1e304a 25%, #122033 50%, #253d5e 75%, #0b131f 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes respiroSfondo {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.sfondo-hero {
    animation: respiroSfondo 20s ease-in-out infinite alternate;
}

/* --- Simmetria e Hover Bottoni Hero --- */
.hero-studio .wp-block-button__link,
.hero-studio a {
    min-width: 250px !important; 
    text-align: center !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.hero-studio a[href="/contatti/"]:hover,
.hero-studio a[href="#attivita"]:hover {
    background: #ffffff !important;
    color: #1a2a40 !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
}

/* Mobile Fix: Bottoni Hero */
@media (max-width: 768px) {
    .hero-studio .wp-block-buttons {
        flex-direction: column !important;
        width: 100%;
    }
    .hero-studio .wp-block-button__link,
    .hero-studio a {
        min-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   2. AREE DI ATTIVITA' E METRICHE (HOME)
   ========================================================================== */
.sezione-attivita {
    padding: 50px 20px;
    background-color: #eef1f6; 
}

.titolo-sezione {
    text-align: center;
    margin-bottom: 70px;
}

.titolo-sezione h2 {
    color: #1a2a40;
    font-size: clamp(32px, 4vw, 42px);
    font-family: 'Playfair Display', serif;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.linea-oro {
    width: 60px;
    height: 3px;
    background: #c5a059;
    margin: 0 auto;
}

.griglia-attivita {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px; 
    max-width: 950px; 
    margin: 0 auto;
}

.card-attivita {
    background: #ffffff;
    padding: 35px 30px; 
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border-top: 4px solid #1a2a40;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card-attivita:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-top-color: #c5a059; 
}

.card-attivita h3 {
    color: #1a2a40;
    font-family: 'Playfair Display', serif;
    font-size: 20px; 
    margin: 20px 0 10px 0;
    font-weight: bold;
}

.card-attivita p {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
    margin-bottom: 25px;
    flex-grow: 1; 
}

.link-attivita {
    display: none !important; /* Nascondiglio temporaneo */
}

@media (max-width: 850px) {
    .griglia-attivita { grid-template-columns: 1fr; } 
}

/* --- Metriche (Il Monolite Navy) --- */
.sezione-metriche {
    background-color: #1a2a40; 
    padding: 30px 20px; 
    position: relative;
}

.sezione-metriche::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #c5a059;
}

.griglia-metriche {
    display: flex; 
    flex-wrap: wrap;
    justify-content: center; 
    gap: 60px; 
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.numero-metrica {
    font-size: clamp(34px, 4vw, 48px); 
    font-weight: bold;
    color: #c5a059;
    font-family: 'Playfair Display', serif;
    margin-bottom: 10px;
    line-height: 1;
}

.blocco-metrica { padding: 20px; }

.testo-metrica {
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    opacity: 0.9;
}

/* Mobile Fix: Gap Metriche */
@media (max-width: 600px) {
    .griglia-metriche { gap: 20px; }
    .blocco-metrica { padding: 10px; }
}

/* ==========================================================================
   3. OVERRIDES STRUTTURALI E HEADER STICKY
   ========================================================================== */
.forza-schermo-intero {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}

html, body, .wp-site-blocks, #page, #content {
    overflow-x: clip !important; 
    overflow-y: visible !important; 
}

html { scroll-behavior: smooth !important; }

header, .site-header, #masthead {
    width: 100% !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    border-bottom: none !important; 
    background-color: transparent !important; 
    transition: all 0.4s ease-in-out !important;
}

body.admin-bar header, 
body.admin-bar .site-header, 
body.admin-bar #masthead {
    top: 32px !important;
}

header img, .site-header img, #masthead img, .custom-logo {
    max-height: 80px; 
    width: auto !important;
    transition: max-height 0.4s ease-in-out !important; 
}

.main-header-bar, .site-header-inner, .inside-header, .ast-main-header-bar {
    transition: all 0.4s ease-in-out !important;
}

/* --- Stato Header Compresso --- */
.header-compresso {
    padding-top: 0 !important;    
    padding-bottom: 0 !important; 
    background-color: transparent !important; 
    box-shadow: none !important;  
}

.header-compresso .main-header-bar,
.header-compresso .site-header-inner,
.header-compresso .inside-header,
.header-compresso .ast-main-header-bar {
    min-height: 30px !important; 
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.header-compresso img, 
.header-compresso .custom-logo {
    max-height: 35px !important; 
}

.header-compresso .main-navigation a,
.header-compresso .main-header-menu a,
.header-compresso .menu-link,
.header-compresso li {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 30px !important; 
}

.header-compresso .site-branding,
.header-compresso .site-logo,
.header-compresso .custom-logo-link {
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important; 
    display: flex !important;
    align-items: center !important;
    min-height: 0 !important;
}

/* ==========================================================================
   4. RICERCA HEADER PRO (Effetto Espansione)
   ========================================================================== */
.header-search .wp-block-search__inside-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50px !important;
    background-color: rgba(255, 255, 255, 0.1) !important; 
    width: 180px; 
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

.header-search input.wp-block-search__input {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding-left: 20px !important;
    transition: color 0.4s ease;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.header-search input.wp-block-search__input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.header-search .wp-block-search__button {
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    transition: color 0.4s ease;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.header-search .wp-block-search__button svg {
    fill: currentColor !important;
}

/* Stato Attivo Ricerca */
.header-search .wp-block-search__inside-wrapper:focus-within {
    width: 250px; 
    background-color: #ffffff !important; 
    border-color: #c5a059 !important; 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); 
}

.header-search .wp-block-search__inside-wrapper:focus-within input.wp-block-search__input {
    color: #1a2a40 !important; 
}

.header-search .wp-block-search__inside-wrapper:focus-within input.wp-block-search__input::placeholder {
    color: #888888 !important;
}

.header-search .wp-block-search__inside-wrapper:focus-within .wp-block-search__button {
    color: #1a2a40 !important; 
}

/* Mobile Fix: Ricerca limitata */
@media (max-width: 600px) {
    .header-search .wp-block-search__inside-wrapper { width: 140px; }
    .header-search .wp-block-search__inside-wrapper:focus-within { width: 200px; }
}

/* ==========================================================================
   5. ARCHIVIO APPROFONDIMENTI (Design Editoriale Avanzato)
   ========================================================================== */
.archivio-notarile .wp-block-post {
    border-bottom: 1px solid #eef2f5;
    padding: 20px 25px !important; 
    margin: 0 0 10px 0 !important; 
    border-radius: 6px;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

.archivio-notarile .wp-block-post:hover {
    background-color: #f8fafc; 
    padding-left: 35px !important; 
    border-left: 3px solid #c5a059; 
}

.archivio-notarile .wp-block-post-title {
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-size: 2.1rem !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    margin: 10px 0 15px 0 !important;
}

.archivio-notarile .wp-block-post-title a {
    color: #1a2a40 !important; 
    text-decoration: none !important;
    transition: color 0.3s ease;
    display: inline-block;
}

.archivio-notarile .wp-block-post:hover .wp-block-post-title a {
    color: #0f1b29 !important; 
}

.archivio-notarile .wp-block-post-title a::after {
    content: ' →';
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
    display: inline-block;
    color: #c5a059;
}

.archivio-notarile .wp-block-post:hover .wp-block-post-title a::after {
    opacity: 1;
    transform: translateX(5px);
}

.archivio-notarile .wp-block-post-date {
    font-size: 0.78rem !important;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 !important;
}

.archivio-notarile .wp-block-post-excerpt {
    color: #475569;
    line-height: 1.7;
    font-size: 1.05rem;
    max-width: 680px; 
}

/* --- Sidebar Notarile --- */
.sidebar-notarile {
    border-left: none !important;
    padding: 35px !important;
    background-color: #f8fafc; 
    border-radius: 8px;
    position: sticky;
    top: 100px; 
    align-self: start; 
}

.sidebar-notarile h2, 
.sidebar-notarile h3 {
    font-size: 0.9rem !important;
    color: #1a2a40; 
    border-bottom: 2px solid #c5a059; 
    padding-bottom: 8px;
    width: 100%;
    display: block;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.sidebar-notarile ul {
    list-style: none !important;
    padding-left: 0;
}

.sidebar-notarile li {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-notarile li:last-child {
    border-bottom: none;
}

.sidebar-notarile a {
    color: #555555;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-notarile a:hover {
    color: #c5a059; 
    font-weight: bold;
}

/* Mobile Fix: Approfondimenti (Spaziature e Font) */
@media (max-width: 800px) {
    .sidebar-notarile {
        padding-left: 0;
        margin-top: 50px;
        background-color: transparent;
        position: static; 
    }
    .archivio-notarile .wp-block-post {
        padding: 20px 15px !important;
    }
    .archivio-notarile .wp-block-post:hover {
        padding-left: 20px !important; 
    }
    .archivio-notarile .wp-block-post-title {
        font-size: 1.6rem !important; 
    }
}

/* ==========================================================================
   6. TEAM E FOTO PROFILO (Effetto Tondo e Luce)
   ========================================================================== */
/* ==========================================================================
   6. TEAM E FOTO PROFILO (Fix per div con background-image)
   ========================================================================== */

/* Applica il cerchio e l'ombra al contenitore principale */
.contenitore-shining {
    border-radius: 50% !important;
    overflow: hidden !important; /* FONDAMENTALE: Taglia la foto quadrata interna a forma di cerchio */
    
    /* Overlay di luce (bordo bianco interno sfumato + ombra esterna) */
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.15), 
        inset 0 0 0 8px rgba(255, 255, 255, 0.4) !important;
        
    transition: all 0.4s ease !important;
    position: relative;
}

/* Forza la rotondità anche sul div interno che contiene l'immagine di sfondo */
.contenitore-shining > div {
    border-radius: 50% !important;
}

/* Effetto al passaggio del mouse sull'intera targa (leggera illuminazione extra della foto) */
.targa-studio:hover .contenitore-shining {
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2), 
        inset 0 0 0 4px rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.03);
}