/* Radio Station Archive Styles */
.stations-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Archive Header */
.archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.archive-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.archive-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.archive-stats {
    margin-top: 15px;
}

.station-count {
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Breadcrumbs */
.archive-breadcrumbs {
    margin-bottom: 30px;
}

.archive-breadcrumbs ol {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.archive-breadcrumbs li {
    margin-right: 15px;
    position: relative;
}

.archive-breadcrumbs li:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -10px;
    color: #999;
}

.archive-breadcrumbs a {
    color: #007cba;
    text-decoration: none;
}

.archive-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Filters */
.stations-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    align-items: center;
}

.stations-filters input[type="text"],
.stations-filters select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 200px;
    background: white;
}

.stations-filters input[type="text"]:focus,
.stations-filters select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#clear-filters {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

#clear-filters:hover {
    background: #c82333;
}

/* Loading Indicator */
.loading-indicator {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Use CSS Grid for a more robust and responsive multi-column layout */
.stations-results-simple {
    display: grid;
    /* Automatically creates as many columns as will fit, with a minimum width of 200px */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px; /* Slightly larger gap between cards for better visual separation */
    margin-bottom: 50px;
}

/* Force the pagination div to take up the full width, pushing it to a new line */
.stations-pagination {
    /* Use grid-column to make it span all columns, pushing it to its own row */
    grid-column: 1 / -1; 
    margin-top: 20px; /* Add some space between the last card and pagination */
    text-align: center; /* Center the pagination links */
}

/* Style for the pagination links to make them more visually appealing */
.page-numbers {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
}

.page-numbers:hover,
.page-numbers.current {
    background: #0073e6;
    color: #fff;
    border-color: #0073e6;
}

/* Style the previous/next buttons */
.prev.page-numbers,
.next.page-numbers {
    font-weight: bold;
    font-size: 1.2em;
}

/* Ensure the cards have consistent sizing */
.station-simple-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    padding: 10px;
}

.station-simple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.station-logo {
    margin-bottom: 10px;
}

.station-meta {
    padding-top: 5px;
}

/* Empty State */
.stations-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.stations-empty h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2rem;
}

.stations-empty a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.stations-empty a:hover {
    text-decoration: underline;
}

/* Browse Sections */
.stations-browse-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.browse-countries,
.browse-genres,
.related-terms-section > div {
    margin-bottom: 50px;
}

.browse-countries h3,
.browse-genres h3,
.related-terms-section h3 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.browse-grid,
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.browse-item,
.term-link {
    display: block;
    padding: 15px 20px;
    background: white;
    border: 2px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    position: relative;
}

.browse-item:hover,
.term-link:hover {
    border-color: #007cba;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,124,186,0.2);
}

.browse-name {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.browse-count,
.term-count {
    font-size: 0.85rem;
    color: #666;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

.view-all {
    text-align: center;
    margin-top: 20px;
}

.view-all a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.view-all a:hover {
    text-decoration: underline;
}

/* Related Terms Section */
.related-terms-section {
    margin: 50px 0;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stations-archive {
        padding: 15px;
    }
    
    .archive-header h1 {
        font-size: 2rem;
    }
    
    .stations-filters {
        flex-direction: column;
    }
    
    .stations-filters input,
    .stations-filters select {
        width: 100%;
        min-width: auto;
    }
    
    .stations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .browse-grid,
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .archive-breadcrumbs ol {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .station-simple-card {
        padding: 15px;
    }
    
    .station-logo img,
    .fallback-logo {
        width: 140px !important;
        height: 70px !important;
    }
    
    .archive-header h1 {
        font-size: 1.5rem;
    }
}
/* Styles for the new compact browse cards */
    .stations-browse-section {
        margin-top: 2rem;
    }
    .browse-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .browse-item {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1rem;
        background-color: #f4f4f4;
        border: 1px solid #ddd;
        border-radius: 9999px; /* Pill shape */
        text-decoration: none;
        color: #333;
        font-weight: 500;
        transition: all 0.2s ease-in-out;
        gap: 0.5rem;
    }
    .browse-item:hover {
        background-color: #e9e9e9;
        border-color: #ccc;
        transform: translateY(-2px);
    }
    .browse-item .browse-icon {
        font-size: 1.25em;
        line-height: 1;
    }
    .browse-item .browse-name {
        font-weight: 600;
    }
    .browse-item .browse-count {
        font-size: 0.8em;
        color: #777;
    }

    /* Additional styling for layout consistency */
    .stations-browse-section .browse-genres,
    .stations-browse-section .browse-countries,
    .stations-browse-section .browse-languages {
        margin-bottom: 2rem;
    }
    .stations-browse-section h3 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }
    .view-all a {
        color: #0073aa;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
    }
    .view-all a:hover {
        color: #005177;
        text-decoration: underline;
    }

    /* Styles for the new compact browse cards */
    .stations-browse-section {
        margin-top: 2rem;
    }
    .browse-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .browse-item {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1rem;
        background-color: #f4f4f4;
        border: 1px solid #ddd;
        border-radius: 9999px; /* Pill shape */
        text-decoration: none;
        color: #333;
        font-weight: 500;
        transition: all 0.2s ease-in-out;
        gap: 0.5rem;
    }
    .browse-item:hover {
        background-color: #e9e9e9;
        border-color: #ccc;
        transform: translateY(-2px);
    }
    .browse-item .browse-icon {
        font-size: 1.25em;
        line-height: 1;
    }
    .browse-item .browse-name {
        font-weight: 600;
    }
    .browse-item .browse-count {
        font-size: 0.8em;
        color: #777;
    }

    /* Styles for related terms cards */
    .related-terms-section .terms-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    .related-terms-section .term-link {
        display: inline-flex;
        align-items: center;
        padding: 0.5rem 1rem;
        background-color: #f4f4f4;
        border: 1px solid #ddd;
        border-radius: 9999px; /* Pill shape */
        text-decoration: none;
        color: #333;
        font-weight: 500;
        transition: all 0.2s ease-in-out;
        gap: 0.5rem;
    }
    .related-terms-section .term-link:hover {
        background-color: #e9e9e9;
        border-color: #ccc;
        transform: translateY(-2px);
    }
    .related-terms-section .term-count {
        font-size: 0.8em;
        color: #777;
    }

    /* Additional styling for layout consistency */
    .stations-browse-section .browse-genres,
    .stations-browse-section .browse-countries,
    .stations-browse-section .browse-languages {
        margin-bottom: 2rem;
    }
    .stations-browse-section h3,
    .related-terms-section h3 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }
    .view-all a {
        color: #0073aa;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;
    }
    .view-all a:hover {
        color: #005177;
        text-decoration: underline;
    }





.station-simple-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.station-simple-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.station-simple-card .station-title {
    font-size: 16px;
    font-weight: 600;
    margin: 10px 0 5px;
}

.station-simple-card .station-title a {
    text-decoration: none;
    color: #222;
}

.station-simple-card .station-title a:hover {
    color: #0f2e42; /* highlight */
}

.station-simple-card .station-country {
    font-size: 14px;
    color: #666;
}
.stations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}