/*
Theme Name: Reliably Chosen
Description: A lightweight, high-performance WordPress theme optimized for Google Core Web Vitals. Built for speed with minimal CSS, no jQuery dependency, and mobile-first responsive design.
Version: 1.0.1
Author: ReliablyChosen
License: MIT
License URI: https://opensource.org/licenses/MIT
*/

/* Font Face Declarations */
@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/wp-content/themes/reliablychosen/assets/font/Roboto-Slab.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/wp-content/themes/reliablychosen/assets/font/Inter.woff2') format('woff2');
}

/* CSS Reset & Base Styles - Critical Path Only */
:root{
    color-scheme:light dark;
    --bg-primary:#fff;
    --bg-secondary:#f8f9fa;
    --text-primary:#333;
    --text-secondary:#666;
    --border-color:#e5e5e5;
    --link-color:#0066cc;
    --link-hover:#004499;
    --logo-accent:#0066cc;
    --header-bg:var(--bg-primary);
    --footer-bg:var(--bg-secondary);
    --transition:color 0.2s ease,background-color 0.2s ease,border-color 0.2s ease;
    --font-size-base:1.1rem;
    --line-height-base:1.8;
    --scroll-progress-height:3px;
    --scroll-progress-color:var(--link-color);
    --scroll-progress-bg:rgba(0,0,0,0.1);
    --scroll-progress-transition:transform 0.1s ease-out,opacity 0.3s ease
}

[data-theme="dark"]{
    --bg-primary:#1a1a1a;
    --bg-secondary:#2d2d2d;
    --text-primary:#e5e5e5;
    --text-secondary:#b3b3b3;
    --border-color:#404040;
    --link-color:#4d9fff;
    --link-hover:#80b3ff;
    --logo-accent:#4d9fff;
    --header-bg:var(--bg-primary);
    --footer-bg:var(--bg-secondary);
    --scroll-progress-bg:rgba(255,255,255,0.1)
}

*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4}
body{font-family:'Inter',sans-serif;font-size:var(--font-size-base);line-height:var(--line-height-base);color:var(--text-primary);background:var(--bg-primary);transition:var(--transition)}
img,picture,video,canvas,svg{display:block;max-width:100%}
input,button,textarea,select{font:inherit;color:var(--text-primary);background:var(--bg-primary)}
p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}

/* Typography - Roboto Slab for Headings */
h1,h2,h3,h4,h5,h6{font-family:'Roboto Slab',serif;font-weight:600;line-height:1.2;margin-top:0;margin-bottom:0.5em}
h1{font-size:clamp(1.65rem,3.3vw,2.2rem)}
h2{font-size:clamp(1.5rem,3vw,2.25rem)}
h3{font-size:clamp(1.25rem,2.5vw,1.875rem)}
h4{font-size:1.25rem}
h5{font-size:1.125rem}
h6{font-size:1rem}
p{margin-bottom:1rem;line-height:var(--line-height-base);font-size:var(--font-size-base)}
a{color:var(--link-color);text-decoration:none;transition:var(--transition)}
a:hover{color:var(--link-hover);text-decoration:underline}

/* Layout - Mobile First */
.container{max-width:1200px;margin:0 auto;padding:0 1rem}
.site-header{background:var(--header-bg);border-bottom:1px solid var(--border-color);position:sticky;top:0;z-index:100;transition:var(--transition);margin-bottom:1rem}
.site-header .container{display:flex;justify-content:space-between;align-items:center;min-height:60px}
.site-title{font-family:'Roboto Slab',serif;font-size:1.875rem;font-weight:900;color:var(--text-primary);margin-bottom:0}
.site-title a{color:inherit;text-decoration:none}
.logo-uppercase{
    color:var(--logo-accent);
    font-weight:800;
    text-shadow:0 0 1px rgba(0,102,204,0.15);
    transition:var(--transition);
}

/* Enhanced specificity for punctuation styling */
.site-title .logo-uppercase,
.site-title a .logo-uppercase{
    color:var(--logo-accent) !important;
    font-weight:800 !important;
    text-shadow:0 0 1px rgba(0,102,204,0.15) !important;
    transition:var(--transition) !important;
}

/* Dark mode enhanced shadow for logo uppercase */
[data-theme="dark"] .logo-uppercase,
[data-theme="dark"] .site-title .logo-uppercase,
[data-theme="dark"] .site-title a .logo-uppercase{
    text-shadow:0 0 1px rgba(77,159,255,0.2) !important;
}

/* Specific styling for punctuation marks in logo */
.logo-uppercase[data-logo-type="punctuation"]{
    font-weight:700 !important;
}

.site-description{color:var(--text-secondary);font-size:0.875rem;margin-top:0.25rem;margin-bottom:0}

/* Navigation */
.main-navigation{display:flex;align-items:center;gap:1rem}
.main-navigation ul{list-style:none;padding:0;margin:0;display:flex;gap:1.5rem;align-items:center}
.main-navigation a{color:var(--text-secondary);font-weight:500;padding:0.5rem 0;display:block;transition:var(--transition)}
.main-navigation a:hover{color:var(--text-primary);text-decoration:none}

/* Theme Toggle Button */
.theme-toggle{
    background:none;
    border:none;
    color:var(--text-primary);
    cursor:pointer;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    transition:var(--transition);
    margin-left:1rem;
}
.theme-toggle:hover{background:var(--bg-secondary)}
.theme-toggle:focus{outline:2px solid var(--link-color);outline-offset:2px}
.theme-toggle svg{width:28px;height:28px;fill:currentColor}
.theme-toggle-label{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    border:0;
}

/* Language Switcher - Pill Style Design */
.language-switcher{
    display:flex;
    align-items:center;
    justify-content:center;
    padding:1.25rem 1rem;
    background:transparent;
    margin:0 auto;
    max-width:700px;
}
.language-options{
    display:inline-flex;
    background:var(--bg-primary);
    border:2px solid var(--border-color);
    border-radius:10px;
    padding:0.3rem;
    gap:0.25rem;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
}
.language-option{
    background:transparent;
    border:none;
    color:var(--text-secondary);
    padding:0.2rem 1.25rem;
    border-radius:8px;
    font-size:0.9rem;
    font-weight:600;
    cursor:pointer;
    transition:all 0.3s cubic-bezier(0.4,0,0.2,1);
    position:relative;
    white-space:nowrap;
}
.language-option:hover:not(.active){
    background:var(--bg-secondary);
    color:var(--text-primary);
    transform:translateY(-1px);
}
.language-option:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(77,159,255,0.3);
}
.language-option.active{
    background:var(--link-color);
    color:#fff;
    box-shadow:0 4px 12px rgba(77,159,255,0.4),0 2px 4px rgba(77,159,255,0.2);
    transform:scale(1.02);
}
/* Dark mode specific enhancements */
[data-theme="dark"] .language-options{
    box-shadow:0 2px 12px rgba(0,0,0,0.3);
    border-color:var(--border-color);
}
[data-theme="dark"] .language-option.active{
    box-shadow:0 4px 16px rgba(77,159,255,0.5),0 2px 6px rgba(77,159,255,0.3);
}
@media(max-width:768px){
    .language-switcher{
        padding:1rem;
    }
    .language-options{
        width:100%;
        justify-content:center;
    }
    .language-option{
        flex:1;
        text-align:center;
    }
}

/* Scroll Progress Bar */
div#scroll-progress-bar{
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:var(--scroll-progress-height);
    background:var(--scroll-progress-bg);
    z-index:101;
    opacity:0;
    visibility:hidden;
    transition:var(--scroll-progress-transition);
    pointer-events:none;
}

#scroll-progress-bar.is-visible{
    opacity:1;
    visibility:visible
}

div#scroll-progress-bar div#scroll-progress-fill{
    height:var(--scroll-progress-height);
    background:var(--scroll-progress-color);
    width:100%;
    transform-origin:left center;
    transform:scaleX(0);
    transition:var(--scroll-progress-transition);
    will-change:transform;
    display:block;
}

/* Accessibility: Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    #scroll-progress-bar,
    #scroll-progress-fill {
        transition: none !important;
    }
}

/* Content */
.site-main{min-height:60vh}
.entry-header{margin-bottom:1.5rem}
.entry-title{font-family:'Roboto Slab',serif;margin-bottom:0.5rem;color:var(--text-primary)}
.entry-meta{color:var(--text-secondary);font-size:0.875rem;margin-bottom:1rem}
.entry-meta a{color:inherit;text-decoration:none}
.entry-meta a:hover{color:#0066cc}
.entry-content{line-height:var(--line-height-base);color:var(--text-primary);font-size:var(--font-size-base)}
.entry-content img{height:auto;border-radius:4px}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select{
    background:var(--bg-primary);
    border:1px solid var(--border-color);
    color:var(--text-primary);
    padding:0.5rem;
    border-radius:4px;
    transition:var(--transition);
}
input:focus,
textarea:focus,
select:focus{
    outline:none;
    border-color:var(--link-color);
    box-shadow:0 0 0 2px rgba(77, 159, 255, 0.2);
}

/* Footer */
.site-footer{
    background:var(--footer-bg);
    border-top:1px solid var(--border-color);
    padding:1.5rem 0;
    text-align:center;
    color:var(--text-secondary);
    font-size:0.875rem;
    transition:var(--transition);
}
.site-footer a{color:var(--text-secondary)}
.site-footer a:hover{color:var(--text-primary)}

/* Footer Links */
.footer-links-section{
    margin-bottom:1rem
}
.footer-links{
    margin:0
}
.footer-links ul{
    list-style:none;
    margin:0;
    padding:0;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:0.5rem
}
.footer-links li{
    margin:0
}
.footer-links a{
    color:var(--text-secondary);
    text-decoration:none;
    padding:0.25rem 0.5rem;
    border-radius:4px;
    transition:var(--transition);
    font-size:0.95rem
}
.footer-links a:hover{
    color:var(--text-primary);
    background:rgba(255,255,255,0.05)
}
.footer-links li:not(:last-child)::after{
    content:'|';
    color:var(--text-secondary);
    margin-left:0.5rem;
    opacity:0.6
}
.footer-copyright{
    font-size:0.9rem;
    opacity:0.8
}
.footer-separator{
    color:var(--text-secondary);
    margin:0 0.5rem;
    opacity:0.6
}

/* Responsive Design */
@media (max-width: 768px){
    .site-header .container{display:flex;align-items:center;justify-content:space-between;min-height:60px}
    .site-branding{flex-shrink:0}
    .main-navigation{display:none}
    .theme-toggle{flex-shrink:0}
    .container{padding:0 1rem}
}

/* Performance Optimizations */

/* Print Styles */
@media print{
    .site-header,.site-footer,.main-navigation,.theme-toggle{display:none}
    body{color:#000!important;background:#fff!important}
    *{color:#000!important;background:#fff!important}
    a{color:#000!important;text-decoration:underline}

    /* Force light mode for printing */
    :root{
        --bg-primary:#fff!important;
        --bg-secondary:#f8f9fa!important;
        --text-primary:#333!important;
        --text-secondary:#666!important;
        --border-color:#e5e5e5!important;
        --link-color:#0066cc!important;
    }
}

/* Performance & Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,*::before,*::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }
    [data-theme="dark"] {
        --border-color: #fff;
    }
}

/* Single Post Styles */
.single-post{}

/* Breadcrumb Navigation */
.breadcrumb{margin-bottom:1rem}
.breadcrumb-list{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:0.5rem;font-size:0.875rem}
.breadcrumb-item{color:var(--text-secondary)}
.breadcrumb-item:not(:last-child)::after{content:"›";margin-left:0.5rem;color:var(--text-secondary)}
.breadcrumb-item a{color:var(--link-color);text-decoration:none;transition:var(--transition)}
.breadcrumb-item a:hover{color:var(--link-hover);text-decoration:underline}
.breadcrumb-current{color:var(--text-primary);font-weight:400;max-width:26rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}

/* Category and Tag Wrapper - Horizontal Scrolling */
.category-tag-wrapper{display:flex;align-items:center;gap:1rem;margin:1rem 0 1.5rem 0;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;position:relative;scrollbar-width:none}
.category-tag-wrapper::-webkit-scrollbar{display:none}


/* Category Buttons */
.category-buttons{display:flex;gap:0.5rem;margin:0;white-space:nowrap;flex-shrink:0}
.category-button{display:inline-block;padding:0.25rem 0.5rem;color:#fff;text-decoration:none;border-radius:4px;font-size:0.8rem;font-weight:400;transition:all 0.2s ease;white-space:nowrap;flex-shrink:0}
.category-button:hover{transform:translateY(-1px);box-shadow:0 4px 8px rgba(0,0,0,0.2);color:#fff;text-decoration:none}

/* Tag Buttons */
.tag-buttons{display:flex;gap:0.5rem;margin:0;white-space:nowrap;flex-shrink:0}
.tag-button{display:inline-block;padding:0.25rem 0.5rem;color:#fff;text-decoration:none;border-radius:4px;font-size:0.8rem;font-weight:400;transition:all 0.2s ease;white-space:nowrap;flex-shrink:0}
.tag-button:hover{transform:translateY(-1px);box-shadow:0 4px 8px rgba(0,0,0,0.2);color:#fff;text-decoration:none}

/* Time Display */
.entry-time{margin-bottom:1rem}
.entry-time .entry-date{color:var(--text-secondary);font-size:0.875rem;font-weight:500}

.entry-featured-image{margin:2rem 0}
.entry-featured-image img{width:100%;height:auto;aspect-ratio:1.75;object-fit:contain;border-radius:8px}
.entry-header-content{margin-bottom:2rem}
.single-post .entry-title{font-size:clamp(1.65rem,3.3vw,2.2rem);line-height:1.2;margin-bottom:1rem}
.single-post .entry-meta{display:flex;gap:1rem;margin-bottom:1.5rem;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;white-space:nowrap;scrollbar-width:none}
.single-post .entry-meta::-webkit-scrollbar{display:none}
.single-post .entry-meta span{display:flex;align-items:center;color:var(--text-secondary);font-size:0.875rem;white-space:nowrap;flex-shrink:0}
.single-post .entry-meta .author-link{color:var(--link-color);text-decoration:none;font-weight:500}
.single-post .entry-meta .author-link:hover{color:var(--link-hover);text-decoration:underline}
.meta-separator{color:var(--text-secondary);font-weight:400;user-select:none}
.reading-time{color:#888}
.entry-content{line-height:var(--line-height-base);font-size:var(--font-size-base)}
.entry-content h2,.entry-content h3,.entry-content h4{font-family:'Roboto Slab',serif;margin-bottom:1rem;color:var(--text-primary)}
.entry-content p{margin-bottom:1.5rem}
.entry-content ul{margin-bottom:1.5rem}
.entry-content img{border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.entry-content blockquote{border-left:4px solid var(--link-color);padding-left:1.5rem;margin:2rem 0;font-style:italic;color:var(--text-secondary)}
.entry-content pre{background:#f8f9fa;padding:1rem;border-radius:8px;overflow-x:auto;font-size:0.875rem}
.entry-content code{background:#f8f9fa;padding:0.125rem 0.25rem;border-radius:4px;font-size:0.875rem}
.entry-content pre code{background:none;padding:0}
.page-links{margin:2rem 0;text-align:center}
.page-links a{display:inline-block;padding:0.5rem 1rem;margin:0.25rem;background:#f0f0f0;color:var(--text-primary);text-decoration:none;border-radius:4px}
.page-links a:hover{background:#e0e0e0}
.entry-footer{margin:3rem 0;padding:2rem 0;border-top:1px solid #e5e5e5}
.entry-categories,.entry-tags{margin-bottom:1rem}
.meta-label{font-weight:600;margin-right:0.5rem;color:var(--text-primary)}
.category-link,.tag-link{display:inline-block;padding:0.25rem 0.75rem;margin:0.125rem 0.25rem 0.125rem 0;background:#f0f0f0;color:var(--text-secondary);text-decoration:none;border-radius:20px;font-size:0.875rem}
.category-link:hover,.tag-link:hover{background:#e0e0e0;color:var(--text-primary)}
/* Author Bio Card - Enhanced Design with Qualification Support */
.author-bio{padding:2rem;background:var(--bg-secondary);border:1px solid var(--border-color);border-radius:12px;margin:3rem 0;transition:var(--transition);box-shadow:0 2px 8px rgba(0,0,0,0.05)}
.author-bio:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}

/* Author Header: Avatar + Name + Qualification */
.author-header{display:flex;gap:1.25rem;align-items:flex-start;margin-bottom:1.5rem}
.author-avatar{flex-shrink:0;width:80px;height:80px;border-radius:50%;overflow:hidden;border:3px solid var(--border-color);transition:var(--transition)}
.author-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.author-header-text{flex:1;min-width:0}
.author-name{margin:0 0 0.5rem 0;color:var(--text-primary);font-size:1.375rem;font-weight:700;line-height:1.3}
.author-qualification{margin:0;color:var(--text-secondary);font-size:0.95rem;font-weight:500;font-style:italic;line-height:1.4}

/* Author Body: Description + Links */
.author-body{margin-top:0}
.author-description{margin:0 0 1rem 0;color:var(--text-secondary);line-height:var(--line-height-base);font-size:1rem}
.author-meta{display:flex;gap:1rem;flex-wrap:wrap;align-items:center}
.author-link,.author-website{color:var(--link-color);text-decoration:none;font-weight:500;transition:var(--transition)}
.author-link:hover,.author-website:hover{color:var(--link-hover);text-decoration:underline}

/* Telegram CTA Card - Modern Call-to-Action Design */
.telegram-cta{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;padding:1.75rem 2rem;background:linear-gradient(135deg,#0088cc 0%,#006ba8 100%);border-radius:12px;margin:3rem 0;transition:all 0.3s ease;box-shadow:0 4px 15px rgba(0,136,204,0.2);position:relative;overflow:hidden}
.telegram-cta::before{content:'';position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(255,255,255,0.15),transparent);transition:left 0.6s ease}
.telegram-cta:hover::before{left:100%}
.telegram-cta:hover{transform:translateY(-3px);box-shadow:0 8px 25px rgba(0,136,204,0.35)}
.telegram-cta-content{display:flex;align-items:center;gap:1.25rem;flex:1}
.telegram-cta-icon{flex-shrink:0;width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.2);border-radius:50%;color:#fff;transition:all 0.3s ease}
.telegram-cta:hover .telegram-cta-icon{background:rgba(255,255,255,0.3);transform:rotate(360deg)}
.telegram-cta-text{flex:1}
.telegram-cta-title{margin:0 0 0.35rem 0;font-family:'Roboto Slab',serif;font-size:1.25rem;font-weight:700;color:#fff;line-height:1.2}
.telegram-cta-description{margin:0;color:rgba(255,255,255,0.9);font-size:0.95rem;line-height:1.4}
.telegram-cta-button{display:inline-flex;align-items:center;gap:0.5rem;padding:0.75rem 1.5rem;background:#fff;color:#0088cc;text-decoration:none;border-radius:25px;font-weight:600;font-size:0.95rem;transition:all 0.3s ease;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,0.15)}
.telegram-cta-button:hover{background:#f0f9ff;transform:translateX(3px);box-shadow:0 4px 12px rgba(0,0,0,0.2)}
.telegram-cta-button svg{transition:transform 0.3s ease}
.telegram-cta-button:hover svg{transform:translateX(3px)}

/* Telegram CTA - Dark Mode */
[data-theme="dark"] .telegram-cta{background:linear-gradient(135deg,#006ba8 0%,#005080 100%);box-shadow:0 4px 15px rgba(0,136,204,0.3)}
[data-theme="dark"] .telegram-cta:hover{box-shadow:0 8px 25px rgba(0,136,204,0.45)}
[data-theme="dark"] .telegram-cta-button{background:rgba(255,255,255,0.95);color:#005080}
[data-theme="dark"] .telegram-cta-button:hover{background:#fff}

.nav-links{display:flex;justify-content:space-between}
.nav-links a{color:#0066cc;text-decoration:none;padding:1rem;max-width:45%;display:block}
.nav-links a:hover{text-decoration:underline}
.nav-subtitle{display:block;font-size:0.875rem;color:var(--text-secondary);margin-bottom:0.25rem}
.nav-title{display:block;font-weight:600;color:var(--text-primary)}
.related-posts{margin:3rem 0;padding:2rem 0;border-top:1px solid #e5e5e5}
.related-posts h3{margin-bottom:1.5rem;color:var(--text-primary)}
.related-posts-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1.5rem}
.related-post{background:#fff;border:1px solid #e5e5e5;border-radius:8px;overflow:hidden;transition:box-shadow 0.2s ease}
.related-post:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.related-post-link{display:block;color:inherit;text-decoration:none}
.related-post-thumbnail img{width:100%;height:150px;object-fit:cover}
.related-post-title{padding:1rem 1rem 0.5rem;font-size:1rem;font-weight:600;color:var(--text-primary);line-height:1.3}
.related-post-meta{padding:0 1rem 1rem;color:var(--text-secondary);font-size:0.875rem}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Single Post Responsive Styles */
@media (max-width: 768px){
/* Layout overflow prevention */
.container{overflow-x:hidden}
.single-content-wrapper{overflow-x:hidden}
.single-main-content{overflow-x:hidden}

/* Content text wrapping */
.entry-content{word-wrap:break-word;overflow-wrap:break-word;hyphens:auto}
.entry-content pre{overflow-x:auto;max-width:100%}
.entry-content table{overflow-x:auto;display:block;white-space:nowrap}

/* Breadcrumb and navigation */
.breadcrumb-list{font-size:0.8rem;gap:0.25rem}
.breadcrumb-item{max-width:none}
.breadcrumb-item:nth-last-child(2){max-width:8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.breadcrumb-current{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.category-tag-wrapper{gap:0.75rem;margin:0.75rem 0 1rem 0}
.category-buttons{gap:0.75rem}
.category-button{padding:0.2rem 0.4rem;font-size:0.75rem}
.tag-buttons{gap:0.75rem}
.tag-button{padding:0.2rem 0.4rem;font-size:0.75rem}

/* Content sections */
.entry-time{margin-bottom:0.75rem}
.entry-featured-image{margin:1.5rem 0}
.entry-featured-image img{height:auto}
.entry-content{font-size:var(--font-size-base)}
/* Author Bio - Mobile Responsive */
.author-bio{padding:1.5rem}
.author-header{gap:1rem;margin-bottom:1.25rem}
.author-avatar{width:60px;height:60px;border-width:2px}
.author-name{font-size:1.2rem;margin-bottom:0.35rem}
.author-qualification{font-size:0.875rem}
.author-description{font-size:0.95rem}
/* Telegram CTA - Mobile Responsive */
.telegram-cta{flex-direction:column;align-items:stretch;gap:1.25rem;padding:1.5rem}
.telegram-cta-content{flex-direction:column;text-align:center;gap:1rem}
.telegram-cta-icon{width:40px;height:40px}
.telegram-cta-title{font-size:1.1rem}
.telegram-cta-description{font-size:0.9rem}
.telegram-cta-button{width:100%;justify-content:center;padding:0.875rem 1.5rem}
.nav-links{flex-direction:column;gap:1rem}
.nav-links a{max-width:100%}
.related-posts-grid{grid-template-columns:1fr}
.single-post .entry-meta{display:flex;gap:0.25rem;align-items:center;line-height:1.4;overflow-x:auto;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;white-space:nowrap}
.entry-meta .meta-separator{margin:0 0.25rem;font-size:0.75rem;opacity:0.7;flex-shrink:0}
}

/* Blog/Homepage Grid Styles */
.posts-grid{display:grid;gap:2rem;margin:2rem 0}
.post-card{border:1px solid #e5e5e5;border-radius:8px;overflow:hidden;background:#fff;transition:box-shadow 0.2s ease}
.post-card:hover{box-shadow:0 4px 12px rgba(0,0,0,0.1)}
.entry-thumbnail img{width:100%;height:200px;object-fit:cover}
.post-card .entry-header{padding:1.5rem 1.5rem 0}
.post-card .entry-content{padding:0 1.5rem}
.post-card .entry-footer{padding:0 1.5rem 1.5rem}
.entry-title a{color:inherit;text-decoration:none}
.entry-title a:hover{color:#0066cc}
.read-more{color:#0066cc;font-weight:500;text-decoration:none}
.read-more:hover{text-decoration:underline}
.entry-tags{margin-top:1rem}
.tags-label{font-size:0.875rem;color:var(--text-secondary);margin-right:0.5rem}
/* Blog/homepage uses the same tag-link styles from single post section */
.page-header{margin-bottom:2rem;text-align:center}
.page-title{font-size:2rem;color:var(--text-primary)}
.no-results{text-align:center;padding:3rem 1rem}
.posts-navigation{margin:3rem 0;padding:2rem 0;border-top:1px solid #e5e5e5}
/* Blog/homepage uses different nav-links styling - see single post section */
.posts-navigation .nav-links{align-items:center}
.nav-subtitle{display:block;font-size:0.875rem;color:var(--text-secondary)}
.nav-title{display:block;font-weight:600}

/* Blog/Homepage Grid Responsive Styles */
@media (min-width: 768px){
.posts-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))}
.site-header{margin-bottom:2rem}
}

/* Single Post Sidebar Styles */
.site-main .container .single-content-wrapper{
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 100%;
    max-width: none;
}

.single-sidebar{
    padding: 0;
    transition: var(--transition);
}

.sidebar-section{
    margin-bottom: 2.5rem;
}

.sidebar-section:last-child{
    margin-bottom: 0;
}

.sidebar-title{
    font-family: 'Roboto Slab', serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.sidebar-posts{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-post{
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
}

.sidebar-post:hover{
    background: var(--bg-secondary);
    transform: translateY(-1px);
}


.sidebar-post-thumbnail{
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}


.sidebar-post-content{
    flex: 1;
    min-width: 0;
}

.sidebar-post-title{
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-post-meta{
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.sidebar-post-category{
    display: inline-block;
    padding: 0.2rem 0.4rem;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 500;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.sidebar-post-category:hover{
    opacity: 0.85;
    color: #fff;
    text-decoration: none;
}

.sidebar-post:hover .sidebar-post-title{
    color: var(--link-color);
}

/* Mobile-first styling for sidebar posts */
.sidebar-post-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.375rem 0;
}

.sidebar-post-thumbnail-link {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
}

.sidebar-post-title-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.sidebar-post-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
}

.sidebar-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar Responsive Styles */
@media (min-width: 768px) {
    .site-main .container .single-content-wrapper{
        grid-template-columns: 1fr 300px !important;
        gap: 3rem;
    }

    .single-sidebar{
        position: sticky;
        top: 80px;
        height: fit-content;
        z-index: 10;
        padding: 0;
    }

    .sidebar-posts{
        gap: 1.25rem;
    }

    .sidebar-post-wrapper {
        display: flex;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.5rem 0 0.5rem 0;
    }

    .sidebar-post-thumbnail {
        width: 80px;
        height: 80px;
    }


    .sidebar-post-title{
        font-size: 0.9rem;
    }

    .sidebar-post-meta{
        font-size: 0.8rem;
    }

    .sidebar-post-category{
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (min-width: 1024px) {
    .site-main .container .single-content-wrapper{
        grid-template-columns: 1fr 320px !important;
        gap: 3.5rem;
    }

    .single-sidebar{
        padding: 0;
    }

    .sidebar-post-thumbnail {
        width: 90px;
        height: 90px;
    }

    .sidebar-post-title{
        font-size: 0.95rem;
    }
}

/* Dark mode sidebar adjustments */
[data-theme="dark"] .sidebar-post{
    background: transparent;
}

[data-theme="dark"] .sidebar-post:hover{
    background: var(--bg-secondary);
}

/* Print styles for sidebar */
@media print {
    .single-sidebar{
        display: none;
    }

    .site-main .container .single-content-wrapper{
        grid-template-columns: 1fr !important;
    }
}

/* Collapsible Comments Section */
.comments-section {
    margin: 3rem 0 0;
    position: relative;
}

.comments-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.comments-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.comments-toggle:hover::before {
    left: 100%;
}

.comments-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-color: #0066cc;
    border-width: 2px;
}

.comments-toggle:focus {
    outline: none;
    border-color: #0066cc;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.comments-toggle-text {
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.comments-toggle-icon {
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.comments-toggle[aria-expanded="true"] .comments-toggle-icon {
    transform: rotate(180deg);
}

.comments-wrapper {
    margin-top: 2rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.comments-wrapper:not([hidden]) {
    opacity: 1;
    max-height: none;
    overflow: visible;
}

/* Dark mode styles for comments toggle */
[data-theme="dark"] .comments-toggle {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .comments-toggle:hover {
    background: var(--bg-secondary);
    border-color: #4a9eff;
    border-width: 2px;
}

[data-theme="dark"] .comments-toggle:focus {
    border-color: #4a9eff;
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(74,158,255,0.1);
}

/* Enhanced accessibility for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .comments-toggle,
    .comments-toggle-icon,
    .comments-wrapper,
    .comments-toggle::before {
        transition: none;
    }

    .comments-toggle:hover {
        transform: none;
    }

    .comments-toggle:hover::before {
        display: none;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .comments-toggle {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Horizontal Related Posts Styles */
.horizontal-related-posts {
    margin: 1.8rem 0 1.5rem 0;
    padding: 1.2rem 0;
    border-top: 2px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.related-posts-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 2rem 0;
    text-align: left;
}

.horizontal-posts-container {
    position: relative;
    margin: 0 -1rem;
}

.horizontal-posts-scroll {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    padding: 0.5rem 1rem 1rem 1rem;
    margin-bottom: -0.5rem;
}

/* Webkit scrollbar styling */
.horizontal-posts-scroll::-webkit-scrollbar {
    display: none;
}

/* Individual post styling */
.horizontal-related-post {
    flex: 0 0 168px;
    scroll-snap-align: start;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.horizontal-related-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--link-color);
}

.horizontal-post-link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.horizontal-post-thumbnail {
    position: relative;
    overflow: hidden;
    height: 96px;
    background: var(--bg-secondary);
}

.horizontal-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.horizontal-related-post:hover .horizontal-post-thumbnail img {
    transform: scale(1.05);
}

.horizontal-post-content {
    padding: 0.75rem;
}

.horizontal-post-title {
    font-family: 'Roboto Slab', serif;
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

/* Dark mode adjustments */
[data-theme="dark"] .horizontal-related-posts {
    border-top-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .horizontal-related-post {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .horizontal-related-post:hover {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* High specificity rules to override global .entry-content h4 styling */
.horizontal-related-posts .horizontal-post-title {
    margin: 0 0 0.75rem 0;
}

.horizontal-related-posts .horizontal-related-post:hover .horizontal-post-title {
    color: var(--link-color);
}

/* Mobile responsive styles for horizontal related posts */
@media (max-width: 767px) {
    .horizontal-posts-container {
        margin: 0;
    }

    .horizontal-posts-scroll {
        padding: 0.5rem 0 1rem 0;
    }

    .horizontal-related-posts .horizontal-post-title {
        margin: 0 0 0.25rem 0;
    }

    .horizontal-related-posts .horizontal-post-content {
        padding: 0.75rem 0.75rem 0.25rem 0.75rem;
    }
}

/* Tablet responsive styles */
@media (min-width: 768px) {
    .horizontal-posts-container {
        margin: 0 -2rem;
    }

    .horizontal-posts-scroll {
        gap: 1.2rem;
        padding: 0.5rem 2rem 1rem 2rem;
    }

    .horizontal-related-post {
        flex: 0 0 192px;
    }

    .horizontal-post-thumbnail {
        height: 108px;
    }

    .horizontal-post-title {
        font-size: 0.95rem;
    }

    .horizontal-post-content {
        padding: 0.5rem 0.5rem 0 0.5rem;
    }
}

/* Desktop responsive styles */
@media (min-width: 1024px) {
    .horizontal-related-posts {
        margin: 2.1rem 0;
    }

    .horizontal-posts-scroll {
        gap: 1.5rem;
    }

    .horizontal-related-post {
        flex: 0 0 210px;
    }

    .horizontal-post-thumbnail {
        height: 120px;
    }

    .related-posts-title {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }
}

/* Print styles */
@media print {
    .horizontal-related-posts {
        display: none;
    }
    .telegram-cta {
        display: none;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .horizontal-related-post {
        transition: none;
    }

    .horizontal-post-thumbnail img {
        transition: none;
    }

    .horizontal-related-post:hover {
        transform: none;
    }

    .horizontal-related-post:hover .horizontal-post-thumbnail img {
        transform: none;
    }

    .telegram-cta,
    .telegram-cta-icon,
    .telegram-cta-button,
    .telegram-cta-button svg,
    .telegram-cta::before {
        transition: none;
    }

    .telegram-cta:hover {
        transform: none;
    }

    .telegram-cta:hover .telegram-cta-icon {
        transform: none;
    }

    .telegram-cta-button:hover {
        transform: none;
    }

    .telegram-cta-button:hover svg {
        transform: none;
    }

    .telegram-cta:hover::before {
        display: none;
    }
}

/* Live Search Styles */
.live-search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 1rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition);
    overflow: hidden;
}

.search-wrapper:focus-within {
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(77, 159, 255, 0.2);
}

.search-input {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 240px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-toggle-button,
.search-clear-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
}

.search-toggle-button:hover,
.search-clear-button:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.search-toggle-button:focus,
.search-clear-button:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

.search-toggle-button .search-icon {
    width: 20px;
    height: 20px;
}

.search-clear-button {
    display: none;
    margin-right: 0.25rem;
}

.search-clear-button svg {
    width: 16px;
    height: 16px;
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

[data-theme="dark"] .search-results-dropdown {
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

/* Search Loading State */
.search-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-loading[aria-hidden="true"] {
    display: none;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--link-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Search Results Content */
.search-results-content {
    display: none;
}

.search-section {
    border-bottom: 1px solid var(--border-color);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-title {
    font-family: 'Roboto Slab', serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 0.75rem 1rem 0.5rem;
    margin: 0;
    background: var(--bg-secondary);
}

/* Topics Section (Categories and Tags) */
.search-topics {
    padding: 0.75rem 1rem;
    line-height: 1.6;
}

.topic-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.topic-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Articles Section */
.search-articles {
    max-height: 280px;
    overflow-y: auto;
}

.article-link {
    display: block;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.article-link:last-child {
    border-bottom: none;
}

.article-link:hover {
    background: var(--bg-secondary);
}

.article-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.article-category {
    font-weight: 500;
}

/* No Results and Error States */
.search-no-results,
.search-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-error p {
    margin: 0;
    color: #e74c3c;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .live-search-container {
        margin-left: auto;
        margin-right: 0;
    }

    .search-wrapper {
        border: none;
    }

    .search-toggle-button .search-icon {
        width: 30px;
        height: 30px;
    }

    .live-search-container:not(.is-active) .search-wrapper {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
    }

    .live-search-container:not(.is-active) .search-input {
        display: none;
    }

    .live-search-container:not(.is-active) .search-clear-button {
        display: none !important;
    }

    .live-search-container:not(.is-active) .search-toggle-button {
        padding: 0;
    }

    .live-search-container.is-active .search-wrapper {
        width: 200px;
        border-radius: 20px;
    }

    .live-search-container.is-active .search-input {
        display: block;
        width: 140px;
        padding: 0.5rem 0.75rem;
    }

    .search-results-dropdown {
        position: fixed;
        top: 70px;
        left: 1rem;
        right: 1rem;
        margin-top: 0;
        max-height: 60vh;
    }

    .search-section-title {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem 0.25rem;
    }

    .search-topics {
        padding: 0.5rem 0.75rem;
    }

    .topic-link {
        font-size: 0.8rem;
    }

    .article-link {
        padding: 0.5rem 0.75rem;
    }

    .article-title {
        font-size: 0.8rem;
    }

    .article-meta {
        font-size: 0.7rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 769px) {
    .search-toggle-button {
        display: none;
    }

    .live-search-container.is-mobile .search-toggle-button {
        display: flex;
    }

    .search-wrapper:hover {
        border-color: var(--link-color);
    }

    .search-results-dropdown {
        min-width: 300px;
        max-width: 400px;
    }

    .article-link:hover .article-title {
        color: var(--link-color);
    }
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .search-wrapper {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .search-wrapper:focus-within {
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(77, 159, 255, 0.3);
}

[data-theme="dark"] .search-results-dropdown {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .loading-spinner {
    border-color: var(--border-color);
    border-top-color: var(--link-color);
}

/* Accessibility and Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .search-wrapper,
    .search-toggle-button,
    .search-clear-button,
    .article-link,
    .topic-link {
        transition: none;
    }

    .loading-spinner {
        animation: none;
    }

    .loading-spinner::after {
        content: '•••';
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        border: none;
        background: none;
        color: var(--link-color);
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .search-wrapper {
        border-width: 2px;
    }

    .search-results-dropdown {
        border-width: 2px;
    }

    .article-link {
        border-bottom-width: 2px;
    }
}

/* Category Template Styles */
.category .site-header {
    margin-bottom: 0;
}

.tag .site-header {
    margin-bottom: 0;
}

.category-template .category-page-header {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.category-page-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-family: 'Roboto Slab', serif;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.category-meta {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Viral Layout Container */
.viral-layout-section {
    margin-bottom: 3rem;
}

.viral-layout-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Hero Post Section */
.hero-main-container {
    grid-column: 1;
}

.category-hero-post {
    position: relative;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    min-height: 500px;
    background: var(--bg-secondary);
    transition: var(--transition);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.category-hero-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.hero-post-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-post-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-post-overlay {
    position: relative;
    z-index: 2;
    padding: 3rem;
    height: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.hero-post-number-badge {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: #4285f4;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(66,133,244,0.4);
    border: 3px solid white;
    z-index: 3;
}

.hero-post-category {
    display: inline-block;
    background: rgba(66,133,244,0.9);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    width: fit-content;
    max-width: max-content;
    white-space: nowrap;
}

.hero-post-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-family: 'Roboto Slab', serif;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Secondary Grid Container */
.secondary-grid-container {
    grid-column: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 500px;
}

.secondary-grid-post {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.secondary-grid-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.secondary-post-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.secondary-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.secondary-grid-post:hover .secondary-post-thumbnail img {
    transform: scale(1.05);
}

.secondary-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 1.5rem 1rem 1rem;
    color: white;
}

.secondary-post-number-badge {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    background: #4285f4;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(66,133,244,0.4);
    border: 2px solid white;
    z-index: 2;
}

.secondary-post-category {
    display: inline-block;
    background: rgba(66,133,244,0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    width: fit-content;
    max-width: max-content;
    white-space: nowrap;
}

.secondary-post-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    font-family: 'Roboto Slab', serif;
    color: white;
}

.secondary-post-meta {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Numbered Posts List */
.category-posts-list {
    margin-bottom: 3rem;
}

.numbered-posts-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.numbered-post-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    padding: 0;
}

.numbered-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #4285f4;
}

.numbered-post-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    width: 100%;
    align-items: center;
}

.post-number-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #4285f4;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(66,133,244,0.3);
    border: 2px solid white;
}

.numbered-post-thumbnail {
    position: relative;
    width: 200px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: 12px 0 0 12px;
}

.numbered-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.numbered-post-card:hover .numbered-post-thumbnail img {
    transform: scale(1.05);
}

.numbered-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.numbered-post-category {
    display: inline-block;
    background: rgba(66,133,244,0.1);
    color: #4285f4;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    width: fit-content;
    max-width: max-content;
    white-space: nowrap;
}

.numbered-post-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    font-family: 'Roboto Slab', serif;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.numbered-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.numbered-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
}

.load-more-button {
    background: var(--link-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    min-width: 140px;
    position: relative;
}

.load-more-button:hover:not(:disabled) {
    background: var(--link-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,204,0.3);
}

.load-more-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-loading {
    display: none;
}

.load-more-end-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0;
}

.load-more-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem auto;
    max-width: 400px;
    text-align: center;
}

.retry-button {
    background: var(--link-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Responsive Design */
/* Tablet Layout */
@media (max-width: 1024px) {
    .viral-layout-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .secondary-grid-container {
        grid-column: 1;
        grid-template-columns: repeat(2, 1fr);
        height: auto;
        margin-top: 1rem;
    }

    .category-hero-post {
        min-height: 400px;
    }
}

/* Mobile Layout */
@media (max-width: 768px) {
    .viral-layout-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-title {
        font-size: 1.8rem;
    }

    .category-hero-post {
        min-height: 350px;
    }

    .hero-post-overlay {
        padding: 2rem;
        min-height: 350px;
    }

    .hero-post-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .hero-post-number-badge {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        top: 1.5rem;
        left: 1.5rem;
    }

    .secondary-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
    }

    .secondary-grid-post {
        min-height: 200px;
    }

    .numbered-post-card {
        flex-direction: column;
        align-items: stretch;
    }

    .numbered-post-thumbnail {
        width: 100%;
        height: 180px;
        border-radius: 12px 12px 0 0;
    }

    .numbered-post-content {
        padding: 1.25rem;
    }

    .numbered-post-title {
        font-size: 1rem;
    }

    .hero-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .numbered-post-meta {
        gap: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Small Mobile Layout */
@media (max-width: 480px) {
    .viral-layout-container {
        gap: 1rem;
    }

    .category-page-header {
        padding: 1.5rem 0;
    }

    .category-title {
        font-size: 1.6rem;
    }

    .category-hero-post {
        min-height: 300px;
    }

    .hero-post-overlay {
        padding: 1.5rem;
        min-height: 300px;
    }

    .hero-post-title {
        font-size: clamp(1.2rem, 6vw, 1.8rem);
        margin-bottom: 1rem;
    }

    .hero-post-number-badge {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        top: 1rem;
        left: 1rem;
    }

    .secondary-grid-post {
        min-height: 180px;
    }

    .secondary-post-title {
        font-size: 0.85rem;
    }

    .numbered-post-card {
        padding: 0;
    }

    .numbered-post-thumbnail {
        height: 160px;
    }

    .numbered-post-content {
        padding: 1rem;
    }

    .numbered-post-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
    }

    .post-number-badge {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        top: 0.8rem;
        left: 0.8rem;
    }
}

    .numbered-post-thumbnail {
        height: 160px;
    }

    .load-more-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .category-hero-post {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

[data-theme="dark"] .category-hero-post:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

[data-theme="dark"] .numbered-post-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Animation Support */
@media (prefers-reduced-motion: reduce) {
    .numbered-post-card,
    .category-hero-post,
    .load-more-button {
        transition: none;
        transform: none !important;
    }

    .numbered-post-thumbnail img {
        transition: none;
        transform: none !important;
    }
}

/* Comments Styles */
.comments-area {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

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

.comments-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

/* Comments Navigation */
.comment-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-navigation a {
    color: var(--link-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
}

.comment-navigation a:hover {
    color: var(--link-hover);
    background: var(--bg-secondary);
    text-decoration: none;
}

/* Comments List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.comment-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.comment-item:hover {
    border-color: var(--link-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.comment-body {
    position: relative;
}

/* Comment Meta */
.comment-meta {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.comment-author img {
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.comment-item:hover .comment-author img {
    border-color: var(--link-color);
}

.comment-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-author-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.comment-author-name a:hover {
    color: var(--link-color);
    text-decoration: none;
}

.post-author-badge {
    display: inline-block;
    background: var(--link-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-metadata {
    margin-left: auto;
    text-align: right;
}

.comment-timestamp {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-timestamp a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.comment-timestamp a:hover {
    color: var(--link-color);
    text-decoration: none;
}

/* Comment Content */
.comment-content {
    margin: 1rem 0;
    line-height: var(--line-height-base);
    color: var(--text-primary);
}

.comment-content p {
    margin-bottom: 1rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-awaiting-moderation {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid #ffeaa7;
    margin-bottom: 1rem;
    font-style: italic;
}

[data-theme="dark"] .comment-awaiting-moderation {
    background: #3d3517;
    color: #ffd32a;
    border-color: #5c4d00;
}

/* Comment Actions */
.comment-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.comment-actions .reply a,
.comment-actions .edit-link a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.comment-actions .reply a:hover,
.comment-actions .edit-link a:hover {
    background: var(--link-color);
    color: white;
    text-decoration: none;
    border-color: var(--link-color);
}

/* Threaded Comments */
.comment-list .children {
    list-style: none;
    margin: 1.5rem 0 0 2rem;
    padding: 0;
}

.comment-list .children .comment-item {
    margin-top: 1.5rem;
    border-left: 3px solid var(--link-color);
    padding-left: 1.5rem;
}

/* Comment Form */
.comment-respond-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comment-reply-title {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.cancel-reply {
    display: block;
    margin-top: 0.5rem;
}

.cancel-reply a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.cancel-reply a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

.comment-form {
    display: grid;
    gap: 1.5rem;
    max-width: 600px;
}

.comment-notes {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.comment-notes .required {
    color: #e74c3c;
    font-weight: 600;
}

.comment-form-author,
.comment-form-email,
.comment-form-url,
.comment-form-comment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comment-form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.comment-form-label .required {
    color: #e74c3c;
    margin-left: 0.25rem;
}

.comment-form-label .optional {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 2px rgba(77,159,255,0.2);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 0.25rem;
}

.comment-form-cookies-consent label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.form-submit {
    margin-top: 1rem;
}

.comment-submit-button {
    background: var(--link-color);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    width: 100%;
}

.comment-submit-button:hover {
    background: var(--link-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,102,204,0.3);
}

.comment-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(77,159,255,0.3);
}

.comment-submit-button:active {
    transform: translateY(0);
}

/* Logged in / Must log in messages */
.must-log-in,
.logged-in-as {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.must-log-in a,
.logged-in-as a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 500;
}

.must-log-in a:hover,
.logged-in-as a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* No Comments State */
.no-comments {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .comments-area {
        margin: 1.5rem 0;
        padding: 1.5rem 0;
    }

    .comment-item {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .comment-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .comment-metadata {
        margin-left: 0;
        text-align: left;
    }

    .comment-list .children {
        margin-left: 1rem;
        padding-left: 1rem;
    }

    .comment-form {
        max-width: 100%;
    }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .comment-submit-button {
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .comment-item {
        padding: 0.75rem;
    }

    .comment-meta {
        gap: 0.5rem;
    }

    .comment-author {
        gap: 0.5rem;
    }

    .comment-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .comment-list .children {
        margin-left: 0.5rem;
        padding-left: 0.75rem;
    }

    .comment-form input[type="text"],
    .comment-form input[type="email"],
    .comment-form input[type="url"],
    .comment-form textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .comment-submit-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Dark Mode Specific */
[data-theme="dark"] .comment-item {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .comment-item:hover {
    border-color: var(--link-color);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

/* Print Styles */
@media print {
    .live-search-container,
    .load-more-container {
        display: none;
    }

    .comments-area {
        break-inside: avoid;
    }

    .comment-item {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }

    .comment-actions,
    .comment-form {
        display: none;
    }
}

/* Enhanced Mobile Layout for Category Posts #2+ */
@media (max-width: 768px) {
    /* Override secondary grid posts to use compact horizontal layout */
    .secondary-grid-post {
        min-height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        background: var(--bg-primary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        transition: var(--transition) !important;
    }

    .secondary-grid-post:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border-color: var(--link-color) !important;
    }

    .secondary-post-thumbnail {
        width: 80px !important;
        height: 80px !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        margin-right: 0.875rem !important;
        position: relative !important;
    }

    .secondary-post-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .secondary-post-overlay {
        position: static !important;
        background: transparent !important;
        padding: 0 !important;
        color: var(--text-primary) !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .secondary-post-category {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
        margin-bottom: 0.4rem !important;
        background: rgba(66,133,244,0.1) !important;
        color: #4285f4 !important;
        border-radius: 4px !important;
        display: inline-block !important;
        width: fit-content !important;
    }

    .secondary-post-title {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin: 0 0 0.3rem 0 !important;
        color: var(--text-primary) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .secondary-post-meta {
        font-size: 0.75rem !important;
        color: var(--text-secondary) !important;
        margin: 0 !important;
    }

    .secondary-post-number-badge {
        position: absolute !important;
        top: 6px !important;
        left: 6px !important;
        background: var(--link-color) !important;
        color: white !important;
        width: 24px !important;
        height: 24px !important;
        border-radius: 50% !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
        border: 2px solid var(--bg-primary) !important;
    }

    /* Override numbered posts to use same compact horizontal layout */
    .numbered-post-card {
        flex-direction: row !important;
        align-items: center !important;
        background: var(--bg-primary) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 8px !important;
        padding: 0.75rem !important;
        margin-bottom: 0.75rem !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
        transition: var(--transition) !important;
    }

    .numbered-post-card:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
        border-color: var(--link-color) !important;
    }

    .numbered-post-thumbnail {
        width: 80px !important;
        height: 80px !important;
        border-radius: 6px !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        margin-right: 0.875rem !important;
        position: relative !important;
    }

    .numbered-post-thumbnail img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    .numbered-post-content {
        padding: 0 !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .numbered-post-category {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
        margin-bottom: 0.4rem !important;
        background: rgba(66,133,244,0.1) !important;
        color: #4285f4 !important;
        border-radius: 4px !important;
        display: inline-block !important;
        width: fit-content !important;
    }

    .numbered-post-title {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin: 0 0 0.3rem 0 !important;
        color: var(--text-primary) !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .numbered-post-meta {
        font-size: 0.75rem !important;
        color: var(--text-secondary) !important;
        margin: 0 !important;
    }

    .post-number-badge {
        position: absolute !important;
        top: 6px !important;
        left: 6px !important;
        background: var(--link-color) !important;
        color: white !important;
        width: 24px !important;
        height: 24px !important;
        border-radius: 50% !important;
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
        border: 2px solid var(--bg-primary) !important;
    }

    /* Ensure proper link styling for both post types */
    .secondary-grid-link,
    .numbered-post-link {
        display: flex !important;
        text-decoration: none !important;
        color: inherit !important;
        width: 100% !important;
        align-items: center !important;
    }

    /* Maintain hero post styling - no changes needed */
    .category-hero-post {
        /* Keep existing hero post styles unchanged */
    }
}

/* Comment Form reCAPTCHA Styling */
.comment-form-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.02);
    border-radius: 8px;
    border: 1px dashed rgba(37, 99, 235, 0.2);
    transition: var(--transition);
}

[data-theme="dark"] .comment-form-recaptcha {
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.3);
}

.comment-form-recaptcha .g-recaptcha {
    transform-origin: center;
}

.comment-form-error {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #dc2626;
    background-color: rgba(239, 68, 68, 0.05);
    border-radius: 6px;
    border-left: 3px solid #dc2626;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    text-align: center;
}

[data-theme="dark"] .comment-form-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.comment-form-error.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments for comment reCAPTCHA */
@media (max-width: 768px) {
    .comment-form-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
        padding: 0.75rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .comment-form-recaptcha {
        transform: scale(0.8);
        padding: 0.5rem;
    }

    .comment-form-error {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Comment form submit button enhancement when reCAPTCHA is present */
.comment-form .submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--text-secondary);
    transform: none;
}

/* Improved focus styles for accessibility */
.comment-form-recaptcha iframe:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}