﻿/* Tarot SEO Page Styles - The Archive of Arcana */

:root {
    --bg-dark: #050810;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-gold: #D4AF37;
    --accent-purple: #9D4EDD;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-serif: 'Zen Old Mincho', 'Cinzel', serif;
    /* Elegant serif for titles */
    --font-sans: 'Inter', sans-serif;
    /* Clean sans for body */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Background Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 50% 50%, #1a1f35 0%, #050810 80%);
    z-index: -1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 2;
}

/* Hero Section with Atmospheric Header */
.card-hero {
    text-align: center;
    margin-bottom: 60px;
    padding-top: 60px;
    /* Space for the background to show */
    position: relative;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

/* The Atmospheric Background Image */
.card-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 500px;
    overflow: hidden;
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.card-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* More visible */
    filter: blur(0px) contrast(1.1);
    /* Remove blur */
    transform: scale(1.1);
    /* Slight zoom for parallax feel later */
}

.card-image-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
    transform-style: preserve-3d;
    perspective: 1000px;
    z-index: 3;
    /* Above the bg */
}

.card-image {
    width: 100%;
    max-width: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s ease;
    border: 1px solid var(--glass-border);
}

.card-image:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: 0 20px 40px rgba(157, 78, 221, 0.3);
    /* Purple glow */
}

.card-hero-content {
    position: relative;
    z-index: 3;
}

.card-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    color: var(--accent-gold);
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.card-subtitle {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--text-main);
    /* Brighter for contrast against bg */
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.keywords-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.keyword-tag {
    background: rgba(5, 8, 16, 0.6);
    /* Darker bg for contrast */
    border: 1px solid var(--glass-border);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-main);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.keyword-tag:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--accent-gold);
}

/* Content Sections */
.content-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 25px;
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-align: justify;
}

/* Dual Interpretation (Upright/Reversed) */
.dual-interpretation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.interpretation-col h3 {
    font-family: var(--font-serif);
    color: var(--accent-purple);
    display: flex;
    align-items: center;
    gap: 10px;
}

.interpretation-col.reversed h3 {
    color: #ff6b6b;
    /* Muted red for reversed */
}

/* Sage's Whisper */
.sage-whisper {
    background: linear-gradient(135deg, rgba(5, 8, 16, 0.9), rgba(20, 10, 30, 0.8));
    border-left: 4px solid var(--accent-gold);
    padding: 30px;
    position: relative;
    border-radius: 10px;
    margin-top: 50px;
}

.sage-whisper::before {
    content: "❝";
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 4rem;
    color: var(--accent-gold);
    opacity: 0.3;
    font-family: serif;
}

.sage-avatar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.sage-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    object-fit: cover;
}

.sage-name {
    font-family: var(--font-serif);
    font-weight: bold;
    color: var(--accent-gold);
    font-size: 1.2rem;
}

.sage-quote {
    font-style: italic;
    color: var(--text-main);
    font-size: 1.1rem;
}

/* Navigation Footer */
.card-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.nav-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-serif);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn:hover {
    color: var(--accent-gold);
}

/* Breadcrumbs */
.breadcrumbs {
    position: relative;
    z-index: 10;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--accent-gold);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .dual-interpretation {
        grid-template-columns: 1fr;
    }

    .card-title {
        font-size: 2.2rem;
    }

    .card-hero-bg {
        height: 400px;
    }
}

/* --- Polish Features (v2) --- */

/* Ornamental Divider */
.ornament-divider {
    text-align: center;
    margin: 40px 0;
    opacity: 0.6;
}

.ornament-svg {
    width: 100%;
    max-width: 200px;
    height: auto;
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 1;
}

/* Sage Action (Practical Advice) */
.sage-action {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(212, 175, 55, 0.3);
}

.sage-action-title {
    font-family: var(--font-serif);
    color: var(--accent-gold);
    font-size: 1rem;
    display: block;
    margin-bottom: 5px;
}

/* FAQ Section */
.faq-section {
    margin-top: 60px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    margin-bottom: 15px;
    padding: 20px;
    transition: background 0.3s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question {
    font-family: var(--font-serif);
    color: var(--text-main);
    font-size: 1.1rem;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-question::before {
    content: "Q.";
    color: var(--accent-purple);
    font-weight: bold;
}

.faq-answer {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
    padding-left: 30px;
}

/* Related Article Links (Card Pages) */
.related-article-link {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-article-link:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
    transform: translateX(5px);
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.5s ease-out 0.5s forwards;
    /* Reduced delay from 2s to 0.5s */
}

.cta-button {
    background: linear-gradient(135deg, var(--accent-purple), #5e2a84);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-family: var(--font-serif);
    font-weight: bold;
    box-shadow: 0 5px 20px rgba(157, 78, 221, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(157, 78, 221, 0.6);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .sticky-cta {
        bottom: 20px;
        right: 0;
        left: 0;
        display: flex;
        justify-content: center;
    }

    /* Prevent sticky CTA from overlapping footer links */
    .card-nav {
        padding-bottom: 80px;
    }
}

/* ============================================
   APP CONTEXT UI ADAPTATION
   When ?source=app is present, hide acquisition-focused elements
   to provide a cleaner experience for existing app users.
   This does NOT affect SEO as Googlebot doesn't use this parameter.
   ============================================ */

.from-app .sticky-cta {
    display: none !important;
}

.from-app .category-links-section {
    display: none !important;
}

/* Reset footer padding when CTA is hidden */
@media (max-width: 768px) {
    .from-app .card-nav {
        padding-bottom: 30px;
    }
}