/* ==========================================================================
   TAROT.CSS — Сьомі двері
   Темна містична палітра: глибокий чорно-зелений фон + золото.
   Шрифти: Cinzel (заголовки, ритуальний, «різьблений» характер)
           + Inter (текст, чистий і легкий для читання).
   ========================================================================== */


.tarot-page-container {
    --gold: #B8954F;
    --gold-light: #E7D8A4;
    --cream: #DAD2BB;
    --ink: #030705;
    --ink-soft: #06130d;
    --muted: #948d7d;
    --danger: #d6978c;

    width: min(1140px, 94%);
    margin: 0 auto;
    padding: 40px 0 80px 0;
    color: var(--cream);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15.5px;
}

.tarot-page-container .step-section { display: none; }
.tarot-page-container .step-section.active-step {
    display: block;
    animation: tarotFadeIn 0.35s ease forwards;
}

@keyframes tarotFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tarot-page-container .page-title {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(26px, 3.6vw, 36px);
    color: var(--gold-light);
    margin: 0 0 6px 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.tarot-page-container .page-subtitle {
    text-align: center;
    color: #A99E80;
    font-size: 15.5px;
    margin-bottom: 40px;
}

/* HERO & BANNER */
.tarot-hero-banner {
    position: relative;
    max-width: 1140px;
    min-height: 340px;
    margin: 0 auto 24px auto;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(184, 149, 79, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    box-sizing: border-box;
}

.tarot-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 35%;
    filter: brightness(0.55) saturate(0.75);
    z-index: 1;
}

.tarot-hero-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(2,5,3,0.55) 0%, rgba(2,5,3,0.25) 45%, rgba(2,5,3,0.75) 100%);
}

.tarot-hero-frame {
    position: absolute;
    inset: 10px;
    border: 1px dashed rgba(184, 149, 79, 0.25);
    border-radius: 8px;
    pointer-events: none;
    z-index: 3;
}

.tarot-hero-content {
    position: relative;
    z-index: 4;
    max-width: 700px;
}

.tarot-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    margin-bottom: 16px;
    border-radius: 20px;
    border: 1px solid rgba(184, 149, 79, 0.45);
    background: rgba(184, 149, 79, 0.1);
    color: var(--gold-light);
    font-size: 13.5px;
    letter-spacing: 0.2px;
}

.tarot-hero-title {
    margin: 0 0 12px 0;
    color: var(--gold-light);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.25;
}

.tarot-hero-subtitle {
    margin: 0 0 26px 0;
    color: #f1ebd9;
    font-size: 16px;
    line-height: 1.5;
    opacity: 0.92;
}

.hero-stats-grid {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
}

.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hero-stat-num {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 22px;
    color: var(--gold-light);
    font-weight: 600;
}

.hero-stat-text {
    font-size: 13px;
    color: #c9c0a8;
}

/* TRUST STRIP */
.trust-strip {
    max-width: 1140px;
    margin: 0 auto 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-top: 1px solid rgba(184, 149, 79, 0.12);
    border-bottom: 1px solid rgba(184, 149, 79, 0.12);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
}

.trust-item span.trust-icon {
    color: var(--gold);
    font-size: 15px;
}

/* OWN QUESTION */
.own-question-banner {
    max-width: 1140px;
    margin: 0 auto 40px auto;
    padding: 26px 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(184,149,79,0.06) 0%, var(--ink) 55%);
    border: 1px solid rgba(184, 149, 79, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.own-question-banner:hover {
    border-color: rgba(184, 149, 79, 0.7);
    transform: translateY(-2px);
}

.own-question-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.own-question-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(184, 149, 79, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--gold-light);
    background: rgba(184, 149, 79, 0.06);
}

.own-question-title {
    margin: 0 0 4px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 500;
    font-size: 22px;
    color: var(--gold-light);
}

.own-question-desc {
    margin: 0 0 10px 0;
    font-size: 14.5px;
    color: #a89f89;
    max-width: 480px;
    line-height: 1.5;
}

.own-question-cta {
    flex-shrink: 0;
    padding: 12px 26px;
    border-radius: 6px;
    border: 1px solid var(--gold);
    color: #07110B;
    background: var(--gold);
    font-size: 15.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: filter 0.2s ease;
}

.own-question-banner:hover .own-question-cta { filter: brightness(1.08); }

/* PRICE */
.price-container {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.old-price {
    font-size: 13.5px;
    color: #6f6a5b;
    text-decoration: line-through;
}

/* GRIDS & CARDS */
.tarot-page-container .spreads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tarot-page-container a.spread-card {
    background: var(--ink);
    border: 1px solid rgba(184, 149, 79, 0.15);
    border-radius: 8px;
    padding: 2px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tarot-page-container .spread-card-inner {
    padding: 22px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.tarot-page-container .spread-card:hover {
    border-color: rgba(184, 149, 79, 0.55);
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.tarot-page-container .spread-card h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    font-size: 21px;
    color: var(--gold-light);
    margin: 0 0 10px 0;
    font-weight: 500;
}

.tarot-page-container .spread-desc {
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 18px;
    white-space: pre-line;
}

/* BADGES & BUTTONS */
.spread-price-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 10px;
    border: 1px solid rgba(184, 149, 79, 0.3);
    background: rgba(184, 149, 79, 0.06);
    color: var(--gold-light);
    font-size: 13.5px;
    font-weight: 600;
}

.spread-price-badge--big { font-size: 15px; padding: 5px 12px; }

.tarot-page-container .spread-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
}

.tarot-page-container .spread-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 12px;
    border: 1px solid rgba(184, 149, 79, 0.35);
    background: rgba(184, 149, 79, 0.06);
    color: var(--gold);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tarot-page-container .spread-card:hover .spread-action-btn {
    background: var(--gold);
    color: #07110B;
}

.tarot-page-container .spread-card:hover .btn-arrow { transform: translateX(3px); }
.tarot-page-container .btn-arrow { display: inline-block; transition: transform 0.2s; }

/* SITUATION FORM & INPUTS */
.tarot-page-container .situation-box {
    max-width: 680px;
    margin: 20px auto;
    background: var(--ink);
    border: 1px solid rgba(184, 149, 79, 0.22);
    padding: 34px;
    border-radius: 10px;
    box-sizing: border-box;
}

.tarot-page-container .back-btn,
.tarot-back-link {
    background: none;
    border: none;
    color: #A99E80;
    cursor: pointer;
    font-size: 15px;
    margin-bottom: 16px;
    padding: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease;
}
.tarot-back-link { margin: 10px 0 0 0; }
.tarot-page-container .back-btn:hover, .tarot-back-link:hover { color: var(--gold); }

.tarot-page-container .situation-box h2 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 26px;
    color: var(--gold-light);
    margin: 0 0 14px 0;
    font-weight: 500;
}

.spread-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
}

.user-balance-row { font-size: 14.5px; color: #A99E80; }
.user-balance-row strong { color: var(--gold-light); font-size: 15.5px; }

.balance-warning {
    background: rgba(217, 123, 108, 0.05);
    border: 1px solid rgba(217, 123, 108, 0.28);
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.balance-warning p { margin: 0; font-size: 14.5px; color: var(--danger); }

.balance-warning-btn {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #07110B;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.tarot-page-container .question-instructions {
    font-size: 14.5px;
    color: var(--cream);
    line-height: 1.6;
    background: rgba(10, 20, 14, 0.45);
    padding: 16px;
    border-radius: 6px;
    border-left: 2px solid var(--gold);
    margin: 0 0 24px 0;
    white-space: pre-line;
}

.question-field-wrapper { margin-bottom: 14px; }
.question-field-wrapper.hidden { display: none; }
.question-field-label { display: block; margin-bottom: 6px; font-size: 15.5px; color: var(--gold-light); }

.question-field-textarea,
.tarot-page-container #situation-input {
    width: 100%;
    border-radius: 6px;
    border: 1px solid rgba(184, 149, 79, 0.28);
    background: rgba(2, 5, 3, 0.6);
    color: #EFE7D2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    box-sizing: border-box;
}

.question-field-textarea { min-height: 56px; padding: 10px 12px; margin-bottom: 4px; resize: vertical; }
.tarot-page-container #situation-input { height: 120px; padding: 12px; margin-bottom: 10px; resize: none; }

.question-field-textarea:focus,
.tarot-page-container #situation-input:focus {
    outline: none;
    border-color: var(--gold);
}

.situation-input-wrapper { position: relative; }

.input-hint {
    font-size: 13px;
    color: #766f5e;
    margin: 0 0 20px 0;
}

.voice-btn {
    position: absolute;
    right: 10px;
    bottom: 30px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(184, 149, 79, 0.35);
    background: rgba(15, 12, 8, 0.85);
    color: var(--gold-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.voice-btn:hover { border-color: var(--gold); }
.voice-btn.is-listening { background: var(--gold); color: #07110B; }
.voice-status { margin: 4px 0 0 0; font-size: 13px; color: var(--gold-light); }
.voice-status.hidden { display: none; }

.tarot-page-container .oracle-btn {
    width: 100%;
    padding: 15px;
    background: var(--gold);
    border: 1px solid var(--gold);
    color: #07110B;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    border-radius: 6px;
    text-align: center;
    box-sizing: border-box;
    transition: filter 0.2s ease, transform 0.15s ease;
}
.tarot-page-container .oracle-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.tarot-page-container .oracle-btn:disabled { opacity: 0.5; cursor: not-allowed; }
a.tarot-result-link { width: auto; padding: 14px 30px; display: inline-block; }

.oracle-reassurance {
    text-align: center;
    font-size: 13px;
    color: #766f5e;
    margin: 12px 0 0 0;
}

/* RESULTS & CARDS */
.tarot-page-container .tarot-table { display: flex; flex-direction: column; gap: 28px; margin-top: 30px; }
.tarot-page-container .position-block {
    background: rgba(3, 8, 5, 0.45);
    border: 1px solid rgba(184, 149, 79, 0.12);
    padding: 22px 16px;
    border-radius: 8px;
    text-align: center;
}
.tarot-page-container .position-block h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 20px;
    color: var(--gold-light);
    margin: 0 0 18px 0;
    font-weight: 500;
}
.tarot-page-container .cards-line { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

.pos-interpretation-text {
    margin-top: 14px;
    padding: 14px;
    color: #f1ebd9;
    font-size: 14.5px;
    line-height: 1.6;
    border-left: 2px solid var(--gold);
    background: rgba(184, 149, 79, 0.03);
    text-align: left;
    border-radius: 0 6px 6px 0;
}

.tarot-page-container .tarot-card-wrapper { width: 115px; height: 200px; perspective: 1000px; }
.tarot-page-container .tarot-card-inner {
    width: 100%; height: 100%; position: relative;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}
.tarot-page-container .tarot-card-inner.flipped { transform: rotateY(180deg); }

.tarot-page-container .card-face {
    position: absolute; inset: 0; backface-visibility: hidden;
    border-radius: 6px; border: 1px solid var(--gold); box-sizing: border-box; overflow: hidden;
}
.tarot-page-container .card-back {
    background: var(--ink-soft);
    display: flex; align-items: center; justify-content: center;
}
.tarot-page-container .back-pattern { font-size: 28px; color: rgba(184, 149, 79, 0.3); }

.tarot-page-container .card-front { background: var(--ink); transform: rotateY(180deg); display: flex; flex-direction: column; }
.tarot-page-container .card-front img { width: 100%; height: 165px; object-fit: cover; display: block; }
.tarot-page-container .card-front img.rotate-180 { transform: rotate(180deg); }
.tarot-page-container .card-label {
    height: 34px; font-size: 11.5px; display: flex; align-items: center; justify-content: center;
    color: var(--gold-light); background: #020503; border-top: 1px solid rgba(184, 149, 79, 0.2); text-align: center; padding: 0 2px;
}

.recommendation-box {
    margin-top: 30px; max-width: 680px; margin-inline: auto; padding: 22px;
    background: rgba(12, 10, 7, 0.8); border: 1px solid rgba(184, 149, 79, 0.28); border-radius: 8px; box-sizing: border-box;
}
.recommendation-box.hidden { display: none; }
.recommendation-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 20px; color: var(--gold-light); margin-bottom: 12px; text-align: center;
    border-bottom: 1px dashed rgba(184, 149, 79, 0.22); padding-bottom: 10px; font-weight: 500;
}
.recommendation-text { color: #f1ebd9; font-size: 15px; line-height: 1.65; text-align: left; }
.result-actions { text-align: center; margin-top: 30px; }

/* CATEGORIES & ICONS */
.tarot-page-container .category-section { margin-bottom: 44px; }
.tarot-page-container .category-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(20px, 2.6vw, 24px); color: var(--gold-light);
    border-bottom: 1px solid rgba(184, 149, 79, 0.15); padding-bottom: 10px; margin-bottom: 22px;
    display: flex; align-items: center; gap: 10px; font-weight: 500;
}
.tarot-page-container .category-icon { font-size: 20px; opacity: 0.8; }

.tarot-page-container .elven-logo { position: relative; width: 44px; height: 44px; margin-bottom: 12px; display: inline-block; }
.tarot-page-container .elven-logo svg { width: 100%; height: 100%; overflow: visible; }
.tarot-page-container .elven-ring-outer { fill: none; stroke: rgba(184, 149, 79, 0.3); stroke-width: 0.8; stroke-dasharray: 3, 2; }
.tarot-page-container .elven-ring-inner { fill: none; stroke: rgba(184, 149, 79, 0.15); stroke-width: 0.5; }
.tarot-page-container .elven-star {
    fill: rgba(184, 149, 79, 0.04); stroke: rgba(184, 149, 79, 0.2); stroke-width: 0.8;
    transform-origin: 50px 50px; transition: stroke 0.2s ease, transform 0.4s ease;
}
.tarot-page-container .inner-emblem { position: absolute; inset: 0; margin: auto; display: flex; align-items: center; justify-content: center; font-size: 16px; }

.tarot-page-container .spread-card:hover .elven-star { stroke: rgba(184, 149, 79, 0.75); transform: rotate(45deg); }
.tarot-page-container .spread-card:hover .elven-ring-outer { stroke: rgba(184, 149, 79, 0.6); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .own-question-banner { flex-direction: column; align-items: stretch; gap: 14px; }
    .own-question-left { flex-direction: column; text-align: center; }
    .own-question-desc { max-width: 100%; }
    .own-question-cta { width: 100%; text-align: center; }
    .tarot-page-container .spreads-grid { grid-template-columns: 1fr; }
    .trust-strip { gap: 16px 24px; }
}

@media (max-width: 600px) {
    .tarot-page-container { padding-top: 20px; font-size: 15px; }
    .tarot-hero-banner { min-height: 240px; padding: 26px 16px; margin-bottom: 20px; }
    .tarot-hero-title { font-size: 24px; }
    .tarot-hero-subtitle { font-size: 14.5px; }
    .hero-stats-grid { gap: 22px; }
    .trust-strip { flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px 16px; }
    .own-question-banner { padding: 20px 16px; margin-bottom: 25px; }
    .own-question-title { font-size: 20px; }
    .tarot-page-container .situation-box { padding: 22px 16px; }
    .tarot-page-container .tarot-card-wrapper { width: 95px; height: 165px; }
    .tarot-page-container .card-front img { height: 132px; }
    .tarot-page-container .cards-line { gap: 10px; }
    .spread-price-row, .balance-warning { flex-direction: column; align-items: stretch; text-align: center; }
    .balance-warning-btn { text-align: center; }
}