/**
 * Homepage Layout Redesign - Magazine Style
 * Requirements: Homepage Layout Redesign Spec
 */

/* ===== CSS Variables ===== */
:root {
    /* Theme colors from database - Simple & Unified System */
    
    /* Primary Colors */
    --primary-color: var(--primary_color, #dc2626);
    --primary-dark: var(--primary_dark, #b91c1c);
    --primary-light: var(--primary_light, #fef2f2);
    --primary-shadow: var(--primary_shadow, rgba(220, 38, 38, 0.2));
    
    /* Background Colors */
    --bg-primary: var(--bg_primary, #ffffff);
    --bg-secondary: var(--bg_secondary, #f9fafb);
    --border-color: var(--border_color, #e5e7eb);
    
    /* Text Colors */
    --text-primary: var(--text_primary, #1f2937);
    --text-secondary: var(--text_secondary, #6b7280);
    --text-light: var(--text_light, #9ca3af);
    
    /* Footer Colors */
    --footer-bg: var(--footer_bg, #1f2937);
    --footer-text: var(--footer_text, #d1d5db);
    
    /* Layout variables */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --spacing: 1rem;
    --radius: 8px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
    direction: ltr;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== Container ===== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* ===== Header (Requirement 1) ===== */
.site-header {
    background: var(--bg-primary);
    border-bottom: 3px solid var(--primary-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 2rem;
}

.site-branding {
    flex-shrink: 0;
}

.site-branding a {
    text-decoration: none;
}

.site-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Navigation */
.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1.5rem 1.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    transition: transform 0.3s ease;
}

.nav-menu > li:hover > a,
.nav-menu > li.active > a {
    color: var(--primary-color);
}

.nav-menu > li:hover > a::after,
.nav-menu > li.active > a::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown Icon */
.dropdown-icon {
    transition: transform 0.3s ease;
    margin-top: 2px;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    padding: 0.75rem 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--primary-color);
    transition: height 0.2s ease;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    color: var(--primary-color);
    padding-left: 1.75rem;
}

.dropdown-menu a:hover::before {
    height: 70%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1300;
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle:hover span {
    background: var(--primary-color);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-primary);
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-primary) 100%);
}

.mobile-sidebar-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.mobile-sidebar-close:hover {
    transform: rotate(90deg);
    color: var(--primary-dark);
}

.mobile-sidebar-nav {
    padding: 1rem 0;
}

.mobile-sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-sidebar-nav > ul > li {
    border-bottom: 1px solid var(--border_color);
}

.mobile-sidebar-nav > ul > li:last-child {
    border-bottom: none;
}

.mobile-sidebar-nav > ul > li > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-sidebar-nav > ul > li.active > a,
.mobile-sidebar-nav > ul > li > a:hover {
    background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%);
    color: var(--primary-color);
    padding-left: 2rem;
}

/* Mobile Dropdown */
.mobile-dropdown-toggle {
    cursor: pointer;
}

.mobile-dropdown-icon {
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-icon {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-secondary);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 500px;
}

.mobile-dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-dropdown-menu li a::before {
    content: '→';
    position: absolute;
    left: 2rem;
    color: var(--primary-color);
    opacity: 0;
    transition: all 0.2s ease;
}

.mobile-dropdown-menu li a:hover {
    color: var(--primary-color);
    padding-left: 3.5rem;
}

.mobile-dropdown-menu li a:hover::before {
    opacity: 1;
}

/* ===== Featured Posts Section (Requirement 2) ===== */
.featured-posts-section {
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-primary) 100%);
    padding: 60px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.featured-card {
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    overflow: hidden;
    height: 340px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px var(--primary-shadow);
    border-color: var(--primary-dark);
}

.featured-card .post-thumbnail {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.featured-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.featured-card .post-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.featured-card .post-title {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.4;
    flex-shrink: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8rem;
    max-height: 2.8rem;
}

.featured-card .post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-card .post-title a:hover {
    color: var(--primary-color);
}

.featured-card .post-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: auto;
    line-height: 1.5;
}

.featured-card .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: auto;
    flex-shrink: 0;
    min-height: 2.5rem;
}

.featured-card .post-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.featured-card .post-author {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

/* ===== Main Content Area (Requirement 3) ===== */
.main-content-area {
    padding: 40px 0 60px;
    background: var(--bg-color);
}

.content-grid {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 5px;
    align-items: start;
}

/* ===== Left Column - Main Posts (Requirement 4) ===== */
.content-primary {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.main-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 200px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.main-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px var(--primary-shadow);
    border-color: var(--primary-color);
}

.main-card .post-thumbnail {
    height: 100%;
    min-height: 200px;
    overflow: hidden;
}

.main-card .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.main-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.main-card .post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.main-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.main-card .post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.main-card .post-title a:hover {
    color: var(--primary-color);
}

.main-card .post-excerpt {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: auto;
    line-height: 1.6;
}

.main-card .post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

.main-card .post-category {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px var(--primary-shadow);
}

/* ===== Right Column - Sidebar (Requirement 5) ===== */
.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.popular-posts-widget {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
}

.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border_color, #e5e7eb);
}

.popular-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post-item:first-child {
    padding-top: 0;
}

.popular-post-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius);
}

.popular-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.popular-post-item:hover .popular-post-thumbnail img {
    transform: scale(1.1);
}

.popular-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.popular-post-title {
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}

.popular-post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.popular-post-title a:hover {
    color: var(--primary-color);
}

.popular-post-views {
    font-size: 0.8125rem;
    color: var(--text-light);
}

/* ===== Responsive Design (Requirement 8) ===== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        grid-template-columns: 60% 40%;
        gap: 30px;
    }
    
    .main-card {
        grid-template-columns: 200px 1fr;
        min-height: 180px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .site-header {
        padding: 0;
    }
    
    .header-content {
        height: 60px;
        gap: 1rem;
    }
    
    .site-name {
        font-size: 1.25rem;
    }
    
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .featured-posts-section {
        padding: 30px 0;
        margin-bottom: 30px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-card {
        height: auto;
        min-height: 320px;
    }
    
    .featured-card .post-thumbnail {
        height: 200px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .main-card {
        grid-template-columns: 1fr;
        height: auto;
        min-height: auto;
    }
    
    .main-card .post-thumbnail {
        height: 200px;
    }
    
    .sidebar {
        position: static;
    }
    
    .main-content-area {
        padding: 30px 0 40px;
    }
}

/* ===== Utilities ===== */
.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ===== Single Post Page ===== */
.post-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
    background: var(--bg-secondary);
}

.post-header {
    margin-bottom: 2.5rem;
    text-align: center;
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.post-category {
    margin-bottom: 1rem;
}

.post-category a {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 6px var(--primary-shadow);
    transition: all 0.3s ease;
}

.post-category a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.post-title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 800;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta svg {
    color: var(--text-light);
    opacity: 0.7;
}

.post-featured-image {
    margin-bottom: 3rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.post-body h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

.post-body h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.post-body h3 {
    font-size: 1.5rem;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.75rem;
}

.post-body a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.post-body a:hover {
    color: var(--primary-dark);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);

}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--bg-secondary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

/* ===== Also Read Cards - Inline Compact Design ===== */
.also-read-card {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    display: block;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.also-read-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px var(--primary-shadow);
    transform: translateY(-2px);
}

.also-read-header {
    position: absolute;
    top: -10px;
    left: 16px;
    background: var(--bg-primary);
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.also-read-header svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.also-read-content {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 14px;
    margin-top: 4px;
}

.also-read-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.also-read-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.also-read-content:hover .also-read-image img {
    transform: scale(1.1);
}

.also-read-text {
    flex: 1;
    min-width: 0;
}

.also-read-text h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.also-read-content:hover .also-read-text h4 {
    color: var(--primary-color);
}
/* Position variations - Legacy (kept for compatibility) */
.also-read-left {
    float: left;
    width: 45%;
    margin-right: 2rem;
}

.also-read-right {
    float: right;
    width: 45%;
    margin-left: 2rem;
}

.also-read-center {
    clear: both;
    max-width: 100%;
}

/* Mobile responsive for Also Read Cards */
@media (max-width: 768px) {
    .also-read-card {
        max-width: 100%;
        margin: 16px 0;
        padding: 14px;
    }
    
    .also-read-header {
        top: -8px;
        left: 14px;
        padding: 3px 10px;
        font-size: 10px;
    }
    
    .also-read-header svg {
        width: 10px;
        height: 10px;
    }
    
    .also-read-content {
        gap: 12px;
    }
    
    .also-read-image {
        width: 70px;
        height: 50px;
    }
    
    .also-read-text h4 {
        font-size: 14px;
        line-height: 1.2;
    }
    
    .also-read-left,
    .also-read-right {
        float: none;
        width: 100%;
        margin: 16px 0;
    }
}

/* ===== Author Box ===== */
.author-box {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-info h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 700;
}

.author-role {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: block;
}

.author-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}
    
    .also-read-left,
    .also-read-right {
        float: none !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }
    
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }
    
    .author-avatar {
        width: 80px;
        height: 80px;
    }

.post-footer {
    border-top: 2px solid var(--border_color);
    padding-top: 2rem;
    margin-top: 3rem;
}

.post-tags {
    margin-bottom: 2rem;
}

.post-tags strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 0.25rem;
    border: 1px solid var(--border_color);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.post-share {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.post-share strong {
    color: var(--text-primary);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid;
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Twitter - Blue */
.share-btn.twitter {
    color: #1DA1F2;
    border-color: #1DA1F2;
    background: #ffffff;
}

.share-btn.twitter:hover {
    background: #1DA1F2;
    color: #ffffff;
}

/* Facebook - Blue */
.share-btn.facebook {
    color: #1877F2;
    border-color: #1877F2;
    background: #ffffff;
}

.share-btn.facebook:hover {
    background: #1877F2;
    color: #ffffff;
}

/* LinkedIn - Blue */
.share-btn.linkedin {
    color: #0A66C2;
    border-color: #0A66C2;
    background: #ffffff;
}

.share-btn.linkedin:hover {
    background: #0A66C2;
    color: #ffffff;
}

/* Pinterest - Red */
.share-btn.pinterest {
    color: #E60023;
    border-color: #E60023;
    background: #ffffff;
}

.share-btn.pinterest:hover {
    background: #E60023;
    color: #ffffff;
}

/* ===== Related Posts Section ===== */
.related-posts {
    background: var(--bg-secondary);
    padding: 4rem 0;
    margin-top: 4rem;
}

.related-posts h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    padding-bottom: 1rem;
}

.related-posts h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.related-posts .post-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.related-posts .post-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px var(--primary-shadow);
}

.related-posts .post-image {
    height: 200px;
    overflow: hidden;
}

.related-posts .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.related-posts .post-card:hover .post-image img {
    transform: scale(1.05);
}

.related-posts .post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.related-posts .post-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem;
}

.related-posts .post-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-posts .post-content h3 a:hover {
    color: var(--primary-color);
}

.related-posts .post-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-posts .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border_color);
}

.related-posts .post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.related-posts .read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.related-posts .read-more:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* ===== Categories Page ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h1,
.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%);
    border: 2px solid var(--border_color);
    border-radius: var(--radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border_color);
}

.view-category {
    font-weight: 600;
}

/* ===== Contact Form ===== */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border_color);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px var(--primary-shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 12px var(--primary-shadow);
    transform: translateY(-2px);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
}

.contact-info {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius);
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h4 {
    margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h3,
.footer-section h4 {
    margin: 0 0 1.2rem 0;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.footer-section h3 {
    font-size: 1.1rem;
}

.footer-info p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--footer-text);
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 0.7rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-color);
    padding-left: 0.3rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.copyright {
    color: var(--footer-text);
}

.copyright p {
    margin: 0;
}

.footer-meta ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-meta a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-meta a:hover {
    color: var(--primary-color);
}

/* ===== Mobile Responsive Adjustments ===== */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 0;
    }
    
    .post-single {
        padding: 2rem 1rem;
    }
    
    .post-title {
        font-size: 1.35rem;
        line-height: 1.4;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .post-body {
        font-size: 1rem;
    }
    
    .post-body h2 {
        font-size: 1.5rem;
    }
    
    /* Hide text in share buttons on mobile, show icons only */
    .share-btn {
        padding: 0.65rem !important;
        min-width: 42px;
        justify-content: center;
        gap: 0 !important;
    }
    
    .share-btn span {
        display: none !important;
    }
    
    .share-btn svg {
        margin: 0 !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    /* Make tags smaller on mobile */
    .tag {
        font-size: 0.75rem;
        padding: 0.25rem 0.65rem;
    }
    
    .post-tags {
        margin-bottom: 1.5rem;
    }
    
    .post-body h3 {
        font-size: 1.25rem;
    }
    
    .post-share {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .post-share strong {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts {
        padding: 3rem 0;
    }
    
    .related-posts h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
}


/* ===================================
   CATEGORY PAGE STYLES
   =================================== */

/* Category Header */
.category-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem 0 3rem;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    opacity: 1;
}

.category-header-content {
    position: relative;
    z-index: 1;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.category-description {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
    line-height: 1.6;
}

.category-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.category-meta .post-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.category-meta .post-count i {
    font-size: 1rem;
}

/* Category Posts Section */
.category-posts-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Category Post Card */
.category-post-card {
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--primary-shadow);
}

.category-post-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.category-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-post-card:hover .category-post-image img {
    transform: scale(1.05);
}

.category-post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-post-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.category-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.category-post-title a:hover {
    color: var(--primary-color);
}

.category-post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.category-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.category-post-meta i {
    color: var(--primary-color);
    font-size: 0.875rem;
}

.category-post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    flex: 1;
}

.category-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
    margin-top: auto;
}

.category-read-more:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.category-read-more i {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.category-read-more:hover i {
    transform: translateX(3px);
}

/* All Categories Section */
.all-categories-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.all-categories-section .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.all-categories-section .section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.all-categories-section .section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--primary-shadow);
    border-color: var(--primary-color);
}

.category-card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.category-card-icon i {
    font-size: 1.75rem;
    color: white;
}

.category-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.category-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.category-card h3 a:hover {
    color: var(--primary-color);
}

.category-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.category-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.category-card-footer .post-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

.category-card-footer .post-count i {
    color: var(--primary-color);
}

.category-card-footer .view-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.category-card-footer .view-category:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

.category-card-footer .view-category i {
    font-size: 0.875rem;
    transition: transform 0.2s;
}

.category-card-footer .view-category:hover i {
    transform: translateX(3px);
}

/* Empty States */
.no-posts,
.no-categories {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-posts i,
.no-categories i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.no-posts p,
.no-categories p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .category-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .category-header {
        padding: 3rem 0 2rem;
    }
    
    .category-title {
        font-size: 1.875rem;
    }
    
    .category-description {
        font-size: 1rem;
    }
    
    .category-posts-section {
        padding: 2rem 0;
    }
    
    .category-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-post-image {
        height: 200px;
    }
    
    .category-post-title {
        font-size: 1.0625rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .all-categories-section .section-header h1 {
        font-size: 1.875rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-card-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-card-icon i {
        font-size: 1.5rem;
    }
}


/* ===================================
   HOMEPAGE IMPROVEMENTS - AJAX PAGINATION
   =================================== */

/* Improved Post Meta Layout */
.main-card .post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border_color);
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.main-card .post-meta-left {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.main-card .post-meta-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.main-card .post-date,
.main-card .post-views {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-light);
    font-size: 0.8125rem;
}

.main-card .post-date svg,
.main-card .post-views svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.main-card .post-category {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px var(--primary-shadow);
    text-decoration: none;
    transition: all 0.3s ease;
}

.main-card .post-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--primary-shadow);
}

.main-card .post-author {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
}

.main-card .post-author svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 3rem;
    padding: 2rem 0;
    flex-wrap: wrap;
    width: 100%;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color, rgba(0, 0, 0, 0.3));
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.pagination-dots {
    color: var(--text-light);
    font-weight: 600;
    padding: 0 0.25rem;
}

/* Loading State */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border_color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade In Animation for Posts */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .main-card .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .main-card .post-meta-left,
    .main-card .post-meta-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .pagination {
        gap: 0.5rem;
        padding: 1.5rem 0;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}


/* ===================================
   ABOUT PAGE - FEATURED IMAGE
   =================================== */

.about-featured-image {
    margin: 0 0 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

.about-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.about-main-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.about-text-content h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.about-text-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
}

.about-text-content h3 {
    font-size: 1.375rem;
    margin: 1.75rem 0 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.about-text-content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1.0625rem;
}

.about-text-content ul,
.about-text-content ol {
    margin: 1.25rem 0;
    padding-left: 2rem;
    line-height: 1.8;
}

.about-text-content li {
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.about-text-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.about-text-content a:hover {
    color: var(--primary-dark);
}

.about-text-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.about-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
}

.about-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border_color);
}

.about-widget .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    position: relative;
}

.about-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
}

.quick-facts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-facts-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border_color);
}

.quick-facts-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-facts-list li:first-child {
    padding-top: 0;
}

.quick-facts-list li svg {
    flex-shrink: 0;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.quick-facts-list li div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.quick-facts-list li strong {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quick-facts-list li span {
    font-size: 0.9375rem;
    color: var(--text-light);
}

.about-cta-widget {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
}

.about-cta-widget p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.75rem;
}

.btn-block:last-child {
    margin-bottom: 0;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 1024px) {
    .about-content-wrapper {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
    
    .about-main-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .about-featured-image {
        margin: 0 0 2rem;
    }
    
    .about-featured-image img {
        max-height: 300px;
    }
    
    .about-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-main-content {
        padding: 1.5rem;
    }
    
    .about-sidebar-content {
        position: static;
    }
    
    .about-widget {
        padding: 1.5rem;
    }
    
    .about-text-content h2 {
        font-size: 1.5rem;
    }
    
    .about-text-content h3 {
        font-size: 1.25rem;
    }
    
    .about-text-content p {
        font-size: 1rem;
    }
}


/* ===================================
   CONTACT PAGE - PROFESSIONAL DESIGN
   =================================== */

.contact-content-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

.contact-form-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.contact-form label svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border_color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-shadow);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.8125rem;
}

.contact-form .btn-lg {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.contact-success-message {
    text-align: center;
    padding: 3rem 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.success-icon svg {
    color: white;
}

.contact-success-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-success-message p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: sticky;
    top: 100px;
}

.contact-info-widget {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border_color);
}

.contact-info-widget .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    color: var(--primary-color);
    position: relative;
}

.contact-info-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
}

.contact-info-widget p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 0;
}

.info-item-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border_color);
}

.info-item-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-item-card:first-child {
    padding-top: 0;
}

.info-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.info-icon svg {
    color: white;
}

.info-content {
    flex: 1;
}

.info-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.info-content p,
.info-content a {
    font-size: 0.9375rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.info-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.info-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-cta-widget {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--primary-light) 100%);
    border-color: var(--primary-color);
}

.contact-cta-widget p {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
}

.alert svg {
    flex-shrink: 0;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.alert-error {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 2px solid var(--primary-color);
}

@media (max-width: 1024px) {
    .contact-content-grid {
        grid-template-columns: 1fr 320px;
        gap: 2rem;
    }
    
    .contact-form-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-sidebar {
        position: static;
    }
    
    .contact-info-widget {
        padding: 1.5rem;
    }
    
    .contact-success-message {
        padding: 2rem 1rem;
    }
    
    .success-icon {
        width: 64px;
        height: 64px;
    }
    
    .contact-success-message h2 {
        font-size: 1.5rem;
    }
    
    .contact-success-message p {
        font-size: 1rem;
    }
}


/* ===================================
   Legal Pages Styles (Privacy, Terms, Disclaimer)
   =================================== */

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.legal-page .last-updated {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border_color);
}

.legal-page section {
    margin-bottom: 2.5rem;
}

.legal-page section:last-child {
    margin-bottom: 0;
}

.legal-page h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border_color);
}

.legal-page h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}

.legal-page p {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-page ul,
.legal-page ol {
    margin: 1rem 0 1rem 2rem;
    line-height: 1.8;
}

.legal-page li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.legal-page strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-page a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.legal-page a:hover {
    color: var(--primary-dark);
}

/* Mobile Responsive for Legal Pages */
@media (max-width: 768px) {
    .legal-page {
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }
    
    .legal-page h2 {
        font-size: 1.5rem;
    }
    
    .legal-page h3 {
        font-size: 1.2rem;
    }
    
    .legal-page ul,
    .legal-page ol {
        margin-left: 1.5rem;
    }
}
/* ===== Advertisement Styles ===== */
.ad-container {
    margin: 20px 0;
    text-align: center;
    clear: both;
}

.ad-container.ad-header_top {
    margin: 10px 0;
}

.ad-container.ad-header_bottom {
    margin: 15px 0 25px 0;
}

.ad-container.ad-homepage_top {
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ad-container.ad-homepage_middle {
    margin: 30px 0;
}

.ad-container.ad-homepage_sidebar {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.ad-container.ad-post_top {
    margin: 20px 0 30px 0;
}

.ad-container.ad-post_below_title {
    margin: 25px 0 30px 0;
    padding: 15px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ad-container.ad-in-content,
.ad-container.ad-post_in_content {
    margin: 30px auto;
    padding: 20px 0;
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
    clear: both;
}

.ad-container.ad-smart {
    margin: 25px auto;
}

.ad-container.ad-post_middle {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ad-container.ad-post_bottom {
    margin: 30px 0 20px 0;
}

.ad-container.ad-post_below_featured_image {
    margin: 25px 0 30px 0;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ad-container.ad-after-also-read {
    margin: 20px 0 30px 0;
    padding: 15px 0;
}

.ad-container.ad-post_sidebar {
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

.ad-container.ad-mobile_sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 10px;
}

.ad-container.ad-footer_top {
    margin: 30px 0 20px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

/* AdSense responsive styling */
.adsbygoogle {
    display: block;
    margin: 0 auto;
}

/* Mobile responsive ads */
@media (max-width: 768px) {
    .ad-container.ad-homepage_sidebar,
    .ad-container.ad-post_sidebar {
        position: static;
        margin: 15px 0;
    }
    
    .ad-container.ad-post_below_title {
        margin: 15px 0 20px 0;
        padding: 10px 0;
    }
    
    .ad-container.ad-in-content,
    .ad-container.ad-post_in_content {
        margin: 20px auto;
        padding: 15px 0;
        max-width: 100%;
    }
    
    .ad-container.ad-mobile_sticky {
        display: block;
    }
}

@media (min-width: 769px) {
    .ad-container.ad-mobile_sticky {
        display: none;
    }
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px var(--primary-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--primary-shadow);
}

.back-to-top:active {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
}

/* ===== Reading Progress Bar ===== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 4px var(--primary-shadow) !important;
}

/* ===== Bullet Point Style ===== */
.bullet-point {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}
