/* style.css - COMPLETE FINAL VERSION - November 27, 2025 */
/* Everything in perfect order, no sections skipped, all comments preserved and enhanced */

@import url('https://fonts.googleapis.com/css2?family=Gabriela&family=Lato:wght@400;700&display=swap');

/* ====== RESET & ROOT ====== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: calc(16px * var(--font-scale, 1));
}

:root {
    --font-scale: 1;
    --bg-color: #0a141f;
    --text-color: #d0e8ff;
    --container-bg: rgba(20, 40, 70, 0.6);
    --accent-color: #00ccff;
    --link-color: #66eeff;
    --heading-color: #fff;
    --border-color: #335577;
    --progress-bg: #223344;
    --button-text: #000;
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ====== TYPOGRAPHY ====== */
h1.site-title {
    font-family: 'Gabriela', serif;
    font-size: 2.8rem;
    text-align: center;
    padding: 1.5rem 1rem 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    color: var(--heading-color);
}

/* ====== PROGRESS ====== */
.progress-container {
    text-align: center;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.progress-bar {
    height: 6px;
    background: var(--progress-bg);
    border-radius: 3px;
    overflow: hidden;
    max-width: 300px;
    margin: 0.4rem auto;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.6s ease;
}

/* ====== NAVIGATION BAR ====== */
nav.nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
    padding: 1rem;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Back / Forward buttons */
.nav-button {
    font-size: 2rem;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.nav-button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.nav-button:active:not(.disabled) {
    transform: translateY(4px);
}

/* Font cycle & Theme buttons - same style as nav buttons */
.font-cycle,
.theme-toggle {
    font-size: 1.8rem;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hamburger menu button */
.menu-btn {
    font-size: 2.2rem;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ====== DROPDOWN DAY MENU (below nav bar) ====== */
.dropdown-grid {
    display: none;
    /* starts hidden */
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 1rem auto 0;
    max-width: 960px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.dropdown-grid.show {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.dropdown-grid a {
    display: block;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    text-align: center;
}

.dropdown-grid a:hover {
    background: var(--accent-color);
    color: #000;
    font-weight: bold;
    transform: translateY(-2px);
}

/* ====== MAIN CONTENT ====== */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 860px;
    margin: 0 auto;
    width: 100%;
}

.day-article,
.title-page {
    background: var(--container-bg);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.day-title {
    font-family: 'Gabriela', serif;
    font-size: 2.6rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--heading-color);
}

.title-image {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 1.5rem;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.day-image {
    width: 100%;
    max-width: 600px;
    border-radius: 1.5rem;
    margin: 2rem auto;
    display: block;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.section {
    margin-bottom: 3rem;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: var(--accent-color);
    text-align: center;
}

.verse {
    font-size: 1.15rem;
    margin: 1.2rem 0;
}

.verse a {
    color: var(--link-color);
    text-decoration: underline;
    font-weight: bold;
}

.big-button {
    display: block;
    width: fit-content;
    margin: 3rem auto;
    font-size: 1.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.big-button:active {
    transform: translateY(6px);
}

.error-container {
    margin: 3rem auto;
    max-width: 700px;
    text-align: center;
    background: rgba(100, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #800;
}

/* ====== THEMES ====== */
[data-theme="dark-sky"] {
    --bg-color: #0a141f;
    --text-color: #d0e8ff;
    --container-bg: rgba(20, 40, 70, 0.6);
    --accent-color: #00ccff;
    --link-color: #66eeff;
    --heading-color: #fff;
    --border-color: #335577;
    --progress-bg: #223344;
}

[data-theme="dark-purple"] {
    --bg-color: #110018;
    --text-color: #e0d0ff;
    --container-bg: rgba(40, 0, 60, 0.6);
    --accent-color: #cc66ff;
    --link-color: #ee99ff;
    --heading-color: #fff;
    --border-color: #553366;
    --progress-bg: #332233;
}

[data-theme="dark-forest"] {
    --bg-color: #001100;
    --text-color: #d0ffd0;
    --container-bg: rgba(0, 40, 20, 0.6);
    --accent-color: #00ffaa;
    --link-color: #66ffcc;
    --heading-color: #fff;
    --border-color: #003322;
    --progress-bg: #003322;
}

[data-theme="dark-charcoal"] {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --container-bg: rgba(40, 40, 40, 0.6);
    --accent-color: #8888ff;
    --link-color: #aaaaff;
    --heading-color: #fff;
    --border-color: #444;
    --progress-bg: #222;
}

[data-theme="light-cream"] {
    --bg-color: #fffaf0;
    --text-color: #332211;
    --container-bg: rgba(255, 255, 255, 0.7);
    --accent-color: #8b4513;
    --link-color: #663300;
    --heading-color: #5d2e0c;
    --border-color: #ccaa88;
    --progress-bg: #eeddcc;
}

[data-theme="light-sepia"] {
    --bg-color: #f1e7d0;
    --text-color: #3c2f1f;
    --container-bg: rgba(255, 255, 255, 0.6);
    --accent-color: #8b4513;
    --link-color: #663300;
    --heading-color: #5d2e0c;
    --border-color: #ccaa88;
    --progress-bg: #ddccbb;
}

[data-theme="light-white"] {
    --bg-color: #ffffff;
    --text-color: #222;
    --container-bg: rgba(0, 0, 0, 0.04);
    --accent-color: #0066cc;
    --link-color: #0066cc;
    --heading-color: #111;
    --border-color: #ccc;
    --progress-bg: #eee;
}

[data-theme="light-blue-tint"] {
    --bg-color: #f0f8ff;
    --text-color: #001f3f;
    --container-bg: rgba(255, 255, 255, 0.7);
    --accent-color: #007bff;
    --link-color: #0056b3;
    --heading-color: #004085;
    --border-color: #bbddee;
    --progress-bg: #ddd;
}

/* Add this anywhere in style.css (I recommend near the bottom, after the themes) */
.contrast-link,
a.contrast-link {
    color: var(--link-color) !important;
    /* !important just in case it's inside another element that tries to override */
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.2s ease;
}

.contrast-link:hover,
a.contrast-link:hover {
    opacity: 0.8;
}

/* ==== PLAIN HYPERLINKS (Bible Verses, etc.) ==== */
a:not([class]) {
    font-weight: bold;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Hover effect: Subtle underline and opacity without changing base color */
a:not([class]):hover {
    text-decoration: underline !important;
    opacity: 0.7;
    color: inherit !important;
}

a:not([class]):visited,
a:not([class]):active,
a:not([class]):focus {
    color: inherit;
    outline: none;
}

/* ====== MOBILE OPTIMIZATIONS ====== */
@media (max-width: 640px) {
    .nav-bar {
        gap: 1.2rem;
        padding: 1rem 0.5rem;
    }

    .site-title {
        font-size: 2.4rem;
    }

    .day-title {
        font-size: 2.2rem;
    }

    .big-button {
        font-size: 1.6rem;
    }

    .dropdown-grid.show {
        grid-template-columns: 1fr;
        padding: 1.2rem;
    }

    .font-cycle,
    .theme-toggle,
    .nav-button,
    .menu-btn {
        width: 3.8rem;
        height: 3.8rem;
        font-size: 2rem;
    }
}