/* ══════════════════════════════════════════════
   EqualRisk — Sito pubblico (equalrisk.it)
   Foglio di stile dedicato, separato da style.css
   (quello resta uso esclusivo dell'area riservata).
   Usa le variabili --er-* già definite in style.css.
   ══════════════════════════════════════════════ */

body { background: white; }

/* ── Navbar ── */
.pub-navbar {
    background: white; border-bottom: 1px solid #e9ecef;
    padding: 14px 0; position: sticky; top: 0; z-index: 500;
}
.pub-navbar .brand { display: flex; align-items: center; text-decoration: none; }
.pub-navbar .brand img { height: 34px; width: auto; display: block; }
.pub-navbar .btn { white-space: nowrap; }
@media (max-width: 400px) {
    .pub-navbar .btn { padding-left: .6rem; padding-right: .6rem; font-size: .82rem; }
}
@media (min-width: 620px) {
    .pub-navbar .brand img { height: 40px; }
}

.pub-nav-link {
    color: #495057; text-decoration: none; font-weight: 500;
    padding: 8px 12px; font-size: .94rem; border-radius: 6px; white-space: nowrap;
}
/* Con la voce "Blog" (15/09/2026) il menu desktop è a sei voci: tra 861 e
   1000 px "Come funziona" andava a capo - spaziatura ridotta in quella fascia. */
@media (max-width: 1000px) {
    .pub-nav-link { padding: 8px 7px; font-size: .9rem; }
}
.pub-nav-link:hover { color: var(--er-primary); background: var(--er-bg); }
.pub-nav-link.active { color: var(--er-primary); font-weight: 700; }

/* Menu mobile: <details>/<summary> nativo, funziona senza JS */
.pub-nav-mobile { display: none; }
.pub-nav-mobile summary {
    list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 6px;
    border: 1.5px solid #dee2e6; color: var(--er-primary);
}
.pub-nav-mobile summary::-webkit-details-marker { display: none; }
.pub-nav-mobile[open] summary { background: var(--er-bg); }
.pub-nav-mobile .pub-nav-mobile-panel {
    position: fixed; left: 0; right: 0; top: 65px;
    background: white; border-bottom: 1px solid #e9ecef;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    padding: 8px 20px 16px;
    max-height: calc(100vh - 65px);
    overflow-y: auto;
}
.pub-nav-mobile .pub-nav-mobile-panel a {
    display: block; padding: 10px 4px; color: #212529; text-decoration: none;
    border-bottom: 1px solid #f1f3f5; font-weight: 500;
}
.pub-nav-desktop { display: flex; }
@media (max-width: 860px) {
    .pub-nav-desktop { display: none; }
    .pub-nav-mobile { display: block; position: relative; }
}

/* ── Hero generico (pagine interne) ── */
.pub-hero { background: linear-gradient(180deg, var(--er-bg) 0%, white 100%); padding: 56px 0; }
.pub-hero h1 { text-wrap: balance; }

/* ── Bottoni ── */
.btn-er-primary { background: var(--er-accent); border-color: var(--er-accent); color: white; }
.btn-er-primary:hover { background: var(--er-accent-lt); border-color: var(--er-accent-lt); color: white; }
.btn-er-outline { border: 1.5px solid var(--er-primary); color: var(--er-primary); font-weight: 500; }
.btn-er-outline:hover { background: var(--er-primary); color: white; }
/* Pulsante pieno blu navy (stessa palette dei titoli), stesse proporzioni di
   .btn-er-primary (style.css): per le scelte secondarie che non sono un CTA
   verde ma devono restare pulsanti del sito, non Bootstrap generico. */
.btn-er-navy {
    background: var(--er-primary); color: white; border: none; border-radius: 8px;
    padding: 7px 18px; font-weight: 500; font-size: .88rem;
    transition: background .15s, box-shadow .15s;
}
.btn-er-navy:hover, .btn-er-navy:focus { background: var(--er-primary-lt); color: white; box-shadow: 0 2px 8px rgba(26,58,92,.3); }

/* style.css (area riservata) definisce .btn-er-primary con padding/font
   compatti da toolbar: qui li ripristiniamo alle proporzioni Bootstrap
   .btn-lg, altrimenti il testo dei CTA hero risulta piccolo e non centrato. */
.btn-er-primary.btn-lg, .btn-er-outline.btn-lg {
    padding: .5rem 1rem;
    font-size: 1.25rem;
}

/* ── Carosello hero Home ── */
.hero-carousel { position: relative; height: 480px; overflow: hidden; border-radius: 16px; background: var(--er-bg); }
@media (max-width: 767px) { .hero-carousel { height: auto; min-height: 560px; } }
.hero-slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity .5s ease;
    display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px;
    padding: 40px 48px;
}
@media (max-width: 767px) { .hero-slide { grid-template-columns: 1fr; padding: 28px 24px; } }
.hero-slide.is-active { opacity: 1; visibility: visible; position: relative; z-index: 1; }
.hero-slide-media { border-radius: 12px; overflow: hidden; box-shadow: var(--er-card-shadow); background: white; }
.hero-slide-media img { width: 100%; height: auto; display: block; }

/* Illustrazioni disegnate (non screenshot di prodotto): stesso grigio del
   carosello, nessun bordo/ombra, per fondersi col resto della slide invece
   di comparire come una card separata. Il bordo ombreggiato resta invece
   sugli screenshot reali, che usano .hero-slide-media da solo. */
.hero-illustration { border-radius: 0; box-shadow: none; background: var(--er-bg); }
.hero-slide h2 { font-size: 1.7rem; font-weight: 700; color: var(--er-primary); text-wrap: balance; }
.hero-slide p { color: #495057; font-size: 1.02rem; line-height: 1.6; }

.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hero-dot {
    width: 9px; height: 9px; border-radius: 50%; border: none;
    background: rgba(26,58,92,.25); cursor: pointer; padding: 0;
}
.hero-dot.is-active { background: var(--er-primary); width: 22px; border-radius: 5px; }
.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: white; box-shadow: var(--er-card-shadow); color: var(--er-primary);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.hero-arrow:hover { background: var(--er-bg); }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
@media (max-width: 767px) {
    /* Su mobile lo slide è molto più alto del carosello desktop: le frecce
       a metà altezza finirebbero sopra i pulsanti. Restano solo i pallini. */
    .hero-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-dots, .hero-arrow { display: none; }
}

/* ── Sezioni generiche di contenuto ── */
.pub-section { padding: 64px 0; }
.pub-section-soft { background: var(--er-accent-soft); }
.pub-section-title { font-weight: 700; color: var(--er-primary); text-wrap: balance; }
.pub-eyebrow {
    font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--er-accent);
}

.feature-icon {
    width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--er-accent-soft);
}
.feature-icon img, .feature-icon svg { width: 24px; height: 24px; }

.step-card { position: relative; }
.step-number {
    font-size: .78rem; font-weight: 700; color: var(--er-accent);
    letter-spacing: .04em;
}

/* ── Card generica pubblica ── */
.pub-card {
    background: white; border: 1px solid #eef0f2; border-radius: var(--er-radius);
    box-shadow: var(--er-card-shadow); padding: 28px;
}
.pub-card .small, .pub-card small { font-size: .95rem; }

/* ── FAQ accordion (details/summary) ── */
.faq-item { border-bottom: 1px solid #e9ecef; }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 26px 4px; font-weight: 600;
    font-size: 1.2rem; color: var(--er-primary); display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+"; font-weight: 400; font-size: 1.6rem; color: #adb5bd; flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer { padding: 0 4px 26px; font-size: 1.08rem; color: #495057; line-height: 1.7; }

/* ── Footer ── */
.pub-footer { background: var(--er-primary); color: rgba(255,255,255,.75); padding: 48px 0 24px; margin-top: 64px; font-size: .9rem; }
.pub-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.pub-footer a:hover { color: white; }
.pub-footer .footer-logo { height: 30px; margin-bottom: 12px; }
.pub-footer .footer-ai-note {
    border-top: 1px solid rgba(255,255,255,.15); margin-top: 28px; padding-top: 20px;
    font-size: .82rem; color: rgba(255,255,255,.6); max-width: 720px;
}

/* ── Placeholder pagina in costruzione ── */
.pub-placeholder {
    padding: 80px 0; text-align: center; color: #6c757d;
}
