/**
 * Main Stylesheet
 * Custom styles to complement Tailwind CSS
 *
 * @package Theologian_Theme
 */

/* Custom Font Family Setup */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    padding-top: 50px; /* Account for fixed header */
}

/* Responsive base styles */
* {
    box-sizing: border-box;
}

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

/* Ensure all images are responsive */
img, video, iframe {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* ============================================
   STANDARDIZED THUMBNAIL SIZING - ONE RULE TO RULE THEM ALL
   ============================================ */

/* Book cover thumbnails - 2:3 aspect ratio - FORCE FIXED SIZE */
/* CRITICAL: Maximum specificity to override Tailwind and everything else */
.book-cover-thumbnail,
.book-card .book-cover-thumbnail,
article.book-card .book-cover-thumbnail,
.books-grid .book-cover-thumbnail,
.books-grid .book-card .book-cover-thumbnail,
.books-grid article .book-cover-thumbnail,
body .book-cover-thumbnail,
body .book-card .book-cover-thumbnail,
body article.book-card .book-cover-thumbnail {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    aspect-ratio: 2 / 3 !important;
    padding-bottom: 150% !important; /* 2:3 = 150% */
    height: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
}

.book-cover-thumbnail img,
.book-card .book-cover-thumbnail img,
article.book-card .book-cover-thumbnail img,
.books-grid .book-cover-thumbnail img,
.books-grid .book-card .book-cover-thumbnail img,
.books-grid article .book-cover-thumbnail img,
body .book-cover-thumbnail img,
body .book-card .book-cover-thumbnail img,
body article.book-card .book-cover-thumbnail img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* CRITICAL: Prevent thumbnail images from exceeding container on homepage */
/* Standard WordPress approach - constrain ALL images in cards */
/* BUT: Don't apply height:auto to images inside aspect-ratio containers */
article:not(.single):not(.page) img:not(.post-thumbnail img):not(.book-cover-thumbnail img),
.post-thumbnail:not(.post-thumbnail) img,
.theologian-latest-section img:not(.post-thumbnail img):not(.book-cover-thumbnail img) {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}
/* Images inside aspect-ratio containers should NOT have height:auto */
.theologian-latest-section .post-thumbnail img,
.theologian-latest-section .book-cover-thumbnail img,
.theologian-latest-section article .post-thumbnail img,
.theologian-latest-section .article-card .post-thumbnail img,
.theologian-latest-section .book-card .book-cover-thumbnail img {
    max-width: 100% !important;
    /* height is controlled by container aspect-ratio */
    box-sizing: border-box !important;
}

/* STANDARDIZED: Prevent card containers from expanding due to oversized images */
article:not(.single):not(.page),
.article-card,
.book-card,
article.book-card,
.sermon-card,
.posts-grid article,
.articles-grid article,
.books-grid article,
.books-grid .book-card {
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    /* Prevent flex/grid items from expanding */
    min-width: 0 !important;
    flex-shrink: 1 !important;
}

/* CRITICAL: Force book cards to respect grid constraints */
.books-grid .book-card,
.books-grid article.book-card {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* CRITICAL: Ensure book thumbnail links don't expand */
.book-card a,
article.book-card a {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

/* CRITICAL: Force grid containers to respect bounds */
.books-grid,
.posts-grid,
.articles-grid {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* CRITICAL: Ensure all images in book cards are constrained */
.book-card img,
article.book-card img {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Removed - using simple .book-cover-thumbnail img rule above */

/* ============================================
   Featured Image Constraints & Aspect Ratios
   ============================================ */

/* STANDARD WORDPRESS FEATURED IMAGE DISPLAY
 * 
 * Single Posts/Articles/Sermons/Pages:
 * - Use WordPress 'large' size (1024px wide) via the_post_thumbnail('large')
 * - Use .post-thumbnail class for consistent styling
 * - Images display full-width with max-height constraint (675px = 16:9 at 1200px)
 * - Responsive: max-height reduces to 400px on mobile
 * 
 * Card/Archive Thumbnails:
 * - Use custom sizes: article-thumbnail (600x400), sermon-thumbnail (400x300), etc.
 * - Maintain 16:9 aspect ratio via CSS padding-bottom technique
 * - Images use object-fit: cover to fill container without distortion
 */

/* Single Post Featured Image Rules - See rules at bottom of this section */
/* These are defined AFTER card rules to ensure proper override */

/* Card Featured Images - Consistent Aspect Ratios */
/* CRITICAL: Apply to ALL post thumbnails in cards/archives/homepage */
/* Target cards specifically - NOT single post pages */
/* STANDARDIZED: Force all thumbnails to fixed size - prevent page expansion */
article:not(.single):not(.page) .post-thumbnail,
.posts-grid .post-thumbnail,
.articles-grid .post-thumbnail,
.books-grid .post-thumbnail,
.theologian-latest-section .post-thumbnail,
.theologian-latest-section article .post-thumbnail,
.theologian-latest-section .article-card .post-thumbnail,
.front-page .post-thumbnail,
.front-page article .post-thumbnail,
.front-page .article-card .post-thumbnail,
.sermon-card .post-thumbnail,
.article-card .post-thumbnail {
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    height: 0 !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    box-sizing: border-box !important;
    /* CRITICAL: Prevent container from expanding */
    flex-shrink: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

article:not(.single):not(.page) .post-thumbnail img,
.posts-grid .post-thumbnail img,
.articles-grid .post-thumbnail img,
.books-grid .post-thumbnail img,
.theologian-latest-section .post-thumbnail img,
.theologian-latest-section article .post-thumbnail img,
.theologian-latest-section .article-card .post-thumbnail img,
.theologian-latest-section .book-card .post-thumbnail img,
.front-page .post-thumbnail img,
.front-page article .post-thumbnail img,
.front-page .article-card .post-thumbnail img,
.sermon-card .post-thumbnail img,
.article-card .post-thumbnail img {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.3s ease;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    box-sizing: border-box !important;
    /* CRITICAL: Prevent image from breaking layout */
    flex-shrink: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* Sermon thumbnail - Standardized to 16:9 (matches other cards) */
.sermon-card .post-thumbnail {
    aspect-ratio: 16 / 9 !important;
    padding-bottom: 56.25% !important;
}

/* Duplicate rules removed - using simple .book-cover-thumbnail rule above */

/* Universal thumbnail constraints - Prevent ANY overflow */
/* BUT: Single posts override these rules below */
/* STANDARDIZED: Force all card thumbnails to respect container bounds */
article:not(.single):not(.single-article):not(.single-sermon):not(.single-book):not(.page) .post-thumbnail,
.post-thumbnail:not(.single .post-thumbnail):not(.single-article .post-thumbnail):not(.single-sermon .post-thumbnail):not(.single-book .post-thumbnail):not(.page .post-thumbnail) {
    max-width: 100% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

article:not(.single):not(.single-article):not(.single-sermon):not(.single-book):not(.page) .post-thumbnail img,
.post-thumbnail:not(.single .post-thumbnail):not(.single-article .post-thumbnail):not(.single-sermon .post-thumbnail):not(.single-book .post-thumbnail):not(.page .post-thumbnail) img {
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

/* CRITICAL: Single Post Featured Images - MUST come AFTER all other rules */
/* These rules override card/archive rules for single post pages */
body.single article .post-thumbnail,
body.single-article article .post-thumbnail,
body.single-sermon article .post-thumbnail,
body.single-book article .post-thumbnail,
body.page article .post-thumbnail,
article.single .post-thumbnail,
article.single-article .post-thumbnail,
article.single-sermon .post-thumbnail,
article.single-book .post-thumbnail,
article.page .post-thumbnail {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 0.5rem !important;
    margin-bottom: 1.5rem !important;
    height: auto !important;
    padding-bottom: 0 !important;
    aspect-ratio: unset !important;
}

body.single article .post-thumbnail img,
body.single-article article .post-thumbnail img,
body.single-sermon article .post-thumbnail img,
body.single-book article .post-thumbnail img,
body.page article .post-thumbnail img,
article.single .post-thumbnail img,
article.single-article .post-thumbnail img,
article.single-sermon .post-thumbnail img,
article.single-book .post-thumbnail img,
article.page .post-thumbnail img {
    width: 100% !important;
    height: auto !important;
    max-height: 675px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0.5rem !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* About page featured image - reasonable size with nice styling */
.about-hero {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 1rem !important;
}

.about-hero img,
.about-featured-image {
    max-width: 100% !important;
    max-height: 500px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.about-hero img:hover,
.about-featured-image:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2), 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

@media (max-width: 768px) {
    .about-hero {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .about-hero img,
    .about-featured-image {
        max-height: 400px !important;
        border-radius: 8px !important;
    }
}

/* Responsive featured image heights */
@media (max-width: 768px) {
    body.single article .post-thumbnail img,
    body.single-article article .post-thumbnail img,
    body.single-sermon article .post-thumbnail img,
    body.single-book article .post-thumbnail img,
    body.page article .post-thumbnail img,
    article.single .post-thumbnail img,
    article.single-article .post-thumbnail img,
    article.single-sermon .post-thumbnail img,
    article.single-book .post-thumbnail img,
    article.page .post-thumbnail img {
        max-height: 400px !important;
    }
    
    .article-card .post-thumbnail,
    .book-card .post-thumbnail {
        aspect-ratio: 16 / 9; /* Keep consistent on mobile */
    }
}

@media (min-width: 1024px) {
    .post-thumbnail img {
        max-height: 675px; /* Match the image size aspect ratio */
    }
}

/* Hover effects for card images */
.article-card:hover .post-thumbnail img,
.book-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Responsive container padding */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 600;
    line-height: 1.2;
}

/* Theologian Hero Section */
.theologian-hero {
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
    position: relative;
}

.theologian-hero .text-content h1 {
    color: #8B1A1A; /* Deep red similar to example */
    font-weight: 700;
}

.theologian-hero .text-content p {
    color: #374151;
}

.theologian-image img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Theologian image sizing - balanced and prominent */
.theologian-hero .theologian-image {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .theologian-hero .theologian-image {
        max-width: 500px;
    }
}

@media (min-width: 1024px) {
    .theologian-hero .theologian-image {
        max-width: 550px;
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.2s both;
}

/* Enhanced hero section styling */
.theologian-hero {
    position: relative;
}

.theologian-hero .text-content h1 {
    background: linear-gradient(135deg, #111827 0%, #374151 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced card hover effects */
.group:hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Hero Button Styles */
.theologian-hero a[href*="about"] {
    background-color: #8B1A1A;
    color: white;
    border: none;
}

.theologian-hero a[href*="about"]:hover {
    background-color: #6B1414;
}

.theologian-hero a[href*="sermons"] {
    background-color: white;
    color: #8B1A1A;
    border: 2px solid #8B1A1A;
    text-decoration: underline;
    text-decoration-color: #8B1A1A;
    text-underline-offset: 4px;
}

.theologian-hero a[href*="sermons"]:hover {
    background-color: #fef2f2;
}

/* Ensure Tailwind utilities work */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Screen Reader Only */
/* Screen Reader Only - Base styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Skip Link - Simple, conflict-free implementation */
.skip-link {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    min-height: 65px;
    padding: 4rem 1.5rem;
    z-index: 99999;
    background-color: #2563eb;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    display: block;
    margin: 0;
    clip: auto;
    overflow: visible;
    white-space: normal;
    box-sizing: border-box;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
}

/* Sermon card hover effects */
.sermon-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.sermon-card:hover {
    transform: translateY(-4px);
}

/* Play overlay animation */
.play-overlay {
    transition: opacity 0.3s ease;
}

.sermon-card:hover .play-overlay {
    opacity: 1;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-list li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '/';
    margin: 0 0.5rem;
    color: #6b7280;
}

.breadcrumb-list a {
    color: #2563eb;
    text-decoration: none;
}

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

/* Pagination */
.pagination {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.pagination-list li a,
.pagination-list li span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #374151;
    background-color: white;
    border: 1px solid #e5e7eb;
}

.pagination-list li a:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-list .pagination-current span {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Mobile menu toggle - handled in responsive section below */

/* Prose styles for content */
/* OLD PROSE STYLES REMOVED - These conflicted with comprehensive content typography styles below */
/* All prose styling is now handled in the "Content Typography" section starting around line 1327 */

/* Book section customizations */
.book-card {
    transition: all 0.3s ease;
}

.book-card:hover {
    transform: translateY(-4px);
}

/* Enhanced card hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:rotate-3 {
    transform: rotate(3deg);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus states */
a:focus,
button:focus {
    outline: 2px solid #8B1A1A;
    outline-offset: 2px;
}

/* ============================================
   HEADER - Simple & Working
   ============================================ */

.site-header {
    background: linear-gradient(to bottom, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5) !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-wrapper {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.header-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 50px;
    height: auto;
    padding: 0.25rem 0;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.site-branding {
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin-left: 4rem !important;
    z-index: 10;
}

.site-branding .logo-wrapper img {
    max-height: 55px;
}

.site-branding .site-title {
    margin: 0 !important;
    color: #ffffff;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

.site-branding .site-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.25s ease !important;
    display: inline-block !important;
}

.site-branding .site-title a:hover {
    color: #fbbf24 !important;
}

/* ============================================
   NAVIGATION - Modern Horizontal Navbar
   ============================================ */

.main-navigation {
    margin-left: auto !important;
    margin-right: 3rem !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Basic menu display - desktop - ONLY top-level menu */
.main-navigation > ul,
.main-navigation > ul.menu,
.main-navigation > #primary-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    align-items: center;
    justify-content: flex-end;
}

/* CRITICAL: Submenus must NEVER be flex/row - always block/vertical */
.main-navigation ul ul,
.main-navigation ul .sub-menu,
.main-navigation li ul,
.main-navigation li .sub-menu {
    display: block !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

.main-navigation li,
.main-navigation .menu-item {
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: inline-block !important;
}

.main-navigation a {
    color: #d1d5db !important;
    text-decoration: none !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    display: block !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0.5rem !important;
    line-height: 1.5 !important;
    position: relative !important;
}

/* Underline effect for top-level menu items only */
.main-navigation > ul > li > a::after,
.main-navigation #primary-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0.375rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #fbbf24;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.main-navigation > ul > li > a:hover::after,
.main-navigation #primary-menu > li > a:hover::after {
    transform: scaleX(1);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.main-navigation > ul > .current-menu-item > a::after,
.main-navigation > ul > .current_page_item > a::after,
.main-navigation #primary-menu > .current-menu-item > a::after,
.main-navigation #primary-menu > .current_page_item > a::after {
    transform: scaleX(1);
}

/* Classic WordPress Dropdown Menus */
/* Parent menu items need relative positioning for dropdowns */
.main-navigation li {
    position: relative;
}

/* Hide submenus by default - styled as distinct dropdown boxes */
/* CRITICAL: Use specific selectors to avoid inheritance */
.main-navigation ul ul,
.main-navigation ul .sub-menu,
.main-navigation li ul,
.main-navigation li .sub-menu,
#primary-menu .sub-menu,
#primary-menu ul ul {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #1e293b !important;
    min-width: 220px !important;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    list-style: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    border-radius: 0.5rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 999 !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease 0.3s, visibility 0.3s ease 0.3s !important;
    /* FORCE block display - never flex */
    flex-direction: column !important;
    flex-wrap: nowrap !important;
}

/* Show dropdown on hover - desktop only */
@media screen and (min-width: 768px) {
    .main-navigation li:hover > ul,
    .main-navigation li:hover > .sub-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Keep submenu visible when hovering over it */
    .main-navigation ul ul:hover,
    .main-navigation ul .sub-menu:hover {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    /* Ensure parent li stays hovered when hovering submenu - use invisible padding to bridge gap */
    .main-navigation li.menu-item-has-children > a {
        position: relative;
    }
    
    /* Add invisible padding area below parent link to bridge gap to submenu */
    .main-navigation li.menu-item-has-children > a::before {
        content: '';
        position: absolute;
        bottom: -0.5rem;
        left: 0;
        right: 0;
        height: 0.5rem;
        background: transparent;
    }
}

/* Nested submenus (third level) - position to the right */
.main-navigation ul ul ul,
.main-navigation ul .sub-menu .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 0;
}

/* Submenu list items - MUST be block, not flex/inline */
.main-navigation ul ul li,
.main-navigation ul .sub-menu li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    /* Override any flex/inline styles from parent */
    flex: none !important;
    flex-direction: column !important;
}

.main-navigation ul ul li:last-child,
.main-navigation ul .sub-menu li:last-child {
    border-bottom: none;
}

/* Submenu links - Override top-level styles and make distinct */
.main-navigation ul ul a,
.main-navigation ul .sub-menu a {
    color: #d1d5db !important;
    padding: 0.75rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 400 !important;
    display: block !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    /* Remove underline effect from submenu items */
}

/* Remove underline effect from submenu items */
.main-navigation ul ul a::after,
.main-navigation ul .sub-menu a::after {
    display: none !important;
}

.main-navigation ul ul a:hover,
.main-navigation ul .sub-menu a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding-left: 1.5rem !important;
    /* No underline on hover for submenu */
}

.main-navigation ul ul a:hover::after,
.main-navigation ul .sub-menu a:hover::after {
    display: none !important;
}

/* Dropdown indicator arrow */
.main-navigation .menu-item-has-children > a::after {
    content: ' ▾';
    font-size: 0.75rem;
    margin-left: 0.25rem;
    opacity: 0.7;
}

/* Mobile Menu Toggle - Modern hamburger */
.menu-toggle {
    display: none !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.5rem !important;
    color: #ffffff !important;
    padding: 0.5rem 0.75rem !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    margin-right: 1rem !important;
    z-index: 100;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.menu-toggle:focus {
    outline: 2px solid #fbbf24 !important;
    outline-offset: 2px !important;
}


/* Desktop Styles - Clean and Simple */
@media screen and (min-width: 768px) {
    /* Hide mobile toggle */
    .menu-toggle {
        display: none !important;
    }
    
    /* Menu always horizontal on desktop - BUT NOT submenus */
    .main-navigation > ul,
    .main-navigation > ul.menu,
    .main-navigation > #primary-menu,
    .main-navigation.toggled > ul,
    .main-navigation.toggled > ul.menu,
    .main-navigation.toggled > #primary-menu {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
    }
    
    /* CRITICAL: Submenus must be block/vertical, NOT flex/row */
    .main-navigation ul ul,
    .main-navigation ul .sub-menu {
        display: none !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    
    .main-navigation li,
    .main-navigation.toggled li {
        display: inline-flex;
        align-items: center;
    }
    
    /* Desktop: Show submenus on hover - display as block list */
    .main-navigation li:hover > ul,
    .main-navigation li:hover > .sub-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-direction: column !important;
    }
    
    /* Keep submenu visible when hovering over submenu items */
    .main-navigation ul ul:hover,
    .main-navigation ul .sub-menu:hover {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-direction: column !important;
    }
    
    /* Ensure parent li stays hovered when hovering submenu */
    .main-navigation li.menu-item-has-children:hover > ul,
    .main-navigation li.menu-item-has-children:hover > .sub-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        flex-direction: column !important;
    }
    
    /* CRITICAL: Submenus must NOT inherit flex from parent menu */
    .main-navigation ul ul,
    .main-navigation ul .sub-menu {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        flex-direction: column !important;
        transition: opacity 0.2s ease 0.1s, visibility 0.2s ease 0.1s !important;
    }
    
    /* Add padding to parent items to bridge gap */
    .main-navigation li.menu-item-has-children {
        padding-bottom: 0.5rem;
    }
}

/* Responsive Header Width */
@media screen and (max-width: 1024px) {
    .header-wrapper {
        padding: 0 1.5rem;
    }
}

@media screen and (max-width: 767px) {
    .header-wrapper {
        padding: 0 1rem;
    }
    
    .header-inner {
        padding: 0 0.5rem;
    }
    
    .site-branding {
        margin-left: 0.5rem;
    }
    
    .main-navigation {
        margin-right: 0;
    }
    
    .menu-toggle {
        display: block !important;
        margin-left: auto;
    }
    
    .main-navigation ul,
    .main-navigation ul.menu,
    .main-navigation #primary-menu {
        display: none !important;
    }
    
    .main-navigation.toggled ul,
    .main-navigation.toggled ul.menu,
    .main-navigation.toggled #primary-menu {
        display: flex !important;
        flex-direction: column !important;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        width: 100%;
        background: #1e293b;
        padding: 1rem 0;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 999;
        max-height: calc(100vh - 65px);
        overflow-y: auto;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Mobile: Reset dropdown positioning */
    /* Mobile submenu styling */
    .main-navigation.toggled .submenu-open > ul,
    .main-navigation.toggled .submenu-open > .sub-menu {
        display: block !important;
    }
    
    .main-navigation.toggled ul ul,
    .main-navigation.toggled ul .sub-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: rgba(0, 0, 0, 0.2) !important;
        margin-left: 1rem !important;
        border-radius: 0 !important;
        padding-left: 0.5rem !important;
        display: none !important;
    }
    
    .main-navigation.toggled li,
    .main-navigation.toggled .menu-item {
        display: block !important;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .main-navigation.toggled li:last-child {
        border-bottom: none;
    }
    
    .main-navigation.toggled a {
        color: #d1d5db !important;
        padding: 1rem 1.5rem !important;
        border-radius: 0 !important;
    }
    
    .main-navigation.toggled a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #ffffff !important;
    }
    
    .main-navigation.toggled a::after {
        display: none !important;
    }
    
    /* Mobile submenu toggle */
    .main-navigation.toggled .menu-item-has-children > a {
        position: relative;
        padding-right: 3rem !important;
    }
    
    .main-navigation.toggled .menu-item-has-children > a::after {
        content: ' ▾' !important;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        display: block !important;
        font-size: 0.875rem;
        transition: transform 0.2s ease;
    }
    
    .main-navigation.toggled .menu-item-has-children.submenu-open > a::after {
        transform: translateY(-50%) rotate(180deg);
    }
    
    .main-navigation.toggled ul ul,
    .main-navigation.toggled ul .sub-menu {
        position: static;
        opacity: 1;
        display: none !important;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Footer Styles */
.site-footer {
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.3), transparent);
}

.site-footer a {
    transition: all 0.2s ease;
}

.site-footer h3,
.site-footer h4 {
    position: relative;
}

.footer-branding p {
    line-height: 1.7;
}

.footer-links ul li,
.footer-resources ul li {
    position: relative;
}

.footer-links ul li::before,
.footer-resources ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, transparent);
    transition: width 0.3s ease;
}

.footer-links ul li:hover::before,
.footer-resources ul li:hover::before {
    width: 20px;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        text-align: center;
    }
    
    .footer-links h4,
    .footer-resources h4 {
        text-align: center;
    }
    
    .footer-links h4 span,
    .footer-resources h4 span {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links ul li,
    .footer-resources ul li {
        justify-content: center;
    }
}

/* Plyr player customizations */
.plyr {
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.plyr__video-embed {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Filter form styles */
.filter-form select,
.filter-form input {
    width: 100%;
}

/* No results message */
.no-results {
    padding: 3rem 1rem;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .posts-grid,
    .sermons-grid,
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Content Typography - WordPress Defaults
   ============================================ */

/* Entry Title - Control size with maximum specificity */
body.single-article .entry-title,
body.single-article h1.entry-title,
article .entry-title,
.entry-header .entry-title,
h1.entry-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    margin-bottom: 1rem !important;
    margin-top: 0 !important;
    color: #1f2937 !important;
}

@media (min-width: 640px) {
    body.single-article .entry-title,
    body.single-article h1.entry-title,
    article .entry-title,
    .entry-header .entry-title,
    h1.entry-title {
        font-size: 2.25rem !important;
    }
}

@media (min-width: 768px) {
    body.single-article .entry-title,
    body.single-article h1.entry-title,
    article .entry-title,
    .entry-header .entry-title,
    h1.entry-title {
        font-size: 2.5rem !important;
    }
}

/* Entry Content - Standard WordPress styling */
/* CRITICAL: Override Tailwind reset styles */
.entry-content {
    font-size: 1rem !important;
    line-height: 1.8 !important;
    color: #333 !important;
}

/* Paragraphs - WordPress default spacing */
/* Use maximum specificity to override Tailwind reset */
body.single-article .entry-content p,
article .entry-content p,
.entry-content p {
    margin-top: 0 !important;
    margin-bottom: 1.5em !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: block !important;
    font-size: 1rem !important;
    line-height: 1.8 !important;
    padding: 0 !important;
    white-space: normal !important;
}

/* Ensure paragraphs have spacing between them */
body.single-article .entry-content p + p,
article .entry-content p + p,
.entry-content p + p {
    margin-top: 0 !important;
    margin-bottom: 1.5em !important;
}

/* Line breaks - ensure <br> tags are displayed */
body.single-article .entry-content br,
article .entry-content br,
.entry-content br {
    display: block !important;
    content: "" !important;
    margin-bottom: 0.5em !important;
}

/* Preserve line breaks in paragraphs */
body.single-article .entry-content p br,
article .entry-content p br,
.entry-content p br {
    display: inline !important;
    margin-bottom: 0 !important;
}

/* Ensure proper spacing for double line breaks (paragraph breaks) */
body.single-article .entry-content p:empty,
article .entry-content p:empty,
.entry-content p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    margin: 2em 0 1em 0;
    font-weight: 600;
    line-height: 1.2;
}

.entry-content h1,
.prose h1 {
    font-size: 2em;
}

.entry-content h2,
.prose h2 {
    font-size: 1.75em;
}

.entry-content h3,
.prose h3 {
    font-size: 1.5em;
}

.entry-content h4,
.prose h4 {
    font-size: 1.25em;
}

/* Lists - WordPress defaults */
.entry-content ul,
.entry-content ol,
.prose ul,
.prose ol {
    margin: 0 0 1.5em 2em;
}

.entry-content li,
.prose li {
    margin-bottom: 0.5em;
}

/* Links */
.entry-content a,
.prose a {
    color: #0073aa;
    text-decoration: underline;
}

.entry-content a:hover,
.prose a:hover {
    color: #005177;
}

/* Blockquotes */
.entry-content blockquote,
.prose blockquote {
    margin: 1.5em 0;
    padding-left: 1.5em;
    border-left: 4px solid #ddd;
    font-style: italic;
}

/* Images */
.entry-content img,
.prose img {
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
}

/* Ensure empty paragraphs don't take space */
.entry-content p:empty,
.prose p:empty {
    display: none;
}

/* Headings in content */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
    margin-left: 0;
    margin-right: 0;
    color: #1f2937;
    display: block; /* Ensure headings are block-level */
    clear: both; /* Clear floats */
}

.entry-content h1,
.prose h1 {
    font-size: 2.5rem;
    margin-top: 0;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5em;
}

.entry-content h2,
.prose h2 {
    font-size: 2rem;
    margin-top: 2em;
}

.entry-content h3,
.prose h3 {
    font-size: 1.5rem;
}

.entry-content h4,
.prose h4 {
    font-size: 1.25rem;
}

.entry-content h5,
.prose h5 {
    font-size: 1.125rem;
}

.entry-content h6,
.prose h6 {
    font-size: 1rem;
}

/* Lists */
.entry-content ul,
.entry-content ol,
.prose ul,
.prose ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.entry-content ul,
.prose ul {
    list-style-type: disc;
}

.entry-content ol,
.prose ol {
    list-style-type: decimal;
}

.entry-content li,
.prose li {
    margin-bottom: 0.75em;
    line-height: 1.75;
}

.entry-content ul li,
.prose ul li {
    list-style-position: outside;
}

.entry-content ol li,
.prose ol li {
    list-style-position: outside;
}

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul,
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.75em;
    margin-bottom: 0.75em;
}

/* Links */
.entry-content a,
.prose a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.entry-content a:hover,
.prose a:hover {
    color: #1d4ed8;
    text-decoration-thickness: 2px;
}

/* Blockquotes */
.entry-content blockquote,
.prose blockquote {
    border-left: 4px solid #8B1A1A;
    padding-left: 1.5em;
    padding-right: 1em;
    margin: 2em 0;
    font-style: italic;
    color: #4b5563;
    background-color: #f9fafb;
    padding-top: 1em;
    padding-bottom: 1em;
    border-radius: 0 4px 4px 0;
}

.entry-content blockquote p,
.prose blockquote p {
    margin-bottom: 1em;
}

.entry-content blockquote p:last-child,
.prose blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content blockquote cite,
.prose blockquote cite {
    display: block;
    margin-top: 1em;
    font-size: 0.875rem;
    font-style: normal;
    color: #6b7280;
}

.entry-content blockquote cite::before,
.prose blockquote cite::before {
    content: '— ';
}

/* Code */
.entry-content code,
.prose code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    color: #dc2626;
}

.entry-content pre,
.prose pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
    line-height: 1.6;
}

.entry-content pre code,
.prose pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
}

/* Images */
.entry-content img,
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2em 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.entry-content img.alignleft,
.prose img.alignleft {
    float: left;
    margin-right: 2em;
    margin-bottom: 1em;
    margin-top: 0.5em;
}

.entry-content img.alignright,
.prose img.alignright {
    float: right;
    margin-left: 2em;
    margin-bottom: 1em;
    margin-top: 0.5em;
}

.entry-content img.aligncenter,
.prose img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Tables */
.entry-content table,
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
    font-size: 1rem;
}

.entry-content table th,
.entry-content table td,
.prose table th,
.prose table td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.entry-content table th,
.prose table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.entry-content table tr:hover,
.prose table tr:hover {
    background-color: #f9fafb;
}

/* Horizontal Rules */
.entry-content hr,
.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 3em 0;
}

/* WordPress Blocks Support */
.entry-content .wp-block-group,
.prose .wp-block-group {
    margin: 2em 0;
}

.entry-content .wp-block-quote,
.prose .wp-block-quote {
    border-left: 4px solid #8B1A1A;
    padding-left: 1.5em;
    margin: 2em 0;
    font-style: italic;
}

.entry-content .wp-block-image,
.prose .wp-block-image {
    margin: 2em 0;
}

.entry-content .wp-block-image figcaption,
.prose .wp-block-image figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5em;
    font-style: italic;
}

.entry-content .wp-block-columns,
.prose .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2em;
    margin: 2em 0;
}

.entry-content .wp-block-separator,
.prose .wp-block-separator {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 3em 0;
}

/* WordPress Block Editor Content - Comprehensive Support */
.entry-content .wp-block-paragraph,
.prose .wp-block-paragraph {
    margin-bottom: 1.5em;
    line-height: 1.75;
}

.entry-content .wp-block-heading,
.prose .wp-block-heading {
    font-family: 'Crimson Text', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2em;
    margin-bottom: 1em;
    color: #1f2937;
}

.entry-content .wp-block-heading h1,
.entry-content .wp-block-heading h2,
.entry-content .wp-block-heading h3,
.entry-content .wp-block-heading h4,
.entry-content .wp-block-heading h5,
.entry-content .wp-block-heading h6,
.prose .wp-block-heading h1,
.prose .wp-block-heading h2,
.prose .wp-block-heading h3,
.prose .wp-block-heading h4,
.prose .wp-block-heading h5,
.prose .wp-block-heading h6 {
    margin: 0;
    font-family: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.entry-content .wp-block-list,
.prose .wp-block-list {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

.entry-content .wp-block-list li,
.prose .wp-block-list li {
    margin-bottom: 0.75em;
    line-height: 1.75;
}

/* Ensure proper spacing for all block elements */
.entry-content > *,
.prose > * {
    margin-top: 0;
    margin-bottom: 1.5em;
}

.entry-content > *:first-child,
.prose > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child,
.prose > *:last-child {
    margin-bottom: 0;
}

/* Better font rendering */
.entry-content,
.prose {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ensure proper display for all content elements */
.entry-content strong,
.entry-content b,
.prose strong,
.prose b {
    font-weight: 700;
    color: #1f2937;
}

.entry-content em,
.entry-content i,
.prose em,
.prose i {
    font-style: italic;
}

.entry-content u,
.prose u {
    text-decoration: underline;
}

/* Proper spacing for nested content */
.entry-content .wp-block-group > *,
.prose .wp-block-group > * {
    margin-top: 0;
    margin-bottom: 1em;
}

.entry-content .wp-block-group > *:last-child,
.prose .wp-block-group > *:last-child {
    margin-bottom: 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .entry-content,
    .prose {
        font-size: 1rem;
    }
    
    .entry-content p,
    .prose p {
        font-size: 1rem;
    }
    
    .entry-content h1,
    .prose h1 {
        font-size: 2rem;
    }
    
    .entry-content h2,
    .prose h2 {
        font-size: 1.75rem;
    }
    
    .entry-content h3,
    .prose h3 {
        font-size: 1.5rem;
    }
    
    .entry-content blockquote,
    .prose blockquote {
        padding-left: 1em;
        margin: 1.5em 0;
    }
    
    .entry-content img.alignleft,
    .entry-content img.alignright,
    .prose img.alignleft,
    .prose img.alignright {
        float: none;
        margin: 1em auto;
        display: block;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .main-navigation,
    .pagination,
    .entry-footer {
        display: none;
    }
    
    .site-main {
        max-width: 100%;
    }
}


