/* =========================================================
   app.css — EnrollCourses UI System (Home + Course + Admin)
   ========================================================= */

/* -------------------------
   Design tokens
------------------------- */
:root{
  /* Base */
  --bg:#f6f8fc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e6edf7;
  --shadow: 0 10px 30px rgba(2,6,23,.08);
  --r:16px;

  /* Safe areas */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  /* EnrollCourses brand */
  --ec-brand: #5624D0;
  --ec-brand2:#A435F0;
  --ec-text: #111827;
  --ec-muted: #6B7280;
  --ec-border:#E5E7EB;
  --ec-bg: #FFFFFF;
  --ec-shadow: 0 1px 0 rgba(17,24,39,.08);
  --ec-radius: 999px;
  --ec-container: 1180px;

  /* Course page tokens */
  --course-hero:#1c1d1f;
  --course-link: var(--ec-brand);
}

/* -------------------------
   Reset / base
------------------------- */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button, input, select, textarea{ font:inherit; }
:focus-visible{
  outline: none;
  box-shadow: 0 0 0 4px rgba(86,36,208,.14);
  border-radius: 10px;
}

/* -------------------------
   Helpers
------------------------- */
.container{
  max-width: var(--ec-container);
  margin: 0 auto;
  padding: 0 16px;
}
.muted{ color:var(--muted); }
.hide{ display:none !important; }
.onlyMobile{ display:block; }
.onlyDesktop{ display:none; }

@media (min-width: 820px){
  .onlyMobile{ display:none; }
  .onlyDesktop{ display:block; }
}

/* -------------------------
   Buttons / pills
------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 12px;
  border:1px solid transparent;
  font-weight: 900;
  cursor:pointer;
  text-decoration:none;
  line-height:1;
}
.btnPrimary{
  background: var(--ec-brand);
  color:#fff;
}
.btnPrimary:hover{ filter:brightness(.96); }
.btnSecondary{
  background:#fff;
  border-color: rgba(0,0,0,.14);
  color:#1c1d1f;
}
.btnSecondary:hover{ background:#f7f9fa; }
.btnBlock{ width:100%; }

/* -------------------------
   ENROLLCOURSES HEADER (shared)
------------------------- */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ec-bg);
  box-shadow: var(--ec-shadow);
  padding-top: var(--safe-top);
}

.topbar__inner{
  max-width: var(--ec-container);
  margin: 0 auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.topbar__left{ display:flex; align-items:center; gap:12px; }

.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color: var(--ec-text);
  font-weight: 900;
  text-decoration:none;
}
.brand__mark{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ec-brand);
  color:#fff;
  font-weight: 1000;
  display:grid;
  place-items:center;
  letter-spacing: .5px;
}
.brand__name{
  font-weight: 1000;
  font-size: 16px;
  letter-spacing: -.02em;
}

.pillBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 14px;
  border-radius: var(--ec-radius);
  background: var(--ec-brand);
  color:#fff;
  font-weight: 900;
  font-size: 13px;
  border: 1px solid transparent;
  line-height:1;
}
.pillBtn--outline{
  background: transparent;
  color: var(--ec-text);
  border-color: var(--ec-border);
  font-weight: 900;
}

.topbar__search{ position:relative; display:flex; align-items:center; }
.search__icon{
  position:absolute;
  left: 14px;
  color: var(--ec-muted);
  display:inline-flex;
  pointer-events:none;
}
.search__input{
  width: 100%;
  height: 42px;
  padding: 0 14px 0 42px;
  border-radius: var(--ec-radius);
  border: 1px solid var(--ec-border);
  outline:none;
  font-size: 14px;
  color: var(--ec-text);
  background:#fff;
}
.search__input:focus{
  border-color: rgba(86,36,208,.55);
  box-shadow: 0 0 0 4px rgba(86,36,208,.10);
}

.topbar__right{ display:flex; align-items:center; gap:10px; }
.topbar__nav{ display:flex; align-items:center; gap:18px; margin-right: 6px; }
.nav__link{
  color: var(--ec-text);
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}
.nav__link:hover{ text-decoration: underline; text-underline-offset: 3px; }

.iconBtn{
  width: 38px;
  height: 38px;
  border-radius: var(--ec-radius);
  border: 1px solid var(--ec-border);
  display:grid;
  place-items:center;
  background:#fff;
  color: var(--ec-text);
  text-decoration:none;
}

.avatar{
  width: 38px;
  height: 38px;
  border-radius: var(--ec-radius);
  overflow:hidden;
  border: 1px solid var(--ec-border);
  display:grid;
  place-items:center;
  background:#fff;
  text-decoration:none;
}
.avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
.avatar__initial{ font-weight:1000; color: var(--ec-text); }

@media (max-width: 980px){
  .topbar__nav{ display:none; }
}
@media (max-width: 640px){
  .topbar__inner{ padding: 12px 12px; gap: 10px; }
  .brand__name{ display:none; }
  .pillBtn--outline{ display:none; }
  .search__input{ height: 40px; }
}

/* -------------------------
   ENROLLCOURSES FOOTER (shared)
------------------------- */
.siteFooter{
  background: #1f2024;
  color:#fff;
  margin-top: 28px;
}
.siteFooter__inner{
  max-width: var(--ec-container);
  margin: 0 auto;
  padding: 38px 16px 18px;
}
.siteFooter__grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.fcol__title{ font-weight: 1000; margin-bottom: 14px; }
.fcol__link{
  display:block;
  color: rgba(255,255,255,.85);
  text-decoration:none;
  font-weight: 900;
  margin: 14px 0;
}
.fcol__link:hover{ text-decoration: underline; }
.siteFooter__bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top: 16px;
}
.siteFooter__copy{ font-weight: 1000; color: rgba(255,255,255,.95); }
.siteFooter__meta{ font-weight: 1000; color: rgba(255,255,255,.85); white-space: nowrap; }

@media (max-width: 900px){
  .siteFooter__grid{ grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .siteFooter__bottom{ flex-direction: column; align-items: flex-start; }
  .siteFooter__meta{ white-space: normal; }
}

/* =========================================================
   COURSE PAGE (namespaced under .coursePage)
   ========================================================= */
.coursePage{ background:#fff; }
.courseHero{
  background: var(--course-hero);
  color:#fff;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.courseHero__grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items:start;
}
.courseBreadcrumb{
  font-size: 13px;
  color: rgba(255,255,255,.75);
  font-weight: 900;
  margin-bottom: 10px;
}
.courseBreadcrumb a{ color:#fff; }
.courseBreadcrumb a:hover{ text-decoration:underline; text-underline-offset:3px; }

.courseTitle{
  margin:0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 1000;
  letter-spacing: -.03em;
}
.courseSubtitle{
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
  font-weight: 800;
  max-width: 70ch;
}
.courseMeta{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px 14px;
  align-items:center;
  font-size: 13px;
  color: rgba(255,255,255,.86);
  font-weight: 900;
}
.courseMeta a{ color:#fff; text-decoration: underline; text-underline-offset:3px; }

.courseBadge{
  display:inline-flex;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.20);
  font-weight: 1000;
  font-size: 12px;
}
.courseBadge--solid{
  background:#eceb98;
  color:#1c1d1f;
  border-color: transparent;
}
.courseBadge--ok{
  background: rgba(34,197,94,.18);
  border-color: rgba(34,197,94,.30);
}

.courseStars{
  display:inline-flex;
  gap: 2px;
  vertical-align:middle;
}
.courseStars svg{ width:16px; height:16px; fill:#f3ca8c; display:block; }
.courseRatingNum{ color:#f3ca8c; font-weight:1000; }

.courseSubnav{
  position: sticky;
  top: 64px; /* header height */
  z-index: 30;
  background:#fff;
  border-bottom: 1px solid rgba(0,0,0,.12);
}
.courseSubnav__row{
  display:flex;
  gap: 18px;
  align-items:center;
  overflow:auto;
  padding: 10px 0;
}
.courseSubnav__row::-webkit-scrollbar{ display:none; }
.courseSubnav__row a{
  color:#1c1d1f;
  text-decoration:none;
  font-weight: 1000;
  font-size: 13px;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.courseSubnav__row a:hover{ border-bottom-color:#1c1d1f; }

.courseMain{ padding: 18px 0 42px; }
.courseGrid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items:start;
}
.courseSticky{ position: sticky; top: 84px; }

.courseSection{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  background:#fff;
  padding: 16px;
  margin-bottom: 16px;
}
.courseH2{
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 1000;
  color:#1c1d1f;
  letter-spacing: -.02em;
}
.courseRich p{ margin: 0 0 10px; }
.courseRich ul, .courseRich ol{ margin: 0 0 10px 18px; }
.courseMuted{ color:#6a6f73; font-weight: 900; }

/* Curriculum accordion */
.courseContentTop{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.courseContentMeta{
  color:#1c1d1f;
  font-weight: 900;
  font-size: 13px;
}
.courseActions{ display:flex; gap: 10px; align-items:center; }
.linkBtn{
  background:none;
  border:none;
  padding:0;
  color: var(--course-link);
  font-weight: 1000;
  cursor:pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  font-size: 13px;
}

.courseAcc details{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  overflow:hidden;
  margin-top: 10px;
  background:#fff;
}
.courseAcc summary{
  list-style:none;
  cursor:pointer;
  padding: 12px 12px;
  display:flex;
  justify-content:space-between;
  gap: 12px;
  align-items:center;
  font-weight: 1000;
  color:#1c1d1f;
  background:#f7f9fa;
}
.courseAcc summary::-webkit-details-marker{ display:none; }
.courseSumMeta{
  font-weight: 900;
  color:#6a6f73;
  font-size: 12px;
  white-space: nowrap;
}
.lessonList{ padding: 10px 12px 12px; display:grid; gap: 10px; }

.lessonRow{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  font-weight: 900;
  color:#1c1d1f;
  font-size: 13px;
  text-decoration:none;
  border-radius: 10px;
  padding: 8px 6px;
}
.lessonRow:hover{ background:#f7f9fa; }
.lessonLeft{ display:flex; gap: 10px; align-items:flex-start; }
.lessonIcon{ width:16px; height:16px; fill:#1c1d1f; margin-top:2px; opacity:.9; }
.lessonTitle{ font-weight: 1000; color:#1c1d1f; }
.lessonMeta{
  color:#6a6f73;
  font-weight: 1000;
  font-size: 12px;
  display:flex;
  gap: 10px;
  align-items:center;
  white-space: nowrap;
}
.previewTag{
  color: var(--course-link);
  font-weight: 1000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Buy card */
.buyCard{
  background:#fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  overflow:hidden;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.buyPreview{
  position:relative;
  aspect-ratio:16/9;
  background:#111 center/cover no-repeat;
  cursor:pointer;
}
.buyPreview::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.58));
  pointer-events:none;
}
.previewBtn{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  color:#fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
  pointer-events:none;
}
.playCircle{
  width:58px;
  height:58px;
  border-radius:999px;
  background: rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.32);
  display:grid;
  place-items:center;
  backdrop-filter: blur(6px);
}
.playCircle svg{ width:20px; height:20px; fill:#fff; margin-left:2px; }
.previewTxt{ font-weight:1000; font-size:13px; letter-spacing:.2px; }

.planTabs{ display:flex; border-bottom: 1px solid rgba(0,0,0,.10); background:#fff; }
.planTab{
  flex: 1 1 50%;
  padding: 10px 12px;
  text-align:center;
  font-weight: 1000;
  font-size: 13px;
  cursor:pointer;
  border-bottom: 2px solid transparent;
}
.planTab[aria-selected="true"]{ border-bottom-color:#1c1d1f; }
.planPanel{ display:none; }
.planPanel[aria-hidden="false"]{ display:block; }

.buyBody{ padding: 14px; }
.priceRow{
  display:flex;
  align-items:baseline;
  gap:10px;
  font-weight:1000;
  color:#1c1d1f;
  margin-top: 10px;
}
.priceNow{ font-size: 26px; }
.priceOld{
  font-size: 14px;
  color:#6a6f73;
  text-decoration: line-through;
  font-weight: 900;
}
.priceNote{ margin-top: 6px; color:#6a6f73; font-size: 13px; font-weight: 900; }
.warn{ margin-top: 6px; color:#b4690e; font-weight: 1000; }

.btnRow{ display:grid; gap: 10px; margin-top: 12px; }
.guarantee{ margin-top: 10px; text-align:center; font-size: 12px; font-weight: 900; color:#1c1d1f; }
.miniRow{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 1000;
  color:#1c1d1f;
}
.miniRow a{
  color:#1c1d1f;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.include{
  margin-top: 14px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px;
}
.includeTitle{
  font-weight: 1000;
  font-size: 14px;
  color:#1c1d1f;
  margin: 0 0 10px;
}
.includeList{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap: 8px;
  color:#1c1d1f;
  font-weight: 900;
  font-size: 13px;
}
.includeList li{ display:flex; gap: 10px; align-items:flex-start; }
.includeList svg{ width:16px; height:16px; fill:#1c1d1f; margin-top:2px; }

/* Mobile sticky CTA */
.mobileBar{
  position: fixed;
  left:0; right:0; bottom:0;
  background:#fff;
  border-top: 1px solid rgba(0,0,0,.12);
  padding: 10px 12px calc(10px + var(--safe-bottom));
  display:none;
  z-index: 60;
}
.mobileBar__inner{
  max-width: var(--ec-container);
  margin: 0 auto;
  display:flex;
  gap: 10px;
  align-items:center;
  justify-content:space-between;
}
.mPrice{ font-weight:1000; color:#1c1d1f; }
.mBtn{
  flex: 0 0 auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ec-brand);
  color:#fff;
  text-decoration:none;
  font-weight:1000;
  font-size: 14px;
}

/* Modal */
.modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.72);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 9999;
  padding: 18px;
}
.modal[aria-hidden="false"]{ display:flex; }
.modalCard{
  width: min(980px, 100%);
  background:#111;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.14);
}
.modalTop{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  color:#fff;
  font-weight: 1000;
  background: rgba(255,255,255,.06);
}
.closeBtn{
  border:none;
  background: rgba(255,255,255,.12);
  color:#fff;
  font-weight: 1000;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor:pointer;
}
.modalBody{ background:#000; }
.modalBody iframe,
.modalBody video{
  width:100%;
  height: min(540px, 62vh);
  display:block;
  border:0;
}
.modalBody audio{ width:100%; display:block; }
.modalFallback{ padding: 18px; color:#fff; font-weight: 900; }
.modalBody a{ color:#fff; }

/* Desktop/tablet layout */
@media (min-width: 820px){
  .courseHero__grid{ grid-template-columns: 1fr 360px; gap: 24px; }
  .courseGrid{ grid-template-columns: 1fr 360px; gap: 24px; }
}

/* Mobile layout */
@media (max-width: 819px){
  .courseTitle{ font-size: 24px; }
  .courseSticky{ display:none; }
  .mobileBar{ display:block; }
}

/* =========================================================
   AUTH (kept)
   ========================================================= */
.authCard{
  max-width: 520px;
  margin: 10px auto;
  background: var(--card);
  border:1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.authCard h1{ margin:0 0 6px; letter-spacing:-.03em; }

.authForm{ margin-top:12px; }
.authForm label{ display:block; font-weight:900; margin:10px 0 6px; }
.authForm input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:#fff;
  outline:none;
}

.alert{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-top:10px;
  font-weight:800;
}
.alert--ok{ background:#ecfdf5; color:#065f46; border-color:#a7f3d0; }
.alert--err{ background:#fef2f2; color:#991b1b; border-color:#fecaca; }

.googleBtn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:#fff;
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(2,6,23,.06);
}

.divider{
  display:flex; align-items:center; gap:10px;
  margin: 12px 0;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}
.divider:before, .divider:after{
  content:"";
  height:1px; background: var(--line);
  flex:1;
}
.divider span{ padding:0 6px; }

.pwRow{ display:flex; gap:8px; align-items:center; }
.pwToggle{
  padding: 12px 12px;
  border-radius: 14px;
  border:1px solid var(--line);
  background:#fff;
  font-weight: 900;
  color: var(--muted);
}
.pwMeter{
  height:10px;
  background:#eef2ff;
  border-radius:999px;
  overflow:hidden;
  margin-top:8px;
}
#pwBar{
  height:100%;
  width:0%;
  background: var(--ec-brand);
}
.hint{ color:var(--muted); font-size:12px; font-weight:800; }

/* =========================================================
   ADMIN (kept)
   ========================================================= */
.adminShell{
  min-height:100vh;
  display:grid;
  grid-template-columns: 260px 1fr;
  background:#f6f8fc;
}
.adminSide{
  position:sticky;
  top:0;
  height:100vh;
  padding:18px 14px;
  background:#fff;
  border-right:1px solid rgba(15,23,42,.08);
  display:flex;
  flex-direction:column;
  gap:14px;
}
.adminBrand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:14px;
  text-decoration:none;
  color:#0f172a;
  font-weight: 1000;
}
.adminBrand em{
  margin-left:auto;
  font-style:normal;
  font-weight:900;
  font-size:12px;
  color:rgba(15,23,42,.55);
}
.adminNav{ display:flex; flex-direction:column; gap:6px; }
.adminNav__item{
  display:flex;
  align-items:center;
  height:42px;
  padding:0 12px;
  border-radius:12px;
  text-decoration:none;
  font-weight:900;
  color:rgba(15,23,42,.78);
  border:1px solid transparent;
}
.adminNav__item:hover{ background:rgba(2,6,23,.03); }
.adminNav__item.isActive{
  background:rgba(86,36,208,.10);
  border-color:rgba(86,36,208,.18);
  color: var(--ec-brand);
}
.adminSide__bottom{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(15,23,42,.08);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.adminLogout{ text-decoration:none; font-weight:1000; color:#ef4444; }
.adminMain{ padding:18px 14px 80px; }
.adminTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.adminH1{
  margin:0;
  font-size:26px;
  letter-spacing:-.02em;
  font-weight:1000;
}
.adminTop__actions{ display:flex; gap:10px; flex-wrap:wrap; }

.input{
  width:100%;
  height:44px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,.12);
  padding:0 12px;
  outline:none;
  background:#fff;
}
.input:focus{
  border-color: rgba(86,36,208,.40);
  box-shadow: 0 0 0 4px rgba(86,36,208,.10);
}

.badgeOk,
.badgeWarn,
.badgeSoft{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:26px;
  padding:0 10px;
  border-radius:999px;
  font-weight:1000;
  font-size:12px;
  border:1px solid transparent;
}
.badgeOk{ background:rgba(16,185,129,.12); border-color:rgba(16,185,129,.25); color:#059669; }
.badgeWarn{ background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.25); color:#b45309; }
.badgeSoft{ background:rgba(2,6,23,.06); border-color:rgba(2,6,23,.10); color:rgba(15,23,42,.72); }

@media (max-width: 900px){
  .adminShell{ grid-template-columns: 1fr; }
  .adminSide{
    position:relative;
    height:auto;
    border-right:none;
    border-bottom:1px solid rgba(15,23,42,.08);
  }
}





/* =========================================================
   HOMEPAGE UI (index.php) — scoped to main.page
   Fixes: "scattered" layout (unstyled hero, grids, cards, etc.)
   ========================================================= */

main.page{
  background:#fff;
  color:#0f172a;
}

/* Give the homepage a consistent max width like your header */
main.page > section,
main.page > .section,
main.page > .hero,
main.page > .quick{
  max-width:1184px;
  margin-left:auto;
  margin-right:auto;
  padding-left:16px;
  padding-right:16px;
}

/* ---------- HERO (carousel) ---------- */
.page .hero{
  padding-top:14px;
  padding-bottom:10px;
}

.page .hero__track{
  display:flex;
  gap:14px;
  overflow:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding-bottom:10px;
}

.page .hero__track::-webkit-scrollbar{ height:8px; }
.page .hero__track::-webkit-scrollbar-thumb{ background:rgba(15,23,42,.15); border-radius:999px; }

.page .heroCard{
  flex:0 0 100%;
  min-height:240px;
  border-radius:18px;
  overflow:hidden;
  position:relative;
  scroll-snap-align:start;
  background: var(--bg, #0b5cff);
  color:#fff;
  border:1px solid rgba(15,23,42,.10);
}

@media (min-width: 760px){
  .page .heroCard{ flex-basis: 72%; min-height:260px; }
}
@media (min-width: 1040px){
  .page .heroCard{ flex-basis: 64%; }
}

.page .heroCard__content{
  position:relative;
  z-index:2;
  padding:22px 18px;
  max-width: 70ch;
}

.page .heroCard h1{
  margin:10px 0 8px;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height:1.08;
  letter-spacing:-.4px;
  font-weight: 1000;
}

.page .heroCard p{
  margin:0;
  opacity:.92;
  font-size: 15px;
  line-height:1.45;
  font-weight:700;
  max-width: 62ch;
}

.page .heroCard__art{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 380px at 10% 10%, rgba(255,255,255,.24), transparent 55%),
    radial-gradient(900px 320px at 90% 70%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.25));
  pointer-events:none;
}

/* Badge + CTA pill used in HERO */
.page .badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.28);
  color:#fff;
  font-weight: 1000;
  font-size: 12px;
}

.page .pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:14px;
  padding:11px 14px;
  border-radius:999px;
  background:#fff;
  color:#111827;
  font-weight: 1000;
  text-decoration:none;
  width: fit-content;
}
.page .pill:hover{ filter: brightness(.96); }

/* Dots (optional, if you later populate them with JS) */
.page .dots{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  padding:10px 0 6px;
}
.page .dots button{
  width:8px;height:8px;border-radius:999px;
  border:none;
  background:rgba(15,23,42,.20);
  cursor:pointer;
}
.page .dots button[aria-current="true"]{
  background:rgba(86,36,208,.95);
}

/* ---------- QUICK ACTIONS ---------- */
.page .quick{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  padding-top:12px;
  padding-bottom:6px;
}

@media (min-width: 760px){
  .page .quick{ grid-template-columns: repeat(3, 1fr); }
}

.page .quickItem{
  display:flex;
  gap:12px;
  align-items:center;
  padding:12px 12px;
  border-radius:14px;
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  text-decoration:none;
  color:#0f172a;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}

.page .quickItem:hover{ background:#f8fafc; }
.page .quickIcon{
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;
  background:rgba(86,36,208,.10);
  border:1px solid rgba(86,36,208,.14);
  font-size:18px;
}
.page .quickTitle{ font-weight:1000; }
.page .quickSub{ margin-top:2px; font-size:12px; font-weight:900; color: rgba(15,23,42,.60); }

/* ---------- SECTIONS ---------- */
.page .section{
  padding-top:18px;
  padding-bottom:6px;
}

.page .section__titleRow{
  display:flex;
  gap:10px;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap:wrap;
  padding-bottom:10px;
}

.page .section__titleRow h2{
  margin:0;
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: -.2px;
  color:#0f172a;
}

.page .link{
  color:#5624d0;
  font-weight: 1000;
  text-decoration:none;
}
.page .link:hover{ text-decoration: underline; text-underline-offset: 3px; }

.page .muted{ color: rgba(15,23,42,.62); font-weight: 800; }

/* ---------- PARTNER LOGOS ---------- */
.page .logos{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.page .logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  color:#0f172a;
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
}
.page .logo:hover{ background:#f8fafc; }

/* ---------- CATEGORY CHIPS ---------- */
.page .chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.page .chip{
  display:inline-flex;
  padding:10px 12px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.10);
  color:#0f172a;
  text-decoration:none;
  font-weight: 900;
  font-size: 13px;
}
.page .chip:hover{ background:#eef2ff; border-color: rgba(86,36,208,.20); }

/* ---------- HORIZONTAL SCROLLER (featured + testimonials) ---------- */
.page .hscroll{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns: min(280px, 84vw);
  gap:12px;
  overflow:auto;
  scroll-snap-type:x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling:touch;
}
.page .hscroll > *{ scroll-snap-align:start; }

@media (min-width: 760px){
  .page .hscroll{ grid-auto-columns: 260px; }
}
@media (min-width: 1100px){
  .page .hscroll{ grid-auto-columns: 280px; }
}

/* ---------- CARD (Featured) ---------- */
.page .card{
  display:block;
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  text-decoration:none;
  color:#0f172a;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.page .card:hover{ transform: translateY(-1px); box-shadow: 0 14px 34px rgba(15,23,42,.10); }

.page .card__media{
  aspect-ratio: 16/9;
  background:#111 center/cover no-repeat;
}
.page .card__body{ padding:12px; }
.page .card__kicker{ font-size:12px; font-weight:1000; color: rgba(15,23,42,.60); }
.page .card__title{ margin-top:6px; font-weight:1000; line-height:1.2; }
.page .card__meta{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:8px;
  font-size:12px;
  font-weight:900;
  color: rgba(15,23,42,.70);
}

/* ---------- GRID (Trending) ---------- */
.page .grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}
@media (min-width: 760px){
  .page .grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px){
  .page .grid{ grid-template-columns: repeat(3, 1fr); }
}

/* ---------- TILE (Trending item) ---------- */
.page .tile{
  display:grid;
  grid-template-columns: 96px 1fr;
  gap:12px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  text-decoration:none;
  color:#0f172a;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.page .tile:hover{ background:#f8fafc; }

.page .tile__media{
  width:96px;height:64px;
  border-radius:12px;
  background:#111 center/cover no-repeat;
}
.page .tile__body{ min-width:0; }
.page .tile__title{
  font-weight:1000;
  line-height:1.2;
  margin:0;
}
.page .tile__sub{
  margin-top:6px;
  font-size:12px;
  font-weight:900;
  color: rgba(15,23,42,.62);
}
.page .tile__meta{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:12px;
  font-weight:1000;
  color: rgba(15,23,42,.80);
}

/* ---------- TESTIMONIALS ---------- */
.page .quote{
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  padding:14px;
  box-shadow: 0 10px 26px rgba(15,23,42,.06);
}
.page .quote__stars{
  letter-spacing:1px;
  font-weight:1000;
}
.page .quote__text{
  margin:10px 0 12px;
  font-weight:800;
  color: rgba(15,23,42,.84);
  line-height:1.5;
}
.page .quote__who strong{ font-weight:1000; }
.page .quote__who span{
  display:block;
  margin-top:4px;
  font-size:12px;
  font-weight:900;
  color: rgba(15,23,42,.62);
}

/* ---------- PHONE-ONLY BOTTOM NAV ---------- */
.bottomNav{
  position:fixed;
  left:0; right:0; bottom:0;
  background:#fff;
  border-top:1px solid rgba(15,23,42,.12);
  display:flex;
  justify-content:space-around;
  gap:8px;
  padding:10px 10px env(safe-area-inset-bottom);
  z-index:1200;
}
.bottomNav .bn{
  text-decoration:none;
  color: rgba(15,23,42,.70);
  font-weight:1000;
  font-size:12px;
  padding:10px 10px;
  border-radius:12px;
}
.bottomNav .bn--active{
  color:#0f172a;
  background: rgba(86,36,208,.10);
  border:1px solid rgba(86,36,208,.16);
}
@media (min-width: 720px){
  .bottomNav{ display:none; }
}

/* Avoid content hiding behind bottom nav on phones */
@media (max-width: 719px){
  main.page{ padding-bottom: 78px; }
}

