:root {
  --gap: 16px;         /* space between cards */
  --rowpad: 16px;      /* left/right padding inside the row track */
  --card-w: 295px;     /* card width (desktop) */
  --card-h: 320px;     /* card height (desktop) */
  --img-ratio: 16/9;   /* top image aspect ratio */
}

/* ================================================================
   COURSE ROWS — Centered Track, Left-Aligned Cards
================================================================ */
.row-scroller {
  position: relative;
  max-width: calc((4 * var(--card-w)) + (3 * var(--gap)) + (2 * var(--rowpad)));
  margin: 0 auto; /* centers the whole track */
}

.cards-wrapper {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: var(--gap);
  padding: 0 var(--rowpad);
  justify-content: flex-start;
  align-items: stretch;
}

.cards-wrapper .card {
  box-sizing: border-box !important;
  flex: 0 0 var(--card-w) !important;
  max-width: var(--card-w) !important;
  height: var(--card-h);
  display: flex;
  flex-direction: column;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
}

.card .card-image {
  width: 100%;
  aspect-ratio: var(--img-ratio);
  min-height: 120px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #cfd8ff, #b1bfff);
}

.card .card-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card .card-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.card .card-description {
  color: #5b6b7a;
  font-size: 12.5px;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.card .card-footer {
  margin-top: auto;
  padding: 10px 12px 12px;
  border-top: 1px solid #f0f2f5;
  display: flex;
  justify-content: space-between;
}

.scroll-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: none;
  z-index: 3;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.scroll-button.left { left: 4px; }
.scroll-button.right { right: 4px; }

/* --------------------- RESPONSIVE --------------------- */
@media (max-width: 1280px) {
  :root { --card-w: 200px; --card-h: 310px; }
}

@media (max-width: 1024px) {
  :root { --card-w: 180px; --card-h: 300px; }
}

@media (max-width: 800px) {
  :root { --card-w: 160px; --card-h: 290px; }
}

@media (max-width: 640px) {
  :root { --card-w: 48vw; --card-h: 300px; } /* 2-up on phones */
  .row-scroller { max-width: 100%; }
  .scroll-button { display: none !important; }
}

/* ================================================================
   HERO SLIDER (Single Image)
================================================================ */
#hero-one {
  max-width: 1300px;
  margin: 20px auto 24px; /* Added 40px top margin for spacing under header */
  padding: 0 16px;
}

#hero-one .hero-slide {
  position: relative !important;
  display: none !important;
}

#hero-one .hero-slide[aria-current="true"] {
  display: block !important;
  animation: heroOneFade 0.6s ease;
}

#hero-one .hero-slide img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 14px !important;
  object-fit: cover !important;
  aspect-ratio: 16 / 9 !important;
}

/* Overlay caption */
#hero-one .hero-caption {
  position: absolute !important;
  left: 24px !important;
  bottom: 24px !important;
  max-width: min(480px, 80%);
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(17,24,39,0.65);
  color: #fff;
  backdrop-filter: blur(2px);
}

#hero-one .hero-caption h2 {
  margin: 0 0 6px;
  font-size: clamp(18px, 2.6vw, px);
  line-height: 1.2;
  font-weight: 700;
}

#hero-one .hero-caption p {
  margin: 0 0 10px;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.35;
  opacity: 0.95;
}

#hero-one .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #2a4ac7;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.06);
}

#hero-one .hero-btn:hover {
  filter: brightness(0.95);
}

/* Dots */
#hero-one .hero-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

#hero-one .hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  background: #d1d5db;
  cursor: pointer;
}

#hero-one .hero-dot.active {
  background: #2a4ac7;
}

@keyframes heroOneFade {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* --------------------- Responsive tweaks --------------------- */
@media (max-width: 900px) {
  #hero-one .hero-caption {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: unset;
  }
}

@media (max-width: 640px) {
  #hero-one { padding: 0 12px; }
  #hero-one .hero-slide img { aspect-ratio: 16 / 10 !important; }
}

/* ================================================================
   SAFETY OVERRIDES VS OLD SLIDER
================================================================ */
.slideshow-container { /* Leave untouched for legacy parts */ }

#hero-one *[class*="mySlider"],
#hero-one *[class*="mySlides"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
}

/* ================================================================
   FIXED: SIX CARDS PER ROW LAYOUT (no partials)
================================================================ */
.cards-wrapper.six-per-row {
  flex-wrap: wrap !important;
  overflow-x: visible !important;
  gap: var(--gap);
  padding: 0 var(--rowpad);
}

.cards-wrapper.six-per-row .card {
  flex: 0 0 calc((100% - (5 * var(--gap))) / 5) !important;
  max-width: calc((100% - (5 * var(--gap))) / 5) !important;
  height: var(--card-h);
}

/* Responsive: 4, 3, then 2 per row */
@media (max-width: 1200px) {
  .cards-wrapper.six-per-row .card {
    flex-basis: calc((100% - (4 * var(--gap))) / 4) !important;
    max-width: calc((100% - (4 * var(--gap))) / 4) !important;
  }
}

@media (max-width: 900px) {
  .cards-wrapper.six-per-row .card {
    flex-basis: calc((100% - (2 * var(--gap))) / 3) !important;
    max-width: calc((100% - (2 * var(--gap))) / 3) !important;
  }
}

@media (max-width: 640px) {
  .cards-wrapper.six-per-row .card {
    flex-basis: calc((100% - (1 * var(--gap))) / 2) !important;
    max-width: calc((100% - (1 * var(--gap))) / 2) !important;
  }
}

.row-scroller.six-per-row {
  max-width: 1200px;
  margin: 0 auto;
}

html, body { margin: 0; }

.mainnavdiv + #hero-one{
  padding-top: 24px;          /* adjust 16–40px as you like */
  margin-top: 0 !important;
  border-top: 1px solid transparent; /* breaks margin collapse */
  display: flow-root;                 /* also breaks margin collapse */
}

/* ================== SPACING + SEPARATORS (FORCE APPLY) ================== */

/* Gap between the yellow navbar and the banner (covers both hero IDs/classes) */
.mainnavdiv { border-bottom: 1px solid transparent; }  /* prevents margin collapse */
#hero-one,
.slideshow-container {
  margin-top: 40px !important;      /* visible gap below navbar */
  padding-top: 20px;                  /* extra breathing room inside hero */
  display: flow-root;                /* also breaks margin collapse */
}

/* Space above and below section titles (catch most headings used on the page) */
.section-title,
.row-title,
.courses-title,
.home-courses h2,
.home-courses h3,
h2.section-title,
h3.section-title,
h2, h3 {
  margin-top: 28px !important;
  margin-bottom: 14px !important;
}

/* Space after each row of cards + light separator line */
.row-scroller,
.cards-wrapper.six-per-row {
  margin-bottom: 44px !important;    /* gap after each card row */
  padding-bottom: 22px !important;   /* space before the line */
  border-bottom: 1px solid #e5e7eb !important; /* subtle separator */
}

/* Optional: a little more breathing room inside cards */
.cards-wrapper .card .card-content { gap: 0px; }

/* ================== SPACE BETWEEN TITLES AND CARDS ================== */

/* Adds consistent spacing below each title before the cards start */
.section-title,
.row-title,
.courses-title,
.home-courses h2,
.home-courses h3,
h2,
h3 {
  margin-bottom: 24px !important;  /* Adjust this value (20–40px) as desired */
}

/* Optional: add some breathing room above the title itself */
.section-title,
.row-title,
.courses-title,
.home-courses h2,
.home-courses h3,
h2,
h3 {
  margin-top: 32px !important;
}

/* Extra safety: ensure the card wrapper doesn’t collapse upward */
.cards-wrapper {
  margin-top: 20px !important;
}

/* ===== Lessons Sign-up banner ===== */
#lessons-signup {
  margin: 32px auto 24px;
  padding: 0 16px;
}

#lessons-signup .lessons-wrap {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(42,74,199,0.85), rgba(99,102,241,0.85)),
    url('/images/lesson-banner.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

#lessons-signup .lessons-copy h2 {
  margin: 0 0 6px;
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 800;
}

#lessons-signup .lessons-copy p {
  margin: 0 0 14px;
  font-size: clamp(14px, 1.6vw, 16px);
  opacity: 0.95;
}

/* form */
.lessons-form { display: grid; gap: 12px; }
.lessons-form .lf-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.lessons-form label { display: grid; gap: 6px; font-size: 13px; }
.lessons-form label span { opacity: 0.95; }

.lessons-form input,
.lessons-form select,
.lessons-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 10px 12px;
  background: rgba(255,255,255,0.12);
  color: #fff;
  outline: none;
}

.lessons-form input::placeholder,
.lessons-form textarea::placeholder { color: rgba(255,255,255,0.8); }

.lessons-form .lf-wide { grid-column: span 2; }

.lf-submit {
  align-self: end;
  height: 42px;
  border-radius: 10px;
  background: #ffcc00;
  color: #111827;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.lf-submit:hover { filter: brightness(0.95); }

.lf-success {
  margin: 4px 0 0;
  font-weight: 600;
}

/* responsive */
@media (max-width: 900px){
  .lessons-form .lf-row { grid-template-columns: 1fr 1fr; }
  .lessons-form .lf-wide { grid-column: 1 / -1; }
}
@media (max-width: 640px){
  #lessons-signup { padding: 0 12px; }
  .lessons-form .lf-row { grid-template-columns: 1fr; }
}

/* =========================================================
   RESPONSIVE GRID VIA CSS CUSTOM PROPS
   - No HTML/JS changes required
   - Works for every row (#row-*) since all use .row-scroller
========================================================= */

/* --- Base (Desktop XL: 1200px and above) --- */
:root{
  /* Track = max content width for rows & hero; can match your hero width */
  --track: 1200px;

  /* How many cards per visible row at this breakpoint */
  --cols: 4;

  /* Spacing tokens */
  --gap: 16px;
  --rowpad: 16px;

  /* Card sizing (width auto-computed from track & cols) */
  --card-w: calc(
    (min(100%, var(--track)) - (2 * var(--rowpad)) - ((var(--cols) - 1) * var(--gap)))
    / var(--cols)
  );
  --card-h: 320px;    /* default card height */
  --img-ratio: 16/9;  /* top image aspect ratio */

  /* Type scale baseline (you can tweak if you like) */
  --title-size: 16px;
  --desc-size: 13px;
  --tag-size: 12px;
}

/* --- Row container should size from the track, not from a fixed calc --- */
.row-scroller{
  position: relative;
  max-width: min(100%, var(--track));
  margin: 0 auto;
  padding: 0 var(--rowpad);
}

/* --- Scroller line --- */
.cards-wrapper{
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  gap: var(--gap);
  /* Ensure the row uses all available width within the track */
  width: 100%;
}

/* --- Card locks to the computed column width --- */
.card{
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  height: var(--card-h);
}

/* Image area respects ratio and shrinks gracefully */
.card-image{
  aspect-ratio: var(--img-ratio);
  width: 100%;
  border-radius: 10px 10px 0 0;
}

/* Tidy up inner type sizes via tokens */
.card-title{ font-size: var(--title-size); line-height: 1.25; }
.card-description{ font-size: var(--desc-size); opacity: .85; }
.card-tag{ font-size: var(--tag-size); }

/* Headings spacing above/below rows for breathing room */
.courses-in-row .heading_div{
  margin: 18px auto 10px;
  max-width: min(100%, var(--track));
  padding: 0 var(--rowpad);
}

/* Scroll buttons nudge inward on small viewports */
.scroll-button{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  z-index: 2;
}
.scroll-button.left{ left: 4px; }
.scroll-button.right{ right: 4px; }

/* ============================================
   BREAKPOINTS
   1) up to 900px  -> 3 columns
   2) up to 720px  -> 2 columns
   3) up to 360px  -> 1 column
=============================================== */

/* ≤900px (tablets) — 3 across */
@media (max-width: 900px){
  :root{
    --track: 900px;
    --cols: 3;
    --card-h: 300px;
    --title-size: 15px;
    --desc-size: 12.5px;
    --tag-size: 11.5px;
  }

  /* Slightly smaller arrows */
  .scroll-button{ width: 34px; height: 34px; }
}

/* ≤720px (large phones) — 2 across */
@media (max-width: 720px){
  :root{
    --track: 720px;
    --cols: 2;
    --card-h: 290px;
    --title-size: 15px;
    --desc-size: 12.5px;
    --tag-size: 11.5px;
  }

  /* Row heading spacing a touch tighter */
  .courses-in-row .heading_div{ margin: 16px auto 8px; }
  .scroll-button{ width: 32px; height: 32px; }
}

/* ≤360px (very small phones) — 1 across */
@media (max-width: 360px){
  :root{
    --track: 360px;
    --cols: 1;
    --card-h: 280px;
    --title-size: 14.5px;
    --desc-size: 12px;
    --tag-size: 11px;
  }
}

/* ============================================
   HERO and BANNER MINOR TUNING FOR BREAKPOINTS
=============================================== */

/* Hero caption scales down on smaller screens */
#hero-one .hero-caption h2{
  font-size: clamp(18px, 2.4vw, 28px);
}
#hero-one .hero-caption p{
  font-size: clamp(13px, 1.6vw, 16px);
}

/* Lessons sign-up banner is already responsive; tighten padding on small */
@media (max-width: 720px){
  #lessons-signup .lessons-wrap{ padding: 16px; }
}

/* Footer grid collapses earlier for comfort */
@media (max-width: 900px){
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px){
  .footer-inner { grid-template-columns: 1fr; }
}

/* ---------- GENERAL MOBILE TUNING ---------- */

/* Slightly tighter vertical rhythm under 720px */
@media (max-width: 720px){
  .courses-in-row .heading_div{ margin: 12px auto 6px; }
  .row-scroller{ padding: 0 12px; }
  :root{
    --gap: 12px;     /* smaller gutter on phones */
    --rowpad: 12px;
  }
}

/* On very small phones, even tighter */
@media (max-width: 360px){
  .row-scroller{ padding: 0 10px; }
  :root{
    --gap: 10px;
    --rowpad: 10px;
  }
}

/* Hide scroll arrows on phones — touch swipe is enough */
@media (max-width: 720px){
  .scroll-button{ display: none !important; }
}

/* Hero images scale better on small screens */
#hero-one .hero-slide img{
  width: 100%;
  height: clamp(160px, 38vw, 240px);
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- LESSONS SIGN-UP BANNER LAYOUT ---------- */
/* Make the banner a proper two-column (copy + form) on wide, 
   stack and center on tablet/phone, remove the big white zone */
#lessons-signup{ margin: 24px auto; padding: 0 16px; }

#lessons-signup .lessons-wrap{
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;     /* copy | form */
  gap: 20px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(42,74,199,0.85), rgba(99,102,241,0.85)),
    url('/images/lesson-banner.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

#lessons-signup .lessons-copy h2{
  margin: 0 0 6px;
  font-size: clamp(18px, 2.6vw, 28px);
  font-weight: 800;
}
#lessons-signup .lessons-copy p{ margin: 0; opacity: .95; }

/* Form fills its column; no narrow left-hugging */
.lessons-form{ width: 100%; display: grid; gap: 12px; }
.lessons-form .lf-row{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.lessons-form .lf-wide{ grid-column: span 2; }

/* Tablet: stack columns and center the content */
@media (max-width: 900px){
  #lessons-signup .lessons-wrap{
    grid-template-columns: 1fr;     /* single column */
    text-align: center;
    padding: 20px;
  }
  .lessons-form{ max-width: 560px; margin: 8px auto 0; }
  .lessons-form .lf-row{ grid-template-columns: 1fr 1fr; }
  .lessons-form .lf-wide{ grid-column: 1 / -1; }
}

/* Phones: full-width form */
@media (max-width: 720px){
  #lessons-signup{ padding: 0 12px; }
  #lessons-signup .lessons-wrap{ padding: 16px; }
  .lessons-form{ max-width: 100%; }
  .lessons-form .lf-row{ grid-template-columns: 1fr; }
}

/* ---------- NAV BAR SMALL FIX ---------- */
/* Keep the yellow search bar tidy on mobile */
@media (max-width: 720px){
  .navbar-wrapper .mainnavdiv{
    gap: 8px;
    padding: 6px 12px;
  }
  .InputContainer{ width: 100%; }
}

/* ---------- FOOTER TIGHTEN ON MOBILE ---------- */
@media (max-width: 720px){
  .site-footer{ margin-top: 24px; }
  .footer-inner{ padding: 20px 12px; }
}


/* LESSONS BANNER — ensure it uses the full row and centers on small screens */
#lessons-signup{ width:100%; max-width:none; }

#lessons-signup .lessons-wrap{
  width:100%;
  margin-left:auto; margin-right:auto;   /* hard-center */
}

/* Tablet & down: single column, no left hugging */
@media (max-width: 900px){
  #lessons-signup .lessons-wrap{
    display:block;           /* avoids odd grid shrink on some mobiles */
    padding:18px;            /* slightly tighter */
  }
  .lessons-form{ max-width:560px; margin:10px auto 0; }
}

/* Phones: truly edge-to-edge inside page padding */
@media (max-width: 720px){
  #lessons-signup{ padding:0 12px; }     /* match row padding */
  .lessons-form{ max-width:100%; }
}

/* ...your existing responsive CSS here... */

/* Phones: truly edge-to-edge inside page padding */
@media (max-width: 720px){
  #lessons-signup{ padding:0 12px; }
  .lessons-form{ max-width:100%; }
}

/* ---------- NEW SECTION: Tighter spacing + subtle dividers ---------- */
@media (max-width: 720px){
  .courses-in-row .heading_div{ margin:10px auto 6px; }
  .row-scroller{ padding:0 12px; }
  .scroll-button{ display:none !important; }  /* swipe instead of arrows */
}

/* Optional: a subtle divider under each row */
.courses-in-row + .courses-in-row{
  border-top:1px solid #eef1f6;
  padding-top:12px;
}

/* ===================================================================
   CTI x NIIT — Course Rows + Hero + Mobile Polish (2025-10-09)
   - Desktop: 6 cards per row inside a centered track
   - Short rows stay LEFT-aligned (no awkward centering)
   - Horizontal scroll when content exceeds track
   - Tablet: ~3 across; Mobile: ~2 visible (with a hard width cap)
   - Subtle mobile spacing rhythm; arrows hidden on phones
=================================================================== */

/* -------------------- ROOT TOKENS -------------------- */
:root{
  /* Layout width (desktop track) */
  --track: 1300px;

  /* Row math (default 4 cards on desktop) */
  --cols: 4;
  --gap: 16px;         /* space between cards */
  --rowpad: 16px;      /* left/right padding inside the row track */

  /* Perfect card width for chosen --track/--cols */
  --card-w: calc(
    (var(--track) - (2 * var(--rowpad)) - ((var(--cols) - 1) * var(--gap)))
    / var(--cols)
  );
  --card-h: 320px;     /* default card height (desktop) */
  --img-ratio: 16/9;   /* top image aspect ratio */
}

/* ==================== ROW SCROLLER (centered track) ==================== */
.row-scroller{
  position: relative;
  max-width: var(--track);
  margin: 0 auto;              /* centers the track on page */
  padding: 0 var(--rowpad);    /* inner left/right breathing room */
}

/* One horizontal line, LEFT-aligned inside the centered track */
.cards-wrapper{
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow-x: auto;            /* horizontal scroll when > track */
  overflow-y: hidden;
  gap: var(--gap);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;         /* avoid shadow clipping on iOS */
}

/* Optional: “strict” 4-per-row helper (grid-like), still scrollable if overflow */
.cards-wrapper.six-per-row .card{
  flex: 0 0 calc((100% - (4 * var(--gap))) / 4);
  max-width: calc((100% - (4 * var(--gap))) / 4);
}

/* ==================== CARD ==================== */
.card{
  flex: 0 0 var(--card-w);
  max-width: var(--card-w);
  height: var(--card-h);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(22,27,45,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top image band */
.card .img-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: var(--img-ratio);
  background: #6a44ff;               /* purple box placeholder */
  display: grid;
  place-items: center;
}
.card .img-wrap img{
  width: 100%;
  height: 100%;
  object-fit: cover;                  /* cover if an image exists */
  display: block;
}

/* Body */
.card .body{
  flex: 1 1 auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card .title{
  font: 600 16px/1.25 "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #171a1f;
  letter-spacing: 0.2px;
}
.card .desc{
  font: 400 13.5px/1.35 "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: #3a3f4b;
}
.card .meta{
  margin-top: auto;
  font: 500 12.5px/1.2 "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: #5b6477;
}

/* ==================== SECTION HEADERS / RHYTHM ==================== */
.courses-in-row .heading_div{
  max-width: var(--track);
  margin: 18px auto 10px;      /* space above/below title on desktop */
  padding: 0 var(--rowpad);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.courses-in-row .heading_div h3{
  font: 700 22px/1.25 "Oswald", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #111;
  letter-spacing: 0.2px;
}
.courses-in-row .heading_div .sub{
  font: 400 14px/1.3 "Roboto", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
  color: #596273;
}

/* Optional: divider between successive rows */
.courses-in-row + .courses-in-row{
  border-top: 1px solid #eef1f6;
  padding-top: 12px;
  margin-top: 12px;
}

/* ==================== NAV-HERO SEPARATION ==================== */
.navbar-wrapper{
  border-bottom: 1px solid #f3f4f7;   /* subtle anchor under yellow bar */
}
#hero-one, .hero-wrap, .hero-section{
  padding-top: 12px;                  /* avoid margin-collapse glitches */
}

/* ==================== SCROLL ARROWS (if you use them) ==================== */
.scroll-button{
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  display: grid; place-items: center;
  cursor: pointer;
}
.scroll-button.left{  left: 4px;  }
.scroll-button.right{ right: 4px; }

/* ==================== LESSONS SIGNUP (if present) ==================== */
#lessons-signup{ padding: 10px var(--rowpad); }
.lessons-form{ max-width: 760px; margin: 0 auto; }

/* ==================== HERO TYPO SIZE SAFETY ==================== */
#hero-one .hero-caption h2{
  /* Fix clamp typo if it existed elsewhere */
  font-size: clamp(18px, 2.6vw, 28px);
}

/* ===================================================================
   RESPONSIVE
=================================================================== */

/* -------- Large desktops (default) -------- */
/* Already 6-per-row via --cols:6 */

/* -------- Tablets (<= 1199px) -------- */
@media (max-width: 1199px){
  :root{
    --track: 100%;
    --cols: 3;                       /* aim ~3 across naturally */
    --card-w: calc(
      (100% - (2 * var(--rowpad)) - ((var(--cols) - 1) * var(--gap)))
      / var(--cols)
    );
    --card-h: 300px;
  }
  .row-scroller{ max-width: 100%; }
}

/* -------- Mid tablets / large phones (<= 900px) -------- */
@media (max-width: 900px){
  :root{
    --gap: 14px;
    --rowpad: 14px;
  }
  .courses-in-row .heading_div{ margin: 14px auto 8px; }
}

/* -------- Phones (<= 720px) -------- */
@media (max-width: 720px){
  :root{
    /* Slimmer cards + hard cap so two fit nicely */
    --gap: 12px;
    --rowpad: 12px;
    --card-w: min(44vw, 180px);
    --card-h: 290px;
  }

  .row-scroller{ max-width: 100%; padding: 0 var(--rowpad); }
  .cards-wrapper{ gap: var(--gap); }

  /* Tighter section rhythm + swipe (hide arrows) */
  .courses-in-row .heading_div{ margin: 10px auto 6px; }
  .scroll-button{ display: none !important; }

  /* Lessons form and section padding */
  #lessons-signup{ padding: 0 var(--rowpad); }
  .lessons-form{ max-width: 100%; }

  /* Make the header search fluid (overrides fixed widths in Nav_bar.css) */
  .InputContainer{ width: 100% !important; max-width: 100% !important; }
}

/* -------- Footer responsiveness safety (class name alignment) -------- */
@media (max-width: 991px){
  /* If your HTML uses .Fotter_div / .Fotter_column, these help ensure they respond */
  .Fotter_div{ max-width: 100%; margin-top: 40px; padding: 0 20px; }
  .Fotter_column{ width: 100%; margin-bottom: 16px; }
}

/* ===================================================================
   UTILS
=================================================================== */
.hide-on-mobile{ display: initial; }
@media (max-width: 720px){
  .hide-on-mobile{ display: none !important; }
}
.only-mobile{ display: none !important; }
@media (max-width: 720px){
  .only-mobile{ display: block !important; }
}

/* =====================  MOBILE WIDTH LOCK + OVERFLOW FIX  ===================== */
/* Put this at the VERY END of css/styleniit.css */

html, body { max-width: 100%; overflow-x: hidden; }

/* Cap the page track on phones so nothing renders wider than ~480px */
@media (max-width: 720px){
  :root{
    /* The core width variable your rows/titles use */
    --track: min(100vw, 480px);

    /* Slimmer cards + hard cap so two fit nicely */
    --gap: 12px;
    --rowpad: 12px;
    --card-w: min(44vw, 180px);
    --card-h: 290px;
  }

  /* Make sure any track-bound sections use the same cap */
  .row-scroller{ max-width: var(--track); padding: 0 var(--rowpad); margin: 0 auto; }
  .courses-in-row .heading_div{ max-width: var(--track); padding: 0 var(--rowpad); margin: 10px auto 6px; }

  /* Prevent flex children from forcing overflow */
  .cards-wrapper{ gap: var(--gap); min-width: 0; }
  .card{ min-width: 0; }

  /* Hide row arrows on phones (swipe instead) */
  .scroll-button{ display: none !important; }

  /* Search bar: avoid fixed widths on small screens */
  .InputContainer{ width: 100% !important; max-width: 100% !important; }

  /* Hero/slider safety so it can't exceed the cap */
  #hero-one, .hero-wrap, .hero-section{ max-width: var(--track); margin: 0 auto; padding-left: var(--rowpad); padding-right: var(--rowpad); }
  img, video{ max-width: 100%; height: auto; display: block; }
}

/* Optional: keep each row visually separated on mobile too */
.courses-in-row + .courses-in-row{
  border-top: 1px solid #eef1f6;
  padding-top: 12px;
}

/* ======= MOBILE LEFT-PIN + HERO SIZE FIX (place at END) ======= */

/* No horizontal scrollbars, ever */
html, body { max-width: 100%; overflow-x: hidden; }

/* 1) Rows/cards: lock track to the viewport & left-align content */
@media (max-width: 720px){
  :root{
    --track: 100vw;           /* was min(100vw, 480px); force full viewport width */
    --rowpad: 12px;
    --gap: 12px;

    /* slimmer cards with a hard cap so 2 fit comfortably */
    --card-w: min(44vw, 176px);
    --card-h: 280px;
  }

  /* Make the track use the full viewport and remove any centering offsets */
  .row-scroller{
    max-width: 100vw !important;
    margin: 0 !important;
    padding-left: var(--rowpad) !important;
    padding-right: var(--rowpad) !important;
  }

  /* Ensure the row content starts at the left — no hidden paddings */
  .cards-wrapper{
    justify-content: flex-start !important;
    padding: 0 !important;          /* override any padding from other CSS */
    margin: 0 !important;
    gap: var(--gap) !important;
    min-width: 0;
  }
  .cards-wrapper .card{
    min-width: 0 !important;
    margin-left: 0 !important;      /* belt & suspenders in case of legacy margins */
  }

  /* Hide scroll arrows; swipe instead */
  .scroll-button{ display: none !important; }
}

/* 2) HERO overlay/text: smaller on phones */
@media (max-width: 720px){
  /* target common caption containers; keep the most specific last */
  .hero-caption,
  #hero-one .caption,
  #hero-one .hero-caption{
    padding: 12px 14px !important;
    max-width: 85% !important;
    border-radius: 14px !important;
    background: rgba(0,0,0,.45) !important;  /* slightly lighter overlay */
  }

  /* Headline + body sizes */
  #hero-one .hero-caption h2{
    font-size: clamp(16px, 4.6vw, 22px) !important;
    line-height: 1.2 !important;
  }
  #hero-one .hero-caption p{
    font-size: clamp(12px, 3.6vw, 15px) !important;
    line-height: 1.35 !important;
    margin-top: 6px !important;
  }

  /* Smaller CTA button */
  #hero-one .hero-caption .btn,
  #hero-one .hero-caption a.button{
    font-size: 14px !important;
    padding: 10px 16px !important;
    border-radius: 12px !important;
  }

  /* Keep the hero image itself shorter with gentle corners */
  #hero-one .slide,
  #hero-one .hero-img,
  #hero-one img{
    height: auto !important;
    max-height: 240px !important;
    object-fit: cover !important;
    border-radius: 16px !important;
  }

  /* If your slider lib shows dots, make them smaller */
  .swiper-pagination-bullet,
  .glide__bullet,
  .slick-dots li button{
    width: 7px !important; height: 7px !important;
  }
}

/* ===== PIN CARDS FLUSH-LEFT ON PHONES (last in file) ===== */
@media (max-width: 720px){

  /* make sure the page itself has no default margins */
  html, body { margin: 0 !important; padding: 0 !important; max-width: 100%; overflow-x: hidden; }

  /* kill any left padding/margin on the row wrappers */
  .courses-in-row,
  .courses-in-row .heading_div,
  .row-scroller,
  .cards-wrapper{
    padding-left: 0 !important;
    margin-left: 0 !important;
    max-width: 100vw !important;
  }

  /* force the scroller to use the full viewport width */
  .row-scroller{ width: 100vw !important; }

  /* neutralize gap/padding tricks; rebuild spacing with margins */
  .cards-wrapper{
    gap: 0 !important;                  /* some earlier CSS uses gap */
    padding: 0 !important;
  }

  /* remove any injected spacer before the first card */
  .cards-wrapper::before{ content: none !important; display: none !important; }

  /* spacing only after the first card */
  .cards-wrapper > .card{ margin-left: 0 !important; }
  .cards-wrapper > .card + .card{ margin-left: 12px !important; }  /* adjust 12px if you prefer */

  /* safety: if older CSS targeted :first-child with a left margin, cancel it */
  .cards-wrapper > .card:first-child{ margin-left: 0 !important; }

  /* safety for common slider wrappers that sometimes add padding-left */
  .slick-list, .glide__track, .swiper, .swiper-wrapper{
    padding-left: 0 !important; margin-left: 0 !important;
  }
}

/* ==== HERO: compact shaded box + contained text on phones ==== */
@media (max-width: 720px){
  #hero-one{ position: relative; }

  /* Smaller overlay box, bottom-left, shrinks to content */
  #hero-one .hero-caption{
    position: absolute;
    inset: auto auto 14px 14px;          /* bottom:14px; left:14px */
    padding: 10px 12px !important;
    border-radius: 12px !important;
    background: rgba(0,0,0,.44) !important;

    display: inline-flex;                 /* shrink-to-fit but allow wrapping */
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;

    width: auto;
    max-width: calc(100% - 28px);        /* stay fully inside the image */
    box-sizing: border-box;
    overflow: hidden;                     /* keep rounded corners clean */
  }

  /* Keep text inside the box (no overflow) */
  #hero-one .hero-caption h2,
  #hero-one .hero-caption p{
    margin: 0;
    white-space: normal;
    overflow-wrap: anywhere;              /* break long words if needed */
  }

  /* Smaller, tighter typography */
  #hero-one .hero-caption h2{
    font-size: clamp(16px, 4.4vw, 20px) !important;
    line-height: 1.2 !important;
  }
  #hero-one .hero-caption p{
    font-size: clamp(12px, 3.6vw, 14px) !important;
    line-height: 1.35 !important;
  }

  /* Compact CTA */
  #hero-one .hero-caption .btn,
  #hero-one .hero-caption a.button{
    font-size: 13px !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
  }

/* ===== EXACTLY TWO CARDS VISIBLE ON PHONES + RIGHT GUTTER ===== */
@media (max-width: 720px){
  /* tune these two to taste */
  :root{
    --gap: 12px;        /* space between the two visible cards */
    --rightpad: 12px;   /* gutter on the right edge (blue line) */
  }

  /* track: flush left, gutter only on the right */
  .courses-in-row .row-scroller{
    max-width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: var(--rightpad) !important;
  }

  /* ensure we're using gap (not margins) and starting at the left edge */
  .cour

/* ===== EXACTLY TWO CARDS VISIBLE ON PHONES + RIGHT GUTTER ===== */
@media (max-width: 720px){
  /* tune these two to taste */
  :root{
    --gap: 12px;        /* space between the two visible cards */
    --rightpad: 12px;   /* gutter on the right edge (blue line) */
  }

  /* track: flush left, gutter only on the right */
  .courses-in-row .row-scroller{
    max-width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: var(--rightpad) !important;
  }

  /* ensure we're using gap (not margins) and starting at the left edge */
  .courses-in-row .cards-wrapper{
    gap: var(--gap) !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: flex-start !important;
    min-width: 0;
  }
  .courses-in-row .cards-wrapper > .card{
    /* EXACT fit: 2 cards + 1 gap + right gutter = viewport width */
    flex: 0 0 calc((100vw - var(--rightpad) - var(--gap)) / 2) !important;
    max-width: calc((100vw - var(--rightpad) - var(--gap)) / 2) !important;
    margin: 0 !important;         /* kill any old margin overrides */
  }

  /* safety: remove any pseudo “spacers” some sliders inject */
  .courses-in-row .cards-wrapper::before,
  .courses-in-row .cards-wrapper::after{
    content: none !important;
    display: none !important;
  }

  /* optional: hide arrows and rely on swipe */
  .scroll-button{ display:none !important; }
}
/* ==== Tabs: light-grey highlight on the selected item ==== */
:root{
  --tab-active-bg: #f3f4f6;   /* light grey */
  --tab-active-ink:#111827;   /* text color when active */
}

.tabs{ gap:10px; padding:0 6px; border-bottom:1px solid var(--border); }
.tabs a{
  padding:10px 12px;
  border-bottom:2px solid transparent;   /* default: no underline */
  border-radius:8px 8px 0 0;              /* rounded cap when active */
}
.tabs a.active{
  color:var(--tab-active-ink);
  background:var(--tab-active-bg);
  border-bottom-color: var(--tab-active-bg); /* hide underline edge */
}

/* Optional: subtle hover for non-active tabs */
.tabs a:not(.active):hover{
  background:#f8fafc;
  border-radius:8px 8px 0 0;
}

/* ==== Panels: add a bit more breathing room left/right ==== */
.tab-panel p,
.tab-panel ul,
.tab-panel .kv,
.tab-panel .table{
  padding-inline:10px;        /* space on left & right of the text */
}

@media (max-width:720px){
  .tabs{ padding:0 4px; }
  .tabs a{ padding:9px 10px; }
  .tab-panel p,
  .tab-panel ul,
  .tab-panel .kv,
  .tab-panel .table{ padding-inline:8px; }
}


