:root {
    --cp-orange: #ff6b00;
    --cp-orange-dark: #e55f00;
    --cp-blue: #0066b3;
    --cp-blue-dark: #04488f;
    --cp-ink: #0f172a;
    --cp-muted: #64748b;
    --cp-line: #e2e8f0;
}

/* Course cards */
.course-list-section { background: #fff; padding: 2.5rem 0 3rem; }
.course-result-count { margin: 0 0 1.5rem; color: var(--cp-muted); font-size: 0.95rem; font-weight: 500; }
.course-result-count strong { color: var(--cp-ink); }
.course-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.course-card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.course-empty { grid-column: 1 / -1; padding: 4rem 1rem; border: 1px dashed #cbd5e1; border-radius: 1rem; text-align: center; color: var(--cp-muted); }

.stream-course-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    padding: 1.05rem 1rem 0.95rem;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 1.1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    animation: courseCardIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--card-i, 0) * 70ms);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}
.stream-course-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--cp-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.stream-course-card:hover::before { transform: scaleX(1); }
.stream-course-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 102, 179, 0.28);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}
@keyframes courseCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}
.stream-course-card-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.stream-course-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(4, 72, 143, 0.08);
    color: var(--cp-blue-dark);
    font-size: 1.1rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, color 0.3s ease;
}
.stream-course-card:hover .stream-course-icon { transform: scale(1.08) rotate(-6deg); background: var(--cp-blue-dark); color: #fff; }
.stream-course-title { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.3; color: var(--cp-ink); }
.stream-course-title a { color: inherit; text-decoration: none; }
.stream-course-title a:hover { color: var(--cp-blue); }
.stream-course-meta { margin: 0.2rem 0 0; font-size: 0.86rem; font-weight: 600; color: var(--cp-muted); }
.stream-course-levels { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.15rem; }
.stream-course-levels span {
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid var(--cp-line);
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}
.stream-course-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    border-radius: 0.85rem;
    color: #fff;
    background: var(--cp-blue);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}
.stream-course-btn i { font-size: 0.8rem; transition: transform 0.25s ease; }
.stream-course-btn:hover,
.stream-course-card:hover .stream-course-btn { background: var(--cp-blue-dark); color: #fff; }
.stream-course-card:hover .stream-course-btn i { transform: translateX(4px); }

/* Buttons */
.course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.course-btn--sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; border-radius: 0.6rem; }
.course-btn--block { width: 100%; }
.course-btn--primary { background: var(--cp-orange); color: #fff; }
.course-btn--primary:hover { background: var(--cp-orange-dark); color: #fff; }
.course-btn--blue { background: var(--cp-blue); color: #fff; }
.course-btn--blue:hover { background: var(--cp-blue-dark); color: #fff; }
.course-btn--outline { background: #fff; border-color: var(--cp-blue); color: var(--cp-blue); }
.course-btn--outline:hover { background: var(--cp-blue); color: #fff; }
.course-btn--ghost { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.course-btn--ghost:hover { background: rgba(255, 255, 255, 0.18); border-color: #fff; color: #fff; }

/* Detail hero */
.course-detail-hero { background-color: #0b2545; background-position: center; background-size: cover; background-repeat: no-repeat; color: #fff; }
.course-detail-hero-shade {
    min-height: 380px;
    display: flex;
    align-items: center;
    padding: 3.5rem 0;
    background: linear-gradient(100deg, rgba(7, 18, 38, 0.94) 0%, rgba(7, 18, 38, 0.74) 45%, rgba(7, 18, 38, 0.25) 100%);
}
.course-detail-back { display: inline-flex; align-items: center; gap: 0.4rem; color: #fdba74; font-size: 0.85rem; font-weight: 700; text-decoration: none; }
.course-detail-back i { font-size: 0.72rem; }
.course-detail-back:hover { color: #fff; }
.course-detail-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.course-detail-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 700;
}
.course-detail-pill--accent { background: var(--cp-orange); border-color: var(--cp-orange); }
.course-detail-hero h1 {
    color: #fff;
    margin: 0.9rem 0 0.5rem;
    max-width: 40rem;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.course-detail-meta { margin: 0; color: rgba(255, 255, 255, 0.82); max-width: 42rem; font-weight: 500; }
.course-detail-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

/* Detail body */
.course-detail-body { background: #f8fafc; padding: 2.5rem 0 3.5rem; }
.course-detail-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.course-detail-fact,
.course-detail-card { background: #fff; border: 1px solid var(--cp-line); border-radius: 1rem; }
.course-detail-fact { padding: 1rem 1.15rem; }
.course-detail-fact span { display: block; color: var(--cp-muted); font-size: 0.75rem; font-weight: 700; }
.course-detail-fact span i { color: var(--cp-orange); margin-right: 0.2rem; }
.course-detail-fact strong { display: block; margin-top: 0.3rem; color: var(--cp-ink); font-size: 0.98rem; }

.guide-jump {
    position: sticky;
    top: var(--a4u-header-stick, 0px);
    z-index: 20;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0 0;
    padding: 0.6rem 0;
    background: #f8fafc;
    scrollbar-width: none;
}
.guide-jump a {
    flex: 0 0 auto;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--cp-line);
    color: var(--cp-ink);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}
.guide-jump a:hover { border-color: var(--cp-orange); color: var(--cp-orange); }

.course-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.75rem; margin-top: 1rem; }
.course-detail-main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.course-detail-main [id] { scroll-margin-top: calc(var(--a4u-header-stick, 0px) + 4.5rem); }
.course-detail-card { padding: 1.35rem 1.4rem; }
.course-detail-card h2 { margin: 0 0 0.7rem; font-size: 1.15rem; font-weight: 800; color: var(--cp-ink); }
.course-detail-card p { margin: 0 0 0.75rem; color: #475569; line-height: 1.7; }
.course-detail-card p:last-child { margin-bottom: 0; }
.course-detail-empty { text-align: center; }
.course-detail-empty p { margin-bottom: 1rem; }

.course-detail-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin: 1rem 0 0; }
.course-detail-overview div { padding: 0.7rem 0.85rem; border-radius: 0.75rem; background: #f8fafc; }
.course-detail-overview dt { color: var(--cp-muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.course-detail-overview dd { margin: 0.2rem 0 0; color: var(--cp-ink); font-weight: 700; font-size: 0.9rem; }

.course-steps { counter-reset: step; list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.course-steps li { counter-increment: step; position: relative; padding: 0.15rem 0 0 2.75rem; min-height: 2rem; }
.course-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    color: var(--cp-orange);
    font-weight: 800;
    font-size: 0.85rem;
}
.course-steps strong { display: block; color: var(--cp-ink); font-size: 0.95rem; }
.course-steps span { display: block; color: var(--cp-muted); font-size: 0.88rem; }

.course-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.course-chips span { padding: 0.4rem 0.8rem; border-radius: 999px; background: #eff6ff; color: var(--cp-blue-dark); font-size: 0.84rem; font-weight: 700; }
.guide-list { display: grid; gap: 0.45rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.guide-list li { padding: 0.65rem 0.8rem; border-radius: 10px; background: #f8fafc; color: var(--cp-ink); }

.course-fee-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.course-fee-table th,
.course-fee-table td { padding: 0.65rem 0.85rem; text-align: left; border-bottom: 1px solid #eef2f7; }
.course-fee-table th:last-child,
.course-fee-table td:last-child { text-align: right; }
.course-fee-table thead th { background: #f8fafc; color: var(--cp-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.course-fee-table td { color: var(--cp-ink); }
.course-fee-table tfoot th { color: var(--cp-ink); border-bottom: 0; }
.course-fee-table tfoot th:last-child { color: var(--cp-orange); }

.course-jobs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.course-jobs li { padding: 0.6rem 0.8rem; border-radius: 10px; background: #f8fafc; color: var(--cp-ink); font-weight: 600; font-size: 0.9rem; }
.course-jobs i { color: var(--cp-orange); margin-right: 0.35rem; }

.course-section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-top: 0.75rem; }
.course-section-head h2,
.course-section-title { margin: 0; color: var(--cp-ink); font-size: 1.35rem; font-weight: 800; }
.course-section-head p { margin: 0.2rem 0 0; color: var(--cp-muted); font-size: 0.88rem; }
.course-section-title { margin-top: 0.75rem; }

.course-college-list { display: grid; gap: 0.75rem; }
.course-college {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid var(--cp-line);
    border-radius: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.course-college:hover { border-color: #fdba74; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06); }
.course-college-logo { width: 56px; height: 56px; border-radius: 0.85rem; border: 1px solid #eef2f7; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; }
.course-college-logo img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 0.3rem; }
.course-college-logo span { font-weight: 800; color: var(--cp-blue-dark); }
.course-college-name { color: var(--cp-ink); font-weight: 800; text-decoration: none; }
.course-college-name:hover { color: var(--cp-orange); }
.course-college-info p { margin: 0.15rem 0 0; color: var(--cp-muted); font-size: 0.84rem; }
.course-college-meta { font-weight: 600; }
.course-college-fee { text-align: right; }
.course-college-fee strong { display: block; color: var(--cp-orange); font-size: 0.95rem; margin-bottom: 0.45rem; }
.course-college-fee div { display: flex; gap: 0.4rem; justify-content: flex-end; }

.course-faqs details { border-top: 1px solid #eef2f7; }
.course-faqs details:first-child { border-top: 0; }
.course-faqs summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    color: var(--cp-ink);
    font-weight: 700;
}
.course-faqs summary::-webkit-details-marker { display: none; }
.course-faqs summary::after { content: "+"; color: var(--cp-orange); font-weight: 800; font-size: 1.1rem; line-height: 1; }
.course-faqs details[open] summary::after { content: "−"; }
.course-faqs details p { margin: 0 0 0.9rem; }

.course-side-sticky { position: sticky; top: calc(var(--a4u-header-stick, 0px) + 4.5rem); display: flex; flex-direction: column; gap: 1rem; }
.course-help { display: flex; gap: 0.85rem; padding: 1.1rem; border-radius: 1rem; background: #0b2545; color: #fff; }
.course-help > i { font-size: 1.4rem; color: #fdba74; margin-top: 0.15rem; }
.course-help strong { display: block; }
.course-help p { margin: 0.2rem 0 0.6rem; color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; }
.course-help button { background: none; border: 0; padding: 0; color: #fdba74; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.course-help button:hover { color: #fff; }

@media (max-width: 1199.98px) {
    .course-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .course-card-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .course-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .course-detail-layout { grid-template-columns: 1fr; }
    .course-side-sticky { position: static; }
    .course-detail-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .course-detail-facts { grid-template-columns: 1fr 1fr; }
    .course-jobs { grid-template-columns: 1fr; }
    .course-college { grid-template-columns: 48px minmax(0, 1fr); }
    .course-college-fee { grid-column: 1 / -1; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
    .course-college-fee strong { margin: 0; }
    .course-detail-hero-shade { min-height: 320px; padding: 2.5rem 0; }
}
@media (max-width: 575.98px) {
    .course-card-grid,
    .course-card-grid--two { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .stream-course-card,
    .stream-course-icon,
    .stream-course-btn i { animation: none; transition: none; }
    .stream-course-card:hover { transform: none; }
}
