/* =====================================================================
   JGU Course Index - site stylesheet
   One file for every page. Loaded from header.php.
   Page-specific rules are scoped with a class on <body>:
     page-home      -> academics/index.php
     page-semester  -> <semester>/index.php
     page-elective  -> spring2027/elective.php
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Header (all pages)
   --------------------------------------------------------------------- */
  /* ===== Site header ===== */
  .jg-header{
    font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    position:relative; color:#1b2433;
    background:
      radial-gradient(600px 160px at 100% 0%, rgba(201,162,75,.12), transparent 70%),
      linear-gradient(180deg, #ffffff 0%, #fbfaf6 100%);
    box-shadow:0 6px 24px rgba(13,44,84,.08);
  }
  /* thin navy -> gold accent strip on top */
  .jg-header::before{
    content:""; display:block; height:4px;
    background:linear-gradient(90deg, #0d2c54 0%, #163d6e 45%, #c9a24b 100%);
  }
  .jg-header *{ box-sizing:border-box; }

  .jg-header-row{ display:flex; align-items:center; justify-content:space-between; gap:24px; min-height:96px; flex-wrap:wrap; padding:14px 0; }

  /* Logo + title */
  .jg-brand{ display:flex; align-items:center; gap:20px; text-decoration:none !important; flex:none; }
  .jg-brand img{ max-height:62px; max-width:100%; width:auto; height:auto; display:block; transition:transform .25s; }
  .jg-brand:hover img{ transform:scale(1.03); }
  .jg-brand-text{ border-left:2px solid #e8dcc0; padding-left:20px; }
  .jg-brand-title{
    font-family:'Playfair Display', Georgia, serif; font-size:21px; font-weight:700;
    color:#0d2c54; line-height:1.15; margin:0;
  }
  .jg-brand-sub{
    display:inline-block; margin-top:6px; font-size:11px; font-weight:600; letter-spacing:.12em;
    text-transform:uppercase; color:#8a6a22; background:#f6efdd; padding:3px 10px; border-radius:999px;
  }

  /* Contact info */
  .jg-info{ display:flex; align-items:center; gap:30px; flex-wrap:wrap; margin-left:auto; }
  .jg-item{ display:flex; align-items:center; gap:12px; text-decoration:none !important; }
  .jg-ico{
    flex:none; width:42px; height:42px; border-radius:12px;
    display:inline-flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg, #163d6e, #0d2c54); color:#e6c87c;
    box-shadow:0 6px 14px rgba(13,44,84,.18); transition:transform .2s, box-shadow .2s;
  }
  .jg-ico svg{ display:block; }
  .jg-item:hover .jg-ico{ transform:translateY(-2px); box-shadow:0 10px 20px rgba(13,44,84,.25); }
  .jg-label{ display:block; font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#a7802c; margin-bottom:2px; }
  .jg-value{ display:block; font-size:14px; font-weight:500; color:#0d2c54; line-height:1.45; }
  a.jg-item .jg-value{ transition:color .15s; }
  a.jg-item:hover .jg-value{ color:#a7802c; }
  .jg-address .jg-value{ max-width:300px; }

  @media (max-width: 991px){
    .jg-brand-text{ display:none; }
    .jg-info{ gap:20px; }
  }
  @media (max-width: 767px){
    .jg-header-row{ flex-direction:column; text-align:center; min-height:0; gap:16px; padding:18px 0; }
    .jg-brand img{ max-height:48px; margin:0 auto; }
    .jg-info{ flex-direction:column; align-items:flex-start; gap:12px; margin:0 auto; }
    .jg-item{ text-align:left; }
    .jg-ico{ width:36px; height:36px; border-radius:10px; }
    .jg-value{ font-size:13px; }
  }

/* ---------------------------------------------------------------------
   2. Footer (all pages)
   --------------------------------------------------------------------- */
  /* ===== Site footer ===== */
  .jg-footer{
    font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    position:relative; margin-top:40px; color:rgba(255,255,255,.75);
    background:
      radial-gradient(600px 200px at 0% 0%, rgba(201,162,75,.16), transparent 70%),
      linear-gradient(135deg, #0b2547 0%, #0d2c54 55%, #163d6e 100%);
  }
  /* gold -> navy accent strip on top (mirrors the header) */
  .jg-footer::before{
    content:""; display:block; height:4px;
    background:linear-gradient(90deg, #c9a24b 0%, #163d6e 55%, #0d2c54 100%);
  }
  .jg-footer *{ box-sizing:border-box; }

  .jg-footer-top{ display:flex; align-items:center; justify-content:space-between; gap:28px; flex-wrap:wrap; padding:34px 0 28px; }

  .jg-f-brand-title{
    font-family:'Playfair Display', Georgia, serif; font-size:22px; font-weight:700;
    color:#fff; line-height:1.25; margin:0;
  }
  .jg-f-brand-title span{ color:#e6c87c; }
  .jg-f-brand-sub{ font-size:13px; color:rgba(255,255,255,.6); margin:6px 0 0; }

  .jg-f-info{ display:flex; align-items:center; gap:30px; flex-wrap:wrap; }
  .jg-f-item{ display:flex; align-items:center; gap:12px; text-decoration:none !important; }
  .jg-f-ico{
    flex:none; width:40px; height:40px; border-radius:12px;
    display:inline-flex; align-items:center; justify-content:center;
    background:rgba(201,162,75,.15); border:1px solid rgba(201,162,75,.35); color:#e6c87c;
    transition:background .2s, transform .2s;
  }
  .jg-f-ico svg{ display:block; }
  .jg-f-item:hover .jg-f-ico{ background:rgba(201,162,75,.28); transform:translateY(-2px); }
  .jg-f-label{ display:block; font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#c9a24b; margin-bottom:2px; }
  .jg-f-value{ display:block; font-size:14px; color:rgba(255,255,255,.88); line-height:1.45; transition:color .15s; }
  a.jg-f-item:hover .jg-f-value{ color:#e6c87c; }
  .jg-f-address .jg-f-value{ max-width:300px; }

  .jg-footer-bottom{ border-top:1px solid rgba(255,255,255,.1); padding:16px 0; }
  .jg-footer-bottom-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
  .jg-footer-bottom p{ margin:0; font-size:13px; color:rgba(255,255,255,.6); }
  .jg-counter{
    display:inline-flex; align-items:center; gap:10px;
    background:rgba(255,255,255,.06); border:1px solid rgba(201,162,75,.35);
    border-radius:999px; padding:5px 6px 5px 14px;
  }
  .jg-counter-ico{ color:#e6c87c; display:inline-flex; }
  .jg-counter-ico svg{ display:block; }
  .jg-counter-label{ font-size:11px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:#e6c87c; }
  .jg-counter-num{
    display:inline-flex; align-items:center; background:#fff; border-radius:999px; padding:6px 12px;
  }
  /* counter image is a tiny 9px-tall pixel image: show it at exactly 2x and keep pixels sharp */
  .jg-counter-num img{
    height:18px; width:auto; display:block;
    image-rendering:pixelated; image-rendering:crisp-edges; -ms-interpolation-mode:nearest-neighbor;
  }

  @media (max-width: 767px){
    .jg-footer-top{ flex-direction:column; align-items:center; text-align:center; padding:28px 0 22px; gap:20px; }
    .jg-f-info{ flex-direction:column; align-items:flex-start; gap:12px; }
    .jg-f-item{ text-align:left; }
    .jg-f-value{ font-size:13px; }
    .jg-footer-bottom-row{ justify-content:center; text-align:center; }
  }

/* ---------------------------------------------------------------------
   3. Home page (academics/index.php) - body.page-home
   --------------------------------------------------------------------- */
  body.page-home{ background:#f4f6fa !important; }
  .hp-page{ font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color:#1b2433; padding-bottom:60px; }
  .hp-page *{ box-sizing:border-box; }

  /* ---------- Banner ---------- */
  .hp-hero{
    position:relative; overflow:hidden; color:#fff; text-align:center;
    background:
      radial-gradient(800px 360px at 85% -20%, rgba(201,162,75,.35), transparent 60%),
      radial-gradient(600px 300px at -10% 120%, rgba(255,255,255,.08), transparent 60%),
      linear-gradient(135deg, #0d2c54 0%, #163d6e 100%);
    padding:64px 0 70px;
  }
  .hp-hero::after{
    content:""; position:absolute; inset:0; pointer-events:none;
    background-image:radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size:22px 22px;
  }
  .hp-hero .container{ position:relative; z-index:1; }
  .hp-eyebrow{
    display:inline-block; background:rgba(201,162,75,.18); border:1px solid rgba(201,162,75,.45);
    color:#f3d99a; font-size:12px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
    padding:6px 14px; border-radius:999px; margin-bottom:18px;
  }
  .hp-hero h1{
    font-family:'Playfair Display', Georgia, serif; font-weight:700; color:#fff;
    font-size:clamp(28px, 4.4vw, 46px); line-height:1.15; margin:0 auto 16px; max-width:820px; border:0; padding:0;
  }
  .hp-hero p{ font-size:16px; line-height:1.7; color:rgba(255,255,255,.78); margin:0 auto 30px; max-width:700px; }

  .hp-cta{
    position:relative; overflow:hidden;
    display:inline-flex; align-items:center; gap:16px;
    background:linear-gradient(135deg, #e6c87c 0%, #c9a24b 55%, #b48a35 100%);
    color:#1b1405 !important; text-decoration:none !important;
    padding:28px 64px; border-radius:20px; font-size:26px; font-weight:800; min-width:420px; justify-content:center;
    border:2px solid rgba(255,255,255,.55);
    box-shadow:0 0 0 6px rgba(201,162,75,.22), 0 18px 40px rgba(201,162,75,.45);
    animation:hpGlow 2.4s ease-in-out infinite;
    transition:transform .2s, box-shadow .2s;
  }
  /* light sweep across the button */
  .hp-cta::after{
    content:""; position:absolute; top:0; bottom:0; left:-60%; width:40%;
    background:linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    transform:skewX(-20deg); animation:hpShine 3.2s ease-in-out infinite;
  }
  .hp-cta small{
    font-size:13px; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
    background:#0d2c54; color:#e6c87c; padding:6px 13px; border-radius:999px;
  }
  .hp-cta svg{ display:block; transition:transform .2s; }
  .hp-cta:hover{ transform:translateY(-3px) scale(1.02); box-shadow:0 0 0 8px rgba(201,162,75,.28), 0 22px 46px rgba(201,162,75,.55); }
  .hp-cta:hover svg{ transform:translateX(5px); }

  @keyframes hpGlow{
    0%,100%{ box-shadow:0 0 0 6px rgba(201,162,75,.22), 0 18px 40px rgba(201,162,75,.45); }
    50%    { box-shadow:0 0 0 14px rgba(201,162,75,.08), 0 18px 48px rgba(201,162,75,.6); }
  }
  @keyframes hpShine{
    0%{ left:-60%; } 55%,100%{ left:130%; }
  }
  @media (prefers-reduced-motion: reduce){
    .hp-cta, .hp-cta::after{ animation:none; }
  }

  /* ---------- Previous semesters ---------- */
  .hp-prev{
    position:relative; z-index:2; margin:-34px auto 0; max-width:980px;
    background:#fff; border-radius:18px; padding:28px 30px 30px;
    box-shadow:0 14px 40px rgba(13,44,84,.10), 0 2px 6px rgba(13,44,84,.04);
  }
  .hp-prev-head{ display:flex; align-items:center; gap:14px; margin-bottom:20px; }
  .hp-prev-head h2{
    display:inline-flex; align-items:center; gap:10px; margin:0; white-space:nowrap;
    font-family:'Playfair Display', Georgia, serif; font-size:22px; font-weight:700; color:#fff;
    background:linear-gradient(135deg, #163d6e, #0d2c54);
    padding:10px 22px 10px 18px; border-radius:12px;
    border-left:5px solid #c9a24b;
    box-shadow:0 8px 20px rgba(13,44,84,.18);
  }
  .hp-prev-head h2::before{ content:""; width:8px; height:8px; border-radius:50%; background:#e6c87c; }
  .hp-prev-line{ flex:1; height:2px; border-radius:2px; background:linear-gradient(90deg, #c9a24b, rgba(201,162,75,0)); }

  .hp-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:16px; }
  .hp-chip{
    display:flex; align-items:center; justify-content:center; text-align:center;
    padding:26px 16px; min-height:84px; border-radius:14px;
    background:#fff; border:1px solid #e1e5ec;
    color:#0d2c54 !important; text-decoration:none !important;
    font-size:19px; font-weight:600;
    box-shadow:0 4px 12px rgba(13,44,84,.08), 0 1px 3px rgba(13,44,84,.06);
    transition:background .15s, border-color .15s, color .15s, box-shadow .2s;
  }
  .hp-chip:hover{
    background:#0d2c54; border-color:#0d2c54; color:#fff !important;
    box-shadow:0 10px 24px rgba(13,44,84,.22);
  }

  /* never allow sideways scrolling */
  body.page-home{ max-width:100%; overflow-x:hidden; }
  .hp-page img, .hp-page svg{ max-width:100%; }

  /* ---------- Tablet (768px – 991px) ---------- */
  @media (min-width: 768px) and (max-width: 991px){
    .hp-hero{ padding:54px 0 64px; }
    .hp-hero h1{ font-size:36px; max-width:640px; }
    .hp-hero p{ max-width:600px; }
    .hp-cta{ padding:24px 48px; font-size:23px; min-width:380px; }
    .hp-prev{ padding:26px 24px 28px; }
    .hp-list{ grid-template-columns:repeat(3, minmax(0,1fr)); gap:14px; }
    .hp-chip{ font-size:18px; min-height:78px; }
  }

  /* ---------- Mobile (up to 767px) ---------- */
  @media (max-width: 767px){
    .hp-page{ padding-bottom:40px; }
    .hp-hero{ padding:40px 0 58px; }
    .hp-eyebrow{ font-size:11px; letter-spacing:.08em; padding:5px 12px; margin-bottom:14px; }
    .hp-hero h1{ font-size:26px; line-height:1.2; }
    .hp-hero p{ font-size:15px; line-height:1.6; margin-bottom:26px; }

    /* button: pill on its own line, text + arrow below — nothing gets cut */
    .hp-cta{
      width:100%; min-width:0; flex-wrap:wrap; justify-content:center;
      padding:18px 16px 20px; font-size:20px; gap:8px 10px; border-radius:16px;
      box-shadow:0 0 0 4px rgba(201,162,75,.22), 0 12px 28px rgba(201,162,75,.4);
    }
    .hp-cta small{ flex-basis:100%; width:max-content; max-width:max-content; margin:0 auto 2px; font-size:11px; padding:4px 11px; }
    .hp-cta svg{ width:22px; height:22px; }
    @keyframes hpGlow{
      0%,100%{ box-shadow:0 0 0 4px rgba(201,162,75,.22), 0 12px 28px rgba(201,162,75,.4); }
      50%    { box-shadow:0 0 0 9px rgba(201,162,75,.08), 0 12px 32px rgba(201,162,75,.55); }
    }

    .hp-prev{ margin:-30px 0 0; padding:20px 14px 18px; border-radius:16px; }
    .hp-prev-head{ margin-bottom:16px; gap:10px; }
    .hp-prev-head h2{ font-size:18px; padding:8px 16px 8px 12px; border-left-width:4px; }
    .hp-list{ grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; }
    .hp-chip{ padding:18px 8px; min-height:66px; font-size:16px; border-radius:12px; }
  }

  /* ---------- Small phones (up to 399px) ---------- */
  @media (max-width: 399px){
    .hp-hero{ padding:32px 0 54px; }
    .hp-hero h1{ font-size:22px; }
    .hp-hero p{ font-size:14px; }
    .hp-cta{ font-size:18px; padding:16px 12px 18px; }
    .hp-prev{ padding:18px 10px 14px; }
    .hp-prev-head h2{ font-size:16px; padding:7px 12px 7px 10px; }
    .hp-prev-line{ display:none; }
    .hp-list{ gap:8px; }
    .hp-chip{ font-size:15px; padding:16px 6px; min-height:58px; }
  }

/* ---------------------------------------------------------------------
   4. Semester index pages (<semester>/index.php) - body.page-semester
   --------------------------------------------------------------------- */
  body.page-semester{ background:#f4f6fa !important; }

  /* Fit header + content + footer in one screen (no page scroll on desktop) */
  body.page-semester{ margin:0 !important; min-height:100vh; display:flex; flex-direction:column; }
  body.page-semester > .jg-header, body.page-semester > .jg-footer{ flex:none; }
  body.page-semester > .jg-footer{ margin-top:0 !important; }
  body.page-semester .jg-footer-top{ padding:18px 0 16px !important; }
  body.page-semester .jg-footer-bottom{ padding:10px 0 !important; }

  .ci-page{
    flex:1 0 auto; display:flex; align-items:center; justify-content:center;
    font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color:#1b2433;
    padding:24px 0;
    background:
      radial-gradient(700px 300px at 50% 0%, rgba(201,162,75,.10), transparent 70%),
      radial-gradient(rgba(13,44,84,.05) 1px, transparent 1px);
    background-size:auto, 22px 22px;
  }
  .ci-page *{ box-sizing:border-box; }
  .ci-page > .container{ width:100%; }

  .ci-box{
    position:relative; max-width:600px; margin:0 auto; background:#fff; border-radius:18px;
    box-shadow:0 14px 40px rgba(13,44,84,.10), 0 2px 6px rgba(13,44,84,.04);
    padding:30px 36px 28px; text-align:center; overflow:hidden;
  }
  .ci-box::before{
    content:""; position:absolute; left:0; right:0; top:0; height:5px;
    background:linear-gradient(90deg, #0d2c54 0%, #163d6e 45%, #c9a24b 100%);
  }

  .ci-icon{
    width:52px; height:52px; margin:0 auto 14px; border-radius:14px;
    display:flex; align-items:center; justify-content:center;
    background:linear-gradient(135deg, #163d6e, #0d2c54); color:#e6c87c;
    box-shadow:0 10px 24px rgba(13,44,84,.22);
  }
  .ci-icon svg{ display:block; }

  .ci-tag{
    display:inline-block; background:#f6efdd; color:#8a6a22; font-size:12px; font-weight:600;
    letter-spacing:.12em; text-transform:uppercase; padding:5px 12px; border-radius:999px; margin-bottom:12px;
  }
  .ci-box h1{
    font-family:'Playfair Display', Georgia, serif; font-size:clamp(22px, 3vw, 28px); font-weight:700;
    color:#0d2c54; line-height:1.3; margin:0 auto 12px; max-width:480px; border:0; padding:0;
  }
  .ci-box h1 span{ color:#a7802c; white-space:nowrap; }
  .ci-divider{ width:48px; height:3px; border-radius:3px; background:#c9a24b; margin:0 auto 14px; }
  .ci-box p{ font-size:15px; line-height:1.6; color:#6b7588; margin:0 auto; max-width:520px; }

  .ci-proceed{ margin-top:18px; padding-top:18px; border-top:1px dashed #e6e9f0; }
  .ci-proceed small{ display:block; font-size:13px; color:#6b7588; margin-bottom:12px; }

  .ci-btn{
    display:inline-flex; align-items:center; gap:10px;
    background:linear-gradient(135deg, #163d6e, #0d2c54); color:#fff !important; text-decoration:none !important;
    padding:12px 28px; border-radius:11px; font-size:15px; font-weight:600;
    box-shadow:0 10px 24px rgba(13,44,84,.22); transition:transform .2s, box-shadow .2s;
  }
  .ci-btns{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }
  .ci-btn svg{ display:block; transition:transform .2s; }
  .ci-btn:hover{ transform:translateY(-2px); box-shadow:0 14px 30px rgba(13,44,84,.3); }
  .ci-btn:hover svg.ci-arrow{ transform:translateX(4px); }

  /* Shorter laptop screens: tighten further so everything still fits */
  @media (min-width: 768px) and (max-height: 760px){
    body.page-semester .jg-header-row{ min-height:0 !important; padding:8px 0 !important; }
    body.page-semester .jg-brand img{ max-height:50px !important; }
    .ci-page{ padding:14px 0; }
    .ci-box{ padding:22px 32px 20px; }
    .ci-icon{ display:none; }
    .ci-tag{ margin-bottom:8px; }
    .ci-box h1{ font-size:24px; margin-bottom:10px; }
    .ci-divider{ margin-bottom:10px; }
    .ci-proceed{ margin-top:14px; padding-top:14px; }
    .ci-proceed small{ margin-bottom:10px; }
  }

  @media (max-width: 767px){
    .ci-page{ padding:24px 16px; }
    .ci-box{ padding:30px 20px 26px; }
    .ci-icon{ width:48px; height:48px; border-radius:13px; }
    .ci-btn{ width:100%; justify-content:center; }
  }

/* ---------------------------------------------------------------------
   5. Elective course list (elective.php) - body.page-elective
   --------------------------------------------------------------------- */
  :root{
    --ec-navy:#0d2c54;
    --ec-navy-2:#163d6e;
    --ec-gold:#c9a24b;
    --ec-gold-soft:#f6efdd;
    --ec-bg:#f4f6fa;
    --ec-card:#ffffff;
    --ec-text:#1b2433;
    --ec-muted:#6b7588;
    --ec-line:#e6e9f0;
    --ec-green:#1f8a5b;
    --ec-green-soft:#e5f5ee;
    --ec-red:#d64545;
    --ec-red-soft:#fdeceb;
    --ec-radius:16px;
    --ec-shadow:0 10px 30px rgba(13,44,84,.08), 0 2px 6px rgba(13,44,84,.04);
  }

  body.page-elective{ background:var(--ec-bg) !important; }

  .ec-page{ font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color:var(--ec-text); padding-bottom:60px; }
  .ec-page *{ box-sizing:border-box; }

  /* ---------- Hero banner ---------- */
  .ec-hero{
    position:relative; overflow:hidden;
    background:
      radial-gradient(900px 400px at 85% -10%, rgba(201,162,75,.35), transparent 60%),
      radial-gradient(700px 300px at -10% 110%, rgba(255,255,255,.08), transparent 60%),
      linear-gradient(135deg, var(--ec-navy) 0%, var(--ec-navy-2) 100%);
    color:#fff; padding:64px 0 120px;
  }
  .ec-hero::after{
    content:""; position:absolute; inset:0;
    background-image:radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
    background-size:22px 22px; pointer-events:none;
  }
  .ec-hero .container{ position:relative; z-index:1; }
  .ec-breadcrumb{ font-size:13px; letter-spacing:.04em; color:rgba(255,255,255,.7); margin-bottom:18px; }
  .ec-breadcrumb a{ color:rgba(255,255,255,.85); text-decoration:none; }
  .ec-breadcrumb a:hover{ color:var(--ec-gold); }
  .ec-breadcrumb .sep{ margin:0 8px; opacity:.5; }
  .ec-eyebrow{
    display:inline-flex; align-items:center; gap:8px;
    background:rgba(201,162,75,.18); border:1px solid rgba(201,162,75,.45);
    color:#f3d99a; font-size:12px; font-weight:600; letter-spacing:.12em; text-transform:uppercase;
    padding:6px 14px; border-radius:999px; margin-bottom:18px;
  }
  .ec-hero h1{
    font-family:'Playfair Display', Georgia, serif; font-weight:700;
    font-size:clamp(32px, 5vw, 52px); line-height:1.1; margin:0 0 14px; color:#fff;
    border:0; padding:0;
  }
  .ec-hero p.ec-lead{ font-size:17px; line-height:1.6; color:rgba(255,255,255,.8); max-width:640px; margin:0; }

  /* ---------- Table card (overlaps the bottom of the banner) ---------- */
  .ec-card{
    position:relative; z-index:2;
    background:var(--ec-card); border-radius:var(--ec-radius); box-shadow:var(--ec-shadow);
    margin-top:-72px; border:1px solid rgba(13,44,84,.04); overflow:hidden;
  }
  .ec-card-head{
    display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
    padding:22px 28px; border-bottom:1px solid var(--ec-line);
  }
  .ec-card-head h2{ font-size:19px; font-weight:700; margin:0; color:var(--ec-navy); font-family:'Inter', sans-serif; }
  .ec-card-head span{ font-size:13px; color:var(--ec-muted); }
  .ec-card-body{ padding:8px 28px 24px; }

  /* Inline SVG icons */
  .ec-page .ec-ico{ display:inline-block; vertical-align:-2px; flex:none; }
  .ec-breadcrumb a{ display:inline-flex; align-items:center; gap:6px; }
  .ec-hint{ display:inline-flex; align-items:center; gap:6px; }

  /* DataTables controls - own layout from site.js:  .ec-dt-top [length | search]  table  .ec-dt-bottom [info | pages] */
  /* DataTables adds "form-inline"; Bootstrap 4 turns that into display:flex, which shrinks the
     controls row and lets the table grow wider than the card on phones. Keep it a normal block. */
  .ec-page .dataTables_wrapper{ display:block !important; font-size:14px; width:100%; max-width:100%; }
  .ec-page .dataTables_wrapper > *{ width:100%; max-width:100%; }
  .ec-page .ec-dt-top,
  .ec-page .ec-dt-bottom{ display:flex; align-items:center; justify-content:space-between; gap:12px 20px; flex-wrap:wrap; }
  .ec-page .ec-dt-top{ padding:18px 0 14px; }
  .ec-page .ec-dt-bottom{ padding:18px 0 4px; }
  .ec-page .dataTables_length,
  .ec-page .dataTables_filter,
  .ec-page .dataTables_info,
  .ec-page .dataTables_paginate{ float:none !important; width:auto !important; margin:0 !important; padding:0 !important; text-align:left !important; }
  .ec-page .dataTables_length label,
  .ec-page .dataTables_filter label{
    display:flex; align-items:center; gap:8px; margin:0; font-weight:500; font-size:14px; color:var(--ec-muted); white-space:nowrap;
  }
  .ec-page .dataTables_filter{ margin-left:auto !important; }
  .ec-page .dataTables_filter input,
  .ec-page .dataTables_length select{
    display:inline-block; height:42px !important; line-height:1.4 !important; margin:0 !important;
    border:1px solid var(--ec-line) !important; border-radius:10px !important; background-color:#f9fafc !important;
    font-size:14px !important; color:var(--ec-text) !important; outline:none; box-shadow:none;
    transition:border-color .15s, box-shadow .15s, background-color .15s;
  }
  .ec-page .dataTables_length select{ width:auto !important; min-width:78px; padding:0 30px 0 12px !important; cursor:pointer; }
  .ec-page .dataTables_filter input{
    width:300px !important; padding:0 14px 0 38px !important;
    background:#f9fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7588' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center !important;
  }
  .ec-page .dataTables_filter input:focus,
  .ec-page .dataTables_length select:focus{ border-color:var(--ec-gold) !important; background-color:#fff !important; box-shadow:0 0 0 4px rgba(201,162,75,.15); }
  .ec-page .dataTables_info{ color:var(--ec-muted); font-size:14px; }

  /* pagination: style only the links, never the <li> (avoids double borders) */
  .ec-page .dataTables_paginate .pagination{ display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; }
  .ec-page .dataTables_paginate .pagination > li{ display:block; float:none; margin:0; padding:0; border:0 !important; background:none !important; }
  .ec-page .dataTables_paginate .pagination > li > a,
  .ec-page .dataTables_paginate .pagination > li > span{
    display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; padding:0 14px;
    float:none; margin:0 !important; border:1px solid var(--ec-line) !important; border-radius:10px !important;
    background:#fff !important; color:var(--ec-navy) !important; font-weight:600; font-size:14px; line-height:1; text-decoration:none !important;
    transition:background .15s, border-color .15s;
  }
  .ec-page .dataTables_paginate .pagination > li > a:hover{ background:var(--ec-gold-soft) !important; border-color:var(--ec-gold) !important; }
  .ec-page .dataTables_paginate .pagination > .active > a,
  .ec-page .dataTables_paginate .pagination > .active > a:hover{ background:var(--ec-navy) !important; border-color:var(--ec-navy) !important; color:#fff !important; }
  .ec-page .dataTables_paginate .pagination > .disabled > a,
  .ec-page .dataTables_paginate .pagination > .disabled > a:hover{ opacity:.45; background:#fff !important; border-color:var(--ec-line) !important; cursor:default; }

  /* Table */
  .ec-table-wrap{ overflow-x:auto; }
  .ec-page table.ec-table{ width:100% !important; border-collapse:separate; border-spacing:0; margin:4px 0 0 !important; border:0; }
  .ec-page table.ec-table thead th{
    background:#f7f8fb; color:var(--ec-muted); font-size:12px; font-weight:600;
    text-transform:uppercase; letter-spacing:.06em; padding:14px 16px; border:0 !important;
    border-bottom:1px solid var(--ec-line) !important; white-space:nowrap; vertical-align:middle;
  }
  .ec-page table.ec-table thead th:first-child{ border-top-left-radius:12px; }
  .ec-page table.ec-table thead th:last-child{ border-top-right-radius:12px; }
  .ec-page table.ec-table tbody td{
    padding:16px; border:0 !important; border-bottom:1px solid var(--ec-line) !important;
    vertical-align:middle; color:var(--ec-text); background:#fff; transition:background .15s;
  }
  .ec-page table.ec-table tbody tr:hover td{ background:#fbf8f0; }
  .ec-page table.ec-table tbody tr:last-child td{ border-bottom:0 !important; }

  .ec-course{ font-weight:600; font-size:13px; color:var(--ec-navy); line-height:1.4; }
  .ec-instructor{ display:flex; align-items:center; gap:10px; color:#3a4456; font-size:13px; }
  .ec-avatar{
    width:34px; height:34px; border-radius:50%; flex:none;
    background:linear-gradient(135deg, var(--ec-navy-2), var(--ec-navy)); color:#fff;
    display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600;
  }
  .ec-school{
    display:inline-block; background:#eef2f9; color:var(--ec-navy-2);
    padding:4px 10px; border-radius:999px; font-size:11px; font-weight:600; letter-spacing:.02em;
  }
  .ec-credits{
    display:inline-flex; align-items:center; justify-content:center; min-width:34px; height:34px;
    border-radius:10px; background:var(--ec-gold-soft); color:#8a6a22; font-weight:700; font-size:13px;
  }
  .ec-badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:999px; font-size:12px; font-weight:600; }
  .ec-badge::before{ content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
  .ec-badge.yes{ background:var(--ec-green-soft); color:var(--ec-green); }
  .ec-badge.no{ background:#f1f3f7; color:#7b8496; }

  /* PDF / Video logo buttons */
  .ec-action{
    display:inline-flex; align-items:center; justify-content:center;
    width:48px; height:48px; border-radius:12px;
    background:#fff; border:1px solid var(--ec-line);
    text-decoration:none !important; box-shadow:0 2px 6px rgba(13,44,84,.05);
    transition:transform .15s, box-shadow .15s, border-color .15s;
  }
  .ec-action .ec-logo{ display:block; }
  .ec-action:hover{ transform:translateY(-2px); }
  .ec-action.pdf:hover{ border-color:#f3b4ad; box-shadow:0 8px 18px rgba(217,48,37,.18); }
  .ec-action.video:hover{ border-color:#f5b3b1; box-shadow:0 8px 18px rgba(229,57,53,.2); }
  .ec-action:focus-visible{ outline:3px solid rgba(201,162,75,.6); outline-offset:2px; }
  .ec-view{
    display:inline-flex; align-items:center; gap:6px; white-space:nowrap;
    padding:7px 14px; border-radius:10px; font-size:12px; font-weight:600;
    background:#fff; color:var(--ec-navy) !important; border:1px solid var(--ec-line);
    text-decoration:none !important; box-shadow:0 2px 6px rgba(13,44,84,.05);
    transition:transform .15s, box-shadow .15s, border-color .15s;
  }
  .ec-view:hover{ transform:translateY(-2px); border-color:var(--ec-gold, #c9a24b); box-shadow:0 8px 18px rgba(13,44,84,.12); }
  .ec-view:focus-visible{ outline:3px solid rgba(201,162,75,.6); outline-offset:2px; }
  .ec-na{ color:#b3bac7; font-size:13px; }
  .ec-center{ text-align:center; }

  .ec-empty{ text-align:center; padding:60px 20px; color:var(--ec-muted); }
  .ec-empty .ec-ico{ display:block; margin:0 auto 14px; color:#c7cdd8; }

  /* sort arrows: the Glyphicons font does not load, so draw them with plain text */
  .ec-page table.ec-table thead th.sorting,
  .ec-page table.ec-table thead th.sorting_asc,
  .ec-page table.ec-table thead th.sorting_desc{ position:relative; padding-right:28px; cursor:pointer; }
  .ec-page table.ec-table thead th.sorting:after,
  .ec-page table.ec-table thead th.sorting_asc:after,
  .ec-page table.ec-table thead th.sorting_desc:after{
    position:absolute; right:10px; top:50%; bottom:auto; transform:translateY(-50%);
    font-family:inherit !important; font-size:12px; line-height:1; display:block;
  }
  .ec-page table.ec-table thead th.sorting:after{ content:"\2195" !important; opacity:.35; }
  .ec-page table.ec-table thead th.sorting_asc:after{ content:"\2191" !important; opacity:.9; color:var(--ec-navy); }
  .ec-page table.ec-table thead th.sorting_desc:after{ content:"\2193" !important; opacity:.9; color:var(--ec-navy); }
  .ec-page table.ec-table thead th.ec-center{ text-align:center; }

  /* ---------- Responsive ---------- */
  @media (max-width: 991px){
    .ec-card-body{ padding-left:20px; padding-right:20px; }
    .ec-page .dataTables_filter input{ width:240px !important; }
  }
  @media (max-width: 767px){
    .ec-hero{ padding:36px 0 96px; }
    .ec-hero h1{ font-size:30px; }
    .ec-hero p.ec-lead{ font-size:15px; }
    .ec-card{ margin-top:-64px; }
    .ec-card-head{ padding:16px; }
    .ec-card-body{ padding:0 14px 16px; }
    .ec-table-wrap{ overflow:visible; }

    /* controls stack: search full width on top, "show N" below */
    .ec-page .ec-dt-top{ flex-direction:column-reverse; align-items:stretch; gap:10px; padding:14px 0 12px; }
    .ec-page .dataTables_filter{ margin-left:0 !important; }
    .ec-page .dataTables_filter label{ display:block; }
    .ec-page .dataTables_filter input{ width:100% !important; }
    .ec-page .ec-dt-bottom{ flex-direction:column; align-items:center; gap:12px; }
    .ec-page .dataTables_info{ text-align:center !important; }
  }

  /* Rows become cards on tablet + mobile (7 columns don't fit below 992px) */
  @media (max-width: 991px){
    /* DataTables' own CSS sets content-box on cells, which makes width:100% + padding overflow */
    .ec-page table.ec-table th, .ec-page table.ec-table td{ box-sizing:border-box !important; }
    .ec-hint{ display:none; }  /* column headers are hidden in card view, so "click a header to sort" doesn't apply */
    .ec-table-wrap{ overflow:visible; }
    .ec-page table.ec-table thead{ display:none; }
    .ec-page table.ec-table, .ec-page table.ec-table tbody, .ec-page table.ec-table tr, .ec-page table.ec-table td{ display:block; width:100% !important; max-width:100%; }
    .ec-page table.ec-table{ margin-top:0 !important; }
    .ec-page table.ec-table tbody tr{
      border:1px solid var(--ec-line); border-radius:14px; margin-bottom:14px; overflow:hidden;
      box-shadow:0 2px 8px rgba(13,44,84,.04);
    }
    .ec-page table.ec-table tbody td{
      display:flex; justify-content:space-between; align-items:center; gap:14px;
      text-align:right; padding:12px 16px;
    }
    .ec-page table.ec-table tbody td::before{
      content:attr(data-label); font-size:11px; font-weight:600; text-transform:uppercase;
      letter-spacing:.06em; color:var(--ec-muted); text-align:left; flex:none;
    }
    .ec-page table.ec-table tbody td:first-child{ background:#f7f8fb; }
    .ec-page table.ec-table tbody tr:last-child td{ border-bottom:1px solid var(--ec-line) !important; }
    .ec-page table.ec-table tbody td:last-child{ border-bottom:0 !important; }
    .ec-page table.ec-table tbody td > *{ min-width:0; }
    /* small badges/buttons keep their natural size (don't get squeezed) */
    .ec-page table.ec-table tbody td > .ec-credits,
    .ec-page table.ec-table tbody td > .ec-badge,
    .ec-page table.ec-table tbody td > .ec-school,
    .ec-page table.ec-table tbody td > .ec-action,
    .ec-page table.ec-table tbody td > .ec-na{ flex:none; }
    .ec-page table.ec-table tbody td > .ec-credits{ min-width:38px; }
    .ec-instructor{ justify-content:flex-end; text-align:right; }
    .ec-course{ text-align:right; }
  }
