/*
Theme Name: Bibledoc Modern
Theme URI: https://bibledoc.org
Author: Pastor Arnold Famini
Author URI: https://arnoldfamini.com
Description: A faithful recreation of the classic Bibledoc design with mobile optimization.
Version: 1.1.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bibledoc-modern
*/

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #dc2626;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #b91c1c;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.skip-link:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ========================================
   NAVIGATION - MAIN STYLES
   ======================================== */

.main-navigation {
    background: #1f2937;
    width: 100%;
    position: sticky;
    top: 0; /* Default sticky position */
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* FIX FOR ADMIN BAR DISPLACEMENT: 
   If the admin bar is present, move the sticky header down so it doesn't hide behind it. */
body.admin-bar .main-navigation {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-navigation {
        top: 46px; /* Admin bar is taller on mobile */
    }
}

.main-navigation.nav-solid {
    background: #111827;
}

/* Transparent nav on home page hero */
.home .main-navigation {
    background: transparent;
    position: absolute;
    width: 100%;
    top: 0; /* Reset top for absolute positioning */
}

/* When logged in, absolute nav on home needs to move down too */
.home.admin-bar .main-navigation {
    top: 32px;
}

.home .main-navigation.scrolled {
    background: #1f2937;
    position: fixed;
    top: 0;
}

.home.admin-bar .main-navigation.scrolled {
    top: 32px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .site-title {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
}

.site-branding .site-title a {
    color: white;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    padding-bottom: 0.25rem;
    transition: border-color 0.3s;
}

.site-branding .site-title a:hover {
    border-bottom-color: #dc2626;
    color: white;
}

.nav-menu-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Primary Menu */
.primary-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.primary-menu li {
    margin: 0;
    list-style: none;
}

.primary-menu > li > a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.3s;
    display: block;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Dropdown Arrow for menu items with children */
.primary-menu > .menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-menu > .menu-item-has-children > a::after {
    content: '';
    border: solid white;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.3s;
}

.primary-menu > .menu-item-has-children:hover > a::after,
.primary-menu > .menu-item-has-children.open > a::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* Submenu Styles */
.primary-menu .menu-item-has-children {
    position: relative;
}

.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 240px;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    list-style: none;
    z-index: 100;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.primary-menu .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    margin: 0;
}

.primary-menu .sub-menu a {
    color: #333333;
    padding: 0.75rem 1.5rem;
    display: block;
    transition: all 0.3s;
    border-radius: 0;
    font-size: 0.95rem;
}

.primary-menu .sub-menu a:hover {
    background: #f3f4f6;
    color: #dc2626;
}

/* Nested Submenus */
.primary-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.support-btn {
    background: #dc2626;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.support-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    color: white;
}

.header-search-toggle {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.header-search-toggle:hover {
    opacity: 0.8;
}

.header-search-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Desktop/Mobile visibility */
.desktop-only {
    display: flex;
}

.mobile-only {
    display: none;
}

/* ========================================
   SEARCH MODALS & OVERLAYS
   ======================================== */

/* Desktop Header Search Bar */
.header-search-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1f2937;
    padding: 1rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.3s;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-search-bar.active {
    transform: translateY(0);
}

.search-bar-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-search-bar .search-form {
    flex: 1;
    display: flex;
}

.header-search-bar .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem 0 0 0.375rem;
    font-size: 1rem;
    outline: none;
}

.header-search-bar .search-submit {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0.375rem 0.375rem 0;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.header-search-bar .search-submit:hover {
    background: #b91c1c;
}

.search-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity 0.3s;
}

.search-close:hover {
    opacity: 0.8;
}

/* Mobile Search Modal */
.mobile-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.98);
    z-index: 1002;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-search-modal.active {
    opacity: 1;
    visibility: visible;
}

.mobile-search-container {
    width: 90%;
    max-width: 500px;
}

.mobile-search-modal .search-form {
    display: flex;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.mobile-search-modal .search-field {
    flex: 1;
    padding: 1.25rem 1.5rem;
    border: none;
    font-size: 1.125rem;
    outline: none;
}

.mobile-search-close {
    background: #f3f4f6;
    border: none;
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s;
}

.mobile-search-close:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-wrapper {
    position: relative;
    height: 520px;
    min-height: 400px;
    max-height: 70vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    overflow: hidden;
}

.hero-wrapper .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9) 0%, rgba(17, 24, 39, 0.8) 100%);
    z-index: 1;
}

.hero-grid {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: end;
    height: 100%;
}

.hero-col-text {
    z-index: 2;
    padding-bottom: 3rem;
    align-self: center;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
    color: white;
    font-style: italic;
}

.hero-col-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
}

.hero-col-image img {
    max-height: 380px;
    width: auto;
    object-fit: contain;
    object-position: bottom;
}

/* Hero Search */
.hero-search {
    margin-top: 2rem;
}

.hero-search .search-form {
    display: flex;
    max-width: 500px;
}

.hero-search .search-field {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.5rem 0 0 0.5rem;
    font-size: 1rem;
    outline: none;
}

.hero-search .search-field:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

.hero-search .search-submit {
    background: #dc2626;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.hero-search .search-submit:hover {
    background: #b91c1c;
}

/* Page Header Spacer (for non-home pages) */
.page-header-spacer {
    height: 0;
}

/* ========================================
   BREADCRUMB
   ======================================== */

.breadcrumb-container {
    background: #f9fafb;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb-container a {
    color: #dc2626;
}

.breadcrumb-container a:hover {
    text-decoration: underline;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */

.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: center;
}

.section-title-red {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    color: #dc2626;
    font-weight: 700;
    margin: 0;
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

/* ========================================
   POSTS LIST GRID (Front Page Style)
   ======================================== */

/* Three-column layout for homepage */
.home-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.home-column {
    min-width: 0;
}

.home-column .section-title-red {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
}

.posts-list-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.list-item {
    padding: 1rem 0;
    background: transparent;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: transparent;
    border-color: #e5e7eb;
    box-shadow: none;
    transform: none;
}

.list-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.list-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s;
}

.list-title a:hover {
    color: #dc2626;
}

.list-meta {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-count {
    display: inline;
}

/* ========================================
   ARCHIVE 3-COLUMN GRID
   ======================================== */

.archive-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.archive-column {
    min-width: 0;
}

.archive-column .posts-list-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.archive-column .list-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.archive-column .list-item:last-child {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .archive-grid-3col {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .archive-grid-3col {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .archive-column {
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .archive-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }
}

/* ========================================
   POSTS GRID (Card Style)
   ======================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 1px solid #e5e7eb;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #dc2626;
    color: white;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-title a {
    color: #1f2937;
}

.card-title a:hover {
    color: #dc2626;
}

.card-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #9ca3af;
}

.card-date,
.card-views {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ========================================
   SINGLE POST STYLES (UPDATED DEC 3)
   ======================================== */

/* Post Background Wrapper - Full Width */
.post-background-wrapper {
    width: 100%;
    background-color: #ffffff;
    /* Pushes content down so it doesn't touch the header */
    padding-top: 80px; 
    padding-bottom: 80px;
    box-sizing: border-box;
}

/* Content Container - Readable Width & Centered */
.post-content-centered {
    /* 740px is the 'Golden Standard' for readable text width */
    max-width: 740px; 
    width: 90%; /* Ensures mobile has side padding */
    margin: 0 auto; /* Centers the block horizontally */
}

/* Entry Header - Centered & Spaced */
.entry-header {
    text-align: center;
    margin-bottom: 50px;
}

.entry-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75em;
    line-height: 1.2;
    margin: 20px 0;
    color: #1f2937;
    font-weight: 700;
}

/* Post Categories */
.post-categories {
    margin-bottom: 15px;
    text-align: center;
}

.post-category {
    display: inline-block;
    padding: 6px 16px;
    background: #dc2626;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.3s;
}

.post-category:hover {
    background: #b91c1c;
    color: white;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    font-size: 0.9em;
    color: #6b7280;
    margin-top: 15px;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta svg,
.post-meta i {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.post-meta a {
    color: #dc2626;
    text-decoration: none;
}

.post-meta a:hover {
    text-decoration: underline;
}

/* Post Thumbnail - Centered */
.post-thumbnail {
    margin: 30px auto;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Entry Content */
.entry-content {
    font-family: Georgia, serif;
    font-size: 1.125em;
    line-height: 1.8;
    color: #374151;
}

/* Prevent embedded article from breaking layout */
.bible-study-article,
.entry-content .bible-study-article {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.entry-content p {
    margin: 1.5em 0;
}

.entry-content h2 {
    color: #2c5f8d;
    font-size: 1.75em;
    margin: 50px 0 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #e5e7eb;
    font-weight: 700;
}

.entry-content h3 {
    color: #3a7ca5;
    font-size: 1.4em;
    margin: 40px 0 20px;
    font-weight: 600;
}

.entry-content h4 {
    color: #4b5563;
    font-size: 1.2em;
    margin: 30px 0 15px;
    font-weight: 600;
}

.entry-content strong {
    color: #2c5f8d;
    font-weight: 600;
}

.entry-content em {
    color: #5a6268;
}

.entry-content a {
    color: #dc2626;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #b91c1c;
}

/* Lists */
.entry-content ul,
.entry-content ol {
    margin: 25px 0;
    padding-left: 40px;
}

.entry-content li {
    margin: 12px 0;
}

/* Blockquote */
.entry-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 5px solid #2c5f8d;
    background: #f0f7fb;
    font-style: italic;
    color: #2c3e50;
}

/* ==========================================================================
   SINGLE POST SVG ICON STYLES
   ========================================================================== */

/* Meta Icons */
.meta-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.375rem;
    flex-shrink: 0;
}

.section-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Tags Section */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #374151;
}

.tags-label {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

.tags-label svg {
    color: #6b7280;
}

.post-tags a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #1f2937;
    color: #d1d5db;
    border-radius: 9999px;
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.post-tags a:hover {
    background: #dc2626;
    color: #fff;
}

/* Share Section */
.post-share {
    margin-top: 1.5rem;
}

.share-label {
    display: inline-flex;
    align-items: center;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.share-label svg {
    color: #6b7280;
    margin-right: 0.5rem;
}

/* Social Share Buttons */
.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-button svg {
    flex-shrink: 0;
}

.share-button.facebook {
    background: #1877f2;
    color: #fff;
}

.share-button.facebook:hover {
    background: #0d65d9;
}

.share-button.twitter {
    background: #000;
    color: #fff;
}

.share-button.twitter:hover {
    background: #333;
}

.share-button.linkedin {
    background: #0a66c2;
    color: #fff;
}

.share-button.linkedin:hover {
    background: #004182;
}

.share-button.email {
    background: #374151;
    color: #fff;
}

.share-button.email:hover {
    background: #4b5563;
}

/* Related Posts Section */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.related-title {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 1.5rem;
}

.related-title svg {
    color: #dc2626;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-item {
    padding: 1rem 0;
    border-bottom: 1px solid #1f2937;
}

.related-item:last-child {
    border-bottom: none;
}

.related-item-title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
}

.related-item-title a {
    color: #e5e7eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-item-title a:hover {
    color: #dc2626;
}

.related-item-meta {
    display: inline-flex;
    align-items: center;
    font-size: 0.8125rem;
    color: #6b7280;
}

.related-item-meta svg {
    color: #4b5563;
}

/* Author Bio */
.author-bio {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: #1f2937;
    border-radius: 0.75rem;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #f9fafb;
    margin: 0 0 0.5rem 0;
}

.author-description {
    color: #9ca3af;
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.author-link {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-link:hover {
    color: #ef4444;
}

/* Post Navigation */
.post-navigation {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
    max-width: 45%;
}

.post-navigation .nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.nav-title {
    color: #e5e7eb;
    font-weight: 500;
    transition: color 0.2s ease;
}

.post-navigation a:hover .nav-title {
    color: #dc2626;
}

/* ========================================
   BIBLE STUDY CUSTOM STYLES
   ======================================== */

/* Introduction Text */
.intro-text {
    font-size: 1.2em;
    color: #555;
    font-style: italic;
    border-left: 5px solid #2c5f8d;
    padding-left: 25px;
    margin: 35px 0;
    line-height: 1.7;
}

/* Scripture Blocks */
.scripture {
    background: linear-gradient(135deg, #f0f7fb 0%, #e8f4f8 100%);
    border-left: 6px solid #2c5f8d;
    padding: 25px 30px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.1em;
    color: #2c3e50;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.scripture-ref {
    display: block;
    margin-top: 15px;
    font-weight: 700;
    font-style: normal;
    color: #2c5f8d;
    font-size: 0.95em;
    text-align: right;
}

/* Highlight Boxes */
.highlight-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

.highlight-box h3 {
    color: #92400e;
    margin-top: 0;
}

/* Key Points */
.key-point {
    background: linear-gradient(135deg, #e8f4f8 0%, #dbeafe 100%);
    padding: 20px 25px;
    margin: 25px 0;
    border-radius: 8px;
    border-left: 5px solid #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.key-point strong {
    color: #0c4a6e;
}

/* Ellen White Quotes */
.ewg-quote {
    background: #f8f9fa;
    border-left: 5px solid #6c757d;
    padding: 25px 30px;
    margin: 30px 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Section Dividers */
.section-divider {
    text-align: center;
    margin: 50px 0;
    color: #cbd5e1;
    font-size: 2em;
    letter-spacing: 10px;
}

/* Parallel Comparison Box */
.parallel-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.parallel-box > div {
    padding: 15px;
    background: white;
    border-radius: 6px;
}

/* ========================================
   ENTRY FOOTER - CENTERED
   ======================================== */

.entry-footer {
    max-width: 100%; /* Inherits centered width */
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
}

/* Comments - Centered */
.comments-area {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e5e7eb;
}

.comments-title {
    font-size: 1.8em;
    color: #1f2937;
    margin-bottom: 30px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    padding: 20px;
    margin-bottom: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.comment-author {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.comment-content {
    color: #4b5563;
    line-height: 1.6;
}

.comment-reply-link {
    color: #dc2626;
    font-size: 0.9em;
    font-weight: 500;
}

.comment-form {
    margin-top: 30px;
}

.comment-form textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #dc2626;
}

.comment-form button,
.comment-form input[type="submit"] {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 15px;
}

.comment-form button:hover,
.comment-form input[type="submit"]:hover {
    background: #b91c1c;
    transform: translateY(-2px);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: #1f2937;
    color: white;
    padding: 3rem 2rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #dc2626;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #9ca3af;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    color: #374151;
    transition: all 0.3s;
    text-decoration: none;
}

.pagination a:hover,
.pagination .current {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .hero-wrapper {
        height: auto;
        min-height: 400px;
        max-height: none;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        align-items: center;
        height: auto;
        padding: 4rem 2rem;
    }
    
    .hero-col-text {
        padding-bottom: 0;
    }
    
    .hero-col-image {
        display: none;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-description {
        font-size: 1.25rem;
    }
    
    .hero-search .search-form {
        margin: 0 auto;
    }
    
    .home-columns {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .posts-list-grid {
        grid-template-columns: 1fr;
    }
    
    /* Single Post Tablet - keep centered width */
    .post-content-centered {
        width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex !important;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .site-branding .site-title {
        font-size: 1.5rem;
    }
    
    .nav-menu-wrapper {
        gap: 1rem;
    }
    
    /* Mobile Menu */
    .primary-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #1f2937;
        flex-direction: column;
        padding: 1.5rem;
        gap: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        align-items: stretch;
    }
    
    /* Admin bar adjustment for mobile menu */
    body.admin-bar .primary-menu {
        top: 106px; /* 60px nav + 46px admin bar */
    }
    
    .primary-menu.active {
        transform: translateX(0);
    }
    
    .primary-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .primary-menu > li > a {
        padding: 1rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* Mobile dropdown arrow */
    .primary-menu > .menu-item-has-children > a::after {
        margin-left: auto;
        margin-right: 0;
    }
    
    /* Mobile Submenu */
    .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        background: rgba(0,0,0,0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0;
        min-width: 100%;
    }
    
    .primary-menu .menu-item-has-children.open > .sub-menu {
        max-height: 1000px;
    }
    
    .primary-menu .sub-menu a {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        color: rgba(255,255,255,0.9);
    }
    
    .primary-menu .sub-menu a:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }
    
    /* Hero Mobile */
    .hero-wrapper {
        height: auto;
        min-height: 400px;
        max-height: none;
        background-attachment: scroll;
    }
    
    .hero-grid {
        padding: 4rem 1.5rem;
        align-items: center;
        height: auto;
    }
    
    .hero-col-text {
        padding-bottom: 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-search .search-form {
        margin: 0 auto;
    }
    
    /* Content Sections */
    .content-section {
        padding: 3rem 1.5rem;
    }
    
    .section-title-red {
        font-size: 1.75rem;
    }
    
    /* Posts Grid */
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        font-size: 1.8em;
    }
    
    .entry-content {
        font-size: 1em;
    }
    
    .entry-content h2 {
        font-size: 1.5em;
    }
    
    .entry-content h3 {
        font-size: 1.25em;
    }
    
    .parallel-box {
        grid-template-columns: 1fr;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .social-share-buttons {
        flex-direction: column;
    }
    
    .share-button {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .site-branding .site-title {
        font-size: 1.3rem;
    }
    
    .hero-title {
        font-size: 1.85rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-title-red {
        font-size: 1.5rem;
    }
    
    .content-section {
        padding: 2.5rem 1rem;
    }
    
    .scripture,
    .highlight-box,
    .key-point,
    .ewg-quote {
        padding: 15px 20px;
    }
    
    .list-item {
        padding: 1rem;
    }
    
    .list-title {
        font-size: 1rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .site-header,
    .main-navigation,
    .site-footer,
    .post-navigation,
    .related-posts,
    .comments-area,
    .social-share-buttons,
    .mobile-overlay,
    .mobile-search-modal,
    .header-search-bar {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .hero-wrapper {
        display: none;
    }
    
    .content-section {
        padding: 1rem;
    }
}