.episodes-filter-group {
    margin-bottom: 15px;
    display: flex; /* Align links in a row */
    gap: 10px; /* Space between filter links */
}

.filter-link {
    display: inline-flex; /* Use inline-flex for flex properties */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    padding: 8px 15px;
    background-color: #f0f0f0; /* Lighter default background */
    color: #333; /* Darker text for better contrast */
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
    border: 1px solid #ccc;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-align: center; /* Keep for text block alignment if it wraps */
}

.filter-link:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.filter-link.active-filter {
    background-color: #007bff; /* Blue background for active filter */
    color: white;
    border-color: #0056b3;
}

.episodes-list-container {
    margin-top: 20px;
}

.episode-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

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

/* Style for promoted episodes */
.episode-promoted {
    background-color: #FFD700; /* Bright gold */
    border-left: 8px solid #FF8C00; /* Thicker dark orange border for contrast */
    padding: 10px;
    box-shadow: 0 4px 10px rgb(255 165 0 / 60%);
    margin: 5px 0;
    border-radius: 6px;
    position: relative;
    z-index: 1;
    transform: scale(1.01); /* Very slightly larger */
}

/* Promoted badge styling */
.promoted-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #FF8C00;
    color: white;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    text-transform: uppercase;
}

.external-link-anchor {
    display: inline-flex;
    align-items: center;
}

.external-link-svg {
    margin-left: 4px;
}

/* Add more specific styles as needed */

.filter-bars-container {
    display: flex;
    justify-content: space-between; /* Pushes children to left and right */
    align-items: flex-start; /* Aligns children to their top edge */
    flex-wrap: wrap; /* Allows filter groups to stack on smaller screens */
    margin-bottom: 15px; /* Consistent margin below the entire filter area */
}

/* Mobile Filter Styles */
.mobile-filter-trigger {
    display: none; /* Hidden by default, shown via media query */
    padding: 8px 15px;
    background-color: #007bff;
    color: white;
    border: 1px solid #0056b3;
    border-radius: 5px;
    font-size: 0.9em;
    cursor: pointer;
    width: 100%; /* Make trigger take full width of its container */
    text-align: left;
}

.mobile-filter-trigger:hover {
    background-color: #0056b3;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0 0 0 / 40%); /* Black w/ opacity for backdrop */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px; /* Max width for larger screens */
    border-radius: 8px;
    position: relative;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
}

.modal-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-link-modal {
    display: block; /* Make links take full width */
    padding: 10px 15px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ccc;
    text-align: center;
}

.filter-link-modal:hover {
    background-color: #e0e0e0;
}

.filter-link-modal.active-filter {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}

/* Visibility classes for mobile/desktop */
.mobile-only {
    display: none; /* Hidden by default */
}

.desktop-only {
    display: flex; /* Default for desktop filter groups, might need adjustment based on original .episodes-filter-group */
}

/* Media Query for Mobile */
@media (width <= 768px) {
    .filter-bars-container {
        flex-direction: column; /* Stack filter sections vertically on mobile */
        gap: 10px; /* Add some space between stacked filter sections */
    }

    .filter-section {
        width: 100%; /* Make each filter section take full width */
    }

    .desktop-only {
        display: none !important; /* Hide desktop links */
    }

    .mobile-only,
    .mobile-filter-trigger {
        display: block; /* Show mobile triggers */
    }

    .modal-content {
        margin: 20% auto; /* Adjust margin for mobile */
        width: 90%;
    }
}
