/* FILE: style.css */
/* THEME: The Classic Authority */

/* --- CSS Variables for "The Classic Authority" Theme --- */
:root {
    --font-sans: 'Roboto', sans-serif;
    --font-serif: 'Lora', serif;
    --font-display: 'Playfair Display', serif;

    --color-background: #f8fafc; /* Slate-50 */
    --color-surface: #ffffff;    /* White */
    --color-primary-text: #1f2937; /* Gray-800 (Dark Charcoal) */
    --color-secondary-text: #4b5563; /* Gray-600 */
    --color-border: #e5e7eb; /* Gray-200 */
    
    /* ACCENT COLORS from the "Classic Authority" Logo */
    --color-accent: #f59e0b;      /* Amber-500 (A rich gold/amber) */
    --color-accent-hover: #d97706; /* Amber-600 (A darker amber for hover) */
    --color-accent-text: #ffffff;  /* White text for on top of the accent color */
}

/* --- General Body & Typography --- */
body {
    font-family: var(--font-sans);
    background-color: var(--color-background);
    color: var(--color-primary-text);
}

h1, h2, h3, h4, h5, h6, .font-serif {
    font-family: var(--font-serif);
}

.font-display {
    font-family: var(--font-display);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}
/* --- NEW: Doctrine Verdict Banner Styles --- */
.doctrine-verdict {
    display: flex;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem; /* 24px */
    border-radius: 0.5rem; /* 8px */
    border-width: 1px;
    border-style: solid;
    font-size: 1rem;
}

.doctrine-verdict svg {
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    margin-right: 0.75rem; /* 12px */
}

/* Green "Sound" style */
.verdict-sound {
    background-color: #f0fdf4; /* Green-50 */
    color: #15803d; /* Green-700 */
    border-color: #bbf7d0; /* Green-200 */
}

/* Red "Not Sound" style */
.verdict-not-sound {
    background-color: #fef2f2; /* Red-50 */
    color: #b91c1c; /* Red-700 */
    border-color: #fecaca; /* Red-200 */
}

/* Yellow "Caution" style */
.verdict-caution {
    background-color: #fefce8; /* Yellow-50 */
    color: #854d0e; /* Yellow-700 */
    border-color: #fef08a; /* Yellow-200 */
}
/* --- Homepage "About Us" Section --- */
.about-us-section {
    border-bottom: 2px solid var(--color-accent);
}


/* --- Main Navigation Overrides (to match the theme) --- */
.main-nav a:hover, #mobile-menu a:hover {
    color: var(--color-accent);
}

/* --- Form Page Styles (Themed) --- */
.form-page-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2.5rem;
    background-color: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

.form-page-container h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}
.form-page-container h1 a {
    color: var(--color-primary-text);
}
.form-page-container h1 a:hover {
    color: var(--color-accent);
}

/* --- UNIFIED FORM STYLES --- */
.post-form label {
    display: block;
    font-weight: 500;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary-text);
}
.post-form label:first-child {
    margin-top: 0;
}

.post-form input[type="text"],
.post-form input[type="password"],
.post-form textarea,
.post-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.post-form input[type="text"]:focus,
.post-form input[type="password"]:focus,
.post-form textarea:focus,
.post-form select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.post-form input[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    margin-top: 2rem;
    background-color: var(--color-accent);
    color: var(--color-accent-text);
    font-weight: bold;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.post-form input[type="submit"]:hover {
    background-color: var(--color-accent-hover);
}

.login-form-layout {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Message Styling --- */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    border: 1px solid transparent;
}

.message.success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.message.error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}
/* --- NEW: Hero Section Styles --- */
.hero-section {
    position: relative; /* Required for the overlay to work */
    min-height: 400px; /* Gives the hero section some height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    
    /* --- IMPORTANT --- */
    /* Replace this URL with the path to YOUR background image */
    background-image: url('https://images.unsplash.com/photo-1497621122273-f5cfb6065c56');
    
    background-size: cover;
    background-position: center;
    border-radius: 8px; /* Optional: adds rounded corners */
    overflow: hidden; /* Ensures the overlay respects the rounded corners */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(31, 41, 55, 0.6); /* A semi-transparent dark overlay (Gray-800 at 60% opacity) */
    z-index: 1;
}

.hero-text-content {
    position: relative; /* Puts the text on top of the overlay */
    z-index: 2;
    padding: 2rem;
    max-width: 800px; /* Keeps the text from stretching too wide */
}

/* --- End Hero Section Styles --- */
/* --- Tabbed Editor Styles --- */
.editor-container {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-top: 1.5rem;
}

.editor-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
    background-color: #f8fafc;
}

.tab-link {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-weight: 500;
    color: var(--color-secondary-text);
    transition: all 0.2s ease-in-out;
}

.tab-link:hover {
    background-color: #f1f5f9;
}

.tab-link.active {
    color: var(--color-primary-text);
    border-bottom: 2px solid var(--color-accent);
    background-color: #ffffff;
}

.tab-content { padding: 0; }

.tab-content textarea {
    width: 100%;
    border: none !important;
    border-radius: 0 0 6px 6px;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}

.tab-content#preview-view {
    padding: 1.5rem;
    min-height: 200px;
}

/* --- UPDATED: Blog Post Content Styles (.prose) --- */
/* --- ENHANCED: Blog Post Content Styles (.prose) --- */

.prose {
    font-size: 1.125rem; /* 18px base for readability */
    line-height: 1.8;
    max-width: 65ch; /* Optimal line length for reading */
    margin: 2rem auto; /* Center the prose content */
}

/* Remove top/bottom margin from the first/last elements for clean spacing */
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

/* --- Headings --- */
.prose h1, .prose h2, .prose h3 {
    line-height: 1.3;
    color: var(--color-primary-text);
}

.prose h1 {
    font-family: var(--font-display);
    font-size: 2.75rem; /* 44px */
    text-align: center;
    margin: 0 0 1.5rem 0;
}

.prose h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem; /* 28px */
    margin: 2.5rem 0 1.25rem 0;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-border);
}

.prose h3 {
    font-family: var(--font-sans);
    font-size: 1.25rem; /* 20px */
    font-weight: 700;
    margin: 2rem 0 1rem 0;
}

/* --- Paragraphs & Links --- */
.prose p {
    margin: 0 0 1.5rem 0;
}

.prose a {
    color: var(--color-accent);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(245, 158, 11, 0.4); /* Subtle underline color */
    text-underline-offset: 3px;
    transition: all 0.2s ease-in-out;
}

.prose a:hover {
    color: var(--color-accent-hover);
    text-decoration-color: var(--color-accent-hover); /* Underline becomes solid on hover */
}

/* --- Lists --- */
.prose ul, .prose ol {
    padding-left: 1.75rem;
    margin: 0 0 1.5rem 0;
}

.prose li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.prose li::marker {
    color: var(--color-accent);
    font-weight: 700;
}

/* --- Other Elements --- */
.prose strong {
    font-weight: 700;
    color: var(--color-primary-text);
}

.prose em {
    font-style: italic;
}

.prose blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-accent);
    background-color: var(--color-background);
    font-style: italic;
    color: var(--color-secondary-text);
}

.prose blockquote p {
    margin: 0;
}

.prose hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 3rem auto;
}
/* --- NEW: Responsive YouTube Embed Container --- */
.video-responsive {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio (9 / 16 = 0.5625) */
    width: 100%;
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
  /* Styles for the scripture popover */
    #scripture-popover {
        position: absolute;
        z-index: 100;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        padding: 1rem;
        width: 320px;
        max-width: 90vw;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
        font-size: 0.95rem;
        line-height: 1.6;
    }
    #scripture-popover.visible {
        opacity: 1;
        visibility: visible;
    }
    #scripture-popover h3 {
        font-size: 1.1rem;
        font-weight: bold;
        margin-top: 0;
        margin-bottom: 0.5rem;
        color: #333;
    }
    #scripture-popover p {
        margin-bottom: 0.75rem;
    }
    #scripture-popover em {
        display: block;
        font-size: 0.8rem;
        text-align: right;
        color: #777;
    }
    #scripture-popover .loading-text {
        color: #999;
    }

    /* Style for the identified scripture references */
    .scripture-ref {
        cursor: pointer;
        border-bottom: 2px dotted #cce4ff; /* Light blue dotted underline */
        transition: background-color 0.2s;
    }
    .scripture-ref:hover {
        background-color: #eef5ff; /* Light blue highlight on hover */
    }