/* =========================================
   1. FONT IMPORT
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Gabriela&family=Lato:wght@300;400;700&display=swap');

/* =========================================
   2. ROOT VARIABLES
   ========================================= */
:root {
    /* Font scaling (controlled by JS) */
    --font-scale: 1;
    --font-base: 16px;

    /* Transitions */
    --transition-speed: 0.3s;

    /* Default colors, overridden by themes */
    --bg-color: #0f172a;
    --text-color: #e5e7eb;
    --heading-color: #f9fafb;
    --accent-color: #38bdf8;
    --container-bg: #020617;
    --scripture-text: #94a3b8;
    --scripture-ref: #7dd3fc;
    --border-color: #1e293b;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

/* =========================================
   3. THEMES
   ========================================= */

/* --- DARK 1: SKY BLUE (DEFAULT) --- */
body.theme-dark-blue {
    --bg-color: #020617;
    --text-color: #e5e7eb;
    --heading-color: #f9fafb;
    --accent-color: #38bdf8;
    --container-bg: #0f172a;
    --scripture-text: #94a3b8;
    --scripture-ref: #7dd3fc;
    --border-color: #1e293b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

/* --- DARK 2: GOLD --- */
body.theme-dark-gold {
    --bg-color: #111827;
    --text-color: #f3f4f6;
    --heading-color: #fef3c7;
    --accent-color: #fbbf24;
    --container-bg: #0b1120;
    --scripture-text: #facc15;
    --scripture-ref: #fbbf24;
    --border-color: #78350f;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}

/* --- DARK 3: FOREST --- */
body.theme-dark-forest {
    --bg-color: #022c22;
    --text-color: #e0f2f1;
    --heading-color: #a7f3d0;
    --accent-color: #34d399;
    --container-bg: #064e3b;
    --scripture-text: #6ee7b7;
    --scripture-ref: #10b981;
    --border-color: #047857;
    --shadow: 0 18px 45px rgba(4, 120, 87, 0.7);
}

/* --- DARK 4: ROYAL --- */
body.theme-dark-royal {
    --bg-color: #020617;
    --text-color: #e0e7ff;
    --heading-color: #eef2ff;
    --accent-color: #6366f1;
    --container-bg: #111827;
    --scripture-text: #c7d2fe;
    --scripture-ref: #818cf8;
    --border-color: #4f46e5;
    --shadow: 0 18px 45px rgba(55, 48, 163, 0.8);
}

/* --- LIGHT 1: CLEAN --- */
body.theme-light-clean {
    --bg-color: #f3f4f6;
    --text-color: #111827;
    --heading-color: #0f172a;
    --accent-color: #2563eb;
    --container-bg: #ffffff;
    --scripture-text: #4b5563;
    --scripture-ref: #1d4ed8;
    --border-color: #e5e7eb;
    --shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
}

/* --- LIGHT 2: SEPIA --- */
body.theme-light-sepia {
    --bg-color: #fdf6e3;
    --text-color: #3b3023;
    --heading-color: #4b2e15;
    --accent-color: #d97706;
    --container-bg: #fffbeb;
    --scripture-text: #92400e;
    --scripture-ref: #c05621;
    --border-color: #fcd34d;
    --shadow: 0 16px 30px rgba(146, 64, 14, 0.25);
}

/* --- LIGHT 3: ROSE --- */
body.theme-light-rose {
    --bg-color: #fff1f2;
    --text-color: #4b1f2f;
    --heading-color: #881337;
    --accent-color: #ec4899;
    --container-bg: #ffffff;
    --scripture-text: #9f1239;
    --scripture-ref: #db2777;
    --border-color: #fecaca;
    --shadow: 0 16px 34px rgba(236, 72, 153, 0.25);
}

/* --- LIGHT 4: COOL --- */
body.theme-light-cool {
    --bg-color: #e5f0ff;
    --text-color: #1e293b;
    --heading-color: #020617;
    --accent-color: #0ea5e9;
    --container-bg: #f9fafb;
    --scripture-text: #64748b;
    --scripture-ref: #0369a1;
    --border-color: #cbd5e1;
    --shadow: 0 16px 34px rgba(15, 23, 42, 0.25);
}

/* =========================================
   3B. PAGE HEADER & TITLE BUTTONS
   ========================================= */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.page-title {
    margin: 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    font-size: 2.4rem;
    line-height: 1.2;
    text-align: center;
}

.title-buttons {
    display: flex;
    gap: 0.5rem;
}

.title-buttons button {
    min-width: 2.5rem;
    padding: 0.5rem 0.9rem;
}

/* =========================================
   4. GLOBAL RESET & LAYOUT
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
    font-size: calc(var(--font-base) * var(--font-scale));
}

/* Apple-style: breathable, centered, elegant */
body {
    font-family: 'Lato', sans-serif;
    font-size: 1rem; /* Everything scales from html font-size */
    line-height: 1.8;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

/* Main content container */
.container {
    width: 100%;
    max-width: 800px;
    background-color: var(--container-bg);
    padding: 2.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    transition:
        background-color var(--transition-speed),
        border-color var(--transition-speed),
        color var(--transition-speed);
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        padding: 0.75rem;
    }
    .container {
        padding: 1.5rem;
        border-radius: 1.25rem;
    }
}

/* =========================================
   5. TYPOGRAPHY
   ========================================= */

/* Headings - Gabriela Font */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Gabriela', serif;
    text-align: center;
    color: var(--heading-color);
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
    text-shadow: 0 0.08rem 0.16rem rgba(0, 0, 0, 0.45);
    transition: color var(--transition-speed);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

/* Paragraphs */
p {
    margin-bottom: 1.15em;
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Links */
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color var(--transition-speed), filter var(--transition-speed);
}

a:hover {
    text-decoration: underline;
    filter: brightness(1.1);
}

/* =========================================
   6. SCRIPTURE STYLING
   ========================================= */

/* Bible text (often inside <em> / <i>) */
em,
i,
.scripture-text {
    font-style: italic;
    color: var(--scripture-text);
    display: block;
    margin: 0.75em 0;
    padding-left: 0.9rem;
    border-left: 0.2rem solid var(--accent-color);
    transition: color var(--transition-speed), border-color var(--transition-speed);
}

/* Bible references: strong, bold links, etc. */
strong,
b,
a,
.scripture-ref {
    font-weight: 700;
    color: var(--scripture-ref);
}

/* =========================================
   7. BUTTONS & INTERACTION
   ========================================= */
button,
.btn {
    cursor: pointer;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 999px; /* pill shape */
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    margin: 0.3rem;
    transition:
        transform 0.1s ease,
        opacity 0.2s ease,
        background-color var(--transition-speed),
        box-shadow var(--transition-speed);
    box-shadow: 0 0.5rem 0.9rem rgba(0, 0, 0, 0.25);
}

button:hover,
.btn:hover {
    transform: translateY(-0.125rem);
    opacity: 0.92;
}

/* Required: animate when clicked with translateY(10px) */
button:active,
.btn:active {
    transform: translateY(0.625rem); /* ~10px */
}

/* =========================================
   8. IMAGES (if any used later)
   ========================================= */
img {
    max-width: 300px;        /* 1. Limits width to 300px */
    width: 100%;             /* Ensures it shrinks on very small screens */
    height: auto;            /* Keeps the image from stretching/distorting */
    border-radius: 0.75rem;  /* 2. Adds rounded corners */
    display: block;          /* Required for centering */
    margin: 1.25rem auto;    /* 3. 'auto' on left/right centers the image */
    box-shadow: var(--shadow);
}

/* =========================================
   9. MISC
   ========================================= */

/* For places where the original text intentionally had strikethrough */
.strikethrough {
    text-decoration: line-through;
}
