/* ============================================================
   tarots.css — Stili Landing Page Tarocchi & Animazioni 3D
   "The Demon's Share" — I 22 Tarocchi del Demone
   ============================================================ */

:root {
    /* Accento dell'hero Tarocchi: HOME, freccia scroll e istruzioni. */
    --tarots-hero-accent: #dbaba9;
}

/* ─── Age Gate ───────────────────────────────────────────── */
.age-gate {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Unico blur ammesso: lo sfondo del popup età, forte come sulla vetrina. */
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
}

.age-gate__inner {
    position: relative;
    text-align: center;
    max-width: 520px;
    width: 100%;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(10, 10, 10, 0.88);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.age-gate__logo {
    width: 160px;
    height: auto;
    margin: 0 auto;
}

.age-gate__title {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: clamp(1.3rem, 3vw, 1.9rem);
    font-weight: 400;
    margin: 1.5rem 0;
    line-height: 1.4;
}

.age-gate__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.age-gate__form {
    display: inline;
    margin: 0;
}

.age-gate__btn {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.75rem 2.5rem;
    border: 1px solid var(--color-gold);
    background: transparent;
    color: var(--color-gold);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease, color 0.3s ease;
}

.age-gate__btn--yes:hover,
.age-gate__btn--yes:focus-visible {
    background: var(--color-gold);
    color: var(--color-black);
}

.age-gate__btn--no {
    border-color: rgba(245, 240, 232, 0.35);
    color: var(--color-white);
}

.age-gate__btn--no:hover {
    border-color: var(--color-white);
}

.age-gate__denied {
    margin-top: 1.5rem;
    color: var(--color-white);
    font-size: 0.9rem;
}

/* ─── Header ─────────────────────────────────────────────── */
.tarots-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 2rem var(--spacing-md) var(--spacing-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

.logo-link {
    display: block;
}

.logo {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

@media (min-width: 768px) {
    .tarots-header .logo-link {
        display: none;
    }
}

/* C'è il popup dell'età legale: l'header dei Tarocchi non deve vedersi. */
body.has-age-gate .tarots-header {
    display: none !important;
}

/* ─── Hero Image ─────────────────────────────────────────── */
/* Font delle istruzioni di lettura: è lo stesso usato nelle foto originali.
   L'elenco è ora HTML, quindi la foto può essere unica per tutte le lingue. */
@font-face {
    font-family: 'TDS Tarots Instructions';
    src: url('../fonts/thedemonshare_font_tarots_reading_instructions.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.hero-image {
    position: relative;
    width: 100%;
    line-height: 0;
}

.hero-image__img {
    display: block;
    width: 100%;
    height: auto;
}

/* Elenco istruzioni sovrapposto alla foto, dove prima era stampato nella
   immagine. Posizione e scala sono espresse in percentuale/vw perché seguono
   l'immagine hero, che è larga quanto il viewport. */
.hero-instructions {
    position: absolute;
    left: 50%;
    top: 71%;
    transform: translateX(-50%);
    width: 70%;
    z-index: 4;
    pointer-events: none;
    text-align: center;
    font-family: 'TDS Tarots Instructions', 'Times New Roman', serif;
    font-size: 1.65vw;
    line-height: 1.2;
    letter-spacing: 0.02em;
    font-variant-caps: small-caps;
    color: var(--tarots-hero-accent);
}

.hero-instructions__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-instructions__item {
    display: block;
    max-width: 100%;
    color: var(--tarots-hero-accent);
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.9), 0 7px 18px rgba(0, 0, 0, 0.5);
}

.hero-instructions__num {
    margin-right: 0.1em;
}

@media (max-width: 767px) {
    .hero-instructions {
        top: 65%;
        width: 96%;
        font-size: 4vw;
        line-height: 1.15;
        letter-spacing: 0.02em;
    }
}

/* Freccia scroll sovrapposta in basso all'hero */
.hero-scroll-arrow {
    position: absolute;
    left: 50%;
    /* Distanza dal bordo che aumenta con la larghezza della finestra:
       più stretto è il viewport, più il chevron si avvicina al bordo */
    bottom: clamp(8px, 2vw, 48px);
    transform: translateX(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tarots-hero-accent);
    line-height: 0;
    /* Leggera animazione che invita a scorrere verticalmente */
    animation: heroScrollArrow 1.8s ease-in-out infinite;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Su mobile (≤767px) la distanza dello chevron dal bordo inferiore è fissa: 50px */
@media (max-width: 767px) {
    .hero-scroll-arrow {
        bottom: 50px;
    }
}

.hero-scroll-arrow svg {
    width: 28px;
    height: 28px;
}

.hero-scroll-arrow:hover {
    opacity: 1;
}

@keyframes heroScrollArrow {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(6px);
    }
}

/* Con <picture> il browser seleziona già la sorgente giusta in base al
   viewport: niente più classi desktop/mobile da mostrare/nascondere. */

/* ─── Sfondo Unico ───────────────────────────────────────── */
.page-background {
    position: relative;
    z-index: 1;
    background: transparent;
}



/* ─── Intro Section ──────────────────────────────────────── */
.intro-section {
    position: relative;
    z-index: 1;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-sm);
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-section__overlay {
    display: none;
}

.intro-section__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
    animation: fadeInUp 1s ease forwards;
}

.intro-section__title {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-heading);
    font-size: clamp(1.8rem, 5.5vw, 3.2rem);
    line-height: 1.15;
    color: var(--color-gold);
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.3), 0 0 80px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-sm);
}

.intro-section__subtitle {
    font-family: var(--font-subheading);
    font-weight: var(--font-weight-subheading);
    font-size: clamp(1.1rem, 2.8vw, 1.7rem);
    line-height: 1.25;
    margin-bottom: var(--spacing-md);
    color: var(--color-gold);
}

.intro-section__description {
    font-family: var(--font-body);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-white);
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.intro-section__description strong {
    font-weight: 800;
}

/* Il brand non usa mai il corsivo: nessun tag em/i deve renderizzare italic */
.intro-section__description em,
.intro-section__description i,
.intro-section__subtitle em,
.intro-section__subtitle i,
.tarot-card__expanded-desc em,
.tarot-card__expanded-desc i,
.tarot-card__expanded-meaning em,
.tarot-card__expanded-meaning i {
    font-style: normal;
}

.intro-section__description p {
    margin: 0 0 1rem 0;
}

.intro-section__description p:last-child {
    margin-bottom: 0;
}

/* ─── Griglia Tarocchi ───────────────────────────────────── */
.tarots-grid-section {
    position: relative;
    z-index: 1;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    /* min-height rimosso: la griglia si dimensiona sul contenuto, senza spazio vuoto */
}

.tarots-grid-section__overlay {
    display: none;
}

.tarots-grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    --col-gap: clamp(1rem, 3vw + 0.5rem, 4rem);
    column-gap: var(--col-gap);
    row-gap: var(--spacing-lg);
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--spacing-md) 0;
}

.tarots-grid .tarot-card {
    flex: 0 0 calc(25% - var(--col-gap) * 3 / 4);
    max-width: 200px;
}

@media (max-width: 1024px) {
    .tarots-grid .tarot-card {
        flex: 0 0 calc(33.333% - var(--col-gap) * 2 / 3);
        max-width: 180px;
    }
}

@media (max-width: 640px) {
    .tarots-grid {
        padding: var(--spacing-sm);
    }

    .tarots-grid .tarot-card {
        flex: 0 0 calc(50% - var(--col-gap) * 1 / 2);
        max-width: 160px;
    }
}

/* ─── Singola Card ───────────────────────────────────────── */
.tarot-card {
    position: relative;
    perspective: 300px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.4);
    aspect-ratio: 2 / 3;
    transition: transform 0.4s ease;
    z-index: 2;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.tarot-card:hover,
.tarot-card:focus-visible,
.tarot-card--tapped {
    transform: translateY(-14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tarot-card--expanded {
    box-shadow: none;
}

.tarot-card--expanded:hover,
.tarot-card--expanded:focus-visible {
    box-shadow: none;
}

.tarot-card__front {
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
}

.tarot-card__svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: var(--radius-md);
    transition: filter 0.3s ease;
}

/* ─── Fix Safari: immagini della griglia tagliate ───────── */
/* Su WebKit (Safari desktop e iOS) un flex item con aspect-ratio
   e figli in height:100% risolve l'altezza in modo difettoso
   (bugs.webkit.org #209983): su schermi stretti l'altezza della
   carta può superare il box previsto e l'immagine (object-fit:
   cover) viene tagliata. Ancorando il fronte in absolute rispetto
   alla carta — che già definisce le proporzioni via aspect-ratio —
   la geometria diventa deterministica in tutti i browser.
   Scope limitato alla griglia: il clone espanso in tarots.js
   dimensiona front/svg con width/height fisse inline e non va
   toccato. */
.tarots-grid .tarot-card__front {
    position: absolute;
    inset: 0;
    height: 100%;
}

.tarots-grid .tarot-card__svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

/* ─── Overlay Hover ──────────────────────────────────────── */
.tarot-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.75);
    z-index: 2;
    pointer-events: none;
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tarot-card:hover .tarot-card__overlay,
.tarot-card:focus-visible .tarot-card__overlay,
.tarot-card--tapped .tarot-card__overlay {
    opacity: 1;
}

.tarot-card__title {
    font-family: var(--font-subheading);
    font-weight: var(--font-weight-subheading);
    font-size: 1.1rem;
    color: var(--color-white);
    margin-bottom: 0.25rem;
    padding: 0 var(--spacing-xs);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.tarot-card__keywords {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0 var(--spacing-xs);
    margin-top: 0.75rem;
    align-self: center;
}

.tarot-card__keyword {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    /* Padding verticale simmetrico: l'override globale delle metriche del
       font in main.css centra già la linea di base. Il vecchio 0.3/0.1
       compensava il font che sedeva alto e ora spingeva il testo in basso. */
    padding: 0.2rem 0.75rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: visible;
}

.tarot-card__cta {
    position: absolute;
    top: calc(100% - 0.5rem);
    left: 0;
    right: 0;
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-black);
    background: var(--color-gold);
    padding: 1rem 0 0.2rem 0;
    text-align: center;
    opacity: 0;
    z-index: -1;
    transform: translateY(-80%);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: transform 0.3s ease, opacity 0.3s ease;
    line-height: normal;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarot-card:hover .tarot-card__cta,
.tarot-card:focus-visible .tarot-card__cta,
.tarot-card--tapped .tarot-card__cta {
    transform: translateY(0);
    opacity: 1;
}

/* Su dispositivi touch (classe is-touch aggiunta da tarots.js) lo sticky :hover
   del tap viene neutralizzato: non deve mostrare nulla. Il dettaglio al primo
   tocco è mostrato dalla classe --tapped (vedi .tarot-card--tapped base), che
   equivale all'hover dei dispositivi non touch. La classe è più affidabile della
   media query (hover: none), che su iPad/penna/DevTools mobile non scatta. */
.is-touch .tarot-card:hover:not(.tarot-card--tapped) {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.is-touch .tarot-card:hover:not(.tarot-card--tapped) .tarot-card__overlay {
    opacity: 0;
}

.is-touch .tarot-card:hover:not(.tarot-card--tapped) .tarot-card__cta {
    transform: translateY(-80%);
    opacity: 0;
}

/* ─── Card Espansa — Flip 3D ────────────────────────────── */
.tarot-card--expanded {
    overflow: visible;
}

.tarot-card--expanded .tarot-card__overlay,
.tarot-card--expanded .tarot-card__cta {
    display: none !important;
}

/* Retro contenuto dettaglio */
.tarot-card__flip-back {
    /* Il retro è ruotato di 180° sul fronte: senza questo, il browser lo
       disegna anche quando mostra il lato posteriore (fronte della carta)
       e il rivestimento crema affiora durante la rotazione. */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Container scrollabile interno */
.tarot-card__expanded-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tarot-card__expanded-scroll {
    margin-right: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-gold) transparent;
}

.tarot-card__expanded-scroll::-webkit-scrollbar {
    width: 4px;
}

.tarot-card__expanded-scroll::-webkit-scrollbar-thumb {
    background: var(--color-gold);
    border-radius: 2px;
}

/* Sfumature fisse sopra e sotto l'area scrollabile */
.tarot-card__scroll-fade {
    height: 4rem;
    z-index: 5;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tarot-card__scroll-fade--top {
    background: linear-gradient(to bottom, #faf3e0 0%, rgba(250, 243, 224, 0.02) 100%);
}

.tarot-card__scroll-fade--bottom {
    background: linear-gradient(to top, #faf3e0 0%, rgba(250, 243, 224, 0.02) 100%);
}

/* Ombra volumetrica flip 3D */
.tarot-card__flip-shadow {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.30) 25%, transparent 55%);
    opacity: 0;
    transition: opacity 0.6s ease;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
}

/* Pulsanti navigazione carta espansa */
.tarot-card__nav-btn {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background: none;
    border: none;
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    padding: 0;
    line-height: normal;
    transition: color 0.3s ease, opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.tarot-card__nav-btn:hover {
    color: var(--color-gold);
}

/* Testo espanso */
.tarot-card__expanded-text {
    flex: 1;
    min-width: 0;
    display: block;
    color: var(--color-dark);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    text-align: left;
    padding: 0 20px 0 8px;
}

.tarot-card__expanded-title {
    font-family: var(--font-subheading);
    font-weight: var(--font-weight-subheading);
    color: var(--color-red) !important;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    display: inline-block;
    border-bottom: 2px solid var(--color-gold);
}

.tarot-card__title-number {
    font-family: 'DemonsSerif', serif;
    font-weight: 400;
    margin-right: 20px;
}

/* Wrapper descrizione + colonna keywords */
.tarot-card__expanded-body-wrapper {
    /* clearfix per il float */
}

.tarot-card__expanded-body-wrapper::after {
    content: '';
    display: table;
    clear: both;
}

/* Colonna sinistra: keywords + astrologico */
.tarot-card__expanded-right-col {
    float: left;
    display: inline-flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin-right: 1rem;
    margin-bottom: 0.75rem;
    max-width: 45%;
}

/* Keywords nel dettaglio */
.tarot-card__expanded-keywords {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tarot-card__keyword-detail {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-gold);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    /* Come .tarot-card__keyword: padding simmetrico, niente compensazione
       extra sopra la linea di base già sistemata da main.css. */
    padding: 0.2rem 0.9rem;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Connessione astrologica */
/* Layout a prova di wrap: la colonna icona è "auto" (abbraccia i 1.5rem
   dell'icona invece di 1.8rem fissi), gap e padding ridotti → l'etichetta
   guadagna ~17px e il simbolo PNG sposta più a sinistra. Il testo NON
   va mai a capo (white-space: nowrap): lo spazio è garantito dalla
   routine JS fitTextInAstroBox, che riduce il font fino all'ingresso
   su una riga (come i badge oro). */
.tarot-card__expanded-astrological {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7b4fa0;
    background: rgba(123, 79, 160, 0.12);
    border: 1px solid rgba(123, 79, 160, 0.35);
    padding: 0.2rem 0.7rem 0.2rem 0.5rem;
    border-radius: 3px;
    text-align: center;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
    white-space: nowrap;
}

.tarot-card__astro-icon {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
    justify-self: start;
    line-height: 1;
    transform: translateY(-0.08em);
}

.tarot-card__astro-label {
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

/* Titolo significato */
.tarot-card__expanded-meaning-title {
    font-family: var(--font-subheading);
    font-weight: var(--font-weight-subheading);
    font-size: 1.25rem;
    color: var(--color-red);
    margin: 1rem 0 1rem 0;
    border-bottom: 2px solid var(--color-gold);
    padding-bottom: 0.4rem;
    display: inline-block;
    clear: both;
}

/* Testo significato */
.tarot-card__expanded-meaning {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    color: #3a3a3a;
    text-align: left;
}

.tarot-card__expanded-meaning p {
    margin: 0 0 0.5rem 0;
    text-align: left;
}

.tarot-card__expanded-meaning p:last-child {
    margin-bottom: 0;
}

.tarot-card__expanded-desc {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.4;
    color: #3a3a3a;
    text-align: left;
}

.tarot-card__expanded-desc p {
    margin: 0 0 0.5rem 0;
    text-align: left;
}

.tarot-card__expanded-desc p:last-child {
    margin-bottom: 0;
}

/* Card immagine laterale */
.tarot-card__side-image {
    position: fixed;
    overflow: hidden;
    touch-action: none;
}

.tarot-card__side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ─── Footer ─────────────────────────────────────────────── */
.tarots-footer {
    position: relative;
    z-index: 1;
    padding: 1rem var(--spacing-md) 1.5rem;
    text-align: center;
}

.tarots-footer__overlay {
    display: none;
}

.tarots-footer__inner {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.tarots-footer__inner > .lang-selector {
    /* Più aria tra la lista delle lingue (solo Tarocchi) e il resto del
       footer: al gap del contenitore si aggiunge questo margine. */
    margin-bottom: 1rem;
    padding: 0;
}

.tarots-footer__legal {
    font-size: 0.78rem;
    color: var(--color-white);
    margin: 0;
    line-height: 1.35;
}

.tarots-footer__legal p {
    margin: 0;
}

.tarots-footer__legal small {
    display: block;
    margin-top: 0;
    font-size: 0.66rem;
    color: var(--color-white);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Social: componente unico .social-links (main.css, da includes/social.php). */
.tarots-footer .social-links {
    gap: 0.8rem;
}

.tarots-footer .social-links__link {
    width: 32px;
    height: 32px;
}

.tarots-footer .social-links__link svg {
    width: 16px;
    height: 16px;
}

.tarots-footer__logos {
    display: flex;
    justify-content: center;
    margin: 0;
}

.tarots-footer__logo-rt {
    height: 22px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

a:hover .tarots-footer__logo-rt {
    opacity: 1;
}

.tarots-footer__copyright {
    margin: 0 0 1.5rem;
    font-size: 0.8rem;
    color: var(--color-white);
}

.tarots-footer__links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem 1.1rem;
    margin-bottom: 0;
}

.tarots-footer__policy {
    font-size: 0.7rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.tarots-footer__policy:hover {
    color: var(--color-gold);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Riduzione movimenti: disabilita solo le animazioni CSS decorative.
   NB: niente !important e nessun tocco alle transizioni del clone
   espanso (gestite via JS inline, che hanno priorità e servono al flip). */
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-arrow {
        animation: none;
    }

    .intro-section__content {
        animation: none;
    }

    .tarot-card {
        transition: none;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .intro-section {
        padding: var(--spacing-md) var(--spacing-sm) var(--spacing-xs);
    }

    .tarots-grid-section {
        padding: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs);
    }

    .logo {
        width: 120px;
    }
}
/* Nota: nessun selettore lingua nell'header — l'unico selettore è nel footer
   (.lang-selector, stili in main.css). */

/* ─── Ritorno alla home (desktop e mobile) ────────────────────────────────
   In alto a sinistra, sempre visibile: freccia sinistra + etichetta "HOME".
   Su mobile il logo resta cliccabile in centro; il pulsante è fuori dal flusso
   (position: absolute) quindi non sposta il logo. Stesso colore della freccia
   che invita allo scroll (.hero-scroll-arrow), senza bordo né sfondo. */
.tarots-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: absolute;
    top: 2rem;
    left: var(--spacing-md);
    padding: 0;
    border: 0;
    background: none;
    color: var(--tarots-hero-accent);
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.tarots-back svg {
    display: block;
    width: 28px;
    height: 28px;
    flex: none;
    align-self: center;
}

.tarots-back__label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.tarots-back:hover,
.tarots-back:focus-visible {
    opacity: 1;
}

@media (max-width: 640px) {
    .tarots-back {
        top: 1.5rem;
        left: var(--spacing-sm);
        gap: 0.3rem;
    }

    .tarots-back svg {
        width: 20px;
        height: 20px;
    }

    .tarots-back__label {
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }
}

/* ─── Hero dei Tarocchi ─────────────────────────────────────
   Nessun filtro sull'immagine di copertina, in nessun browser: Safari
   applicava il vecchio blur in modo molto più aggressivo e la rendeva
   sfumata. L'immagine resta nitida su tutti i motori. */
.hero-image,
.hero-image picture,
.hero-image__img {
    filter: none !important;
    -webkit-filter: none !important;
}

/* L'attributo hidden deve vincere sul display:flex dell'age gate: senza
   questa regola il gate poteva restare visibile (con il suo
   backdrop-filter) sopra l'hero anche dopo la verifica salvata in
   localStorage. */
[hidden] {
    display: none !important;
}

/* L'age gate deve stare sopra al banner cookie iubenda (z-index ~1e8). */
.age-gate {
    z-index: 100000000;
}

/* Finché l'age gate è aperto il banner cookie resta nascosto: evita che i
   suoi link entrino nel focus trap del popup età. Compare dopo il YES. */
body.has-age-gate #iubenda-cs-banner {
    display: none !important;
}
