/*
 Theme Name:   Hello Elementor Child — Chiara Di Iullo
 Theme URI:    https://chiaradiiullonutrizionista.it
 Description:  Child theme per il sito Chiara Di Iullo Nutrizionista
 Author:       Studio Sombrero
 Template:     hello-elementor
 Version:      1.2.0
 Text Domain:  hello-elementor-child
*/

/* === Palette Chiara Di Iullo === */
:root {
    --cdi-navy: #1A3B6B;
    --cdi-navy-dark: #0F2647;
    --cdi-azure: #0E84C6;
    --cdi-cream: #F5F1EA;
    --cdi-warm: #FAF7F2;
    --cdi-stone: #E8E2D5;
    --cdi-ink: #2A2E35;
    --cdi-muted: #6B7280;
}

/* === Base === */
html, body {
    margin: 0;
    padding: 0;
    background: var(--cdi-warm);
}
body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--cdi-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: var(--cdi-navy);
    font-weight: 500;
    letter-spacing: -0.01em;
}

a {
    color: inherit;
    transition: color 0.3s ease;
}

::selection {
    background: var(--cdi-azure);
    color: var(--cdi-cream);
}

html {
    scroll-behavior: smooth;
}

/* === Elementor heading override === */
.elementor-widget-heading .elementor-heading-title {
    font-family: "Cormorant Garamond", Georgia, serif;
}

/* === Buttons === */
.elementor-button {
    border-radius: 2px;
    font-family: Inter, sans-serif;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.elementor-button:hover {
    letter-spacing: 0.11em;
    box-shadow: 0 10px 24px -10px rgba(14, 132, 198, 0.5);
}

/* === WPForms === */
.wpforms-container {
    font-family: Inter, sans-serif;
}
.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container textarea {
    background: var(--cdi-warm);
    border: 1px solid var(--cdi-stone);
    border-radius: 2px;
    font-family: Inter, sans-serif;
    color: var(--cdi-ink);
    padding: 12px 14px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}
.wpforms-container input:focus,
.wpforms-container textarea:focus {
    border-color: var(--cdi-azure);
    box-shadow: 0 0 0 3px rgba(14, 132, 198, 0.1);
    outline: none;
}
.wpforms-container .wpforms-submit {
    background-color: var(--cdi-navy);
    color: var(--cdi-cream);
    border: none;
    border-radius: 2px;
    font-family: Inter, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 16px 32px;
    transition: all 0.3s ease;
}
.wpforms-container .wpforms-submit:hover {
    background-color: var(--cdi-azure);
}

/* === Screen reader only labels — nascondi sempre === */
.elementor-screen-only,
.screen-reader-text,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* === Social icons === */
/* Header e footer (sfondi navy) */
.elementor-location-header .elementor-social-icon,
.elementor-location-footer .elementor-social-icon {
    background-color: rgba(245, 241, 234, 0.08);
    color: #F5F1EA;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 3px;
    border: 1px solid rgba(245, 241, 234, 0.2);
    transition: all 0.3s ease;
}
.elementor-location-header .elementor-social-icon:hover,
.elementor-location-footer .elementor-social-icon:hover {
    background-color: var(--cdi-cream);
    color: var(--cdi-navy);
    border-color: var(--cdi-cream);
}
.elementor-location-header .elementor-social-icon svg,
.elementor-location-footer .elementor-social-icon svg {
    width: 13px;
    height: 13px;
    fill: currentColor;
}

/* === Icon-list — limita dimensioni icone (anti-explosion) === */
.elementor-icon-list-icon svg {
    max-width: 24px;
    max-height: 24px;
    flex-shrink: 0;
}

/* Icone dentro icon-box ragionevoli */
.elementor-widget-icon-box .elementor-icon svg {
    max-width: 64px;
    max-height: 64px;
}

/* === HERO SLIDER === */
.cdi-hero-slider .swiper-slide-bg,
.cdi-hero-slider .elementor-slide-bg {
    background-color: var(--cdi-navy-dark);
    background-size: cover !important;
    background-position: center center !important;
}
/* Overlay scuro forte sul lato sinistro per leggibilità */
.cdi-hero-slider .elementor-background-overlay {
    background: linear-gradient(100deg, rgba(15,38,71,0.85) 0%, rgba(15,38,71,0.55) 50%, rgba(15,38,71,0.25) 100%) !important;
}

/* Contenuti sopra l'overlay */
.cdi-hero-slider .elementor-slide-content,
.cdi-hero-slider .swiper-slide-contents,
.cdi-hero-slider .swiper-slide-inner {
    position: relative;
    z-index: 2;
}

/* Text shadow per leggibilità extra */
.cdi-hero-slider .elementor-slide-heading,
.cdi-hero-slider .elementor-slide-description {
    text-shadow: 0 2px 16px rgba(15,38,71,0.6);
}

/* Heading em italic blu chiaro */
.cdi-hero-slider .elementor-slide-heading em {
    font-style: italic;
    color: #A8D4EE;
}

/* Sub italic Cormorant */
.cdi-hero-sub {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 24px;
    line-height: 1.4;
    color: rgba(245,241,234,0.95);
}
@media (max-width: 767px) {
    .cdi-hero-sub { font-size: 18px; }
}

/* Slider arrows */
.cdi-hero-slider .elementor-swiper-button {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(245,241,234,0.5) !important;
    background: transparent !important;
    color: var(--cdi-cream) !important;
    top: auto !important;
    bottom: 32px !important;
    transform: none !important;
}
.cdi-hero-slider .elementor-swiper-button:hover {
    background: var(--cdi-cream) !important;
    color: var(--cdi-navy) !important;
}
.cdi-hero-slider .elementor-swiper-button-prev {
    left: auto !important;
    right: 88px !important;
}
.cdi-hero-slider .elementor-swiper-button-next {
    right: 32px !important;
}

/* === Scroll to top === */
#cdi-scroll-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 48px;
    height: 48px;
    background-color: var(--cdi-navy);
    color: var(--cdi-cream);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px -8px rgba(26, 59, 107, 0.45);
    transition: all 0.3s ease;
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
}
#cdi-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#cdi-scroll-top:hover {
    background-color: var(--cdi-azure);
}
@media (max-width: 767px) {
    #cdi-scroll-top {
        bottom: 18px;
        right: 18px;
        width: 44px;
        height: 44px;
    }
}

/* === Card hover === */
.cdi-card {
    transition: all 0.3s ease;
}
.cdi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(30, 58, 95, 0.15);
}

/* ==========================================================
   NAV MENU FIX — desktop vs mobile (toggle hamburger)
   ========================================================== */

/* Desktop > 1024px: solo menu orizzontale, hamburger nascosto */
@media (min-width: 1025px) {
    .elementor-nav-menu--main {
        display: flex !important;
    }
    .elementor-nav-menu--dropdown {
        display: none !important;
    }
    .elementor-menu-toggle {
        display: none !important;
    }
}

/* Mobile/tablet ≤ 1024px: solo hamburger, menu orizzontale nascosto */
@media (max-width: 1024px) {
    .elementor-nav-menu--main {
        display: none !important;
    }
    .elementor-menu-toggle {
        display: inline-flex !important;
        background: var(--cdi-navy) !important;
        color: #fff !important;
        padding: 10px 14px !important;
        border-radius: 4px !important;
    }
    /* Dropdown nascosto di default, mostrato solo se menu attivo */
    nav.elementor-nav-menu--dropdown {
        display: none;
    }
    nav.elementor-nav-menu--dropdown.elementor-active,
    .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu--dropdown {
        display: block !important;
    }
}

/* Menu orizzontale: rimuovi default UL margin/padding */
.elementor-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.elementor-nav-menu li {
    list-style: none;
}
@media (min-width: 1025px) {
    .elementor-nav-menu--main .elementor-nav-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 4px;
    }
}

/* ==========================================================
   HERO SLIDER — overlay scuro + testi visibili sopra
   ========================================================== */

/* Slide parent */
.cdi-hero-slider .swiper-slide {
    position: relative;
    overflow: hidden;
}

/* Lo swiper-slide-bg è uno strato sotto, gli applichiamo un filter per scurire l'immagine */
.cdi-hero-slider .swiper-slide-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Aggiungiamo un overlay come pseudo-elemento dello SLIDE (non del bg) */
.cdi-hero-slider .swiper-slide > .swiper-slide-bg + a::before,
.cdi-hero-slider .swiper-slide-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(15,38,71,0.85) 0%, rgba(15,38,71,0.55) 50%, rgba(15,38,71,0.25) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Lo swiper-slide-inner contiene i contenuti — deve stare sopra overlay */
.cdi-hero-slider .swiper-slide-inner {
    position: relative;
    z-index: 3;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    padding: 0 80px;
    text-decoration: none;
}
@media (max-width: 767px) {
    .cdi-hero-slider .swiper-slide-inner {
        padding: 0 20px;
    }
}

/* Contents wrapper */
.cdi-hero-slider .swiper-slide-contents {
    position: relative;
    z-index: 3;
    max-width: 720px;
}

/* Testi: chiari e visibili */
.cdi-hero-slider .elementor-slide-heading {
    color: #F5F1EA !important;
    font-family: "Cormorant Garamond", serif !important;
    font-size: 84px !important;
    line-height: 1.02 !important;
    font-weight: 500 !important;
    margin: 0 0 24px !important;
    text-shadow: 0 2px 16px rgba(15,38,71,0.5);
}
.cdi-hero-slider .elementor-slide-heading em {
    font-style: italic;
    color: #A8D4EE !important;
    display: block;
}
.cdi-hero-slider .elementor-slide-description {
    color: rgba(245,241,234,0.92) !important;
    font-family: Inter, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-bottom: 40px !important;
    text-shadow: 0 1px 8px rgba(15,38,71,0.4);
    max-width: 560px;
}
.cdi-hero-slider .elementor-slide-description * {
    color: inherit !important;
}
.cdi-hero-slider .cdi-hero-sub {
    font-family: "Cormorant Garamond", serif !important;
    font-style: italic;
    font-size: 24px !important;
    line-height: 1.4 !important;
    color: rgba(245,241,234,0.95) !important;
    display: block;
    margin-bottom: 20px;
}

/* Bottoni del slider */
.cdi-hero-slider .elementor-slide-button {
    display: inline-block;
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .cdi-hero-slider .elementor-slide-heading { font-size: 56px !important; }
    .cdi-hero-slider .cdi-hero-sub { font-size: 20px !important; }
}
@media (max-width: 767px) {
    .cdi-hero-slider .elementor-slide-heading { font-size: 40px !important; }
    .cdi-hero-slider .cdi-hero-sub { font-size: 18px !important; }
    .cdi-hero-slider .elementor-slide-description { font-size: 14px !important; }
}

/* ===== Header sticky (topbar + menu) — 2026-07-29 =====
   Da tablet in su l'intero header resta fisso in alto durante lo scroll.
   Su mobile (<768px) resta fisso il solo menu, gestito da Elementor
   (sezione h1 del template Header CDI, Effetti di movimento > Fissato, solo Mobile). */
@media (min-width: 768px) {
    header.elementor-location-header {
        position: sticky;
        top: 0;
        z-index: 99;
    }
}

/* ===== Header compatto tablet/mobile — 2026-07-29 =====
   Fino a 1024px le 3 colonne dell'header stanno su una riga:
   logo a sinistra, Contattami al centro, hamburger a destra.
   Le larghezze colonna responsive sono nei settings Elementor
   (template Header CDI, colonne h2/h4/h6); qui solo l'ordine visivo. */
@media (max-width: 1024px) {
    .elementor-element-h1 .elementor-element-h2 { order: 1; } /* logo */
    .elementor-element-h1 .elementor-element-h6 { order: 2; } /* Contattami */
    .elementor-element-h1 .elementor-element-h4 { order: 3; } /* menu/hamburger */
}


/* ==========================================================
   PALETTE C — chiaro, malva medio + terracotta — 2026-08-25
   Scelta della cliente sui mockup del 17/08. Override in coda:
   ridefinisce i token :root e le poche regole che usavano il navy
   come sfondo. I nomi storici (--cdi-navy, --cdi-azure, ...)
   restano validi ma prendono i valori della palette C.
   ========================================================== */
:root {
    --cdi-ink-dark: #3D3438;        /* titoli e testi scuri */
    --cdi-mauve: #7D6B7A;           /* sezioni scure, footer, topbar */
    --cdi-mauve-deep: #5E4F5B;
    --cdi-terracotta: #C0664B;      /* bottoni e accenti */
    --cdi-terracotta-deep: #A5563E; /* hover bottoni */
    --cdi-peach: #F2C6B2;
    --cdi-navy: #3D3438;
    --cdi-navy-dark: #5E4F5B;
    --cdi-azure: #C0664B;
    --cdi-ink: #3D3438;
}
.elementor-button:hover {
    box-shadow: 0 10px 24px -10px rgba(192, 102, 75, 0.45);
}
.wpforms-container input:focus,
.wpforms-container textarea:focus {
    box-shadow: 0 0 0 3px rgba(192, 102, 75, 0.12);
}
.elementor-location-header .elementor-social-icon:hover,
.elementor-location-footer .elementor-social-icon:hover {
    color: var(--cdi-mauve);
}
#cdi-scroll-top {
    background-color: var(--cdi-terracotta);
    box-shadow: 0 10px 20px -8px rgba(192, 102, 75, 0.45);
}
#cdi-scroll-top:hover {
    background-color: var(--cdi-terracotta-deep);
}
.cdi-card:hover {
    box-shadow: 0 20px 40px -20px rgba(125, 107, 122, 0.28);
}
@media (max-width: 1024px) {
    .elementor-menu-toggle {
        background: var(--cdi-terracotta) !important;
    }
}

/* ===== Leggibilita hero/CTA: piccola ombra nel testo - 2026-09-10 =====
   Scelta provino 3: velo invariato (0.82/0.85), ombra morbida sui testi
   delle 3 sezioni con texture carta (hero Home, CTA Home, CTA Chi sono). */
.elementor-element-cdba001 .elementor-heading-title,
.elementor-element-cdba001 .elementor-widget-text-editor,
.elementor-element-fcta1 .elementor-heading-title,
.elementor-element-fcta1 .elementor-widget-text-editor,
.elementor-element-d42aaf6 .elementor-heading-title,
.elementor-element-d42aaf6 .elementor-widget-text-editor {
    text-shadow: 0 1px 2px rgba(61,52,56,.4), 0 2px 10px rgba(61,52,56,.35);
}

/* ===== Ombra testo hero/CTA: intensita rivista (tra B e C) - 2026-09-10 =====
   Override della regola ombra precedente: stessa specificita, vince l ultima. */
.elementor-element-cdba001 .elementor-heading-title,
.elementor-element-cdba001 .elementor-widget-text-editor,
.elementor-element-fcta1 .elementor-heading-title,
.elementor-element-fcta1 .elementor-widget-text-editor,
.elementor-element-d42aaf6 .elementor-heading-title,
.elementor-element-d42aaf6 .elementor-widget-text-editor {
    text-shadow: 0 2px 7px rgba(0,0,0,.55), 0 3px 20px rgba(0,0,0,.42);
}

/* Banner cookie: il link alla policy e gia nel testo (2026-11-02) */
.cmplz-cookiebanner .cmplz-documents{display:none !important;}
