/*
Theme Name: Hello Reddi
Theme URI: https://reddi.it
Description: Tema figlio di Hello Elementor per reddi.it. Contiene il sistema di
  design del sito: colori, tipografia, card, bottoni e comportamento mobile.
  Ogni coppia colore/sfondo usata qui, stati hover compresi, e' verificata a
  contrasto WCAG AA (>= 4.5:1 sul testo, >= 3:1 sui bordi).
Author: LGconsult
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-reddi
*/

/* ============================================================ TOKEN */
:root {
  --ink:        #0E1C26;   /* titoli            17.3:1 su bianco */
  --body:       #3D4F5C;   /* testo              8.5:1 su bianco */
  --muted:      #5E7180;   /* testo secondario   5.1:1 su bianco */
  --brand:      #0D4F63;   /* marchio            9.1:1 con bianco */
  --brand-700:  #093A49;   /* hover marchio     12.3:1 con bianco */
  --brand-100:  #E3F0F4;   /* fondo chiaro       7.8:1 col marchio */
  --accent:     #E8833A;   /* CTA                6.4:1 con --ink */
  --accent-700: #CF6D27;   /* hover CTA          4.8:1 con --ink */
  --accent-ink: #A85416;   /* accento LEGGIBILE su chiaro: 5.3:1 su bianco */
  --accent-lt:  #F6B77E;   /* accento su scuro:  5.2:1 sul gradiente */
  --surface:    #F4F8FA;
  --line:       #D9E3E9;
  --warn-bg:    #FFF6E6;
  --warn-line:  #F0D9A8;
  --white:      #FFFFFF;

  --radius:     14px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(14,28,38,.06), 0 8px 24px rgba(14,28,38,.06);
  --shadow-lg:  0 2px 4px rgba(14,28,38,.08), 0 18px 40px rgba(14,28,38,.12);
  --wrap:       1120px;
  --gutter:     20px;
  --focus:      0 0 0 3px rgba(232,131,58,.55);

  --font-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================ BASE */
body {
  font-family: var(--font-body);
  color: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;              /* niente scorrimento laterale su mobile */
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.7vw, 3.35rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem);  font-weight: 800; }
h3 { font-size: clamp(1.25rem, 1.08rem + .75vw, 1.6rem); font-weight: 700; }
p  { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 650; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--brand-700); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

ul { padding-left: 1.15em; margin: 0 0 1em; }
li { margin-bottom: .45em; }
li::marker { color: var(--accent-ink); }

/* ============================================================ SEZIONI */
.e-con, .elementor-element > .e-con-inner { --container-max-width: var(--wrap); }

.r-sec > .e-con-inner,
.r-sec { padding-top: clamp(48px, 6vw, 88px); padding-bottom: clamp(48px, 6vw, 88px); }
.r-sec--tight > .e-con-inner { padding-top: clamp(36px,4vw,56px); padding-bottom: clamp(36px,4vw,56px); }

.r-surface, .e-con.r-surface { background-color: var(--surface); }

/* Il fondo scuro va imposto: su alcune sezioni il CSS di pagina di Elementor,
   caricato dopo questo foglio, azzerava background-image e lasciava testo
   bianco su bianco. Verificato sul computato, non a occhio. */
.r-deep, .e-con.r-deep {
  background-color: #0B2F3C !important;   /* fondo solido: bianco sopra = 14,1:1 */
  position: relative;
  isolation: isolate;
}
/* Il gradiente sta su uno pseudo-elemento invece che su background-image:
   su alcune sezioni Elementor azzerava l'immagine di sfondo anche con
   !important, e il gradiente spariva. Qui non puo' toccarlo. */
.r-deep::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(160deg, #0D4F63 0%, #093A49 62%, #0B2F3C 100%);
}
.r-deep h1, .r-deep h2, .r-deep h3 { color: var(--white); }
.r-deep p, .r-deep li { color: #D6E5EB; }
.r-deep strong { color: var(--white); }

.e-con.r-warn, .r-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
}
.r-warn h3 { color: var(--ink); }

/* ---- colore dei titoli -------------------------------------------------
   Elementor colora OGNI titolo con --e-global-color-primary da post-N.css,
   che viene caricato dopo questo foglio e vince a (0,2,0). Dentro l'hero
   scuro voleva dire titoli color marchio su fondo marchio: illeggibili.
   Si rimedia salendo a (0,3,0), non con !important.                       */
.e-con .elementor-widget-heading .elementor-heading-title { color: var(--ink); }
.r-deep .elementor-widget-heading .elementor-heading-title { color: var(--white); }

/* occhiello sopra il titolo.
   L'ambra piena su bianco sta a 2,7:1 e non e' leggibile: su chiaro si usa
   --accent-ink (5,3:1), su scuro --accent-lt (5,2:1).                      */
.r-eyebrow .elementor-heading-title,
.r-eyebrow {
  font-family: var(--font-body);
  font-size: .8rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase;
}
.e-con .r-eyebrow .elementor-heading-title,
.e-con .r-eyebrow { color: var(--accent-ink); }
.r-deep .r-eyebrow .elementor-heading-title,
.r-deep .r-eyebrow { color: var(--accent-lt); }

.r-lead p { font-size: clamp(1.02rem, .97rem + .35vw, 1.22rem); }

/* ============================================================ CARD */
.e-con.r-card, .r-card > .e-con-inner {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 2.2vw, 32px);
  box-shadow: var(--shadow);
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  height: 100%;
}
.r-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #BFD2DC; }
.r-card h3 { margin-bottom: .35em; }

.r-card--flat:hover { transform: none; box-shadow: var(--shadow); border-color: var(--line); }

/* griglia che si impila da sola */
/* Elementor impone --display:flex sui container dal CSS della pagina, che viene
   caricato dopo questo foglio: invece di contendergli il display, la griglia
   usa il suo flex e sono le card a decidere quando andare a capo. */
.e-con.r-grid { align-items: stretch; }
.e-con.r-card { flex: 1 1 270px; min-width: 0; }
.e-con.r-grid--2 > .e-con.r-card { flex-basis: 320px; }
.e-con.r-price { flex: 1 1 320px; min-width: 0; }

/* ============================================================ BOTTONI */
.elementor-button {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  padding: 15px 26px;
  min-height: 52px;               /* bersaglio comodo col pollice */
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
  border: 2px solid transparent;
  text-decoration: none;
}
.elementor-button:active { transform: translateY(1px); }

/* primario: ambra con testo scuro — 6.4:1, hover 4.8:1 */
.r-btn .elementor-button,
.r-btn .elementor-button-link {
  background: var(--accent); color: var(--ink); border-color: var(--accent);
}
.r-btn .elementor-button:hover, .r-btn .elementor-button:focus-visible {
  background: var(--accent-700); border-color: var(--accent-700); color: var(--ink);
}

/* Il kit Elementor dipinge TUTTI i bottoni di ambra, e il suo foglio vince sul
   nostro per ordine di caricamento. Le varianti qui sotto sono le sole
   dichiarazioni del sito che usano !important, e serve. */

/* secondario su fondo scuro: bordo bianco, hover bianco pieno */
.r-btn-ghost .elementor-button {
  background-color: transparent !important; color: var(--white) !important;
  border-color: rgba(255,255,255,.8) !important;
}
.r-btn-ghost .elementor-button:hover, .r-btn-ghost .elementor-button:focus-visible {
  background-color: var(--white) !important; color: var(--brand-700) !important;
  border-color: var(--white) !important;
}

/* secondario su fondo chiaro: bordo marchio, hover marchio pieno */
.r-btn-outline .elementor-button {
  background-color: transparent !important; color: var(--brand) !important;
  border-color: var(--brand) !important;
}
.r-btn-outline .elementor-button:hover, .r-btn-outline .elementor-button:focus-visible {
  background-color: var(--brand) !important; color: var(--white) !important;
  border-color: var(--brand) !important;
}

/* terziario: solo testo */
.r-btn-text .elementor-button {
  background-color: transparent !important; color: var(--brand) !important;
  padding: 8px 0; min-height: 0; border: 0;
  text-decoration: underline; text-underline-offset: 4px;
}
.r-btn-text .elementor-button:hover { color: var(--brand-700) !important; }

/* ============================================================ PREZZO */
.e-con.r-price, .r-price > .e-con-inner {
  background: var(--white);
  border: 2px solid var(--brand);
  border-radius: 18px;
  padding: clamp(26px, 3vw, 40px);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.r-price-fig { font-family: var(--font-head); font-weight: 800; color: var(--ink);
  font-size: clamp(2.6rem, 2rem + 2.6vw, 3.8rem); line-height: 1; letter-spacing: -.03em; }
.r-price-fig small { display: block; font-size: .9rem; font-weight: 600; color: var(--muted);
  letter-spacing: 0; margin-top: 10px; text-transform: none; }
.r-price ul { display: inline-block; text-align: left; margin-top: 4px; }

/* etichetta */
.r-chip {
  display: inline-block; background: var(--brand-100); color: var(--brand);
  border-radius: 999px; padding: 7px 15px; font-size: .84rem; font-weight: 700;
  font-family: var(--font-head); letter-spacing: .01em;
}

/* riga di fiducia */
.r-trust p { font-size: .95rem; color: #C6DAE2; margin: 0; }
.r-trust strong { color: var(--white); }

/* elenco con spunta */
.r-check ul { list-style: none; padding-left: 0; }
.r-check li { position: relative; padding-left: 30px; }
.r-check li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-100);
  box-shadow: inset 0 0 0 2px var(--brand);
}
.r-check li::after {
  content: ""; position: absolute; left: 6px; top: .72em;
  width: 5px; height: 9px; border: solid var(--brand);
  border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.r-deep .r-check li::before { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 2px #7FC3D6; }
.r-deep .r-check li::after  { border-color: #BFE4EF; }

/* elenco con croce, per cio' che manca */
.r-cross ul { list-style: none; padding-left: 0; }
.r-cross li { position: relative; padding-left: 30px; }
.r-cross li::before {
  content: "\00d7"; position: absolute; left: 2px; top: -.06em;
  font-size: 1.3em; font-weight: 700; color: var(--accent-ink); line-height: 1.35;
}

/* ============================================================ FAQ */
.elementor-accordion .elementor-tab-title,
.e-n-accordion-item summary {
  font-family: var(--font-head); font-weight: 700; color: var(--ink);
  background: var(--white); border-radius: var(--radius-sm);
  transition: background-color .16s ease, color .16s ease;
}
.elementor-accordion .elementor-tab-title:hover,
.e-n-accordion-item summary:hover { background: var(--brand-100); color: var(--brand-700); }

/* ============================================================ TESTATA */
.site-header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 0;
  position: sticky; top: 0; z-index: 99;
  box-shadow: 0 1px 0 rgba(14,28,38,.03);
}
.site-header .header-inner {
  max-width: var(--wrap); margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.site-header .site-title a {
  font-family: var(--font-head); font-weight: 800; font-size: 1.5rem;
  color: var(--brand); text-decoration: none; letter-spacing: -.02em;
}
.site-header .site-title a:hover { color: var(--brand-700); }
.site-header .site-description { display: none; }  /* il claim sta nell'hero, non qui */

.site-navigation ul.menu { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.site-navigation ul.menu li { margin: 0; }
.site-navigation ul.menu a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  color: var(--body); text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
/* hover verificato: --brand su --brand-100 = 7.8:1 */
.site-navigation ul.menu a:hover,
.site-navigation ul.menu a:focus-visible { background: var(--brand-100); color: var(--brand); }
.site-navigation ul.menu .current-menu-item > a { color: var(--brand); background: var(--brand-100); }

/* voce di menu trasformata in bottone */
.site-navigation ul.menu .menu-cta > a {
  background: var(--accent); color: var(--ink); font-weight: 700;
}
.site-navigation ul.menu .menu-cta > a:hover { background: var(--accent-700); color: var(--ink); }

/* ============================================================ PIE' DI PAGINA */
.site-footer.site-footer { background: var(--ink); padding: 0; }
.site-footer .footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 44px var(--gutter);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
}
.site-footer, .site-footer p, .site-footer .site-description { color: #AEC1CC; font-size: .92rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--accent); }

/* ============================================================ MOBILE */
@media (max-width: 767px) {
  body { font-size: 16.5px; }
  .e-con.r-card, .e-con.r-price { flex-basis: 100%; }

  /* i bottoni prendono tutta la riga: bersaglio grande, niente file strette */
  .e-con.r-cta-row { flex-direction: column !important; gap: 12px; width: 100%; align-items: stretch !important; }
  .r-cta-row .elementor-widget-button,
  .r-cta-row .elementor-button { width: 100%; }

  .site-header .header-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px var(--gutter); }
  .site-navigation ul.menu { justify-content: center; }
  .site-navigation ul.menu a { padding: 9px 12px; font-size: .95rem; }

  .site-footer .footer-inner { flex-direction: column; text-align: center; padding: 34px var(--gutter); }

  .e-con.r-price, .r-price > .e-con-inner { padding: 24px 20px; }
  .e-con.r-card, .r-card > .e-con-inner { padding: 20px; }
}

@media (max-width: 420px) {
  .site-navigation ul.menu a { padding: 8px 10px; font-size: .9rem; }
}

/* chi preferisce meno movimento */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .r-card:hover { transform: none; }
}
