/* Archive Hero Section - Enhanced */
.ibct-archive-hero {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    position: relative;
    padding: 6rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    overflow: hidden;
}

.ibct-archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.ibct-archive-hero .hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.ibct-archive-hero h1 {
    font-size: 3.5em;
    font-weight: 800;
    margin: 0 0 1rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.ibct-archive-hero p {
    font-size: 1.4em;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 300;
}

/* Container Width Control */
.ibct-archive .site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Enhanced Filters Section */
.ibct-filters-section {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: -5rem auto 3rem;
    position: relative;
    max-width: 1160px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Enhanced Search Input */
.filter-group input[type="text"] {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #eef0f2;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-group input[type="text"]:focus {
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.filter-group select {
    height: 48px;
    /* Match search input height */
    padding: 0 1.25rem;
    border: 2px solid #eef0f2;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,...");
    /* Add dropdown arrow */
}

/* Enhanced Center Cards */
.center-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid #eef0f2;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.center-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Center Logo/Thumbnail Enhancement */
.center-thumbnail {
    position: relative;
    height: 160px;
    /* Reduced from 200px */
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.75rem;
}

.center-thumbnail img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.center-card:hover .center-thumbnail img {
    transform: scale(1.05);
}

/* Enhanced Content Styling */
.center-content {
    padding: 1.25rem;
    /* Reduced from 1.5rem */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
    /* Reduced from 1rem */
}

.center-title {
    font-size: 1.1em;
    /* Reduced from 1.2em */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    margin: 0;
}

.center-title a {
    color: #1a2b48;
    text-decoration: none;
    transition: color 0.2s ease;
}

.center-title a:hover {
    color: #0073aa;
}

.center-excerpt {
    font-size: 0.85em;
    line-height: 1.4;
    color: #666;
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

/* Stars Rating Enhancement */
.center-rating {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stars-rating {
    display: flex;
    gap: 0.15rem;
}

.star {
    font-size: 1.2em;
    transition: transform 0.2s ease;
}

.star.filled {
    color: #ffd700;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.golden-stars .star.filled {
    background: linear-gradient(45deg, #FFD700, #FDB931);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.silver-stars .star.filled {
    background: linear-gradient(45deg, #C0C0C0, #E8E8E8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.star:not(.filled) {
    color: #e0e0e0;
}

.stars-label {
    font-size: 0.8em;
    color: #666;
}

/* Status Badge Enhancement */
.certification-status {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* New Details Button Style */
.center-details-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.center-details-button:hover {
    background: #005d87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Filter Submit Button */
.ibct-filter-submit {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 0.875rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    text-align: center;
}

.ibct-filter-submit:hover {
    background: #005d87;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ibct-filter-reset {
    display: inline-block;
    padding: 0.875rem 1.25rem;
    border: 2px solid #0073aa;
    border-radius: 8px;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #fff;
}

.ibct-filter-reset:hover {
    background: #f8f9fa;
    color: #005d87;
    border-color: #005d87;
}

/* Rest of the styles remain the same */

/* Pagination */
.navigation.pagination {
    margin: 2rem 0;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 0.5rem;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
}

.page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Responsive Enhancements */
@media (max-width: 1200px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .filter-group:first-child {
        grid-column: 1 / -1;
    }

    .filter-buttons {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .ibct-archive-hero h1 {
        font-size: 2.5em;
    }

    .ibct-filters-section {
        margin-top: -3rem;
        padding: 1.5rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .center-thumbnail {
        height: 140px;
    }
}

/* Centers Grid - Updated for fixed 3 columns */
.ibct-centers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Fixed 3 columns */
    gap: 2rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Updated responsive styles */
@media (max-width: 1200px) {
    .ibct-centers-grid {
        padding: 1rem 2rem;
    }
}

@media (max-width: 992px) {
    .ibct-centers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .ibct-centers-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .center-thumbnail {
        height: 180px;
    }
}

/* View Switcher Styles */
.view-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.view-switcher button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.view-switcher button.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* List View Styles */
.ibct-centers-grid[data-view="list"] {
    display: block;
}

.ibct-centers-grid[data-view="list"] .center-card {
    display: flex;
    flex-direction: row;
    margin-bottom: 1rem;
}

.ibct-centers-grid[data-view="list"] .center-thumbnail {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.ibct-centers-grid[data-view="list"] .center-content {
    flex: 1;
}

/* Results Count */
.results-count {
    display: none;
}

/* Loading State */
.ibct-filters-form.loading {
    position: relative;
}

.ibct-filters-form.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ibct-filters-form.loading::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -20px;
    margin-left: -20px;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Style No Results Message */
.no-centers-found {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem auto;
    max-width: 600px;
}

.no-centers-found .message-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.no-centers-found .dashicons {
    font-size: 2em;
    width: auto;
    height: auto;
    color: #0073aa;
}

.no-centers-found p {
    margin: 0;
    font-size: 1.1em;
    color: #666;
}