
    /* ─── Reset & Base ─── */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    html {
        scroll-behavior: smooth;
    }

    .tabs-sticky-nav {
    position: sticky;
    top: 80px;
    }

    .tabs-sticky-nav.scrolled {
        box-shadow: 0 4px 10px #172e6b;
    }

    /* ─── Design Tokens ─── */
    :root {

        --primary:      #1E3A8A;  /* Medical Blue */
        --primary-dark: #172e6b;
        --primary-light:#172e6b;

        --secondary:      #16A34A; /* Healthcare Green */
        --secondary-dark: #15803d;
        --secondary-light:#dcfce7;

        --bg:         #F1F5F9; /* Soft Clinical Gray */
        --white:      #ffffff;

        --text-dark:  #172e6b;
        --text-mid:   #334155;
        --text-soft:  #39e779;

        --border:     #9db5f7;

        --radius-sm:  8px;
        --radius-md:  12px;
        --radius-lg:  20px;

        /* ─── SHADOWS ─── */
        --shadow-sm:  0 1px 4px rgba(0,0,0,.06);
        --shadow-md:  0 4px 16px rgba(0,0,0,.08);
        --shadow-lg:  0 12px 40px rgba(0,0,0,.12);
    }
    /* ─── Prose lists ─── */
    .prose ul, .prose ol  { margin: .9rem 0; padding-left: 1.75rem; }
    .prose ul              { list-style-type: disc; }
    .prose ol              { list-style-type: decimal; }
    .prose li              { margin: .4rem 0; color: var(--text-mid); }

    /* ─── Breadcrumb ─── */
    .breadcrumb {
        background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
        padding: .875rem 0;
        color: white;
        font-size: .8rem;
    }

    .breadcrumb a {
        color: rgba(255,255,255,.85);
        text-decoration: none;
        transition: color .2s;
    }

    .breadcrumb a:hover { color: white; }

    .breadcrumb .separator {
        color: #1E3A8A;
        margin: 0 .4rem;
        font-size: .65rem;
    }

    /* ─── Page Layout ─── */
    .page-wrapper {
        background: var(--bg);
        min-height: 100vh;
    }

  .content-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    display: grid;                 
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;       
    }
        .content-grid,
    #schedules-section {
        overflow: visible;
    }

    @media (min-width: 1024px) {
        .content-grid {
            display: grid;
            grid-template-columns: 1fr 380px;
            gap: 2rem;
            align-items: start;
            padding: 2.5rem 2rem;
        }
    }

    /* ─── Course Hero ─── */
    .course-hero {
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-lg);
        margin-bottom: 1.5rem;
        position: relative;
    }

    .course-hero img {
        width: 100%;
        height: 240px;
        object-fit: cover;
        display: block;
    }

    @media (min-width: 640px)  { .course-hero img { height: 280px; } }
    @media (min-width: 768px)  { .course-hero img { height: 320px; } }

    /* ─── Course Title Block ─── */
    .course-title-block {
        margin-bottom: 1.75rem;
    }

    .course-title-block h2 {
        font-size: 1.5rem !important;
        font-weight: 800;
        color: var(--blue);
        line-height: 1.3;
        margin-bottom: .6rem;
    }

    @media (min-width: 640px) { .course-title-block h2 { font-size: 1.75rem !important; } }

    .course-meta-row {
        display: flex;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
        margin-top: .75rem;
    }

    .meta-badge {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        background: var(--teal-light);
        color: var(--teal-dark);
        border-radius: 100px;
        padding: .3rem .75rem;
        font-size: .75rem;
        font-weight: 600;
    }

    /* ─── Card ─── */
    .card {
        background: var(--white);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
        margin-bottom: 1.5rem;
        overflow: hidden;
    }

    .card-body {
        padding: 1.5rem;
    }

    .card,
.card-body {
    overflow: visible !important;
}

    @media (min-width: 640px) { .card-body { padding: 2rem; } }

    /* ─── Sticky Tab Nav ─── */
    .tabs-sticky-nav {
        position: sticky;
        top: 100px;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        margin: 0 -1.5rem 2rem -1.5rem;
        padding: 0 1.5rem;
        transition: box-shadow .2s;
    }

    @media (max-width: 640px) { .tabs-sticky-nav { top: 56px; } }

    .tabs-sticky-nav.scrolled { box-shadow: 0 4px 12px #16A34A; }

    .tabs-container {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: .25rem;
    }

    .tabs-container::-webkit-scrollbar { display: none; }

    .tab-modern {
        position: relative;
        padding: .875rem 1.25rem;
        background: transparent;
        border: none;
        cursor: pointer;
        font-weight: 600;
        font-size: .82rem;
        color: var(--text-soft);
        transition: color .25s;
        white-space: nowrap;
        flex: 1;
        text-align: center;
    }

    @media (min-width: 1024px) { .tab-modern { flex: none; } }

    .tab-modern:hover { color: var(--teal); }

    .tab-modern.active { color: var(--teal); }

    .tab-modern::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--teal);
        border-radius: 2px 2px 0 0;
        transform: scaleX(0);
        transition: transform .25s ease;
    }

    .tab-modern.active::after { transform: scaleX(1); }

    /* ─── Scroll Sections ─── */
    .scroll-section {
        scroll-margin-top: 160px;
        padding-top: 2rem;
    }

    /* ─── Section Header ─── */
    .section-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-number {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--teal);
        color: white;
        font-weight: 700;
        font-size: .8rem;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .section-title {
        font-size: 1.2rem !important;
        font-weight: 700;
        color: var(--teal);
    }

    @media (min-width: 640px) { .section-title { font-size: 1.35rem !important; } }

    /* ─── Prose Content ─── */
    .prose {
        color: var(--text-mid);
        line-height: 1.75;
        font-size: .9rem;
    }

    .prose h1, .prose h2, .prose h3, .prose h4 {
        color: var(--text-dark);
        margin-top: 1.25rem;
        margin-bottom: .5rem;
    }

    /* ─── Section Divider ─── */
    .sections-wrap {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .sections-wrap .scroll-section + .scroll-section {
        border-top: 1px solid var(--border);
    }

    /* ─── Administration Items ─── */
    .admin-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    @media (min-width: 640px) { .admin-grid { grid-template-columns: 1fr 1fr; } }

    .admin-item {
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 1.1rem 1.25rem;
    }

    .admin-item h4 {
        font-size: .78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .06em;
        color: var(--blue);
        margin-bottom: .5rem;
    }

    .admin-item p {
        font-size: .82rem;
        color: var(--text-mid);
        line-height: 1.6;
    }

    .admin-item.highlight {
        border-color: var(--teal);
        background: var(--teal-light);
    }

    .admin-item.highlight h4 { color: var(--teal-dark); }

    /* ─── Related Courses ─── */
    .related-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    @media (min-width: 480px) { .related-grid { grid-template-columns: 1fr 1fr; } }
    @media (min-width: 768px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

    .related-card {
        border-radius: var(--radius-md);
        overflow: hidden;
        border: 1px solid var(--border);
        transition: all .25s ease;
        text-decoration: none;
        display: block;
        background: var(--white);
    }

    .related-card:hover {
        border-color: var(--teal);
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
    }

    .related-card img {
        width: 100%;
        height: 130px;
        object-fit: cover;
        display: block;
    }

    .related-card-body {
        padding: .75rem 1rem;
    }

    .related-card h4 {
        font-size: .8rem;
        font-weight: 600;
        color: var(--text-dark);
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ─── Participants Table ─── */
    .participants-table {
        width: 100%;
        font-size: .8rem;
        border-collapse: collapse;
    }

    .participants-table thead tr {
        background: var(--bg);
    }

    .participants-table th {
        padding: .65rem 1rem;
        text-align: left;
        font-size: .7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--text-soft);
    }

    .participants-table td {
        padding: .65rem 1rem;
        color: var(--text-mid);
        border-top: 1px solid var(--border);
    }

    .participants-table tr:hover td { background: var(--bg); }

    /* ─── Share Buttons ─── */
    .share-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .75rem;
    }

    @media (min-width: 480px) { .share-grid { grid-template-columns: repeat(4, 1fr); } }

    .share-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: .7rem .5rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        transition: all .2s;
        text-decoration: none;
        color: var(--text-mid);
        font-size: .78rem;
        font-weight: 500;
    }

    .share-btn:hover {
        background: var(--teal-light);
        border-color: var(--teal);
        color: var(--teal);
    }

    /* ─── Card Title ─── */
    .card-title {
        font-size: 1.1rem !important;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 1.25rem;
    }

    .sidebar {
        position: sticky;
        top: 110px;          /* MUST match your fixed navbar height */
        align-self: start;   /* required for CSS Grid */
    }

    /* @media (min-width: 1024px) { .sidebar { top: 2.5rem; } } */

    .schedule-card {
        background: var(--white);
        border-radius: var(--radius-lg);
        border: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        overflow: hidden;
        /* max-height: calc(100vh - 120px);
        overflow-y: auto; */
    }

    .schedule-card-head {
        background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
        padding: 1.25rem 1.5rem;
    }

    .schedule-card-head h2 {
        color: #1E3A8A;
        font-size: 1rem;
        font-weight: 700;
    }

    .schedule-card-body { padding: 1.25rem 1.5rem; }

    /* ─── Schedule Tabs ─── */
    .sched-tabs {
        display: flex;
        background: var(--bg);
        border-radius: var(--radius-sm);
        padding: .25rem;
        gap: .25rem;
        margin-bottom: 1.25rem;
    }

    .schedule-tab {
        flex: 1;
        padding: .5rem;
        font-size: .75rem;
        font-weight: 600;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all .2s;
        background: transparent;
        color: var(--text-soft);
    }

    .schedule-tab.active-tab {
        background: var(--white);
        color: var(--teal);
        box-shadow: var(--shadow-sm);
    }

    /* ─── Schedule Table ─── */
    .schedule-table {
        width: 100%;
        border-collapse: collapse;
        font-size: .75rem;
        table-layout: fixed;
    }

    .schedule-table th {
        padding: .5rem .5rem;
        text-align: left;
        font-size: .65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--text-soft);
        border-bottom: 1px solid var(--border);
    }

    .schedule-table td {
        padding: .75rem .5rem;
        border-bottom: 1px solid var(--bg);
        vertical-align: middle;
    }

    .schedule-table tr:hover td { background: var(--bg); }

    .year-row td {
        background: var(--teal-light) !important;
        color: var(--teal-dark);
        font-weight: 700;
        font-size: .72rem;
        padding: .4rem .75rem;
    }

    .date-text {
        font-weight: 600;
        color: var(--text-dark);
        line-height: 1.3;
    }

    .location-text {
        display: flex;
        align-items: center;
        gap: .25rem;
        margin-top: .2rem;
        color: var(--text-soft);
        font-size: .7rem;
    }

    .price-text {
        font-weight: 700;
        color: var(--text-dark);
        line-height: 1.5;
    }

    .enroll-btn {
        display: inline-block;
        background: #1E3A8A;
        color: white;
        padding: .4rem .75rem;
        border-radius: 6px;
        font-size: .68rem;
        font-weight: 700;
        text-transform: uppercase;
        text-decoration: none;
        transition: background .2s;
        letter-spacing: .03em;
        white-space: nowrap;
    }

    .enroll-btn:hover { background: #16A34A; color: white; }

    /* ─── Quick Links ─── */
    .quick-links { margin-top: 1.25rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }

    .quick-links-label {
        font-size: .65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--text-soft);
        margin-bottom: .75rem;
    }

    .quick-link-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        padding: .7rem 1rem;
        border-radius: var(--radius-sm);
        font-size: .8rem;
        font-weight: 600;
        cursor: pointer;
        transition: all .2s;
        margin-bottom: .6rem;
    }

    .quick-link-btn.outline-blue {
        border: 1.5px solid var(--blue);
        background: transparent;
        color: var(--blue);
    }

    .quick-link-btn.outline-blue:hover { background: var(--blue-light); }

    .quick-link-btn.outline-teal {
        border: 1.5px solid var(--teal);
        background: transparent;
        color: var(--teal);
    }

    .quick-link-btn.outline-teal:hover { background: var(--teal-light); }

    /* ─── Mobile Register FAB ─── */
    .mobile-register-btn {
        display: none;
        position: fixed;
        bottom: 1.25rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
        background: #1E3A8A;
        color: white;
        border: none;
        padding: .9rem 2rem;
        border-radius: 100px;
        font-weight: 700;
        font-size: .85rem;
        box-shadow: 0 8px 24px rgba(30,161,157,.4);
        transition: all .25s;
        cursor: pointer;
        white-space: nowrap;
    }

    .mobile-register-btn:hover {
        background: var(--teal-dark);
        box-shadow: 0 12px 32px rgba(30,161,157,.5);
    }

    @media (max-width: 639px) { .mobile-register-btn { display: block; } }

    /* ─── Utility ─── */
    .truncate {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .tabs-sticky-nav.scrolled {
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
/* ══════════════════════════════════════════
   MOBILE FIXES — max-width: 639px only
   Desktop (640px+) is completely untouched
══════════════════════════════════════════ */

@media (max-width: 639px) {

    /* ─── Grid: stack columns vertically ─── */
    .content-grid {
        grid-template-columns: 1fr;
        padding: 1rem .75rem;
        gap: 1.25rem;
    }

    /* ─── Sidebar: un-stick on mobile, show below content ─── */
    .sidebar {
        position: static;
        top: auto;
        width: 100%;
    }

    /* ─── Schedule card: remove fixed height constraints ─── */
    .schedule-card {
        overflow: visible;
        max-height: none;
    }

    /* ─── Hero image: shorter on small screens ─── */
    .course-hero img {
        height: 200px;
    }

    /* ─── Course title: tighter on mobile ─── */
    .course-title-block {
        margin-bottom: 1rem;
    }

    /* ─── Card body: less padding on mobile ─── */
    .card-body {
        padding: 1rem !important;
    }

    /* ─── Sticky tabs: stick just below typical mobile navbar ─── */
    .tabs-sticky-nav {
        top: 56px;
        margin: 0 -1rem 1.5rem -1rem;
        padding: 0 1rem;
        z-index: 40;
    }

    /* ─── Tab buttons: smaller text, allow wrapping ─── */
    .tab-modern {
        font-size: .75rem;
        padding: .7rem .75rem;
        flex: 1;
    }

    /* ─── Admin grid: always single column ─── */
    .admin-grid {
        grid-template-columns: 1fr;
    }

    /* ─── Related courses: single column on very small screens ─── */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* ─── Share buttons: 2 columns ─── */
    .share-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* ─── Participants table: allow horizontal scroll ─── */
    .participants-table {
        font-size: .72rem;
    }

    .participants-table th,
    .participants-table td {
        padding: .5rem .6rem;
    }

    /* ─── Schedule table: tighter on mobile ─── */
    .schedule-table th,
    .schedule-table td {
        padding: .6rem .35rem;
        font-size: .7rem;
    }

    /* ─── Enroll button: smaller ─── */
    .enroll-btn {
        font-size: .62rem;
        padding: .35rem .5rem;
    }

    /* ─── Quick link buttons: full width, comfortable tap target ─── */
    .quick-link-btn {
        padding: .85rem 1rem;
        font-size: .78rem;
    }

    /* ─── Breadcrumb: smaller text ─── */
    .breadcrumb {
        font-size: .72rem;
    }

    /* ─── Section scroll margin: account for mobile navbar + tabs ─── */
    .scroll-section {
        scroll-margin-top: 120px;
        padding-top: 1.25rem;
    }
}

/* ─── Between 640px–1023px: tablet — single column grid, sidebar below ─── */
@media (min-width: 640px) and (max-width: 1023px) {

    .content-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 1.25rem;
    }

    .sidebar {
        position: static;
        top: auto;
        width: 100%;
        max-height: none;
        overflow-y: visible;
    }

    /* ─── Fixed CTA: hide on tablet too since sidebar is visible ─── */
    #fixed-cta {
        display: none !important;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ══════════════════════════════════════════
   EXTRA SMALL SCREENS — max-width: 400px
   Fixes breakage on very small phones
══════════════════════════════════════════ */

@media (max-width: 400px) {

    /* ─── Grid: minimal padding ─── */
    .content-grid {
        padding: .75rem .5rem;
        gap: 1rem;
    }

    /* ─── Hero: very short on tiny screens ─── */
    .course-hero img {
        height: 160px;
    }

    /* ─── Card body: minimal padding ─── */
    .card-body {
        padding: .75rem !important;
    }

    /* ─── Tabs: very compact, prevent overflow ─── */
    .tabs-sticky-nav {
        margin: 0 -.75rem 1.25rem -.75rem;
        padding: 0 .75rem;
    }

    .tab-modern {
        font-size: .68rem;
        padding: .65rem .4rem;
        letter-spacing: -.01em;
    }

    /* ─── Course title: smaller ─── */
    .course-title-block h1,
    .course-title-block h2 {
        font-size: 1.25rem !important;
        line-height: 1.3;
    }

    /* ─── Meta badges: wrap and shrink ─── */
    .course-meta-row {
        gap: .5rem;
    }

    .meta-badge {
        font-size: .68rem;
        padding: .25rem .6rem;
    }

    /* ─── Admin items: tighter ─── */
    .admin-item {
        padding: .85rem .9rem;
    }

    .admin-item h4 {
        font-size: .72rem;
    }

    .admin-item p {
        font-size: .76rem;
    }

    /* ─── Schedule table: minimal column widths ─── */
    .schedule-table {
        font-size: .65rem;
    }

    .schedule-table th,
    .schedule-table td {
        padding: .5rem .25rem;
    }

    /* ─── Enroll button: as small as readable ─── */
    .enroll-btn {
        font-size: .58rem;
        padding: .3rem .4rem;
        letter-spacing: 0;
    }

    /* ─── Share grid: stack to single column ─── */
    .share-grid {
        grid-template-columns: 1fr;
    }

    /* ─── Related grid: always single column ─── */
    .related-grid {
        grid-template-columns: 1fr;
    }

    /* ─── Quick links: full width comfortable tap ─── */
    .quick-link-btn {
        font-size: .74rem;
        padding: .8rem .75rem;
    }

    /* ─── Schedule card body: less padding ─── */
    .schedule-card-body {
        padding: .9rem .85rem;
    }

    /* ─── Schedule tabs: shrink text ─── */
    .schedule-tab {
        font-size: .68rem;
        padding: .45rem .35rem;
    }

    /* ─── Participants table: minimal ─── */
    .participants-table th,
    .participants-table td {
        padding: .4rem .4rem;
        font-size: .65rem;
    }

    /* ─── Breadcrumb: very compact ─── */
    .breadcrumb {
        font-size: .65rem;
        padding: .6rem 0;
    }

    /* ─── Mobile FAB: smaller on tiny screens ─── */
    .mobile-register-btn {
        font-size: .75rem;
        padding: .75rem 1.5rem;
        bottom: 1rem;
    }

    /* ─── Section titles: readable but compact ─── */
    .section-title {
        font-size: 1rem !important;
    }

    /* ─── Prose: slightly smaller ─── */
    .prose {
        font-size: .82rem;
    }
}