/* ==================== HOMEPAGE STYLES ==================== */


/* ==================== HERO BANNER ==================== */

.hero {
    position: relative;
    max-height: 20vh;
    min-height: 120px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 72%;
    position: absolute;
    inset: 0;
    filter: brightness(0.9);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--gj-space-lg) var(--gj-page-px);
}

.hero-title {
    font-size: var(--gj-text-3xl);
    font-weight: 800;
    color: var(--gj-white);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: var(--gj-text-base);
    color: rgba(255, 255, 255, 0.75);
    /* filter: drop-shadow(2px 1px 4px rgba(0, 0, 0, 0.8)); */
    /* text-shadow: 0 2px 4px #00000090, 0 0 2px #00000090; */
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.6);
    margin-top: var(--gj-space-xs);
    font-style: italic;
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 4%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.0),
            var(--gj-white));
    pointer-events: none;
}

/* ==================== TAG INTRO (LANDING PAGES) ==================== */

.tag-intro {
    background: var(--gj-white);
    padding: var(--gj-space-md);
    padding-bottom: var(--gj-space-lg);
    box-shadow: inset 0 -8px 10px -6px #00000020;
}

.tag-intro-inner {
    max-width: var(--gj-max-width);
    margin: 0 auto;
    padding: 0 var(--gj-space-lg);
    border-radius: 0 0 var(--gj-radius-xl) var(--gj-radius-xl);
    font-size: var(--gj-text-sm);
    color: var(--gj-text-secondary);
    line-height: 1.8;
}

.tag-intro-inner p {
    margin: 0 0 var(--gj-space-sm);
}

.tag-intro-inner ul {
    margin: var(--gj-space-xs) 0 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
}

.tag-intro-inner li {
    list-style: disc;
}


/* ==================== FILTER BAR ==================== */

.filter-bar {
    background: var(--gj-white);
    border-bottom: 1px solid var(--gj-border-light);
    padding: var(--gj-space-sm) var(--gj-page-px);
    overflow-x: clip;
}

.filter-bar-inner {
    max-width: var(--gj-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--gj-space-sm);
    flex-wrap: wrap;
}

.filter-select-group {
    display: flex;
    gap: var(--gj-space-sm);
    flex-wrap: wrap;
    overflow: visible;
}

.filter-btn {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: var(--gj-space-xs);
    padding: 0.5rem 1rem;
    font-family: var(--gj-font-sans);
    font-size: var(--gj-text-sm);
    font-weight: 500;
    color: var(--gj-text-secondary);
    background: var(--gj-white);
    border: 1px solid var(--gj-border);
    border-radius: var(--gj-radius-full);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    transition: all var(--gj-transition-fast);
}

.filter-btn:hover {
    border-color: var(--gj-gray-300);
    background: var(--gj-gray-50);
}

.filter-btn>.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: var(--gj-z-dropdown);
}

.filter-dropdown-searchable {
    display: flex;
    flex-direction: column;
}

.filter-dropdown-search {
    padding: var(--gj-space-sm);
    border: none;
    border-bottom: 1px solid var(--gj-border-light);
    font-size: var(--gj-text-sm);
    outline: none;
}

.filter-dropdown-list {
    overflow-y: auto;
    flex: 1;
    max-height: min(260px, 50vh);
}

.filter-dropdown-empty {
    color: var(--gj-text-muted);
    pointer-events: none;
}

.filter-dropdown-item-selected {
    font-weight: 600;
}

.filter-btn-icon {
    font-size: var(--gj-text-base);
    line-height: 1;
}

.filter-btn-arrow {
    font-size: 0.625rem;
    opacity: 0.5;
    margin-left: var(--gj-space-2xs);
}

.filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.filter-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    font-family: var(--gj-font-sans);
    font-size: var(--gj-text-sm);
    color: var(--gj-text-primary);
    background: var(--gj-white);
    border: 1px solid var(--gj-border);
    border-radius: var(--gj-radius-full);
    transition: border-color var(--gj-transition-fast);
}

.filter-search input:focus {
    outline: none;
    border-color: var(--gj-brand-light);
    box-shadow: 0 0 0 3px var(--gj-brand-subtle);
}

.filter-search input::placeholder {
    color: var(--gj-text-muted);
}

.filter-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--gj-text-sm);
    pointer-events: none;
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    max-width: min(320px, 95vw);
    background: var(--gj-white);
    border: 1px solid var(--gj-border);
    border-radius: var(--gj-radius-md);
    box-shadow: var(--gj-shadow-lg);
    max-height: min(280px, 50vh);
    overflow: hidden auto;
    z-index: var(--gj-z-dropdown);
    margin-top: 4px;
}

.filter-dropdown.filter-dropdown-searchable {
    max-height: none;
    overflow: visible;
}

.filter-dropdown.open {
    display: block;
}

.filter-dropdown-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: var(--gj-text-sm);
    transition: background var(--gj-transition-fast);
    display: flex;
    align-items: center;
    gap: var(--gj-space-sm);
    min-width: 0;
}

.filter-dropdown-item span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dropdown-item:hover {
    background: var(--gj-gray-50);
}

.filter-dropdown-item-icon {
    flex-shrink: 0;
    width: 1.2em;
    text-align: center;
}

.filter-dropdown-category {
    padding: 0.375rem 0.75rem;
    font-size: var(--gj-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gj-text-muted);
    background: var(--gj-gray-50);
    position: sticky;
    top: 0;
}

/* Active filter pills */
.filter-active {
    max-width: var(--gj-max-width);
    margin: var(--gj-space-sm) auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--gj-space-xs);
}

.filter-active:empty {
    display: none;
    margin: 0;
}


/* ==================== SORT BAR ==================== */

.sort-bar {
    max-width: var(--gj-max-width);
    margin: 0 auto;
    padding: var(--gj-space-md) var(--gj-page-px) var(--gj-space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sort-bar-count {
    font-size: var(--gj-text-sm);
    color: var(--gj-text-muted);
}


/* Job list and job row styles live in components/job-list.css (shared with job detail, employer profile). */

/* ==================== EMPTY STATE (home list loading / no results) ==================== */

.empty-state {
    text-align: center;
    padding: var(--gj-space-3xl) var(--gj-space-md);
    color: var(--gj-text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: var(--gj-space-md);
}


/* ==================== RESPONSIVE ==================== */
@media (min-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .hero {
        min-height: 180px;
    }
}

@media (min-width: 768px) and (min-height: 768px) {
    .filter-bar {
        position: sticky;
        top: 49px;
        z-index: calc(var(--gj-z-sticky) - 1);
    }
}

/* Small screens: keep all filters and job data visible */
@media (max-width: 639px) {
    .filter-bar-inner {
        gap: var(--gj-space-xs);
    }

    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: var(--gj-text-xs);
    }

    .filter-btn-icon {
        font-size: var(--gj-text-sm);
    }

    .hero-title {
        font-size: var(--gj-text-2xl);
    }

    .hero-subtitle {
        font-size: var(--gj-text-sm);
    }
}