/* ══════════════════════════════════════════════
   BAGLIORI ESOTERICO — Base CSS v1.2
   Cormorant Garamond ha altezza ottica bassa:
   tutti i font-size sono calibrati su misura.
══════════════════════════════════════════════ */

:root {
    --bge-black:      #0a0a0a;
    --bge-white:      #ffffff;
    --bge-gray-100:   #f5f5f5;
    --bge-gray-200:   #e8e8e8;
    --bge-gray-400:   #aaaaaa;
    --bge-gray-600:   #555555;
    --bge-font:       'Cormorant Garamond', Georgia, serif;
    --bge-radius:     2px;
    --bge-transition: 0.2s ease;
}

/* ── Wrapper ── */
.bge-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 2.5rem 2rem 4rem;
    font-family: var(--bge-font);
    font-size: 22px;
    color: var(--bge-black);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

/* ── Nav tab ── */
.bge-nav {
    display: flex;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--bge-gray-200);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0;
}

.bge-nav::-webkit-scrollbar { display: none; }

.bge-nav-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.9rem 1.75rem;
    font-family: var(--bge-font);
    font-size: 19px;
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--bge-gray-600);
    cursor: pointer;
    transition: var(--bge-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.bge-nav-btn:hover { color: var(--bge-black); }

.bge-nav-btn.active {
    color: var(--bge-black);
    border-bottom-color: var(--bge-black);
    font-weight: 500;
}

/* ── Pannelli ── */
.bge-panel { display: none; }
.bge-panel.active { display: block; }

/* ── Titoli sezione ── */
.bge-section-title {
    font-family: var(--bge-font);
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1.2;
    margin-bottom: 0.4rem;
    color: var(--bge-black);
}

.bge-section-sub {
    font-family: var(--bge-font);
    font-size: 18px;
    color: var(--bge-gray-600);
    font-style: italic;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* ── Blocco teoria ── */
.bge-theory {
    background: var(--bge-gray-100);
    padding: 1.75rem 2.25rem;
    margin-bottom: 2.5rem;
    border-left: 3px solid var(--bge-black);
}

.bge-theory h3 {
    font-family: var(--bge-font);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--bge-black);
}

.bge-theory p,
.bge-theory li {
    font-family: var(--bge-font);
    font-size: 20px;
    line-height: 1.85;
    color: var(--bge-gray-600);
}

.bge-theory p + p  { margin-top: 0.75rem; }
.bge-theory ul     { padding-left: 1.4rem; margin-top: 0.75rem; }
.bge-theory li     { margin-bottom: 0.4rem; }
.bge-theory strong { font-weight: 500; color: var(--bge-black); }

/* ── Step progress ── */
.bge-steps {
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.bge-step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.bge-step-item:last-child { flex: none; }

.bge-step-num {
    width: 34px;
    height: 34px;
    border: 1px solid var(--bge-gray-400);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--bge-font);
    font-size: 15px;
    color: var(--bge-gray-400);
    flex-shrink: 0;
    transition: var(--bge-transition);
}

.bge-step-num.active {
    border-color: var(--bge-black);
    background: var(--bge-black);
    color: var(--bge-white);
}

.bge-step-num.done {
    border-color: var(--bge-black);
    background: var(--bge-white);
    color: var(--bge-black);
}

.bge-step-label {
    font-family: var(--bge-font);
    font-size: 15px;
    color: var(--bge-gray-400);
    letter-spacing: 0.05em;
    display: none;
}

@media (min-width: 640px) { .bge-step-label { display: block; } }

.bge-step-line {
    flex: 1;
    height: 1px;
    background: var(--bge-gray-200);
    margin: 0 10px;
}

/* ── Campi form ── */
.bge-field { margin-bottom: 1.75rem; }

.bge-label {
    display: block;
    font-family: var(--bge-font);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bge-gray-600);
    margin-bottom: 0.65rem;
}

.bge-input,
.bge-textarea {
    width: 100%;
    font-family: var(--bge-font);
    font-size: 22px;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--bge-gray-200);
    border-radius: var(--bge-radius);
    background: var(--bge-white);
    color: var(--bge-black);
    outline: none;
    transition: var(--bge-transition);
    letter-spacing: 0.02em;
    line-height: 1.5;
    box-sizing: border-box;
}

.bge-input:focus,
.bge-textarea:focus { border-color: var(--bge-black); }

.bge-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ── Pulsanti ── */
.bge-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.9rem;
    font-family: var(--bge-font);
    font-size: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--bge-black);
    border-radius: var(--bge-radius);
    cursor: pointer;
    transition: var(--bge-transition);
    background: var(--bge-white);
    color: var(--bge-black);
    text-decoration: none;
    line-height: 1;
}

.bge-btn:hover { background: var(--bge-gray-100); }

.bge-btn.primary {
    background: var(--bge-black);
    color: var(--bge-white);
}

.bge-btn.primary:hover { background: #2a2a2a; }

.bge-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.bge-btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
    justify-content: flex-end;
}

/* ── Nota / callout ── */
.bge-note {
    background: var(--bge-gray-100);
    padding: 1.4rem 1.75rem;
    border-left: 3px solid var(--bge-black);
    margin: 1.75rem 0;
}

.bge-note h4 {
    font-family: var(--bge-font);
    font-size: 14px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
    color: var(--bge-black);
}

.bge-note p {
    font-family: var(--bge-font);
    font-size: 20px;
    line-height: 1.85;
    color: var(--bge-gray-600);
    font-style: italic;
    margin: 0;
}

/* ── Accesso negato ── */
.bge-access-denied {
    padding: 2.5rem;
    text-align: center;
    background: var(--bge-gray-100);
    border: 1px solid var(--bge-gray-200);
    font-family: var(--bge-font);
}

.bge-access-denied p {
    font-size: 22px;
    color: var(--bge-gray-600);
    margin-bottom: 1.25rem;
    font-style: italic;
}

/* ── Divisore ── */
.bge-divider {
    border: none;
    border-top: 1px solid var(--bge-gray-200);
    margin: 2.5rem 0;
}

/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */

/* Mobile < 480px */
@media (max-width: 479px) {
    .bge-wrapper        { padding: 1.5rem 1rem 3rem; font-size: 19px; }
    .bge-nav-btn        { padding: 0.75rem 1rem; font-size: 17px; }
    .bge-section-title  { font-size: 1.8rem; }
    .bge-theory p,
    .bge-theory li      { font-size: 18px; }
    .bge-note p         { font-size: 18px; }
    .bge-input,
    .bge-textarea       { font-size: 19px; }
    .bge-btn            { font-size: 15px; padding: 0.75rem 1.3rem; }
    .bge-btn-group      { justify-content: stretch; }
    .bge-btn-group .bge-btn { flex: 1; justify-content: center; }
}

/* Tablet 480–767px */
@media (min-width: 480px) and (max-width: 767px) {
    .bge-wrapper        { padding: 2rem 1.5rem 3.5rem; font-size: 20px; }
    .bge-section-title  { font-size: 2rem; }
    .bge-nav-btn        { font-size: 18px; }
}

/* Desktop 768px+ — valori base già corretti */
@media (min-width: 768px) {
    .bge-wrapper { padding: 2.5rem 2.5rem 4rem; }
}

/* ── Pagina Intenzione Mappa ── */
.bge-int-mappa-wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.bge-int-mappa-header { margin-bottom: 32px; }
.bge-int-back { font-size: 13px; color: var(--bge-black); text-decoration: none; border-bottom: 1px solid currentColor; }
.bge-int-mappa-title { font-size: clamp(1.6rem,4vw,2.4rem); margin: 12px 0 0; }
.bge-int-mappa-intro { color: #555; margin-bottom: 24px; }
.bge-intenzioni-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.bge-int-count { font-size: 11px; background: rgba(0,0,0,0.08); border-radius: 20px; padding: 1px 6px; margin-left: 4px; }
.bge-int-sezione { margin-bottom: 48px; }
.bge-int-sezione-head { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid #0a0a0a; padding-bottom: 10px; margin-bottom: 20px; }
.bge-int-sezione-head h2 { margin: 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; }
.bge-int-vedi-tutti { margin-left: auto; font-size: 12px; color: #0a0a0a; text-decoration: none; border-bottom: 1px solid currentColor; }
.bge-int-vuota { opacity: 0.5; }
.bge-int-nessun { font-size: 13px; color: #888; font-style: italic; }
.bge-int-more { text-align: right; margin-top: 12px; font-size: 13px; }
.bge-int-more a { color: #0a0a0a; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ── Mappa Intenzione — link e hover ── */
.bge-int-mappa-wrap a {
    color: var(--bge-black);
    text-decoration: none;
}
.bge-int-mappa-wrap a:hover {
    color: var(--bge-gray-600);
    text-decoration: underline;
}
.bge-int-mappa-wrap .bge-card-link,
.bge-int-mappa-wrap .bge-card-link:hover {
    text-decoration: none !important;
    color: var(--bge-black) !important;
}
.bge-int-mappa-wrap .bge-intenzione-btn:hover {
    background: var(--bge-gray-100);
    border-color: var(--bge-gray-600);
    color: var(--bge-black);
}

/* ── Box giallo Avvertenze (passi, metodi, fasi, testi, voci) ── */
.bge-avvert-box{
    background:#fcf9e8;
    border-left:4px solid #dba617;
    border-radius:4px;
    padding:12px 16px;
    margin:14px 0;
    color:#5c4400;
}
.bge-avvert-box .bge-avvert-tit{
    display:block;
    font-weight:700;
    letter-spacing:.4px;
    color:#7a5a00;
    margin-bottom:4px;
}
.bge-avvert-box p{ margin:.4em 0; }
.bge-avvert-box p:last-child{ margin-bottom:0; }

/* ── Titolo solo per SEO/accessibilità (archivi) ── */
.bge-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;}

/* 4.9.4 — «Qual è la tua intenzione?» non è più un H2: stessa resa grafica dei titoli del finder */
p.bge-finder-title{font-family:var(--bge-font);line-height:1.2;}

/* ══ Griglia viva: filtri e lettere sul posto ══ */
.bge-griglia-viva [data-viva].bge-alfa-hide { display: none !important; }
@keyframes bgeVivaIn {
    0%   { opacity: 0; transform: translateY(12px) scale(.98); box-shadow: 0 0 0 rgba(201,168,44,0); }
    60%  { opacity: 1; box-shadow: 0 0 22px rgba(201,168,44,.35); }
    100% { opacity: 1; transform: none; }
}
.bge-griglia-viva [data-viva].bge-alfa-in { animation: bgeVivaIn .55s ease both; animation-delay: calc(var(--bge-alfa-i, 0) * 35ms); }
@media (prefers-reduced-motion: reduce) { .bge-griglia-viva [data-viva].bge-alfa-in { animation: none; } }
.bge-viva-empty { text-align: center; padding: 28px 12px; font-size: 16px; color: var(--bge-gray-600, #555); }

/* ══ Dove opera (slider sotto piante e cristalli) ══ */
.bge-dove-opera .bge-dove-intro { font-size: 16px; line-height: 1.6; color: var(--bge-gray-600, #555); margin: 0 0 14px; }
.bge-dove-opera .bge-dove-tutti { text-align: center; margin: 16px 0 0; }
.bge-dove-opera .bge-dove-tutti a { display: inline-block; padding: 10px 20px; border-radius: 999px; border: 1px solid rgba(201,168,44,.6); color: inherit; text-decoration: none; font-weight: 600; transition: background .25s, color .25s, box-shadow .25s; }
.bge-dove-opera .bge-dove-tutti a:hover { background: #C9A84C; color: #fff; box-shadow: 0 0 14px rgba(201,168,44,.45); }

/* ══ Filtri dentro la barra degli strumenti (griglia viva) ══ */
.bge-vista-bar .bge-barra-filtro { display: flex; align-items: center; gap: 10px; flex: 1 1 520px; min-width: 0; margin: 0 8px; }
.bge-vista-bar .bge-barra-form { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.bge-vista-bar .bge-barra-form select {
    -webkit-appearance: none; appearance: none;
    flex: 1 1 0; min-width: 120px; max-width: none; width: auto;
    height: 44px; margin: 0; padding: 0 34px 0 16px;
    border: 1.5px solid var(--bge-gray-200, #ddd); border-radius: 11px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234a4a4a' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
    font-family: var(--bge-font); font-size: 16px; line-height: 1; color: #2a2a2a;
    cursor: pointer; box-shadow: none; transition: border-color .15s, background-color .15s, color .15s;
}
.bge-vista-bar .bge-barra-form select:hover { border-color: #9a9a9a; }
.bge-vista-bar .bge-barra-form select.is-set {
    border-color: var(--bge-black, #1d1d1f); color: #fff;
    background: var(--bge-black, #1d1d1f) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.bge-vista-bar .bge-barra-form select option { color: #1d1d1f; background: #fff; font-size: 16px; }
.bge-vista-bar .bge-barra-cerca { position: relative; display: flex; flex: 1.6 1 0; min-width: 180px; }
.bge-vista-bar .bge-barra-cerca::before { content: "⌕"; position: absolute; left: 14px; top: 50%; transform: translateY(-52%); font-size: 19px; color: #6b6b6b; pointer-events: none; }
.bge-vista-bar .bge-barra-cerca input {
    height: 44px; width: 100%; margin: 0; padding: 0 14px 0 40px;
    border: 1.5px solid var(--bge-gray-200, #ddd); border-radius: 11px; background: #fff;
    font-family: var(--bge-font); font-size: 16px; color: #1d1d1f; box-shadow: none; outline: none;
}
.bge-vista-bar .bge-barra-cerca input::placeholder { color: #8a8478; }
.bge-vista-bar .bge-barra-cerca input:focus { border-color: var(--bge-black, #1d1d1f); }
.bge-vista-bar .bge-barra-filtro .bge-filtro-clear-pill { display: inline-block; margin: 0; padding: 0 4px; font-size: 14px; white-space: nowrap; color: #6b6b6b; text-decoration: none; }
.bge-vista-bar .bge-barra-filtro .bge-filtro-clear-pill:hover { color: var(--bge-black, #1d1d1f); }
.bge-griglia-viva .bge-vista-bar .bge-ordine-bar { margin-left: 0; }
.bge-griglia-viva .bge-vista-bar .bge-vista-count { margin-left: 6px; font-size: 15px; }
@media (max-width: 1360px) {
    .bge-vista-bar .bge-barra-filtro { order: 10; flex: 1 1 100%; margin: 6px 0 0; padding-top: 10px; border-top: 1px solid var(--bge-gray-200, #e5e2da); }
    .bge-griglia-viva .bge-vista-bar .bge-ordine-bar { margin-left: auto; }
}
@media (max-width: 760px) {
    .bge-vista-bar .bge-barra-filtro { flex-wrap: wrap; }
    .bge-vista-bar .bge-barra-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
    .bge-vista-bar .bge-barra-form select { min-width: 0; width: 100%; }
    .bge-vista-bar .bge-barra-cerca { grid-column: 1 / -1; min-width: 0; }
}

/* Griglia cristalli: stessa larghezza e respiro della griglia piante */
.bge-wrapper.bge-cristalli-archive { max-width: 100%; margin: 0; padding: 2.5rem 2.5rem 4rem; }
@media (max-width: 479px) { .bge-wrapper.bge-cristalli-archive { padding: 1.5rem 1rem 3rem; } }
@media (min-width: 480px) and (max-width: 767px) { .bge-wrapper.bge-cristalli-archive { padding: 2rem 1.5rem 3.5rem; } }

/* ══ Fonti e bibliografia: bottone in fondo alla scheda ══ */
.bge-fonti { margin: 36px 0 24px; text-align: center; }
.bge-fonti-det { display: inline-block; max-width: 760px; width: 100%; text-align: left; }
.bge-fonti-btn {
    list-style: none; cursor: pointer; display: block; width: fit-content; margin: 0 auto;
    padding: 10px 22px; border: 1px solid rgba(201,168,44,.6); border-radius: 999px;
    font-family: var(--bge-font); font-size: 16px; font-weight: 600; letter-spacing: .04em; color: inherit;
    transition: background .25s, color .25s, box-shadow .25s;
}
.bge-fonti-btn::-webkit-details-marker { display: none; }
.bge-fonti-btn::after { content: ' ▾'; font-size: 12px; }
.bge-fonti-det[open] .bge-fonti-btn::after { content: ' ▴'; }
.bge-fonti-btn:hover { background: #C9A84C; color: #fff; box-shadow: 0 0 14px rgba(201,168,44,.45); }
.bge-fonti-btn:focus-visible { outline: 2px solid #C9A84C; outline-offset: 3px; }
.bge-fonti-list { margin: 18px 0 0; padding: 18px 22px 18px 38px; background: var(--bge-gray-100, #f6f5f2); border-radius: 10px; }
.bge-fonti-list li { font-size: 16px; line-height: 1.6; color: var(--bge-gray-600, #555); margin: 0 0 6px; }
.bge-fonti-memoria { margin: 20px auto 0; max-width: 720px; font-family: var(--bge-font); font-style: italic; font-size: 21px; line-height: 1.55; color: #8a6d12; }
@media (max-width: 640px) { .bge-fonti-memoria { font-size: 19px; } }
