
/* Base Styles & Variables */
:root {
    /* New Playful Palette */
    --primary: #5EADF5;     /* Sky Blue - Main brand color */
    --secondary: #FF8A5B;   /* Coral Orange - Secondary actions */
    --accent: #16a085;      /* A slightly darker, complementary teal */
    --primary-light: #e0f7ff;
    --secondary-light: #ffeadd;
    
    /* Neutral Colors */
    --light: #FFFFFF;       /* Pure white */
    --background: #FAFBFC;  /* Very light gray background */
    --dark: #2C3E50;        /* Professional dark text */
    --text: #34495E;        /* Main text color */
    --text-light: #7F8C8D;  /* Secondary text */
    --text-muted: #BDC3C7;  /* Muted text */
    --dark-muted: #95a5a6;   /* Darker muted for light backgrounds */
    
    /* Status Colors (using main palette) */
    --success: var(--secondary);  /* Use teal for success */
    --warning: var(--accent);     /* Use yellow for warnings */
    --danger: var(--primary);     /* Use pink for errors */
    --info: var(--secondary);     /* Use teal for info */
    
    /* Typography */
    --font-primary: 'Baloo 2', cursive; /* Playful headings */
    --font-secondary: 'Comic Neue', cursive; /* Fun body text */
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

#app {
    background-color: transparent;
}

body {
    font-family: var(--font-secondary);
    color: var(--text);
    line-height: 1.6;
    background: linear-gradient(180deg, #f0f8ff 0%, #ffffff 30%);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    background-color: transparent;
}

.page-container {
    max-width: 1400px; /* Lebarkan kontainer untuk menampung sidebar */
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: 180px 1fr 180px; /* Sidebar Kiri, Konten Utama, Sidebar Kanan */
    gap: var(--spacing-lg);
}

.sidebar-left, .sidebar-right {
    padding-top: var(--spacing-lg); /* Beri sedikit jarak dari atas */
}

/* Pada layar kecil, tumpuk kolom */
@media (max-width: 1024px) {
    .page-container {
        grid-template-columns: 1fr; /* Hanya satu kolom */
    }

    .sidebar-left, .sidebar-right {
        display: none; /* Sembunyikan sidebar di tablet dan mobile */
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--text);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Header */
/* Header */
.header {
    background-color: transparent;
    box-shadow: none;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--dark);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn-login {
    background-color: transparent;
    color: var(--text);
}

.btn-signup {
    background-color: var(--primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

/* Hero Section - Homepage */
.hero {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    padding: 60px 0;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    text-align: left;
    animation: slideInFromLeft 1s ease-out forwards;
}

.hero-title {
    font-family: 'Baloo 2', cursive;
    font-size: 3.5rem;
    color: #0056b3;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 30px;
}

.hero-illustration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInFromRight 1s ease-out forwards;
}

.hero-illustration img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
}

/* Unified Page Header */
.unified-header {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
    padding: 2rem 0;
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
}

.unified-header h1 {
    font-family: var(--font-primary);
    font-size: 2.8rem;
    margin: 0;
    color: #0056b3;
    text-shadow: none;
}

.unified-header .breadcrumb {
    font-family: var(--font-secondary);
    font-size: 1rem;
    margin-top: 0.5rem;
    color: #000;
}

.unified-header .breadcrumb a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.unified-header .breadcrumb a:hover {
    color: var(--dark);
}

.hero-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.hero-mosaic-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 140px);
    gap: 10px;
    margin-left: auto;
}

.hero-mosaic-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid white;
}

.hero-mosaic-container img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    z-index: 10;
}

.hero-mosaic-container img:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 2; }
.hero-mosaic-container img:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
.hero-mosaic-container img:nth-child(3) { grid-column: 4 / 5; grid-row: 1 / 2; }
.hero-mosaic-container img:nth-child(4) { grid-column: 5 / 7; grid-row: 1 / 2; }
.hero-mosaic-container img:nth-child(5) { grid-column: 1 / 2; grid-row: 2 / 3; }
.hero-mosaic-container img:nth-child(6) { grid-column: 2 / 4; grid-row: 2 / 3; }
.hero-mosaic-container img:nth-child(7) { grid-column: 4 / 6; grid-row: 2 / 3; }
.hero-mosaic-container img:nth-child(8) { grid-column: 6 / 7; grid-row: 2 / 3; }
.hero-mosaic-container img:nth-child(9) { display: none; }


/* Featured Stories */
.featured-stories {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}

.story-card {
    background: white;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.story-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.story-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.favorite-btn:hover,
.favorite-btn.active {
    color: var(--primary);
    border-color: var(--primary);
    background: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn.active {
    color: var(--danger);
    border-color: var(--danger);
}

.story-info {
    padding: 1.5rem;
}

.story-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.story-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.btn-read {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background-color: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-read:hover {
    background-color: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.load-more {
    text-align: center;
    margin-top: 2rem;
}

/* Categories Preview */
.categories-preview {
    padding: 4rem 0;
    background-color: transparent;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary);
}

.category-card span {
    font-weight: 600;
    color: var(--dark);
}

/* Back to Top Button */
.back-to-top {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
    margin: 0 !important;
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.back-to-top:hover {
    background-color: var(--secondary) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

.back-to-top svg {
    width: 24px !important;
    height: 24px !important;
}

/* Footer */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    max-width: 280px;
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 48px;
    width: auto;
}

.logo-label {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--light);
    line-height: 1.2;
}

.footer-logo p {
    color: var(--text-light);
    opacity: 0.8;
}

.footer-links h4,
.footer-legal h4,
.footer-social h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 0.75rem;
}

.footer-links a,
.footer-legal a {
    color: var(--light);
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--primary);
}

.footer-bottom {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid lightgrey;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Newsletter Form */
.footer-newsletter {
    max-width: 300px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 1rem;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50px; /* Membuat sudut lebih oval */
    font-size: 0.95rem;
    transition: all 0.3s ease;
    height: 48px; /* Menetapkan tinggi yang konsisten */
    box-sizing: border-box;
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.15);
}

.newsletter-form .btn {
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 48px; /* Menyamakan tinggi dengan input email */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.newsletter-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Floating Ad */
.floating-ad {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: white;
}

/* Keyframes */
@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.ad-label {
    display: inline-block;
    background-color: var(--primary);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.ad-content p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .hero .page-container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 1.5rem;
    }
    
    .hero-content {
        padding-left: 0;
        margin-left: 0;
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .hero-image {
        max-width: 80%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: white;
        padding: 1rem 0;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .main-nav.active {
        transform: translateY(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 768px;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .floating-ad {
        max-width: 160px;
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

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

.page-header h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Categories Grid */
.categories-section {
    padding: 2rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 2rem;
    transition: transform 0.3s, background 0.3s;
}

/* Memastikan ikon di dalam category-icon berwarna putih */
.category-icon i {
    color: white;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    background: var(--secondary);
}

/* Footer Styles */
.footer {
    background-color: #0056b3; /* Deep Blue */
    color: var(--light);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: left;
    align-items: start;
}

.footer h3 {
    color: var(--light);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: var(--primary);
}

.footer .social-links a {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: var(--primary);
}

.footer .footer-bottom {
    border-top: 1px solid #444;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
}


.category-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--dark);
    font-size: 1.4rem;
}

.category-card p {
    color: var(--text-light);
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.stories-count {
    display: inline-block;
    background: var(--light);
    color: var(--text-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: auto;
}

/* Stories Section */
.stories-section {
    padding: 3rem 0;
    background-color: #f8f9fa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--dark);
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.view-all:hover {
    color: var(--secondary);
}

.view-all i {
    font-size: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .breadcrumb {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .view-all {
        align-self: flex-end;
    }
}

/* General Page Layout */

.page-container.library-layout {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: var(--spacing-lg);
    align-items: start;
}

.sidebar-left,
.sidebar-right {
    position: sticky;
    top: 20px;
}

.page-container {
    /* This rule is now for non-library pages */
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    background-color: transparent;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 20px 0;
}

/* Recent Stories */
.recent-story {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}

.recent-story:last-child {
    border-bottom: none;
}

.recent-story-img {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.recent-story:hover .recent-story-img {
    transform: scale(1.05);
}

.recent-story-content {
    flex: 1;
    min-width: 0;
}

.recent-story h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.recent-story h4 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.recent-story h4 a:hover {
    color: var(--primary);
}

.recent-story-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-light);
}

.recent-story-category {
    background: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

.recent-story-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.category-list a:hover {
    color: var(--primary);
}

/* Sidebar Ad Insert */
.sidebar-ad-insert {
    margin: 15px 0;
    padding: 15px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed var(--primary);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-ad-insert:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.2);
    border-color: var(--secondary);
}

/* Popular Categories Section */
.popular-categories {
    padding: var(--spacing-md) 0;
}

.popular-categories .section-title {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.popular-categories .category-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    justify-content: center;
    padding: 0;
    margin: 0;
}

.popular-categories .category-list li {
    margin-bottom: 0;
}

.popular-categories .category-list a {
    text-decoration: none;
    color: var(--text);
    background-color: transparent;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    font-weight: 600;
    font-size: 1rem;
}

.popular-categories .category-list a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}



.sidebar-ad-insert::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-ad-insert:hover::before {
    opacity: 0.1;
}

.sidebar-widget {
    background-color: transparent;
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
    box-shadow: none;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .page-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 20px 0;
    }
    
    .sidebar-ad-insert {
        margin: 10px 0;
        padding: 12px;
    }
}
