/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom right, #f8fafc, #e2e8f0);
    min-height: 100vh;
    color: #1e293b;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.875rem;
    font-weight: bold;
    background: linear-gradient(to right, #2563eb, #9333ea);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-desktop {
    display: none;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    color: #64748b;
}

.icon-btn:hover {
    background-color: #f1f5f9;
}

.menu-toggle {
    display: flex;
}

@media (min-width: 768px) {
    .menu-toggle {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
}

.mobile-nav {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Breaking News Ticker */
.breaking-news-ticker {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    color: white;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 999;
}

.breaking-news-label {
    background: #991b1b;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
}

.breaking-news-content {
    flex: 1;
    overflow: hidden;
    padding: 0.75rem 0;
}

.breaking-news-scroll {
    display: flex;
    gap: 3rem;
    animation: scroll-news 30s linear infinite;
    white-space: nowrap;
}

.breaking-news-scroll:hover {
    animation-play-state: paused;
}

@keyframes scroll-news {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.breaking-news-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.breaking-news-item:hover {
    opacity: 0.8;
}

.breaking-news-item::before {
    content: "•";
    font-size: 1.5rem;
    opacity: 0.5;
}

.breaking-news-item:first-child::before {
    display: none;
}

@media (max-width: 768px) {
    .breaking-news-label {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
}

/* Main Content */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 350px;
    }
}

.main-column {
    min-width: 0;
}

/* Sidebar Widgets */
.sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (max-width: 1023px) {
    .sidebar-widgets {
        display: none;
    }
}

/* Make sidebar visible for testing */
@media (min-width: 1024px) {
    .sidebar-widgets {
        display: flex !important;
    }
}

.widget {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.widget-content {
    padding: 0;
}

/* Popular Articles Widget */
.popular-article-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.3s;
}

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

.popular-article-item:hover {
    background: #f8fafc;
}

.popular-article-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.popular-article-info {
    flex: 1;
    min-width: 0;
}

.popular-article-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-article-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.popular-article-views {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Categories Widget */
.category-widget-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s;
}

.category-widget-item:last-child {
    border-bottom: none;
}

.category-widget-item:hover {
    background: #f8fafc;
    padding-left: 1.25rem;
}

.category-widget-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-widget-icon {
    font-size: 1.25rem;
}

.category-widget-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.category-widget-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 1023px) {
    .sidebar-widgets {
        display: none;
    }
}

/* ==========================================
   FEATURED SECTION
   ========================================== */

   .featured-section {
    margin-bottom: 3rem;
}

.featured-card {
    position: relative;
    height: 500px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.featured-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.featured-card:hover .featured-card-image {
    transform: scale(1.05);
}

.featured-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        transparent 100%
    );
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 59, 48, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 2rem;
    margin-bottom: 1rem;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge svg {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.featured-category {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: rgba(37, 99, 235, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.featured-excerpt {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.featured-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.featured-meta-item svg {
    width: 16px;
    height: 16px;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    color: #2563eb;
    font-weight: 600;
    border-radius: 0.5rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.featured-read-more:hover {
    background: #2563eb;
    color: white;
    transform: translateX(5px);
}

.featured-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.featured-read-more:hover svg {
    transform: translateX(3px);
}

/* Loading State */
.featured-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.featured-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.featured-loading-text {
    font-size: 1rem;
    opacity: 0.9;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .featured-card {
        height: 450px;
    }
    
    .featured-title {
        font-size: 2rem;
    }
    
    .featured-excerpt {
        font-size: 1rem;
    }
    
    .featured-card-overlay {
        padding: 2rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .featured-section {
        margin-bottom: 2rem;
    }
    
    .featured-card {
        height: 400px;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .featured-excerpt {
        font-size: 0.9375rem;
        -webkit-line-clamp: 2;
    }
    
    .featured-card-overlay {
        padding: 1.5rem;
    }
    
    .featured-meta {
        gap: 1rem;
    }
    
    .featured-read-more {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .featured-card {
        height: 350px;
        border-radius: 0.75rem;
    }
    
    .featured-title {
        font-size: 1.25rem;
    }
    
    .featured-excerpt {
        display: none; /* Hide on very small screens */
    }
    
    .featured-card-overlay {
        padding: 1.25rem;
    }
    
    .featured-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .featured-category {
        font-size: 0.6875rem;
        padding: 0.3rem 0.75rem;
    }
}

/* ==========================================
   STEP 2: ENHANCED TRENDING SECTION
   ========================================== */

   .trending-section {
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.trending-icon {
    color: #ef4444;
    animation: trendingPulse 2s ease-in-out infinite;
}

@keyframes trendingPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(to right, #ef4444, transparent);
    border-radius: 2px;
    max-width: 100px;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.trending-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.trending-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: #ef4444;
}

.trending-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #ef4444, #f97316);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.trending-card:hover::before {
    transform: scaleX(1);
}

.trending-image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.trending-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.trending-card:hover .trending-image {
    transform: scale(1.1) rotate(2deg);
}

.trending-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.trending-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

.trending-badge svg {
    width: 14px;
    height: 14px;
}

.trending-body {
    padding: 1.25rem;
}

.trending-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.trending-card:hover .trending-title {
    color: #ef4444;
}

.trending-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #94a3b8;
    font-weight: 500;
}

.trending-time svg {
    opacity: 0.7;
}

.trending-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.trending-views {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 600;
}

.trending-views svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.trending-arrow {
    width: 20px;
    height: 20px;
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.trending-card:hover .trending-arrow {
    color: #ef4444;
    transform: translateX(4px);
}

/* Loading Skeleton */
.trending-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.skeleton-image {
    height: 200px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-body {
    padding: 1.25rem;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}

.skeleton-line.title {
    height: 20px;
    width: 90%;
}

.skeleton-line.excerpt {
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Empty State */
.trending-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.trending-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.trending-empty p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .trending-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.25rem;
    }
    
    .trending-section {
        padding: 1.5rem;
    }
    
    .trending-image-wrapper {
        height: 180px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .trending-section {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
        border-radius: 0.75rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .section-title::after {
        display: none;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .trending-card {
        display: flex;
        flex-direction: row;
        height: 140px;
    }
    
    .trending-image-wrapper {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
    }
    
    .trending-body {
        padding: 1rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 1;
    }
    
    .trending-title {
        font-size: 1rem;
        -webkit-line-clamp: 2;
        margin-bottom: 0.5rem;
    }
    
    .trending-excerpt {
        display: none;
    }
    
    .trending-footer {
        display: none;
    }
    
    .trending-category {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.6875rem;
    }
    
    .trending-badge {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.3rem 0.6rem;
        font-size: 0.6875rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .trending-section {
        padding: 1rem;
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .trending-card {
        height: 120px;
        border-radius: 0.75rem;
    }
    
    .trending-image-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .trending-body {
        padding: 0.875rem;
    }
    
    .trending-title {
        font-size: 0.9375rem;
    }
    
    .trending-time {
        font-size: 0.75rem;
    }
}

/* Horizontal Scroll Alternative for Mobile */
@media (max-width: 640px) {
    .trending-grid.horizontal-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .trending-grid.horizontal-scroll::-webkit-scrollbar {
        height: 4px;
    }
    
    .trending-grid.horizontal-scroll::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }
    
    .trending-grid.horizontal-scroll::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    
    .trending-grid.horizontal-scroll .trending-card {
        flex-direction: column;
        min-width: 280px;
        height: auto;
        scroll-snap-align: start;
    }
    
    .trending-grid.horizontal-scroll .trending-image-wrapper {
        width: 100%;
        height: 180px;
    }
    
    .trending-grid.horizontal-scroll .trending-excerpt {
        display: -webkit-box;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .trending-section {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }
    
    .trending-card {
        background: #1e293b;
        border-color: #334155;
    }
    
    .trending-card:hover {
        border-color: #ef4444;
    }
    
    .section-title {
        color: #f1f5f9;
    }
    
    .trending-title {
        color: #f1f5f9;
    }
    
    .trending-card:hover .trending-title {
        color: #ef4444;
    }
    
    .trending-excerpt {
        color: #94a3b8;
    }
    
    .trending-footer {
        background: #0f172a;
        border-color: #334155;
    }
}

/* Accessibility */
.trending-card:focus {
    outline: 3px solid #ef4444;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .trending-card,
    .trending-image,
    .trending-icon,
    .trending-arrow {
        animation: none !important;
        transition: none !important;
    }
}
/* ==========================================
   STEP 3: CATEGORY SHOWCASE SECTIONS
   ========================================== */

   .category-showcase-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 3rem;
}

.category-showcase {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.category-showcase-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #e2e8f0;
}

.category-showcase-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-showcase-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.category-showcase-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.category-showcase-count {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-left: 0.5rem;
}

.category-showcase-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.category-showcase-view-all:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateX(4px);
}

.category-showcase-view-all svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.category-showcase-view-all:hover svg {
    transform: translateX(3px);
}

.category-showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-showcase-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.category-showcase-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.category-showcase-card-image-wrapper {
    position: relative;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.category-showcase-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-showcase-card:hover .category-showcase-card-image {
    transform: scale(1.08);
}

.category-showcase-card-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    color: #1e293b;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-showcase-card-badge svg {
    width: 12px;
    height: 12px;
}

.category-showcase-card-body {
    padding: 1rem;
}

.category-showcase-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.625rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.category-showcase-card:hover .category-showcase-card-title {
    color: #3b82f6;
}

.category-showcase-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.category-showcase-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.category-showcase-card-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Loading State */
.category-showcase-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-showcase-skeleton-card {
    background: #f8fafc;
    border-radius: 0.75rem;
    overflow: hidden;
}

.category-showcase-skeleton-image {
    height: 160px;
    background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.category-showcase-skeleton-body {
    padding: 1rem;
}

.category-showcase-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, #e2e8f0 25%, #cbd5e1 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 0.625rem;
}

.category-showcase-skeleton-line.title {
    height: 16px;
    width: 90%;
}

.category-showcase-skeleton-line.short {
    width: 50%;
}

/* Empty State */
.category-showcase-empty {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.category-showcase-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.category-showcase-empty p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .category-showcase-sections {
        gap: 2.5rem;
    }
    
    .category-showcase {
        padding: 1.5rem;
    }
    
    .category-showcase-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .category-showcase-card-image-wrapper {
        height: 140px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .category-showcase-sections {
        gap: 2rem;
        margin-bottom: 2rem;
    }
    
    .category-showcase {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }
    
    .category-showcase-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-showcase-title {
        font-size: 1.25rem;
    }
    
    .category-showcase-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .category-showcase-view-all {
        width: 100%;
        justify-content: center;
    }
    
    .category-showcase-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-showcase-card {
        display: flex;
        flex-direction: row;
        background: white;
    }
    
    .category-showcase-card-image-wrapper {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    .category-showcase-card-body {
        padding: 0.875rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex: 1;
    }
    
    .category-showcase-card-title {
        font-size: 0.9375rem;
        -webkit-line-clamp: 3;
        margin-bottom: 0.5rem;
    }
    
    .category-showcase-card-badge {
        top: 0.5rem;
        left: auto;
        right: 0.5rem;
        bottom: auto;
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 480px) {
    .category-showcase-sections {
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    .category-showcase {
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .category-showcase-card {
        border-radius: 0.5rem;
    }
    
    .category-showcase-card-image-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .category-showcase-title {
        font-size: 1.125rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .category-showcase {
        background: #1e293b;
        border-color: #334155;
    }
    
    .category-showcase-header {
        border-color: #334155;
    }
    
    .category-showcase-title {
        color: #f1f5f9;
    }
    
    .category-showcase-icon {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    }
    
    .category-showcase-view-all {
        background: #0f172a;
        color: #cbd5e1;
        border-color: #334155;
    }
    
    .category-showcase-view-all:hover {
        background: #3b82f6;
        color: white;
    }
    
    .category-showcase-card {
        background: #0f172a;
    }
    
    .category-showcase-card:hover {
        border-color: #3b82f6;
    }
    
    .category-showcase-card-title {
        color: #f1f5f9;
    }
    
    .category-showcase-card:hover .category-showcase-card-title {
        color: #3b82f6;
    }
    
    .category-showcase-empty {
        background: #0f172a;
    }
}

/* Accessibility */
.category-showcase-card:focus {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .category-showcase-card,
    .category-showcase-card-image,
    .category-showcase-view-all {
        transition: none !important;
    }
}

/* ============================================
   LATEST STORIES - MODERN FULL WIDTH
   ============================================ */

   .latest-stories-modern {
    width: 100%;
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
}

.latest-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
}

.latest-stories-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
}

.latest-stories-title {
    font-size: 48px;
    font-weight: 900;
    color: white;
    margin: 10px 0 0 0;
}

.latest-stories-view-all {
    background: white;
    color: #667eea;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
}

.latest-stories-view-all:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.latest-stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.latest-stories-loading {
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    font-size: 18px;
    padding: 60px 20px;
}

/* Article Cards */
.latest-story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.latest-story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.latest-story-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.latest-story-body {
    padding: 25px;
}

.latest-story-category {
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

.latest-story-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-story-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #64748b;
    align-items: center;
}

.latest-story-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive */
@media (max-width: 1200px) {
    .latest-stories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .latest-stories-modern {
        padding: 50px 0;
    }

    .latest-stories-title {
        font-size: 36px;
    }

    .latest-stories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .latest-stories-header {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .latest-stories-title {
        font-size: 28px;
    }

    .latest-stories-grid {
        grid-template-columns: 1fr;
    }

    .latest-story-image {
        height: 180px;
    }
}

/* ============================================
   CATEGORY MODAL - Modern Design
   Add this to your style.css
   ============================================ */

/* Modal Overlay */
.category-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.category-modal-overlay.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Container */
.category-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.category-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 20px 30px;
    border-bottom: 2px solid #f1f5f9;
}

.category-modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-modal-title svg {
    color: #3b82f6;
}

.category-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.category-modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.category-modal-subtitle {
    padding: 0 30px 20px 30px;
    color: #64748b;
    font-size: 1rem;
}

/* Modal Body */
.category-modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.category-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Category Card */
.category-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
    background: white;
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.category-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.category-card-count {
    font-size: 0.9rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-card-count svg {
    width: 16px;
    height: 16px;
}

/* Popular Badge */
.category-card.popular {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    position: relative;
}

.category-card.popular::before {
    content: '🔥 Popular';
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fbbf24;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .category-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .category-modal-header {
        padding: 20px;
    }

    .category-modal-title {
        font-size: 1.4rem;
    }

    .category-modal-body {
        padding: 20px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 20px;
    }

    .category-card-name {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   FILTERED ARTICLES SECTION
   Add this to your style.css
   ============================================ */

   .filtered-articles-section {
    padding: 3rem 0;
    background: #f8fafc;
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.category-icon {
    font-size: 2rem;
}

.category-header-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.category-header-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.back-to-home-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-home-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateX(-3px);
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card-filtered {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-card-filtered:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.article-card-filtered-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-filtered-body {
    padding: 1.5rem;
}

.article-card-filtered-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.article-card-filtered-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-filtered-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.article-card-filtered-meta svg {
    width: 16px;
    height: 16px;
}

/* Load More Container */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-articles-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.load-more-articles-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .category-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .category-header-content {
        flex-direction: column;
        text-align: center;
    }

    .category-header-title {
        font-size: 1.5rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .back-to-home-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #cbd5e1;
    margin-top: 4rem;
}

/* Article Preview Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    overflow-y: auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 1rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: white;
    transform: rotate(90deg);
}

.modal-content {
    overflow-y: auto;
    max-height: 90vh;
}

.modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 2rem;
}

.modal-category {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background-color: #2563eb;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin: 0;
    line-height: 1.3;
}

.modal-body {
    padding: 2rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-source {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

.modal-source-icon {
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.modal-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.modal-btn-primary {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
    color: white;
    flex: 1;
    justify-content: center;
}

.modal-btn-primary:hover {
    background: linear-gradient(to right, #1d4ed8, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

.modal-btn-secondary:hover {
    background: #e2e8f0;
}

.modal-stats {
    display: flex;
    gap: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-top: 1.5rem;
}

.modal-stat {
    text-align: center;
}

.modal-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1e293b;
}

.modal-stat-label {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
}

/* ENHANCED MODAL STYLES */

/* Reading time in meta */
.modal-reading-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #64748b;
}

/* Content notice banner */
.content-notice {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-left: 4px solid #3b82f6;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #1e40af;
}

.content-notice svg {
    flex-shrink: 0;
    color: #3b82f6;
}

/* Key points section */
.modal-key-points {
    background: #f8fafc;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e2e8f0;
}

.key-points-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.key-points-title svg {
    color: #22c55e;
}

.key-points-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-points-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #475569;
    line-height: 1.6;
    border-bottom: 1px solid #e2e8f0;
}

.key-points-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.key-points-list li:first-child {
    padding-top: 0;
}

.key-points-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: bold;
}

/* Full content area */
.modal-full-content {
    margin-bottom: 2rem;
}

.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #334155;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    font-weight: 700;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.article-content a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid #93c5fd;
    transition: all 0.3s;
}

.article-content a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 1.75rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #475569;
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.article-content code {
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #e11d48;
    font-family: 'Courier New', monospace;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Toast notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1e293b;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Save button filled state */
.modal-btn svg[fill="currentColor"] {
    fill: #3b82f6;
}

/* Smooth scroll for long content */
.modal-content {
    scroll-behavior: smooth;
}

/* Better modal scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================
   IMPROVED MENU MANAGEMENT ADMIN DESIGN
   Add this to admin-style.css or replace existing menu styles
   ========================================== */

   .menu-section {
    margin-bottom: 3rem;
}

.menu-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Menu Tree Structure - IMPROVED */
.menu-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-tree-item {
    margin-bottom: 0.75rem;
}

/* Submenu Container - IMPROVED */
.submenu-container {
    margin-left: 2.5rem;
    margin-top: 0.75rem;
    padding-left: 1.5rem;
    border-left: 3px solid #3b82f6;
    position: relative;
}

.submenu-container::before {
    content: '';
    position: absolute;
    left: -3px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, transparent);
}

/* Menu Item Row - IMPROVED */
.menu-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: move;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item-row:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

/* Depth-specific styling - IMPROVED */
.menu-item-row.depth-0 {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-left: 4px solid #3b82f6;
}

.menu-item-row.depth-1 {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 4px solid #8b5cf6;
}

.menu-item-row.depth-2 {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-left: 4px solid #ec4899;
}

/* Drag Handle - IMPROVED */
.drag-handle {
    cursor: move;
    color: #cbd5e1;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.drag-handle:hover {
    color: #3b82f6;
    background: #eff6ff;
}

/* Depth Indicator - IMPROVED */
.depth-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.depth-indicator.depth-1 {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.depth-indicator.depth-2 {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

/* Menu Item Icon - IMPROVED */
.menu-item-icon {
    font-size: 1.75rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

/* Menu Item Info - IMPROVED */
.menu-item-info {
    flex: 1;
    min-width: 0;
}

.menu-item-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-item-details {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Submenu Badge - IMPROVED */
.submenu-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.85;
    }
}

/* Type Badge - IMPROVED */
.type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.type-category {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.type-custom {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* Status Badge - IMPROVED */
.badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge-inactive {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
}

/* Card Actions - IMPROVED */
.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-edit {
    color: #3b82f6;
    border-color: #bfdbfe;
}

.btn-edit:hover {
    background: #dbeafe;
    border-color: #3b82f6;
}

.btn-toggle {
    color: #f59e0b;
    border-color: #fcd34d;
}

.btn-toggle:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.btn-delete {
    color: #ef4444;
    border-color: #fca5a5;
}

.btn-delete:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* Empty State - IMPROVED */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
}

/* Card Header - IMPROVED */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 2px solid #e2e8f0;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.card-header p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0.5rem 0 0 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-item-row {
        flex-wrap: wrap;
        padding: 1rem;
    }
    
    .menu-item-icon {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .card-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.75rem;
    }
    
    .submenu-container {
        margin-left: 1.5rem;
        padding-left: 1rem;
    }
}

/* Loading State */
.menu-item-row.loading {
    opacity: 0.6;
    pointer-events: none;
}

.menu-item-row.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}
/* ==========================================
   URGENT FIX FOR MENU DISPLAY ISSUE
   Add this to your admin-style.css IMMEDIATELY
   ========================================== */

/* Card Body - MISSING STYLE */
.card-body {
    padding: 1.5rem;
    overflow-x: auto;
}

/* Menu List Container */
#headerMenuList,
#footerMenuList {
    width: 100%;
    overflow: visible;
}

/* Ensure menu items are visible */
.menu-tree {
    width: 100%;
    display: block;
}

.menu-item-row {
    width: 100%;
    min-width: 600px; /* Prevent squishing */
    display: flex !important;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Fix the layout */
.admin-content {
    width: 100%;
    overflow-x: visible;
}

.card {
    width: 100%;
    overflow: visible;
}

/* Make sure action buttons stay on right */
.card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ========================================
   MOBILE RESPONSIVE IMPROVEMENTS
   ======================================== */

/* Tablet Devices (768px and below) */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal-container {
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
        max-width: 100%;
        margin: 0;
    }
    
    .modal-content {
        max-height: 100vh;
    }
    
    .modal-header {
        height: 200px;
    }
    
    .modal-header-overlay {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-meta {
        gap: 0.75rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn-primary {
        width: 100%;
    }
    
    .modal-btn {
        padding: 0.875rem 1.5rem;
        justify-content: center;
    }
    
    .modal-stats {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    .content-notice {
        font-size: 0.8125rem;
        padding: 0.875rem 1rem;
    }
    
    .modal-key-points {
        padding: 1.25rem;
    }
    
    .key-points-title {
        font-size: 1rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h1 { font-size: 1.75rem; }
    .article-content h2 { font-size: 1.5rem; }
    .article-content h3 { font-size: 1.25rem; }
    
    .toast-notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Small Mobile Devices (480px and below) */
@media (max-width: 480px) {
    .modal-close {
        top: 0.75rem;
        right: 0.75rem;
        width: 36px;
        height: 36px;
    }
    
    .modal-header {
        height: 180px;
    }
    
    .modal-header-overlay {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.125rem;
    }
    
    .modal-category {
        font-size: 0.6875rem;
        padding: 0.3rem 0.625rem;
    }
    
    .modal-body {
        padding: 1.25rem;
    }
    
    .modal-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-source,
    .modal-author,
    .modal-time,
    .modal-reading-time {
        font-size: 0.8125rem;
    }
    
    .modal-description {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
    
    .modal-btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .modal-stats {
        padding: 1.25rem;
        gap: 0.75rem;
    }
    
    .modal-stat-value {
        font-size: 1.25rem;
    }
    
    .modal-stat-label {
        font-size: 0.6875rem;
    }
    
    .modal-key-points {
        padding: 1rem;
    }
    
    .key-points-title {
        font-size: 0.9375rem;
    }
    
    .key-points-list li {
        font-size: 0.875rem;
        padding: 0.625rem 0;
        padding-left: 1.25rem;
    }
    
    .article-content {
        font-size: 0.9375rem;
    }
    
    .article-content h1 { font-size: 1.5rem; }
    .article-content h2 { font-size: 1.375rem; }
    .article-content h3 { font-size: 1.125rem; }
    .article-content h4 { font-size: 1rem; }
    
    .content-notice {
        font-size: 0.8125rem;
        padding: 0.75rem 0.875rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Thinner scrollbar on mobile */
    .modal-content::-webkit-scrollbar {
        width: 4px;
    }
}

/* Extra Small Devices (360px and below) */
@media (max-width: 360px) {
    .modal-header {
        height: 150px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-btn {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }
    
    .article-content {
        font-size: 0.875rem;
    }
    
    .article-content h1 { font-size: 1.375rem; }
    .article-content h2 { font-size: 1.25rem; }
    .article-content h3 { font-size: 1.0625rem; }
}

/* Landscape Mode on Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-header {
        height: 150px;
    }
    
    .modal-body {
        padding: 1rem 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .modal-close {
        width: 44px;
        height: 44px;
    }
    
    .modal-btn {
        min-height: 44px;
        padding: 0.875rem 1.5rem;
    }
    
    /* Prevent text selection except for content */
    .modal-container {
        -webkit-user-select: none;
        user-select: none;
    }
    
    .modal-description,
    .article-content {
        -webkit-user-select: text;
        user-select: text;
    }
    
    /* Remove hover effects on touch devices */
    .modal-close:hover {
        transform: none;
    }
    
    .modal-btn-primary:hover {
        transform: none;
    }
}

/* iOS Safe Area Support (for iPhone notches) */
@supports (padding: max(0px)) {
    .modal-body {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
    
    @media (max-width: 480px) {
        .modal-body {
            padding-left: max(1.25rem, env(safe-area-inset-left));
            padding-right: max(1.25rem, env(safe-area-inset-right));
            padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
        }
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .modal-overlay,
    .modal-container,
    .modal-close,
    .modal-btn,
    .toast-notification {
        animation: none !important;
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modal-btn {
        border: 2px solid currentColor;
    }
    
    .modal-close {
        border: 2px solid #000;
    }
}

/* Footer */
.footer {
    background-color: #0f172a;
    color: #cbd5e1;
    margin-top: 4rem;
}

.footer .container {
    padding: 3rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-heading {
    color: white;
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.875rem;
}

.footer-title {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

