/* eCourse.my — custom CSS layer on top of Tailwind */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Nav links */
.nav-link {
    color: #1e293b;
    font-weight: 500;
    transition: color 0.15s ease;
    position: relative;
}
.nav-link:hover { color: #f97316; }
.nav-link-active { color: #f97316; }
.nav-link-active::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: #f97316;
    border-radius: 2px;
}

/* Course card thumb — gradient driven by per-card CSS vars */
.course-thumb {
    background: linear-gradient(135deg, var(--from, #1e293b), var(--to, #0f172a));
    aspect-ratio: 16 / 10;
}

/* Audience portrait placeholder */
.audience-portrait {
    background: linear-gradient(160deg, var(--from, #0a1f44), var(--to, #1e3a8a));
}

/* Instructor portrait placeholder */
.instructor-portrait {
    background: linear-gradient(135deg, #fb923c, #f97316);
}

/* Hero background pattern (legacy gradient fallback) */
.hero-bg {
    background:
        radial-gradient(ellipse at top right, rgba(249,115,22,0.18), transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(13,36,84,0.6), transparent 50%),
        #0a1f44;
}
.hero-pattern {
    background-image: radial-gradient(circle, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

/* Glass-morphism floating card for hero */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.875rem;
    padding: 1rem;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
}

/* FAQ accordion */
.faq-item[open] summary .faq-chev { transform: rotate(180deg); }
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev { transition: transform 0.2s ease; }

/* Course card hover lift */
.course-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.course-card:hover { transform: translateY(-4px); }

/* Mobile menu open state — lock body scroll */
body.menu-open { overflow: hidden; }

/* Step number circle (How It Works) */
.step-num {
    width: 32px; height: 32px;
    background: #f97316;
    color: #fff;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Avatar placeholder fallback */
.avatar-fallback {
    background: linear-gradient(135deg, #fb923c, #f97316);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
