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

body {
    font-family: 'Playfair Display', Georgia, serif;
    color: #333;
    overflow-x: hidden;
    background-color: #f0f0f0;
}

/* Prevent scrolling on landing page */
body.landing-page {
    overflow: hidden;
}

/* Left Sidebar */
#sidebar {
    width: 180px;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #e8e8e8;
    padding: 40px 15px;
    border-right: none;
    box-shadow: 5px 0 15px -10px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.sidebar-header {
    margin-bottom: 50px;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
}

.home-link {
    text-decoration: none;
    color: #333;
    cursor: pointer;
}

.home-link:hover {
    color: #333;
}

.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.sidebar-nav li {
    margin-bottom: 15px;
}

.sidebar-nav a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
    transition: color 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #333;
    font-weight: 500;
}

.social-links {
    position: absolute;
    bottom: 40px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dcdedd;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.social-btn:hover {
    background: #d0d3d0;
    color: #333;
    transform: translateY(-3px);
}

/* Main Content */
#main-content {
    margin-left: 180px;
    padding: 0 40px 40px 15px;
    min-height: 100vh;
    background: #f0f0f0;
    position: relative;
}

/* Gradient transition between sidebar and main content */
#main-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 20px;
    background: linear-gradient(to right, #e8e8e8, #f0f0f0);
    z-index: -1;
}

/* Content Sections - Basic Structure */
.content-section {
    display: none;
    max-width: 1000px;
    margin: 0 auto;
}

.content-section.active {
    display: block;
}

/* CRITICAL FIX: Ensure only one section is active at a time */
body:not(.landing-page) #article-showcase {
    display: none !important;
}

body.landing-page #selected-reporting,
body.landing-page #radio,
body.landing-page #about,
body.landing-page #tv {
    display: none !important;
}

/* Section Specific Spacing */
#selected-reporting,
#radio,
#about {
    padding-top: 150px !important; /* Match to "Selected reporting" menu height */
    margin-top: 0 !important;
}

/* For the carousel container */
.carousel-container {
    margin-top: 0;
    margin-bottom: 60px;
}

/* Landing page specific - CENTER THE CONTENT VERTICALLY */
#article-showcase {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#article-showcase.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100vh !important;
    overflow: hidden !important;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 60px;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    opacity: 0.7;
    transition: opacity 0.5s;
}

.carousel-slide.active {
    opacity: 1;
}

.article-screenshot {
    display: block;
    width: 100%;
    transition: transform 0.3s;
}

.article-screenshot img {
    width: 100%;
    height: auto;
    object-fit: contain;
    box-shadow: none;
    max-height: 75vh;
}

/* Pagination Indicators - Fixed smaller, more discreet dots */
.carousel-pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.pagination-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
}

.pagination-dot.active {
    background-color: #666;
    transform: scale(1.1);
}

/* Two-column layout for Selected Reporting */
.publication-group {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 30px;
    margin-bottom: 40px;
    align-items: baseline;
}

.publication-group:first-child {
    margin-top: 0;
}

.publication-title {
    grid-column: 1;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: none;
    position: sticky;
    top: 40px;
    align-self: start;
    padding-top: 0;
    margin-top: 0;
    background-color: transparent;
}

.article-list {
    grid-column: 2;
    list-style: none;
    margin-top: 0;
    padding-top: 0;
}

.article-item:first-child {
    margin-top: 0;
}

.article-item {
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: none;
}

.article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-title {
    font-size: 15px;
    margin-bottom: 3px;
    font-weight: 500;
}

.article-title a {
    text-decoration: none;
    color: #333;
}

.article-title a:hover {
    color: #333;
}

.article-meta,
.radio-meta,
.video-meta {
    color: #666;
    font-size: 13px;
}

/* Country subsections styling */
.country-subsection {
    margin-top: 20px;
    margin-bottom: 25px;
}

.country-title {
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #444;
}

.country-subsection, 
.collapsed-publication {
    display: none;
    margin-top: 10px;
}

.country-subsection.expanded, 
.collapsed-publication.expanded {
    display: block;
}

.dropdown-button, 
.publication-dropdown {
    background-color: transparent;
    border: none;
    color: #444;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    font-family: 'Playfair Display', Georgia, serif;
    text-align: left;
    grid-column: 1;
    margin-top: 15px;
}

.dropdown-button::after, 
.publication-dropdown::after {
    content: "▼";
    font-size: 10px;
    margin-left: 6px;
}

.dropdown-button.expanded::after, 
.publication-dropdown.expanded::after {
    content: "▲";
}

/* Ensure expanded country subsections are visible by default */
.country-subsection.expanded {
    display: block;
}

/* Publication title dropdown */
.dropdown-title {
    position: relative;
    cursor: pointer;
    background-color: transparent;
}

.dropdown-title::after {
    content: "▼";
    font-size: 10px;
    margin-left: 6px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.dropdown-title.expanded::after {
    content: "▲";
}

/* Radio Page Styles */
.radio-list {
    list-style: none;
}

.radio-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: none;
}

.radio-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.radio-title {
    font-size: 15px;
    margin-bottom: 6px;
    font-weight: 500;
}

.radio-title a {
    text-decoration: none;
    color: #333;
}

.radio-title a:hover {
    color: #333;
}

.radio-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

audio {
    width: 100%;
}

/* Updated Inline Audio Player with Box */
.inline-player {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    max-width: 400px;
    background-color: #e8e8e8;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.inline-player:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

/* Keep existing player controls styling */
.play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}

.play-btn:hover {
    background-color: #e0e0e0;
}

/* Ensure the original play button styling is preserved */
.play-btn svg {
    width: 12px;
    height: 12px;
    fill: #333;
}

.progress-container {
    flex-grow: 1;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #555;
    border-radius: 3px;
    width: 0;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 12px;
    color: #666;
    min-width: 70px;
    text-align: right;
}

/* Loading state */
.play-btn.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #999;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-container {
    flex-grow: 1;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #555;
    border-radius: 3px;
    width: 0;
    transition: width 0.1s linear;
}

.progress-container:hover .progress-bar {
    background-color: #333;
}

.time-display {
    font-size: 12px;
    color: #666;
    min-width: 70px;
    text-align: right;
}

/* Error state for audio player */
.inline-player.error .play-btn {
    background-color: #fff0f0;
}

.inline-player.error .progress-container {
    background-color: #ffe0e0;
}

/* Radio section title */
.radio-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

/* TV Page Styles */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.video-item {
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 15px;
}

.video-container img,
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    font-size: 15px;
    margin-bottom: 5px;
    font-weight: 500;
}

/* About Page Styles */
.about-content {
    line-height: 1.8;
    padding-left: 0;
    margin-left: 0;
}

.about-image {
    float: right;
    margin: 0 0 20px 40px;
    max-width: 300px;
    border-radius: 4px;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .sidebar-header {
        margin-bottom: 20px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .sidebar-nav li {
        margin-bottom: 0;
    }
    
    .social-links {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 20px;
        justify-content: center;
        gap: 20px;
    }
    
    #main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    /* Adjust mobile spacing */
    #selected-reporting,
    #radio,
    #about {
        padding-top: 30px !important;
    }
    
    /* Center landing page content on mobile too */
    #article-showcase.active {
        height: calc(100vh - 150px) !important;
        padding-top: 0 !important;
    }
    
    .about-image {
        float: none;
        margin: 0 0 20px 0;
        max-width: 100%;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .article-meta,
    .radio-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .publication-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .publication-title {
        grid-column: 1;
        position: static;
        margin-bottom: 15px;
        border-bottom: 1px solid #ddd;
    }
    
    .article-list {
        grid-column: 1;
    }
    
    .dropdown-button {
        grid-column: 1;
    }
}

#about .about-content {
  padding-left: 25px; /* Adjust this value as needed to align with "Selected reporting" */
}
