/* ============================================
   InformedPortal - Modern SEO Content Platform
   A distinctive, magazine-style design
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Deep teal & warm gold palette */
    --primary: #0d6e6e;
    --primary-dark: #094d4d;
    --primary-light: #1a9a9a;
    --secondary: #d4a438;
    --secondary-light: #e8c46a;
    --accent: #ff6b35;
    
    /* Neutrals */
    --dark: #1a1a2e;
    --dark-light: #2d2d44;
    --gray-900: #212529;
    --gray-800: #343a40;
    --gray-700: #495057;
    --gray-600: #6c757d;
    --gray-500: #adb5bd;
    --gray-400: #ced4da;
    --gray-300: #dee2e6;
    --gray-200: #e9ecef;
    --gray-100: #f8f9fa;
    --white: #ffffff;
    
    /* Category Colors */
    --bio-color: #6366f1;
    --recruit-color: #10b981;
    --edu-color: #f59e0b;
    --ent-color: #ef4444;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Borders & Shadows */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-800);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

@media (max-width: 576px) {
    .container {
        padding: 0 var(--space-md);
    }
}

/* ============================================
   HEADER
   ============================================ */

/* Header top bar styling */

.header-top {
    background: linear-gradient(90deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: var(--space-sm) 0;
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: var(--gray-400);
    margin-right: var(--space-md);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

.social-links a:hover {
    color: var(--secondary);
}

.header-date {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.header-date i {
    margin-right: var(--space-sm);
    color: var(--secondary);
}

.header-main {
    padding: var(--space-lg) 0;
    border-bottom: 1px solid var(--gray-200);
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.nav-main .logo-text {
    color: var(--white);
}

/* Header Ad Wrapper - Shows on all devices */
.header-ad-wrapper {
    background: var(--gray-100);
    padding: var(--space-sm) 0;
    text-align: center;
    transition: opacity 0.5s ease, max-height 0.5s ease, padding 0.5s ease;
    max-height: 200px;
    overflow: hidden;
}

/* Header ad hidden state (added by JavaScript on scroll) */
.header-ad-wrapper.ad-hidden {
    opacity: 0;
    max-height: 0;
    padding: 0;
}

.header-ad-wrapper .header-ad {
    display: flex;
    justify-content: center;
}

.header-ad {
    display: block;
    width: 100%;
}

.header-ad .adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-height: 90px;
}

/* Navigation */
.nav-main {
    background: var(--primary);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    width: 100%;
}

.nav-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
    min-height: 56px;
}

.nav-main .logo {
    flex-shrink: 0;
    margin-right: auto;
}

/* Mobile nav adjustments */
@media (max-width: 991px) {
    .nav-main .container {
        padding: 0 var(--space-md);
    }
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-md);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* Hamburger animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (min-width: 992px) {
    .nav-toggle {
        display: none;
    }
}

.nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    background: var(--primary);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.nav-menu.active {
    display: flex;
}

@media (min-width: 992px) {
    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        max-height: none;
        overflow-y: visible;
        box-shadow: none;
    }
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    border-bottom: 3px solid transparent;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    border-bottom-color: var(--secondary);
}

.nav-menu li a i {
    font-size: 0.875rem;
}

/* Mobile menu items - full width with borders */
@media (max-width: 991px) {
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu li a {
        padding: var(--space-lg) var(--space-xl);
        font-size: 1rem;
        border-bottom: none;
    }
    
    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(255,255,255,0.15);
        border-bottom: none;
    }
    
    .nav-menu li a i {
        font-size: 1.1rem;
        width: 24px;
    }
}

.nav-search {
    padding: var(--space-sm);
}

.nav-search form {
    display: flex;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.nav-search input {
    border: none;
    background: transparent;
    padding: var(--space-sm) var(--space-md);
    color: var(--white);
    width: 180px;
    font-size: 0.9rem;
}

.nav-search input::placeholder {
    color: rgba(255,255,255,0.6);
}

.nav-search button {
    background: var(--secondary);
    border: none;
    padding: var(--space-sm) var(--space-md);
    color: var(--dark);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.nav-search button:hover {
    background: var(--secondary-light);
}

/* Desktop only search */
.nav-search.desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .nav-search.desktop-only {
        display: block;
    }
}

/* Mobile search in menu */
.mobile-search-item {
    display: block;
    padding: var(--space-md) var(--space-xl);
    background: var(--primary-dark);
    border-bottom: none !important;
}

.mobile-search-form {
    display: flex;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.mobile-search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-md);
    color: var(--white);
    font-size: 1rem;
}

.mobile-search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.mobile-search-form button {
    background: var(--secondary);
    border: none;
    padding: var(--space-md) var(--space-lg);
    color: var(--dark);
    cursor: pointer;
}

@media (min-width: 992px) {
    .mobile-search-item {
        display: none;
    }
}

/* Mobile menu overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.nav-overlay.active {
    display: block;
}

@media (min-width: 992px) {
    .nav-overlay {
        display: none !important;
    }
}

/* ============================================
   FLASH MESSAGES
   ============================================ */

.flash-messages {
    margin-top: var(--space-lg);
}

.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main-content {
    min-height: 60vh;
    padding: var(--space-2xl) 0;
}

/* Content Layout with Sidebar */
.content-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

@media (min-width: 992px) {
    .content-layout {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 768px) {
    .content-layout {
        gap: var(--space-xl);
    }
}

@media (max-width: 576px) {
    .content-layout {
        gap: var(--space-lg);
    }
}

.content-main {
    min-width: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    position: sticky;
    top: 20px;
    height: fit-content;
    align-self: flex-start;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--secondary);
    display: inline-block;
}

/* Category List in Sidebar */
.category-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--gray-700);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.category-list li a:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.category-list li a i {
    width: 20px;
    text-align: center;
}

/* Sidebar Post List */
.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.sidebar-post {
    display: flex;
    gap: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-post-image {
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-post-image.placeholder {
    background: linear-gradient(135deg, var(--gray-300), var(--gray-200));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
}

.sidebar-post-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.sidebar-post-content h4 a {
    color: var(--dark);
}

.sidebar-post-content h4 a:hover {
    color: var(--primary);
}

.sidebar-post-date {
    font-size: 0.8rem;
    color: var(--gray-600);
}

/* Sidebar AdSense */
.sidebar-ad {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    min-height: 250px;
}

.sidebar-ad-placeholder {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* AdSense Elements - Ensure visibility */
.sidebar-ad .adsbygoogle,
.header-ad .adsbygoogle,
.in-content-ad .adsbygoogle,
.footer-ad-wrapper .adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-height: 100px;
}

/* Footer Ad Wrapper */
.footer-ad-wrapper {
    padding: var(--space-lg) 0;
    background: var(--gray-100);
    text-align: center;
}

/* Between Posts Ad */
.between-posts-ad {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: center;
    min-height: 100px;
}

.between-posts-ad .adsbygoogle {
    display: block !important;
    width: 100% !important;
}

@media (max-width: 576px) {
    .footer-ad-wrapper {
        padding: var(--space-md) 0;
    }
    
    .footer-ad-wrapper .adsbygoogle {
        min-height: 80px;
    }
}

.sidebar-ad .adsbygoogle {
    min-height: 250px;
}

.in-content-ad .adsbygoogle {
    min-height: 280px;
}

/* ============================================
   CARDS & POST GRIDS
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark);
    position: relative;
    padding-left: var(--space-md);
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary);
    border-radius: 2px;
}

.section-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-link:hover {
    color: var(--primary-dark);
}

/* Post Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: var(--space-xl);
}

@media (min-width: 640px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Post Card */
.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.post-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gray-300), var(--gray-200));
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image .placeholder-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--gray-400);
}

@media (max-width: 576px) {
    .post-card-image .placeholder-icon {
        font-size: 2rem;
    }
}

.post-card-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--white);
}

.category-biography { background: var(--bio-color); }
.category-recruitment { background: var(--recruit-color); }
.category-education { background: var(--edu-color); }
.category-entertainment { background: var(--ent-color); }

.post-card-body {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
}

.post-card-title a {
    color: var(--dark);
}

.post-card-title a:hover {
    color: var(--primary);
}

.post-card-excerpt {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.post-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-500);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
}

.post-card-date i,
.post-card-views i {
    margin-right: var(--space-xs);
}

/* ============================================
   SINGLE POST / ARTICLE PAGE
   ============================================ */

.article-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.article-header {
    position: relative;
}

.article-featured-image {
    height: 400px;
    background: linear-gradient(135deg, var(--gray-300), var(--gray-200));
    position: relative;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-featured-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.article-header-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl);
    color: var(--white);
    z-index: 1;
}

.article-category {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.5rem;
    }
}

.article-meta {
    display: flex;
    gap: var(--space-lg);
    font-size: 0.9rem;
    opacity: 0.9;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Article Body */
.article-body {
    padding: var(--space-2xl);
}

/* In-content Ad */
.in-content-ad {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: center;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.in-content-ad-placeholder {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2 {
    font-size: 1.75rem;
    margin: var(--space-2xl) 0 var(--space-lg);
    color: var(--dark);
    position: relative;
    padding-bottom: var(--space-sm);
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.375rem;
    margin: var(--space-xl) 0 var(--space-md);
    color: var(--dark);
}

.article-content p {
    margin-bottom: var(--space-lg);
    color: var(--gray-700);
}

.article-content ul,
.article-content ol {
    margin: var(--space-lg) 0;
    padding-left: var(--space-xl);
}

.article-content li {
    margin-bottom: var(--space-sm);
    position: relative;
}

.article-content ul li::before {
    content: '→';
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

/* Quick Facts Table */
.quick-facts {
    background: linear-gradient(135deg, var(--gray-100), var(--white));
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
}

.quick-facts-title {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quick-facts-title i {
    color: var(--secondary);
}

.quick-facts-table {
    width: 100%;
    border-collapse: collapse;
}

.quick-facts-table tr {
    border-bottom: 1px solid var(--gray-200);
}

.quick-facts-table tr:last-child {
    border-bottom: none;
}

.quick-facts-table td {
    padding: var(--space-md) var(--space-sm);
}

.quick-facts-table td:first-child {
    font-weight: 600;
    color: var(--gray-700);
    width: 40%;
}

.quick-facts-table td:last-child {
    color: var(--dark);
}

/* FAQ Section */
.faq-section {
    margin: var(--space-2xl) 0;
}

.faq-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--dark);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.faq-item {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-question {
    padding: var(--space-lg);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-fast);
}

.faq-question:hover {
    background: var(--gray-200);
}

.faq-question i {
    color: var(--primary);
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--gray-700);
    line-height: 1.7;
}

/* Related Posts */
.related-posts {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

.related-posts-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.related-post-card {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform var(--transition-fast);
}

.related-post-card:hover {
    transform: translateY(-3px);
}

.related-post-image {
    height: 120px;
    background: var(--gray-200);
    overflow: hidden;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-title {
    padding: var(--space-md);
    font-size: 0.9rem;
    font-weight: 600;
}

.related-post-title a {
    color: var(--dark);
}

.related-post-title a:hover {
    color: var(--primary);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-2xl);
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.pagination a {
    background: var(--white);
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
}

.pagination a:hover {
    background: var(--primary);
    color: var(--white);
}

.pagination span.current {
    background: var(--primary);
    color: var(--white);
}

.pagination span.disabled {
    background: var(--gray-200);
    color: var(--gray-400);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--dark);
    color: var(--gray-400);
    margin-top: auto;
}

.footer-main {
    padding: var(--space-3xl) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.footer-about p {
    line-height: 1.7;
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--gray-400);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--secondary);
    color: var(--dark);
}

.footer-links ul li {
    margin-bottom: var(--space-sm);
}

.footer-links ul li a {
    color: var(--gray-400);
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--secondary);
}

.newsletter-form {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.newsletter-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: var(--space-md);
    color: var(--white);
}

.newsletter-form input::placeholder {
    color: var(--gray-500);
}

.newsletter-form button {
    background: var(--secondary);
    border: none;
    padding: var(--space-md) var(--space-lg);
    color: var(--dark);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.newsletter-form button:hover {
    background: var(--secondary-light);
}

.footer-bottom {
    background: rgba(0,0,0,0.3);
    padding: var(--space-lg) 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ============================================
   BACK TO TOP
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ============================================
   CATEGORY PAGES
   ============================================ */

.category-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-3xl) 0;
    margin-bottom: var(--space-2xl);
    text-align: center;
    color: var(--white);
}

.category-header h1 {
    color: var(--white);
    margin-bottom: var(--space-md);
}

.category-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   HOMEPAGE SECTIONS
   ============================================ */

.home-section {
    margin-bottom: var(--space-3xl);
}

/* Horizontal scroll on mobile for featured cards */
@media (max-width: 576px) {
    .home-section .post-grid.horizontal-scroll-mobile {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-md);
        padding-bottom: var(--space-sm);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .home-section .post-grid.horizontal-scroll-mobile::-webkit-scrollbar {
        display: none;
    }
    
    .home-section .post-grid.horizontal-scroll-mobile .post-card {
        flex: 0 0 280px;
        max-width: 85vw;
        scroll-snap-align: start;
    }
}

.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--space-3xl) 0;
    color: var(--white);
    margin-bottom: var(--space-2xl);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
}

.hero-search form {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: var(--space-lg) var(--space-xl);
    font-size: 1rem;
}

.hero-search button {
    background: var(--secondary);
    border: none;
    padding: var(--space-lg) var(--space-xl);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.hero-search button:hover {
    background: var(--secondary-light);
}

/* Hero mobile enhancements */
@media (max-width: 576px) {
    .hero-section {
        padding: var(--space-lg) 0;
        margin-bottom: var(--space-lg);
    }
    
    .hero-title {
        font-size: 1.5rem;
        padding: 0 var(--space-sm);
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 var(--space-sm);
    }
    
    .hero-search {
        padding: 0 var(--space-sm);
    }
    
    .hero-search input {
        padding: var(--space-md);
        font-size: 16px;
    }
    
    .hero-search button {
        padding: var(--space-md);
    }
}

/* Featured Posts Carousel */
.featured-section {
    margin-bottom: var(--space-2xl);
}

.featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .featured-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.featured-main {
    position: relative;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.featured-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-main-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl);
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: var(--white);
}

.featured-main-title {
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.featured-sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.featured-sidebar-post {
    display: flex;
    gap: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.featured-sidebar-post:hover {
    transform: translateX(5px);
}

.featured-sidebar-image {
    width: 100px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.featured-sidebar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-sidebar-content h4 {
    font-size: 0.95rem;
    margin-bottom: var(--space-xs);
}

.featured-sidebar-content h4 a {
    color: var(--dark);
}

.featured-sidebar-content h4 a:hover {
    color: var(--primary);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.category-tab {
    padding: var(--space-sm) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-xl);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.category-tab:hover,
.category-tab.active {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================
   FORMS (Admin & Search)
   ============================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: #10b981;
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-lg); }
.mt-3 { margin-top: var(--space-xl); }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-lg); }
.mb-3 { margin-bottom: var(--space-xl); }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-md); }
.gap-2 { gap: var(--space-lg); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--gray-500);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--gray-600);
    margin-bottom: var(--space-sm);
}

/* ============================================
   RESPONSIVE - MOBILE FIRST
   ============================================ */

/* Tablet and below */
@media (max-width: 991px) {
    .sidebar {
        order: 2;
        position: static;
        top: auto;
    }
    
    .content-main {
        order: 1;
    }
    
    /* Navigation search - hide desktop search on mobile */
    .nav-search.desktop-only {
        display: none;
    }
    
    /* Article adjustments */
    .article-featured-image {
        height: 280px;
    }
    
    .article-header-content {
        padding: var(--space-lg);
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    /* Related posts */
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile phones */
@media (max-width: 767px) {
    /* Base typography */
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Container padding */
    .container {
        padding: 0 var(--space-md);
    }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    /* Navigation - styles defined in mobile section */
    
    /* Hero section */
    .hero-section {
        padding: var(--space-xl) 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-search form {
        flex-direction: column;
        border-radius: var(--radius-md);
    }
    
    .hero-search input {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        text-align: center;
    }
    
    .hero-search button {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        width: 100%;
    }
    
    /* Main content */
    .main-content {
        padding: var(--space-lg) 0;
    }
    
    /* Section headers */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
    }
    
    .section-title {
        font-size: 1.35rem;
    }
    
    .section-link {
        font-size: 0.85rem;
    }
    
    /* Post cards */
    .post-grid {
        gap: var(--space-md);
    }
    
    .post-card-image {
        height: 180px;
    }
    
    .post-card-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .post-card-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .post-card-meta {
        font-size: 0.75rem;
    }
    
    /* Home sections */
    .home-section {
        margin-bottom: var(--space-xl);
    }
    
    /* Empty state */
    .empty-state {
        padding: var(--space-xl);
    }
    
    .empty-state i {
        font-size: 2.5rem;
    }
    
    .empty-state h3 {
        font-size: 1.1rem;
    }
    
    .post-card-body {
        padding: var(--space-md);
    }
    
    .post-card-title {
        font-size: 1rem;
    }
    
    .post-card-excerpt {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .post-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    /* Article page */
    .article-featured-image {
        height: 220px;
    }
    
    .article-title {
        font-size: 1.35rem;
        line-height: 1.3;
    }
    
    .article-category {
        font-size: 0.7rem;
    }
    
    .article-meta {
        font-size: 0.8rem;
    }
    
    .article-body {
        padding: var(--space-md);
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.35rem;
        margin: var(--space-xl) 0 var(--space-md);
    }
    
    .article-content h3 {
        font-size: 1.15rem;
    }
    
    /* Quick facts table */
    .quick-facts {
        padding: var(--space-md);
        margin: var(--space-md) 0;
    }
    
    .quick-facts-title {
        font-size: 1.1rem;
    }
    
    .quick-facts-table td {
        padding: var(--space-sm) var(--space-xs);
        font-size: 0.9rem;
    }
    
    .quick-facts-table td:first-child {
        width: 35%;
    }
    
    /* FAQ section */
    .faq-question {
        padding: var(--space-md);
        font-size: 0.95rem;
    }
    
    .faq-answer-content {
        padding: 0 var(--space-md) var(--space-md);
        font-size: 0.9rem;
    }
    
    /* In-content ads */
    .in-content-ad {
        padding: var(--space-md);
        min-height: 200px;
        margin: var(--space-lg) 0;
    }
    
    /* Related posts */
    .related-posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }
    
    .related-post-image {
        height: 100px;
    }
    
    .related-post-title {
        padding: var(--space-sm);
        font-size: 0.8rem;
    }
    
    /* Sidebar */
    .sidebar {
        gap: var(--space-lg);
    }
    
    .sidebar-widget {
        padding: var(--space-md);
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
    
    .sidebar-post {
        gap: var(--space-sm);
    }
    
    .sidebar-post-image {
        width: 70px;
        height: 55px;
    }
    
    .sidebar-post-content h4 {
        font-size: 0.85rem;
    }
    
    .sidebar-ad {
        min-height: 200px;
    }
    
    /* Share buttons */
    .share-buttons {
        display: flex;
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .share-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Footer */
    .footer-main {
        padding: var(--space-xl) 0;
    }
    
    .footer-grid {
        gap: var(--space-xl);
    }
    
    .footer-title {
        font-size: 1.1rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        text-align: center;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    /* Category header */
    .category-header {
        padding: var(--space-xl) 0;
    }
    
    .category-header h1 {
        font-size: 1.5rem;
    }
    
    /* Pagination */
    .pagination a,
    .pagination span {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    /* Buttons - Touch friendly */
    .btn {
        padding: var(--space-md) var(--space-lg);
        min-height: 44px;
    }
    
    .btn-sm {
        padding: var(--space-sm) var(--space-md);
        min-height: 40px;
    }
    
    /* Forms - Touch friendly */
    .form-control {
        padding: var(--space-md);
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }
    
    /* Back to top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
    
    /* Category tabs */
    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
    }
    
    .category-tab {
        flex-shrink: 0;
        padding: var(--space-sm) var(--space-md);
    }
}

/* Small phones */
@media (max-width: 380px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--space-sm);
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .hero-title {
        font-size: 1.35rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--space-md);
    }
    
    .hero-search input {
        padding: var(--space-sm);
    }
    
    .hero-search button {
        padding: var(--space-sm);
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.15rem;
    }
    
    .section-link {
        font-size: 0.8rem;
    }
    
    .post-card-image {
        height: 140px;
    }
    
    .post-card-body {
        padding: var(--space-sm);
    }
    
    .post-card-title {
        font-size: 0.95rem;
    }
    
    .post-card-excerpt {
        font-size: 0.8rem;
        display: none;
    }
    
    .post-card-meta {
        font-size: 0.7rem;
    }
    
    .post-card-category {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
    
    .article-featured-image {
        height: 180px;
    }
    
    .quick-facts-table td {
        display: block;
        width: 100% !important;
        padding: var(--space-xs) 0;
    }
    
    .quick-facts-table td:first-child {
        font-size: 0.8rem;
        color: var(--gray-500);
        padding-bottom: 0;
    }
    
    .quick-facts-table td:last-child {
        padding-top: 0;
        padding-bottom: var(--space-sm);
        border-bottom: 1px solid var(--gray-200);
    }
    
    .quick-facts-table tr:last-child td:last-child {
        border-bottom: none;
    }
    
    /* Hide header-top on very small screens */
    .header-top {
        display: none;
    }
    
    /* Post grid single column */
    .posts-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Related posts single column */
    .related-posts-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Sidebar widgets */
    .sidebar-widget {
        padding: var(--space-sm);
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    /* Empty state */
    .empty-state {
        padding: var(--space-lg);
    }
    
    .empty-state i {
        font-size: 2rem;
    }
    
    .empty-state h3 {
        font-size: 1rem;
    }
    
    .empty-state p {
        font-size: 0.85rem;
    }
    
    /* In content ad */
    .in-content-ad {
        padding: var(--space-sm);
        min-height: 150px;
        margin: var(--space-md) 0;
    }
}

/* Landscape orientation on phones */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: var(--space-lg) 0;
    }
    
    .article-featured-image {
        height: 200px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .post-card:hover {
        transform: none;
    }
    
    .post-card:active {
        transform: scale(0.98);
    }
    
    .related-post-card:hover {
        transform: none;
    }
    
    .featured-sidebar-post:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .nav-menu li a {
        min-height: 48px;
    }
    
    .faq-question {
        min-height: 48px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --gray-300: #ccc;
        --gray-400: #999;
    }
    
    .post-card {
        border: 2px solid var(--gray-400);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   ADDITIONAL MOBILE FIXES
   ============================================ */

/* Prevent horizontal scroll - wrapper approach to preserve sticky nav */
.main-wrapper {
    overflow-x: hidden;
}

/* Nav sticky is defined in main nav-main block */

/* Mobile article fixes */
@media (max-width: 767px) {
    .article-header {
        padding: var(--space-lg);
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .article-meta {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .article-content {
        padding: var(--space-md);
    }
    
    /* Better image handling */
    .article-featured-image {
        border-radius: 0;
        margin: 0 calc(-1 * var(--space-md));
        width: calc(100% + 2 * var(--space-md));
    }
    
    /* Share buttons stack */
    .social-share {
        flex-direction: column;
    }
    
    .social-share a {
        width: 100%;
        text-align: center;
    }
}

/* Mobile tables - horizontal scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Mobile-friendly forms */
@media (max-width: 576px) {
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
}

/* Fix sidebar sticky on mobile (disable) */
@media (max-width: 991px) {
    .sidebar {
        position: static !important;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVENESS FIXES
   ============================================ */

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent any element from overflowing */
* {
    box-sizing: border-box;
}

/* Mobile-first post grid */
@media (max-width: 767px) {
    .post-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-lg);
    }
    
    .post-card {
        margin: 0;
    }
    
    .post-card-image {
        height: 200px;
    }
    
    /* Ensure content doesn't overflow */
    .content-main,
    .sidebar,
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Extra small screen fixes */
@media (max-width: 480px) {
    .hero-content {
        padding: 0 var(--space-sm);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .section-link {
        font-size: 0.85rem;
    }
    
    .post-card-body {
        padding: var(--space-md);
    }
    
    .post-card-title {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .post-card-excerpt {
        font-size: 0.85rem;
        line-height: 1.5;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .post-card-meta {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: var(--space-xs);
    }
    
    /* Sidebar widget fixes */
    .sidebar-widget {
        padding: var(--space-md);
    }
    
    .widget-title {
        font-size: 1.1rem;
    }
    
    /* Footer mobile fixes */
    .footer-main {
        padding: var(--space-xl) 0;
    }
    
    .footer-grid {
        gap: var(--space-lg);
    }
    
    .footer-title {
        font-size: 1rem;
        margin-bottom: var(--space-md);
    }
    
    .footer-social a {
        width: 36px;
        height: 36px;
    }
    
    .footer-bottom {
        padding: var(--space-md) 0;
        font-size: 0.8rem;
    }
}

