/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. THEME AND GLOBAL STYLES
   2. HEADER & NAVIGATION
   3. FOOTER
   4. REUSABLE COMPONENTS (Grids, Cards, Buttons)
   5. PAGE-SPECIFIC STYLES
   6. RESPONSIVENESS (MEDIA QUERIES)
   ========================================================================== */


/* ==========================================================================
   1. THEME AND GLOBAL STYLES
   ========================================================================== */
:root {
    --primary-blue: #3498db;
    /* A brighter blue for accents */
    --accent-yellow: #ffc400;
    --dark-bg: #0a192f;
    /* A deep midnight blue for the main background */
    --card-bg: #172a45;
    /* A slightly lighter navy for cards and footer */
    --text-light: #ccd6f6;
    --text-dark: #ffffff;
    --text-muted: #8892b0;
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    --card-hover-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

::selection {
    background-color: var(--accent-yellow);
    color: var(--dark-bg);
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
}

main>.container {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* --- Premium Messages --- */
.message-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.message {
    pointer-events: auto;
    background: rgba(23, 42, 69, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-dark);
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--primary-blue);
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.message.success { border-left-color: #2ecc71; }
.message.error { border-left-color: #e74c3c; }
.message.warning { border-left-color: #f1c40f; }
.message.info { border-left-color: #3498db; }

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-dark);
    z-index: 1001;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-yellow);
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-dark);
}

/* --- Navigation Dropdown --- */
.nav-item-dropdown {
    position: relative;
}

.nav-link-with-icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1002;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
}

/* Show on hover for desktop */
@media (min-width: 993px) {
    .nav-item-dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 10px 20px;
    color: var(--text-light) !important;
    display: block;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-yellow) !important;
}

/* ==========================================================================
   3. FOOTER
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 20px;
    background-color: var(--card-bg);
    color: var(--text-muted);
    border-top: 1px solid #333;
    margin-top: auto;
}

/* ==========================================================================
   4. REUSABLE COMPONENTS (Grids, Cards, Buttons)
   ========================================================================== */
.publications-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

.publications-header h1,
.publications-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin: 0;
}

.publications-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.text-center {
    text-align: center !important;
}

/* --- Publications & Articles Grid --- */
.publications-grid {
    margin-top: 20px;
}

/* Desktop: 4 columns */
@media (min-width: 993px) {
    .publications-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 40px !important;
    }
}

/* Mobile: Stacked blocks with spaces */
@media (max-width: 992px) {
    .publications-grid:not(.mobile-carousel) {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px !important;
        align-items: center;
    }
    
    .publications-grid:not(.mobile-carousel) .publication-card {
        width: 100% !important;
        max-width: 500px;
        margin-bottom: 0 !important;
    }
}

/* --- Horizontal Carousel (Mobile Snap) --- */
@media (max-width: 768px) {
    .mobile-carousel {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 15px !important;
        padding-bottom: 20px !important;
        padding-top: 10px !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Hide scrollbar for clean look */
    }
    
    .mobile-carousel::-webkit-scrollbar {
        display: none !important;
    }
    
    .mobile-carousel .publication-card {
        flex: 0 0 85% !important; /* Peek at the next card */
        scroll-snap-align: center !important;
        margin: 0 !important;
    }
}

.publication-card {
    background-color: var(--card-bg);
    border-radius: 16px; /* Softer rounded corners */
    text-decoration: none;
    color: var(--text-light);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Slightly more visible border */
}

.publication-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(255, 196, 0, 0.3); /* Subtle yellow tint on hover */
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #333;
    overflow: hidden;
    /* Ensure image zoom stays within bounds */
    position: relative;
}

.card-image-wrapper img,
.placeholder-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.5s ease;
    /* Smooth zoom transition */
}

/* Zoom effect on card hover */
.publication-card:hover .card-image-wrapper img {
    transform: scale(1.08);
}

.card-content {
    padding: 20px; /* Standardized more generous padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Consistent spacing between elements */
}

.card-date {
    font-size: 0.8rem;
    font-weight: 700; /* Heavier for better legibility */
    color: var(--accent-yellow); /* Magazines date also in yellow for consistency */
    text-transform: uppercase;
    display: block;
}

.card-title {
    font-size: 1.2rem; /* Slightly larger, standardized */
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    font-weight: 600;
}

.card-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 15px;
}

/* --- Article Story Card (Homepage Popular Articles) --- */
.article-story-card {
    border-radius: 12px !important;
}

.article-story-card .card-image-wrapper {
    aspect-ratio: 16 / 9 !important; /* Cinematic/Horizontal for articles */
}

.article-story-card .card-content {
    padding: 15px !important;
    gap: 8px !important;
}

.article-story-card .card-title {
    font-size: 1.1rem !important;
}

.article-story-card .card-excerpt {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-story-card .tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.no-publications {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 40px 0;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #3a5f9b;
}

.back-link {
    display: block;
    text-align: left;
    margin-bottom: 20px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

/* --- NEW: Reading Progress Bar --- */
.progress-container {
    width: 100%;
    height: 5px;
    /* Height of the progress bar */
    background-color: transparent;
    /* Make container transparent */
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
    /* Ensure it's above everything */
    display: none;
    /* Hidden by default, shown via JS on article pages */
}

.progress-bar {
    height: 100%;
    background-color: var(--accent-yellow);
    width: 0%;
    /* Starts at 0% width */
}

/* ==========================================================================
   5. PAGE-SPECIFIC STYLES
   ========================================================================== */
/* --- Homepage Hero --- */
.hero-banner {
    background-color: var(--primary-blue);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%), linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%);
    background-size: 20px 20px;
    color: var(--text-dark);
    padding: 60px 0 40px;
}


.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
    max-width: 50%;
    position: relative;
    z-index: 10; /* Ensure content and buttons are above absolutely positioned image wrappers */
}

.hero-tagline {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Increased for readability */
    font-weight: 700; /* Bolder for contrast */
}

.hero-headline {
    font-size: 2.8rem;
    line-height: 1.2;
    font-weight: 700;
    margin: 15px 0 20px 0;
}

.hero-subheadline {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 30px;
}

.hero-subscribe-button {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    border: 2px solid var(--accent-yellow);
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-subscribe-button:hover {
    background-color: var(--accent-yellow);
    color: #000;
}

.mobile-only-btn-wrapper {
    display: none !important;
}

.desktop-only-btn {
    display: inline-block !important;
}

.hero-images {
    flex: 1;
    position: relative;
    height: 500px;
    max-width: 50%;
    margin-left: auto;
}

.hero-image-wrapper {
    position: absolute;
    width: 280px; /* Slightly larger for desktop */
    border: 4px solid #fff;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image-wrapper:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    z-index: 10 !important;
}

.hero-image-wrapper img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

.hero-images .image-1 { z-index: 3; top: 10%; left: 35% !important; transform: rotate(5deg); }
.hero-images .image-2 { z-index: 2; top: 15%; left: 15% !important; transform: rotate(-3deg); }
.hero-images .image-3 { z-index: 1; top: 20%; left: -5% !important; transform: rotate(-10deg); }

@media (max-width: 992px) {
    .hero-banner {
        padding: 20px 0 10px !important;
    }

    .hero-banner .hero-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0 !important;
    }
    
    .hero-banner .hero-content {
        max-width: 100% !important;
        margin-bottom: 10px !important;
        display: block !important;
        visibility: visible !important;
    }

    .hero-banner .hero-headline {
        font-size: 1.8rem !important;
        display: block !important;
        visibility: visible !important;
    }

    .hero-banner .hero-subheadline {
        display: block !important;
        visibility: visible !important;
    }
    
    .hero-banner .hero-images, 
    .hero-banner .hero-container .hero-images {
        display: block !important;
        order: 2 !important;
        width: 100% !important;
        height: 320px !important; 
        min-height: 320px !important;
        max-width: 100% !important;
        position: relative !important;
        margin: 10px auto 20px !important; 
        overflow: visible !important;
        clear: both !important;
    }

    .hero-banner .hero-image-wrapper {
        position: absolute !important;
        width: 130px !important;
        height: auto !important;
        margin: 0 !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.4) !important;
        left: 50% !important;
    }

    .hero-banner .hero-images .image-1 { left: 50% !important; top: 140px !important; margin-left: 35px !important; transform: translate(-50%, -50%) rotate(5deg) !important; z-index: 3 !important; }
    .hero-banner .hero-images .image-2 { left: 50% !important; top: 140px !important; margin-left: 0px !important; transform: translate(-50%, -50%) rotate(-3deg) !important; z-index: 2 !important; }
    .hero-banner .hero-images .image-3 { left: 50% !important; top: 140px !important; margin-left: -35px !important; transform: translate(-50%, -50%) rotate(-10deg) !important; z-index: 1 !important; }

    .hero-banner .hero-images [class*="image-"] {
        max-width: none !important; 
    }

    .desktop-only, .desktop-only-btn {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }

    .mobile-only-btn-wrapper,
    .hero-banner .hero-container .mobile-only-btn-wrapper {
        order: 3 !important;
        display: block !important;
        margin: 0px auto 30px !important; 
        width: 100% !important;
        position: relative !important;
        z-index: 50 !important;
        clear: both !important;
        text-align: center !important;
    }
    
    /* Ensure the stats bar stays clear and button is below */
    .trust-impact-bar,
    .hero-banner .hero-container .trust-impact-bar {
        order: 4 !important;
        position: relative !important;
        z-index: 10 !important; 
        clear: both !important;
        margin-top: 100px !important; 
        background: var(--primary-dark) !important;
        display: flex !important;
    }
}

/* Fan out effect on hover */
.hero-images:hover .image-1 {
    transform: translate(-50%, -60%) rotate(0deg) scale(1.1);
}

.hero-images:hover .image-2 {
    transform: translate(-95%, -45%) rotate(-15deg) scale(1.05);
}

.hero-images:hover .image-3 {
    transform: translate(-5%, -45%) rotate(15deg) scale(1.05);
}

/* --- NEW: Stats Card Section --- */
.trust-impact-bar {
    background-color: var(--dark-bg);
    padding: 5px 0 10px;
}

.stats-card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: rgba(23, 42, 69, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-yellow);
}

.stat-title {
    color: var(--accent-yellow);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 8px 0;
    font-weight: 700; /* Bolder for contrast */
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 5px 0;
    line-height: 1;
}

.stat-number.event-title {
    font-size: 0.9rem;
    line-height: 1.2;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* Responsive adjustments for stats */
@media (max-width: 768px) {
    .stats-card-container {
        grid-template-columns: repeat(3, 1fr) !important; /* Force side-by-side */
        gap: 8px;
        padding: 0 5px;
    }
    
    .stat-card {
        padding: 10px 5px;
    }
    
    .stat-number {
        font-size: 1.2rem; /* Slighly smaller for 3-up on tiny screens */
    }
    
    .stat-title {
        font-size: 0.55rem;
    }
    
    .stat-number.event-title {
        font-size: 0.7rem;
        min-height: 30px;
    }
    
    .stat-description {
        font-size: 0.6rem;
    }
}


/* --- Articles Page --- */
.articles-container {
    max-width: 900px;
    margin: 0 auto;
}

.filter-form {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-form .form-group {
    flex-grow: 1;
}

.filter-form label {
    margin-right: 10px;
    font-weight: bold;
    color: var(--text-light);
}

.filter-form select {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
}

.filter-btn {
    padding: 10px 25px;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-btn:hover {
    background-color: #3a5f9b;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-item {
    background-color: var(--card-bg);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #333;
}

.article-title {
    margin: 0;
    color: var(--text-dark);
}

.article-date {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: var(--text-muted);
}

.article-item .read-more-btn {
    padding: 8px 15px;
    background-color: var(--primary-blue);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.article-item .read-more-btn:hover {
    background-color: #4ea8e1;
}

/* --- Events Page --- */
.event-content {
    padding: 20px;
}

.event-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #333;
    text-align: center;
}

.countdown {
    display: inline-flex;
    gap: 15px;
    margin-bottom: 10px;
}

.countdown div {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    font-weight: normal;
    color: var(--text-muted);
    text-transform: uppercase;
}

.countdown-label.passed {
    font-size: 1rem;
    color: var(--accent-yellow);
    width: 100%;
}

.event-date {
    font-size: 0.9em;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    padding: 0;
    border: none;
}

/* --- Contact Page --- */
.contact-page-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #333;
}

.contact-header {
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.contact-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.contact-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.contact-content-centered {
    text-align: center;
}

.contact-info h3 {
    color: var(--accent-yellow);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.contact-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.contact-info a {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}

.contact-info a:hover {
    text-decoration: underline;
}

.social-media {
    margin-top: 40px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
    margin: 0 10px;
    transition: transform 0.3s ease;
    background-color: #fff;
    /* Added a white background for contrast */
}

.social-icon:hover {
    transform: scale(1.1);
}

/* --- NEW: Style the image inside the social icon link --- */
/* --- Article Detail Page --- */
.article-detail-container {
    max-width: 900px;
    margin: 40px auto;
    /* More vertical space */
    padding: 40px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid #333;
}

.article-header h1 {
    color: var(--accent-yellow);
    margin-bottom: 15px;
    font-size: 2.5rem;
    /* Larger title */
    line-height: 1.2;
}

.article-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    /* row-gap column-gap */
    align-items: center;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.article-meta i.fas,
.article-meta i.far {
    color: var(--primary-blue);
    font-size: 1.1em;
}

.average-rating {
    font-weight: bold;
    color: var(--accent-yellow);
}

.rating-stars {
    color: var(--accent-yellow);
}

.article-content {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.1rem;
}

.article-content a {
    color: var(--accent-yellow);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 196, 0, 0.5);
    transition: all 0.2s ease-in-out;
}

.article-content a:hover {
    background-color: rgba(255, 196, 0, 0.1);
    border-bottom-color: var(--accent-yellow);
}

/* --- Styled Article Images (User Request) --- */
.article-content img,
.article-content figure img {
    max-width: 70%;
    height: auto;
    display: block;
    margin: 30px auto;
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    /* Rectangular frame effect */
    background-color: var(--card-bg);
    padding: 5px;
}

.article-content figure {
    margin: 30px auto;
    max-width: 100%;
    text-align: center;
}

.article-content figcaption {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

/* --- Cover Image Styling --- */
.article-cover-image {
    width: 100%;
    /* Make image responsive to its container */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: cover;
    border-radius: 8px;
    /* Optional: adds rounded corners */
    margin-bottom: 2rem;
}

/* --- NEW: Social Share Buttons Styling --- */
.social-share-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allows buttons to wrap on smaller screens */
}

.social-share-section span {
    font-weight: bold;
    color: var(--text-light);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    /* Circular buttons */
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.share-btn.twitter {
    background-color: #1DA1F2;
}

.share-btn.facebook {
    background-color: #1877F2;
}

.share-btn.linkedin {
    background-color: #0A66C2;
}

.share-btn.copy-link {
    background-color: #6c757d;
}

.share-btn.native-share {
    background-color: var(--primary-blue);
    gap: 8px;
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Social Media Icons */
.social-icon img {
    width: 24px;
    /* Adjust size as needed */
    height: 24px;
    /* Adjust size as needed */
    object-fit: contain;
}

/* REMOVED: The background colors are no longer needed as the images provide the branding */
/* .social-icon.facebook { background-color: #3b5998; } */
/* .social-icon.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888 100%); } */

/* Rating Section */
.rating-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.star-rating {
    display: inline-block;
    font-size: 2.5rem;
    cursor: pointer;
}

.star {
    color: #555;
    /* Unselected star color */
    transition: color 0.2s;
}

.star-rating:hover .star,
.star-rating .star.selected {
    color: var(--accent-yellow);
    /* Selected/hovered star color */
}

.star-rating:hover .star:hover~.star {
    color: #555;
    /* Make stars to the right of the hovered one unselected */
}

/* Comment Section */
.article-average-rating {
    font-size: 0.9em;
    color: var(--accent-yellow);
    margin-top: 5px;
}

.comment-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.comment-section h3 {
    color: var(--text-dark);
    margin-bottom: 25px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.comment-list .comment {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.comment-list .comment:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.comment-list .comment:last-child {
    margin-bottom: 0;
}

.comment-meta {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-meta strong {
    color: var(--text-dark);
}

.comment-meta small {
    color: var(--text-muted);
    font-size: 0.8em;
}

.comment p {
    margin: 0 0 10px 0;
}

/* --- NEW: Style for comments by the article author --- */
.comment-by-author {
    border-color: var(--accent-yellow);
}

.comment-by-author .comment-meta strong::after {
    content: 'Author';
    background-color: var(--accent-yellow);
    color: var(--dark-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 8px;
    font-weight: bold;
}

.comment-actions {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

.reply-btn {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.reply-btn:hover {
    color: var(--accent-yellow);
}

.report-btn {
    background: none;
    border: none;
    color: #e74c3c;
    /* Red color for report */
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.reply-btn:hover {
    color: var(--accent-yellow);
}

.comment-list.nested {
    margin-left: 30px;
    padding-left: 20px;
    border-left: 2px solid #333;
}

.report-btn:hover {
    color: #c0392b;
}

/* --- NEW: Like Button Styling --- */
.like-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.like-btn:hover {
    color: var(--primary-blue);
}

.like-btn.liked {
    color: var(--primary-blue);
    /* Color when the user has liked it */
    font-weight: bold;
}

.like-count {
    font-weight: normal;
}

#comment-form-header {
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* --- NEW: Comment Form Styling --- */
.comment-form {
    background-color: #0a192f;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #333;
}

.comment-form textarea,
.comment-form input[type="text"] {
    width: 100%;
    padding: 12px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 15px;
    box-sizing: border-box;
    /* Ensures padding doesn't affect width */
}

/* .social-icon.youtube { background-color: #ff0000; } */

/* --- Pagination --- */
.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination .step-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination a {
    color: var(--primary-blue);
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--primary-blue);
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.pagination a:hover {
    background-color: var(--primary-blue);
    color: var(--text-dark);
}

.pagination .current {
    color: var(--text-muted);
    font-weight: bold;
}

/* .social-icon.twitter { background-color: #0c0c0c; } */

/* --- Author Avatar Styling --- */
.author-avatar-inline {
    width: 30px;
    /* Adjust as needed */
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
}

/* --- Login/Signup/Profile Pages --- */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.login-box {
    max-width: 450px;
    width: 100%;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
}

.login-box h1 {
    color: var(--text-dark);
    margin-bottom: 10px;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.login-form p {
    margin: 10px 0;
    color: var(--text-light);
}

.login-form input {
    width: 95%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 10px;
}

.auth-links {
    margin-top: 20px !important;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--accent-yellow);
}

.logout-form {
    margin-top: 20px;
}

.logout-form .submit-btn {
    background-color: #c82333;
}

.logout-form .submit-btn:hover {
    background-color: #a71d2a;
}

.referral-section {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: left;
}

.referral-section h3 {
    color: var(--accent-yellow);
    text-align: center;
    margin-bottom: 10px;
}

.referral-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 15px;
}

.referral-link-input {
    width: 100%;
    padding: 10px;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: var(--text-light);
    font-size: 0.9rem;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
}

/* --- Flipbook & PDF Viewer --- */
.flipbook-container {
    text-align: center;
    padding: 30px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    width: 100%;
    box-sizing: border-box;
}

._df_book {
    height: 80vh;
    background-color: #000;
    /* Dark background for the stage */
    min-height: 600px;
}

.pdf-viewer-container {
    max-width: 100%;
    padding: 0;
}

.pdf-viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid #333;
}

.pdf-viewer-header h2 {
    margin: 0;
}

.pdf-iframe {
    width: 100%;
    height: 85vh;
    border: none;
}

/* --- Hero Stats Container (Desktop layout) --- */
.hero-stats-container {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 10;
}
.hero-stats-container .stat-card {
    flex: 0 0 calc(50% - 15px); /* Two items per row with gap taken into account */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    padding: 15px;
}
.hero-stats-container .stat-card:nth-child(3) {
    /* Center the third item below the first two */
    flex: 0 0 calc(50% - 15px);
}
.hero-stats-container .stat-title {
    color: var(--accent-yellow);
    font-size: 0.85rem;
    margin-bottom: 5px;
}
.hero-stats-container .stat-number {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 5px;
}
.hero-stats-container .stat-number.event-title {
    font-size: 1.1rem;
    min-height: auto;
}
.hero-stats-container .stat-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
}

/* --- About Snippet Section --- */
.about-snippet-section {
    padding: 60px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.about-snippet-section h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}
.about-snippet-text {
    font-size: 1.1rem; /* Slightly smaller for better scaling */
    color: var(--text-light); /* Better contrast than muted */
    line-height: 1.6;
    margin-bottom: 20px;
}

/* --- About Us Redesign (Socialy Inspired) --- */
.about-hero-section {
    background-color: var(--accent-yellow);
    color: #000;
    padding: 80px 20px 40px;
    position: relative;
    overflow: hidden;
}

.about-hero-section h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #000;
}

.about-hero-section .subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

.about-decor {
    position: absolute;
    opacity: 0.2;
    pointer-events: none;
}

.decor-1 { top: 20%; left: 10%; font-size: 2rem; }
.decor-2 { top: 40%; right: 15%; font-size: 1.5rem; }
.decor-3 { bottom: 10%; left: 20%; font-size: 1rem; }

/* --- About Gallery Mobile --- */
@media (max-width: 768px) {
    .about-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 15px !important;
        gap: 10px !important;
    }
    
    .about-hero-section h1 {
        font-size: 2.5rem !important;
    }
}

/* Floating Animations for About Decor */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.about-decor {
    animation: float 4s ease-in-out infinite;
}

.decor-2 { animation-delay: 1s; }
.decor-3 { animation-delay: 2s; }

/* Table Responsiveness */
.modern-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-table {
    min-width: 600px;
}

/* About Gallery */
.about-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 0;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Split Content */
.about-split-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 80px 40px;
    align-items: start;
}

.split-left h2 {
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.split-right p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
}

/* Feature Portrait & Quote */
.about-founder-highlight {
    display: flex;
    gap: 80px;
    padding: 80px 40px;
    align-items: center;
}

.founder-image-wrapper {
    flex: 1;
    position: relative;
}

.founder-image-wrapper img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.quote-box {
    position: static;
    bottom: auto;
    right: auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    max-width: 100%;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #000;
    border-left: 4px solid var(--accent-yellow);
}

.quote-box blockquote {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    border: none;
    padding: 0;
}

.quote-box .author-name {
    font-size: 0.85rem;
    color: #666;
}

/* Common Section Headers */
.about-section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.about-section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

/* Modern Tables */
.modern-table-container {
    overflow-x: auto;
    margin: 40px 0;
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.modern-table th {
    background: rgba(255,255,255,0.03);
    padding: 20px;
    text-align: left;
    color: var(--accent-yellow);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modern-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    vertical-align: top;
    color: var(--text-light);
    line-height: 1.6;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table .icon-cell {
    width: 50px;
    color: var(--primary-blue);
    font-size: 1.25rem;
}

/* Value Pillars */
.about-values-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 60px 40px;
}

.value-pillar {
    text-align: center;
}

.value-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: #000;
}

.value-pillar h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--text-dark);
}

.value-pillar p {
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .about-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
    .about-split-content, .about-founder-highlight {
        grid-template-columns: 1fr;
        flex-direction: column;
        gap: 40px;
        padding: 60px 20px;
    }
    .about-hero-section h1 { font-size: 3rem; }
    .about-values-row { grid-template-columns: 1fr; }
    .quote-box {
        position: static;
        margin: 20px auto 0;
    }
}

/* --- About Us Page (Old styles - keeping for compatibility or cleaning up later) --- */
.about-us-container {
    max-width: 1200px; /* Increased from 1000 */
    margin: 40px auto;
}


/* --- Sponsors Marquee Section --- */
.sponsors-section {
    padding-bottom: 40px;
    border-top: 1px solid #333;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--card-bg);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marquee-track {
    display: flex;
    width: fit-content;
    animation: scroll-left 40s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    width: max-content;
}

.sponsor-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
}

.sponsor-logo img {
    height: 100px; /* Slightly larger while still "small" */
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: none; /* Professional original color look */
    transition: transform 0.3s ease;
}

.sponsor-logo img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* ==========================================================================
   6. RESPONSIVENESS (MEDIA QUERIES)
   ========================================================================== */

/* For Tablets */

/* For smaller tablets and large phones */
@media (max-width: 768px) {

    /* Hamburger Menu Activation */
    .hamburger {
        display: block;
    }

    .main-nav {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        align-items: center; /* Center items horizontally */
        background-color: var(--dark-bg);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        justify-content: center;
        gap: 0;
        padding-top: 60px;
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav a {
        margin: 20px 0;
        font-size: 1.5rem;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Other Tablet Styles */
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-headline {
        font-size: 2.2rem;
    }

    /* Stats Card on Tablet */
    .hero-stats-container {
        flex-direction: column;
        align-items: center;
    }
    .hero-stats-container .stat-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
    .hero-stats-container .stat-card:nth-child(3) {
        flex: 0 0 auto;
        width: 100%;
        max-width: 300px;
    }
}

/* For mobile phones */
@media (max-width: 576px) {
    .publications-grid {
        grid-template-columns: 1fr;
    }

    .hero-headline {
        font-size: 1.8rem;
    }

    /* Centered Mobile Layout for Hero Images */
    .hero-images {
        height: 280px;
        position: relative;
        display: block;
        margin-top: 40px;
    }

    .hero-image-wrapper {
        position: absolute;
        width: 170px;
        top: 50%;
        left: 50%;
    }

    .hero-images .image-1 {
        transform: translate(-50%, -50%) rotate(2deg) scale(1);
        z-index: 2;
    }

    .hero-images .image-2 {
        transform: translate(-80%, -50%) rotate(-8deg) scale(0.95);
        z-index: 1;
    }

    .hero-images .image-3 {
        transform: translate(-20%, -50%) rotate(10deg) scale(0.9);
        z-index: 0;
    }
}

.google-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #ffffff;
    color: #444;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border: 1px solid #ccc;
    width: fit-content;
    transition: all 0.2s ease;
}

.google-btn img {
    width: 22px;
    height: 22px;
}

.google-btn:hover {
    background-color: #f3f3f3;
    border-color: #bbb;
}

.google-btn:active {
    transform: scale(0.97);
}

/* =================================== */
/*  Header & Navigation Styles         */
/* =================================== */

.logo img {
    /* Set a maximum height for the logo. Adjust this value as needed. */
    max-height: 50px;


    /* Ensure the image scales correctly without distortion */
    width: auto;
    height: auto;

    /* Aligns the logo vertically with the navigation links */
    vertical-align: middle;
}

.ck-editor__editable_inline {
    /* Force text to black */
    color: #000000 !important;
    /* Optionally, force the background to white for contrast */
    background-color: #ffffff !important;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--text-light) !important;
}

@media (max-width: 992px) {
    .dropdown-menu {
        display: none;
        padding-left: 20px;
    }
    .main-nav {
        flex-direction: column;
        align-items: center; /* Center items horizontally */
        gap: 15px !important;
    }
}

/* publications/static/publications/css/style.css */
.filter-toggle-btn {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.filter-toggle-btn:hover {
    background-color: #2980b9;
}

.articles-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 300px;
    height: 100%;
    background-color: var(--card-bg);
    padding: 20px;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
}

.articles-sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.close-filter-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 2rem;
    cursor: pointer;
}

.content-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.content-overlay.active {
    display: block;
}

.show-more-btn {
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    margin: 40px auto 0;
    padding: 12px 30px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.show-more-btn:hover {
    background-color: #2980b9;
}

@media (max-width: 992px) {
    .articles-page-container {
        flex-direction: column;
    }

    .articles-main-content {
        width: 100%;
    }

    .filter-toggle-btn {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}

/* ela_flipbook_django/publications/static/publications/css/style.css */
.article-header h1 {
    color: var(--accent-yellow) !important;
    /* Consistent with publication headlines */
    margin-bottom: 15px;
    font-size: 2.5rem;
    line-height: 1.2;
}

/* Make article headings highly readable on dark background */
.article-title,
.publication-card .card-title,
.articles-container h1,
.article-header h1 {
    color: var(--text-light);
    /* light, high-contrast color */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    /* subtle lift on dark bg */
    line-height: 1.2;
}

/* Optional stronger accent for headings (uncomment to use)
.article-title,
.publication-card .card-title {
    color: var(--accent-yellow);
    text-shadow: 0 2px 6px rgba(0,0,0,0.45);
}
*/

/* ela_flipbook_django/publications/static/publications/css/style.css */

/* Make article headings highly readable on dark background */
.article-title,
.publication-card .card-title,
.articles-container h1,
.article-header h1 {
    color: var(--text-light);
    /* light, high-contrast color */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    /* subtle lift on dark bg */
    line-height: 1.2;
}

/* Optional stronger accent for headings (uncomment to use) */
.article-title,
.publication-card .card-title {
    color: var(--accent-yellow);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Show sidebar on desktop and arrange layout */
@media (min-width: 993px) {
    .articles-page-container {
        display: flex;
        gap: 30px;
    }

    .articles-sidebar {
        flex: 0 0 280px;
        position: static;
        transform: translateX(0);
        height: auto;
        padding: 0;
        background: none;
    }

    .sidebar-header {
        display: none;
        /* Hide the mobile header with the close button */
    }

    .articles-main-content {
        flex: 1;
    }

    .filter-toggle-btn {
        display: none;
        /* Hide the floating button on desktop */
    }
}

/* --- FIX: Article Card Title Links --- */
/* Ensure links inside card titles (like in Most Popular Articles) are yellow */
.card-title a {
    color: var(--accent-yellow) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: var(--primary-blue) !important;
    text-shadow: 0 0 10px rgba(52, 152, 219, 0.5); /* Glow effect on hover */
}

/* --- Profile Edit Form Styling --- */
.profile-divider {
    border: 0;
    border-top: 1px solid #333;
    margin: 30px 0;
}

.profile-form {
    text-align: left;
    margin-top: 20px;
}

.profile-section-title {
    color: var(--accent-yellow);
    font-size: 1.4rem;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-yellow);
    padding-left: 15px;
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-field input,
.profile-field select,
.profile-field textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: #0a192f;
    /* Darker bg for inputs to stand out on card */
    border: 1px solid #444;
    border-radius: 6px;
    color: var(--text-dark);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
    background-color: #0d213f;
}

.profile-field .form-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.profile-field .error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 6px;
    font-weight: bold;
}

.submit-btn.full-width {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* --- Profile Info Display --- */
.profile-detail-row {
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    /* Centered since the container is text-align: center */
    align-items: center;
    gap: 10px;
}

.profile-label {
    color: var(--accent-yellow);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.profile-value {
    color: var(--text-light);
    font-weight: normal;
}

/* --- Skeleton Loading --- */
.skeleton-text {
    height: 1rem;
    width: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 1rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Image Lazy Loading Placeholder */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

img.loaded {
    opacity: 1;
}