/**
 * BestPublicHealth - Explore Page Styles 2025
 * Matches homepage-2025.css aesthetics
 */

/* -------------------------
   Hero Section
--------------------------*/
.explore-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    background-color: var(--color-primary);
    /* Fallback */
    color: #ffffff;
    padding: 60px 0 100px;
    /* Extra bottom padding for tabs overlap */
    text-align: center;
    position: relative;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    color: #ffffff;
}

.hero-title .highlight {
    color: var(--color-secondary);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
}

/* Search Bar in Hero */
.hero-search-container {
    background: #ffffff;
    padding: 8px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.explore-search-form {
    display: flex;
    gap: 8px;
}

.search-input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-group.location-group {
    flex: 0 0 30%;
    border-left: 1px solid var(--border-color);
    padding-left: 8px;
}

.search-icon {
    position: absolute;
    left: 16px;
    color: var(--color-text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    border: none;
    padding: 16px 16px 16px 48px;
    font-size: 1rem;
    color: var(--color-text-main);
    background: transparent;
    outline: none;
}

.search-btn {
    background: var(--color-secondary);
    color: #ffffff;
    border: none;
    padding: 0 32px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.search-btn:hover {
    background: #006666;
    /* Darker teal */
}

@media (max-width: 768px) {
    .explore-search-form {
        flex-direction: column;
    }

    .search-input-group.location-group {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 8px;
    }

    .search-btn {
        padding: 16px;
        width: 100%;
    }

    .hero-title {
        font-size: 2rem;
    }
}


/* -------------------------
   Tabs Navigation
--------------------------*/
.explore-tabs-wrapper {
    margin-top: -40px;
    /* Overlap hero */
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
}

.explore-tabs {
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: center;
    padding: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.tab-item {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-item:hover {
    background: var(--color-bg-main);
    color: var(--color-primary);
    text-decoration: none;
}

.tab-item.active {
    background: var(--color-primary);
    color: #ffffff;
}

.tab-item .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.tab-item.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}


/* -------------------------
   Main Layout
--------------------------*/
.explore-content {
    padding-bottom: 80px;
    background: var(--color-bg-main);
    /* Ensure full page bg matches */
}

.explore-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 992px) {
    .explore-grid {
        grid-template-columns: 1fr;
    }

    .explore-sidebar {
        display: none;
        /* Hide sidebar on mobile for now, or implement toggle */
    }
}


/* -------------------------
   Sidebar Filters
--------------------------*/
.explore-sidebar {
    background: #ffffff;
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 20px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-primary);
}

.reset-filters {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: underline;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-main);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options.scrollable {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    user-select: none;
}

.checkbox-label:hover {
    color: var(--color-primary);
}

.checkbox-label input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input:checked+.checkmark {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.checkbox-label input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ffffff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Sidebar CTA */
.sidebar-cta {
    background: var(--color-bg-main);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 32px;
}

.sidebar-cta h4 {
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.sidebar-cta p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.btn-sidebar {
    display: inline-block;
    background: #ffffff;
    border: 1px solid var(--color-secondary);
    color: var(--color-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-sidebar:hover {
    background: var(--color-secondary);
    color: #ffffff;
    text-decoration: none;
}


/* -------------------------
   Results Area
--------------------------*/
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-count {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.results-sort label {
    font-size: 0.9rem;
    margin-right: 8px;
    color: var(--color-text-muted);
}

.results-sort select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    font-size: 0.9rem;
    background: #ffffff;
}

/* Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Cards (Shared Base) */
.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--color-secondary);
}

.card-image {
    height: 160px;
    background: var(--color-primary-light);
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 3rem;
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-secondary);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-title a {
    color: var(--color-text-main);
    text-decoration: none;
}

.card-title a:hover {
    color: var(--color-primary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-meta {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.card-btn {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 10px;
    background: var(--color-bg-main);
    color: var(--color-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.card-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
}

/* Job Card Specifics */
.job-header {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.job-icon {
    width: 50px;
    height: 50px;
    background: var(--color-bg-main);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.job-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.card-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.meta-tag {
    background: var(--color-bg-main);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-primary);
}

.meta-tag.outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
}

.job-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Event Card Specifics */
.event-card .card-date-box {
    background: var(--color-primary);
    color: #ffffff;
    padding: 16px;
    text-align: center;
    border-bottom: 4px solid var(--color-secondary);
}

.event-card .day {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.event-card .month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    opacity: 0.9;
}


/* -------------------------
   Pagination & No Results
--------------------------*/
.pagination-wrapper {
    margin-top: 40px;
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 4px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--color-text-main);
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.no-results-icon {
    font-size: 3rem;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.no-results p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}