/* Program Finder page — uses vars from style.css
   (--primary, --secondary, --accent, --dark, --white,
   --light-bg, --text-dark, --text-light). Shared card/section
   styles (home-topuni-*, home-section, trending-*, course-item-card,
   home-scholarcard-*, home-article-*, enquiry-modal) come from
   css/home.css, linked directly in program-finder.blade.php —
   NOT duplicated in this file, so don't re-add them here. */

/* Hero — same blobs + dotted mask pattern as the blog/events pages */
.pf-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(85,171,215,0.35), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 110%, rgba(37,117,252,0.4), transparent 60%),
        linear-gradient(150deg, var(--dark) 0%, var(--primary) 62%, #1a4f86 100%);
    padding: 72px 0 58px;
    text-align: center;
}

.pf-hero-blob {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.pf-hero-blob-1 {
    width: 420px;
    height: 420px;
    top: -180px;
    right: -100px;
    background: radial-gradient(circle, rgba(85,171,215,0.5), transparent 70%);
}

.pf-hero-blob-2 {
    width: 360px;
    height: 360px;
    bottom: -240px;
    left: -120px;
    background: radial-gradient(circle, rgba(37,117,252,0.4), transparent 70%);
}

.pf-hero-dots {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 10%, #000 30%, transparent 100%);
    pointer-events: none;
}

.pf-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.pf-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 7px 18px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.pf-hero-eyebrow svg {
    color: var(--accent);
    flex-shrink: 0;
}

.pf-hero-title {
    color: var(--white);
    font-size: clamp(1.3rem, 3.2vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.pf-hero-title span {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}

.pf-hero-sub {
    color: #cfd9f0;
    font-size: 1rem;
    margin: 0 auto;
    max-width: 700px;
    line-height: 1.65;
    text-wrap: balance;
}

.pf-hero-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border-radius: 12px;
    height: 48px;
    padding: 0 16px;
    max-width: 580px;
    margin: 28px auto 0;
    box-shadow: 0 24px 50px rgba(4,26,87,0.32);
    border: 1px solid rgba(255,255,255,0.5);
    box-sizing: border-box;
}

.pf-hero-search svg {
    color: var(--text-light);
    flex-shrink: 0;
}

.pf-hero-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: normal;
    color: var(--text-dark);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .pf-hero-title { white-space: normal; }
}

@media (max-width: 640px) {
    .pf-hero { padding: 44px 0 36px; }
    .pf-hero-title { white-space: normal; }
    .pf-hero-search input { font-size: 16px; }
}

/* Tabs + mobile "Filters" toggle button */
.pf-tabs-wrapper {
    background: var(--white);
    border-bottom: 1px solid #eee;
    position: -webkit-sticky;
    position: sticky;
    top: 72px;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.pf-tabs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
}

.pf-tabs-inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.pf-tabs-inner::-webkit-scrollbar { display: none; }

.pf-tab-btn {
    background: var(--light-bg);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-dark);
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.25s ease;
    font-family: inherit;
}

.pf-tab-btn:hover {
    background: #eaf2fb;
    color: var(--primary);
}

.pf-tab-btn.active {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37,117,252,0.3);
}

.pf-tab-badge {
    background: rgba(255,255,255,0.6);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
}

.pf-tab-btn.active .pf-tab-badge { background: rgba(255,255,255,0.9); color: var(--primary); }

.pf-filters-toggle {
    display: none;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    background: var(--dark);
    color: var(--white);
    border: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 900px) {
    .pf-filters-toggle { display: flex; }
}

@media (max-width: 640px) {
    .pf-tabs-wrapper { top: 0; }
    .pf-tab-btn { padding: 8px 16px; font-size: 0.82rem; }
}

/* Layout: program grid LEFT, filters sidebar RIGHT */
.pf-explore-section {
    padding-top: 36px;
}

.pf-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

.pf-main {
    flex: 1;
    min-width: 0;
}

.pf-showing-line {
    color: var(--text-light);
    font-size: 0.86rem;
    margin: 0 0 16px;
}

.pf-empty-state {
    display: none;
    text-align: center;
    color: var(--text-light);
    font-size: 0.92rem;
    padding: 50px 20px;
}

.pf-empty-state.show { display: block; }

/* Sidebar */
.pf-sidebar {
    flex: 0 0 300px;
    background: var(--white);
    border: 1px solid #edf0f4;
    border-radius: 18px;
    padding: 22px;
    position: sticky;
    top: 140px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    box-shadow: 0 10px 24px rgba(20,40,70,0.06);
}

.pf-sidebar::-webkit-scrollbar { width: 6px; }
.pf-sidebar::-webkit-scrollbar-thumb { background: #d7e6fb; border-radius: 10px; }

.pf-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.pf-sidebar-head h3 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.15rem;
    color: var(--dark);
    margin: 0;
}

.pf-sidebar-clear {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    font-family: inherit;
}

.pf-sidebar-clear:hover { color: var(--secondary); }

.pf-filter-group {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #f1f4f8;
}

.pf-filter-group-last {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.pf-filter-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 12px;
}

.pf-filter-title svg {
    color: var(--primary);
    flex-shrink: 0;
}

.pf-filter-count {
    font-weight: 500;
    color: var(--text-light);
    font-size: 0.78rem;
    margin-left: -2px;
}

.pf-select {
    width: 100%;
    border: 1px solid #e2e6ec;
    border-radius: 10px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.84rem;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pf-select:focus { border-color: var(--primary); }

.pf-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.pf-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.pf-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

/* Dual-handle price range slider — two overlapping native range
   inputs; only their thumbs are interactive (track is transparent),
   with a separate visual track + fill bar drawn underneath. */
.pf-range-slider {
    position: relative;
    height: 22px;
    margin-bottom: 12px;
}

.pf-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e4eaf2;
    border-radius: 4px;
    transform: translateY(-50%);
}

.pf-range-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transform: translateY(-50%);
}

.pf-range-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 22px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
}

.pf-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(20,40,70,0.25);
    cursor: pointer;
    pointer-events: auto;
    margin-top: 0;
}

.pf-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--primary);
    box-shadow: 0 2px 6px rgba(20,40,70,0.25);
    cursor: pointer;
    pointer-events: auto;
}

.pf-range-slider input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    height: 22px;
}

.pf-range-slider input[type="range"]::-moz-range-track {
    background: transparent;
    height: 22px;
}

.pf-range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--dark);
}

@media (max-width: 900px) {
    .pf-layout { flex-direction: column-reverse; }

    .pf-sidebar {
        flex: 1 1 auto;
        width: 100%;
        position: fixed;
        top: 0;
        right: -100%;
        bottom: 0;
        z-index: 9998;
        max-height: 100vh;
        border-radius: 0;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    }

    .pf-sidebar.open {
        right: 0;
    }
}

@media (max-width: 480px) {
    .pf-checkbox-grid { grid-template-columns: 1fr; }
}

/* ===== Page-specific override =====
   home.css centers course-card-uni / course-card-main vertically
   (justify-content: center). On this page the Apply panel
   (course-card-apply) is the tallest of the three columns, so the
   shorter uni/main columns were centering with a large empty gap
   above their content. Top-align them here instead — scoped to
   .pf-main so it only affects this page, home.css itself untouched. */
.pf-main .course-card-uni,
.pf-main .course-card-main {
    justify-content: flex-start;
}