/* FlexCourse course catalog page */

/* ---------- Hero ---------- */
.fc-cat-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 4rem;
    background:
        radial-gradient(circle at 84% 16%, rgba(96, 165, 250, .2), transparent 30%),
        radial-gradient(circle at 10% 85%, rgba(14, 165, 233, .12), transparent 30%),
        linear-gradient(150deg, #f8fbff 0%, #eef5ff 52%, #f8fafc 100%);
}

.fc-cat-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: fc-cat-orb-pulse 9s ease-in-out infinite alternate;
}

.fc-cat-orb-one {
    width: 300px;
    height: 300px;
    top: -160px;
    left: -140px;
    background: rgba(37, 99, 235, .09);
}

.fc-cat-orb-two {
    width: 180px;
    height: 180px;
    right: -70px;
    bottom: -70px;
    background: rgba(14, 165, 233, .12);
    animation-delay: -4.5s;
}

@keyframes fc-cat-orb-pulse {
    from { opacity: .75; }
    to { opacity: 1; scale: 1.15; }
}

.fc-cat-hero-inner { max-width: 780px; margin: 0 auto; }

.fc-cat-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .85rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: rgba(255, 255, 255, .8);
    box-shadow: var(--fc-shadow-xs);
    color: var(--fc-primary);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.fc-cat-title {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1.1;
}

.fc-cat-title span {
    background: linear-gradient(100deg, var(--fc-primary), var(--fc-accent), var(--fc-primary));
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fc-cat-gradient 6s ease-in-out infinite;
}

@keyframes fc-cat-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.fc-cat-lead {
    max-width: 580px;
    color: var(--fc-text-2);
    font-size: clamp(.95rem, 1.4vw, 1.08rem);
    line-height: 1.75;
}

/* ---------- Search bar ---------- */
.fc-cat-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    max-width: 560px;
    padding: .45rem .45rem .45rem 1.15rem;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 44px rgba(15, 23, 42, .12);
}

.fc-cat-search:focus-within {
    border-color: var(--fc-primary);
    box-shadow: 0 18px 44px rgba(37, 99, 235, .18);
}

.fc-cat-search i {
    color: var(--fc-muted);
    font-size: 1.05rem;
}

.fc-cat-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fc-text);
    font-size: .95rem;
}

.fc-cat-search .btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: .55rem 1.4rem;
    font-weight: 700;
}

/* ---------- Category chips ---------- */
.fc-cat-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
}

.fc-cat-chip {
    padding: .45rem 1.05rem;
    border: 1px solid var(--fc-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    color: var(--fc-text-2);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}

.fc-cat-chip:hover {
    border-color: var(--fc-primary);
    color: var(--fc-primary);
    transform: translateY(-2px);
}

.fc-cat-chip.is-active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--fc-primary), var(--fc-accent));
    color: #fff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .3);
}

/* ---------- Sections ---------- */
.fc-cat-featured {
    padding: 3.5rem 0 1rem;
    background: #fff;
}

.fc-cat-list {
    padding: 2.5rem 0 5rem;
    background: #fff;
}

.fc-cat-section-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.03em;
}

.fc-cat-section-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #b45309, #fbbf24);
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 8px 18px rgba(217, 119, 6, .28);
}

/* ---------- Toolbar ---------- */
.fc-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .85rem 1.1rem;
    border: 1px solid var(--fc-border);
    border-radius: 1rem;
    background: #f8fafc;
}

.fc-cat-toolbar-info strong {
    display: block;
    font-size: .95rem;
    letter-spacing: -.01em;
}

.fc-cat-toolbar-info span {
    font-size: .8rem;
}

.fc-cat-toolbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.fc-cat-switch {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 .25rem;
    padding: 0;
}

.fc-cat-switch .form-check-input {
    margin: 0;
    cursor: pointer;
}

.fc-cat-switch .form-check-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fc-text-2);
    cursor: pointer;
    white-space: nowrap;
}

/* ---------- Empty state ---------- */
.fc-cat-empty {
    padding: 4rem 1.5rem;
    border: 1px dashed var(--fc-border-strong);
    border-radius: 1.25rem;
    background: #f8fafc;
}

.fc-cat-empty-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 1.25rem;
    border-radius: 20px;
    background: #eff6ff;
    color: var(--fc-primary);
    font-size: 1.6rem;
}

/* ---------- Reveal animations ---------- */
.fc-anim [data-reveal] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.fc-anim [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .fc-anim [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .fc-cat-orb,
    .fc-cat-title span {
        animation: none;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .fc-cat-hero { padding: 3.25rem 0 3rem; }
    .fc-cat-featured { padding-top: 2.75rem; }
    .fc-cat-list { padding-bottom: 4rem; }
    .fc-cat-toolbar { align-items: flex-start; flex-direction: column; }
    .fc-cat-toolbar-controls { width: 100%; }
    .fc-cat-toolbar-controls .form-select { flex: 1 1 45%; }
    .fc-cat-search .btn { padding: .5rem 1rem; }
}
