/* Modern Professional Responsive Design */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for easy theme management */
:root {
    --primary-color: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary-color: #A855F7;
    --accent-color: #fbbc04;
    --danger-color: #ea4335;
    --warning-color: #ff9800;
    --info-color: #00bcd4;
    --success-color: #4caf50;
    
    --text-primary: #1a1a1a;
    --text-secondary: #5f6368;
    --text-light: #9aa0a6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-light: #fafbfc;
    --bg-dark: #1a1a1a;
    
    --border-light: #e8eaed;
    --border-medium: #dadce0;
    
    --shadow-light: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-heavy: 0 8px 25px rgba(0,0,0,0.15);
    
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-light);
}

/* Main Content Wrapper */
.main-content-wrapper {
    min-height: 100vh;
}

/* Mobile Container Fixes */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%; /* Corrected: Added missing semicolon */
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-8, .col-lg-4 {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .post-meta-hero .meta-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .content-body {
        font-size: 1rem;
    }
    
    .author-card {
        padding: 1.5rem;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .author-name {
        font-size: 1.25rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .reaction-btn.modern-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .recent-post-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .recent-post-image {
        width: 40px;
        height: 40px;
    }
    
    .recent-post-placeholder {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    .recent-post-title {
        font-size: 0.8rem;
    }
    
    .recent-post-date {
        font-size: 0.7rem;
    }
    
    .sidebar-widget {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Container and Layout */
.container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.main-content-wrapper {
    min-height: 100vh;
    padding-top: 2rem;
}

/* Modern Card Design */
.modern-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 2rem;
}

.modern-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.modern-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-secondary) 100%);
}

.modern-card-body {
    padding: 1.5rem;
}

.modern-card-footer {
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
}

/* Post Cards - Enhanced Modern Design */
.post-card {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
    margin-bottom: 2.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 1;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.2);
}

.post-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: all 0.4s ease;
    position: relative;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.post-card:hover .post-image {
    transform: scale(1.03);
}

/* Image overlay for better text visibility */
.post-card .post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.1));
    pointer-events: none;
}

.post-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.post-title:hover {
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.post-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Meta Information - Enhanced Horizontal Layout */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    padding: 1rem 1.25rem;
    background: rgba(139, 92, 246, 0.03);
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.post-meta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(168, 85, 247, 0.02));
    z-index: 0;
}

.post-meta > * {
    position: relative;
    z-index: 1;
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.meta-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(5px);
}

.meta-item:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.meta-item i {
    font-size: 0.9rem;
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

/* Modern Badges - Enhanced */
.modern-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modern-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.badge-category {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.badge-author {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.badge-status {
    background: linear-gradient(135deg, var(--info-color), #0097a7);
    color: white;
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
    color: white;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* Reaction Buttons */
/* Post Tags */
.post-tags {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(168, 85, 247, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.post-tags i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Reaction Buttons - Enhanced */
.reaction-buttons {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-top: 2px solid rgba(139, 92, 246, 0.1);
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid rgba(139, 92, 246, 0.1);
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.9));
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 75px;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.reaction-btn:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
    border-color: var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    color: var(--primary-color);
}

.reaction-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.reaction-emoji {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.reaction-btn:hover .reaction-emoji {
    transform: scale(1.2);
}

.reaction-count {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Post Share and Action Buttons */
.post-share {
    display: flex;
    gap: 0.5rem;
}

.post-share .btn-modern {
    padding: 0.6rem 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.post-share .btn-secondary {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1), rgba(75, 85, 99, 0.1));
    color: var(--text-secondary);
    border: 2px solid rgba(107, 114, 128, 0.1);
}

.post-share .btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

/* Sidebar Styling */
.sidebar-widget {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--secondary-color);
}

/* Navigation Links */
.category-link, .nav-link-modern {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.category-link:hover, .nav-link-modern:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--border-light);
    transform: translateX(4px);
}

.category-link i, .nav-link-modern i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

/* Featured Posts */
.featured-post {
    padding: 1rem;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(135deg, #fff9c4 0%, #fff3b0 100%);
    margin-bottom: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.featured-post h6 {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.featured-post p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* Latest Updates Section */
#latest-updates {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

#latest-updates::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

#latest-updates h2 {
    color: var(--primary-color);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#latest-updates p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid var(--border-medium);
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 0.9rem;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    text-decoration: none;
}

.pagination-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-medium);
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    color: var(--text-light);
    font-weight: 500;
}

/* Toast Message Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrolling News */
.scrolling-news {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-light) 100%);
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.scrolling-news h3 {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 40s linear infinite;
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
}

@media (max-width: 992px) {
    .main-content-wrapper {
        padding-top: 1.5rem;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    #latest-updates {
        padding: 1.5rem;
    }
    
    #latest-updates h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .post-card {
        border-radius: 16px;
        box-shadow: 0 6px 20px rgba(139, 92, 246, 0.1);
    }
    
    .post-image {
        height: 200px;
        border-radius: 16px 16px 0 0;
    }
    
    .post-content {
        padding: 1.25rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
        font-size: 0.8rem;
        padding: 1rem;
    }
    
    .meta-badges {
        order: 1;
        justify-content: center;
        gap: 0.4rem;
    }
    
    .meta-details {
        order: 2;
        margin-left: 0;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .modern-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
    
    .meta-item {
        background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(168, 85, 247, 0.1));
        padding: 0.4rem 0.8rem;
        border-radius: 8px;
        border: 1px solid rgba(139, 92, 246, 0.15);
        font-size: 0.75rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .meta-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .post-title {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .post-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .reaction-buttons {
        gap: 0.5rem;
        justify-content: center;
        padding: 1.25rem 0;
        flex-wrap: wrap;
    }
    
    .reaction-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 60px;
        flex: 1;
        max-width: 75px;
        border-radius: 20px;
    }
    
    .reaction-emoji {
        font-size: 1rem;
    }
    
    .post-tags {
        padding: 0.6rem 0.8rem;
        gap: 0.4rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .modern-card-header,
    .modern-card-body {
        padding: 1rem;
    }
    
    .sidebar-widget {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .widget-title {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .recent-posts {
        gap: 0.5rem;
    }
    
    #latest-updates {
        padding: 1rem;
    }
    
    #latest-updates h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .posts-grid {
        padding: 0 0.5rem;
        gap: 1rem;
    }
    
    .post-card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    
    .post-image {
        height: 180px;
        border-radius: 12px 12px 0 0;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .post-excerpt {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .reaction-buttons {
        gap: 0.4rem;
        padding: 1rem 0;
        justify-content: space-around;
    }
    
    .reaction-btn {
        padding: 0.45rem 0.6rem;
        font-size: 0.75rem;
        min-width: 50px;
        max-width: 65px;
        border-radius: 15px;
    }
    
    .reaction-emoji {
        font-size: 0.9rem;
    }
    
    .post-meta {
        gap: 0.4rem;
    }
    
    .meta-item {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        border-radius: 6px;
        flex: 1;
        min-width: 0;
        text-align: center;
    }
    
    .meta-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.65rem;
    }
    
    .meta-details {
        gap: 0.3rem;
        flex-wrap: nowrap;
    }
    
    .modern-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .post-tags {
        padding: 0.5rem 0.7rem;
        gap: 0.3rem;
        font-size: 0.8rem;
        border-radius: 8px;
    }
    
    .d-flex.justify-content-between.align-items-center {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .btn-modern {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-modern.btn-primary {
        order: 2;
    }
    
    .post-share {
        justify-content: center;
        order: 1;
    }
    
    .post-share .btn-modern {
        width: auto;
        padding: 0.6rem 1rem;
    }
    .pagination a {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .reaction-emoji {
        font-size: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #e8eaed;
        --text-secondary: #9aa0a6;
        --text-light: #5f6368;
        
        --bg-primary: #1f1f1f;
        --bg-secondary: #2d2d2d;
        --bg-light: #121212;
        
        --border-light: #3c4043;
        --border-medium: #5f6368;
    }
}

/* Print Styles */
@media print {
    .sidebar-widget,
    .reaction-buttons,
    .pagination,
    .scrolling-news {
        display: none !important;
    }
    
    .post-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    
    .post-image {
        max-height: 200px !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scrolling-news h3 {
        animation: none;
        transform: none;
    }
}

/* Focus States for Better Accessibility */
.btn-modern:focus,
.reaction-btn:focus,
.category-link:focus,
.pagination a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Post View Specific Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #7C3AED 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="0.5" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.post-meta-hero {
    margin-top: 1.5rem;
}

.post-meta-hero .meta-badges {
    justify-content: center;
    gap: 1rem;
}

.post-meta-hero .modern-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.post-meta-hero .modern-badge:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
}

.badge-author {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(21, 128, 61, 0.3)) !important;
}

.badge-date {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(29, 78, 216, 0.3)) !important;
}

.badge-views {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(124, 58, 237, 0.3)) !important;
}

/* Content Body Styling */
.content-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.content-body h1, 
.content-body h2, 
.content-body h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-body p {
    margin-bottom: 1.5rem;
}

.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Ensure images in content don't overflow */
.content-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.content-body * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Handle embedded content like videos, iframes */
.content-body iframe,
.content-body video,
.content-body embed,
.content-body object {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Handle tables */
.content-body table {
    width: 100%;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
}

/* Author Card */
.author-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    padding: 2rem;
    border-radius: 20px;
    margin: 2rem 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.author-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.5rem;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.author-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.author-role {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.author-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.author-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Reaction Section */
.reaction-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(139, 92, 246, 0.1);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.reaction-buttons[data-post-id] {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.reaction-btn.modern-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(248,250,252,0.9));
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.reaction-text {
    font-weight: 600;
}

/* Sidebar Enhancements */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--bg-secondary);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.recent-post-item:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.recent-post-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-post-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.recent-post-title a:hover {
    color: var(--primary-color);
}

.recent-post-date {
    color: var(--text-light);
    font-size: 0.8rem;
}

.recent-post-date i {
    color: var(--primary-color);
}

/* Responsive adjustments for post view */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .post-content {
        margin-bottom: 2rem;
        padding: 1rem;
    }
    
    .modern-card {
        margin: 0;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .content-body {
        padding: 0;
        overflow: hidden;
    }
    
    .content-body img {
        max-width: 100%;
        width: 100%;
        height: auto;
        margin: 1rem 0;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        object-fit: contain;
    }
    
    .content-body p {
        margin-bottom: 1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .sidebar {
        margin-top: 1rem;
    }
    
    .author-header {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .author-stats {
        justify-content: center;
    }
    
    .reaction-buttons[data-post-id] {
        justify-content: center;
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .reaction-btn.modern-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .recent-post-item {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .recent-post-image {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }
    
    .recent-post-content {
        flex: 1;
        min-width: 0;
    }
    
    .recent-post-title {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
        word-wrap: break-word;
    }
    
    .recent-post-date {
        font-size: 0.75rem;
    }
    
    .recent-post-placeholder {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .post-meta-hero .meta-badges {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .content-body {
        font-size: 1rem;
        padding: 0;
    }
    
    .content-body img {
        margin: 0.75rem 0;
        border-radius: 6px;
        max-width: 100%;
        width: 100%;
        height: auto;
    }
    
    .post-card {
        margin: 0 -0.5rem 1.5rem -0.5rem;
        border-radius: 8px;
    }
    
    .post-image {
        height: 160px;
        border-radius: 8px 8px 0 0;
    }
    
    .post-content {
        padding: 0.75rem;
    }
    
    .author-card {
        padding: 1.5rem;
        margin: 1.5rem 0;
        border-radius: 12px;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .author-name {
        font-size: 1.25rem;
    }
    
    .reaction-btn.modern-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .recent-post-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .recent-post-image {
        width: 40px;
        height: 40px;
    }
    
    .recent-post-placeholder {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    .recent-post-title {
        font-size: 0.8rem;
    }
    
    .recent-post-date {
        font-size: 0.7rem;
    }
    
    .sidebar-widget {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
}

/* Footer Animation Styles */
.footer-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.footer-section:nth-child(1) { transition-delay: 0.1s; }
.footer-section:nth-child(2) { transition-delay: 0.2s; }
.footer-section:nth-child(3) { transition-delay: 0.3s; }
.footer-section:nth-child(4) { transition-delay: 0.4s; }

/* Social Icon Initial State */
.social-link i {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading Animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.loading-shimmer {
    background: linear-gradient(90deg, 
        var(--bg-secondary) 25%, 
        var(--bg-light) 37%, 
        var(--bg-secondary) 63%);
    background-size: 400px 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

/* Pulse Animation for Notifications */
@keyframes pulse-notification {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse-animation {
    animation: pulse-notification 2s infinite;
}

/* Modern Tooltip */
.tooltip-modern {
    position: relative;
    cursor: pointer;
}

.tooltip-modern::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 1000;
}

.tooltip-modern::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-dark);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.tooltip-modern:hover::before,
.tooltip-modern:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Focus States */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===============================================
   MAGAZINE LAYOUT STYLES
   =============================================== */

/* Magazine Hero Section */
.magazine-hero {
    margin: 120px 0 3rem 0;
    padding: 2rem 0;
    background: #f8f9fa;
}

/* Magazine Grid */
.magazine-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 500px;
}

/* Featured Main Article (Left Side) */
.featured-main {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    min-height: 500px;
}

.featured-card {
    position: relative;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: scale(1.02);
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.8) 100%);
    border-radius: 15px;
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
    z-index: 2;
}

.featured-category {
    display: inline-block;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
}

.featured-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

.featured-author, .featured-date {
    font-weight: 500;
}

.featured-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    text-decoration: none;
}

/* Secondary Articles (Right Side) */
.featured-secondary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.secondary-card {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: calc((500px - 40px) / 3);
}

.secondary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.secondary-image {
    width: 100%;
    height: 60%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.secondary-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 100%);
}

.secondary-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.secondary-content {
    padding: 15px;
    height: 40%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.secondary-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.secondary-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.secondary-author, .secondary-date {
    font-weight: 500;
}

.secondary-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .magazine-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .featured-title {
        font-size: 24px;
    }
    
    .secondary-title {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .magazine-hero {
        margin: 80px 0 2rem 0;
        padding: 1rem 0;
    }
    
    .magazine-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
    
    .featured-main {
        min-height: 350px;
    }
    
    .featured-title {
        font-size: 22px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .featured-secondary {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .secondary-card {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .magazine-hero {
        margin: 60px 0 1rem 0;
    }
    
    .magazine-grid {
        padding: 0 10px;
    }
    
    .featured-main {
        min-height: 300px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .featured-content {
        padding: 15px;
    }
    
    .featured-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .secondary-card {
        height: 180px;
    }
    
    .secondary-content {
        padding: 12px;
    }
    
    .secondary-title {
        font-size: 14px;
    }
}

/* ===============================================
   END MAGAZINE LAYOUT STYLES
   =============================================== */

/* Error States */
.error-state {
    color: var(--danger-color);
    background: rgba(234, 67, 53, 0.1);
    border: 1px solid rgba(234, 67, 53, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
}

.success-state {
    color: var(--success-color);
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
}
