@import url("https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800;900&display=swap");

:root {
  --sky: #9ec9f4;
  --mint: #c8f7df;
  --ink: #050505;
  --muted: #5f6d75;
  --panel: rgba(255, 255, 255, 0.48);
  --line: rgba(163, 183, 194, 0.42);
  --teal: #03898a;
  --teal-dark: #007071;
  --blue: #075f9a;
  --red: #d12626;
  --shadow: 0 18px 42px rgba(27, 72, 92, 0.12);
  font-family: "Kanit", "Prompt", "Segoe UI", Arial, sans-serif;
}

/* Two-level catalog: bundles first, individual topics second. */
.catalog-zone-heading {
  margin: 0 0 22px;
}

.catalog-zone-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2.35rem);
  line-height: 1.2;
}

.catalog-zone-heading p {
  margin: 6px 0 0;
  color: #687781;
  font-weight: 500;
}

.catalog-zone-divider {
  height: 1px;
  margin: 46px 0;
  background: #b9c6ce;
}

.promotion-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.topic-grid .course-card .card-body {
  padding: 18px;
}

.topic-grid .course-card h2 {
  font-size: 1.12rem;
}

.topic-grid .course-card .card-description {
  font-size: .92rem;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.product-includes {
  margin: 34px auto 0;
  max-width: 1100px;
}

.product-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-topic-list span {
  padding: 9px 13px;
  border: 1px solid rgba(18, 70, 97, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .65);
}

.community-page .site-footer {
  margin-top: 72px;
}

.courses-page .site-footer {
  margin-top: 88px;
}

.topic-recommendations {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.topic-recommendations h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.topic-recommendation-list {
  display: grid;
  gap: 9px;
}

.topic-recommendation-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid rgba(7, 95, 154, .14);
  border-radius: 6px;
  background: rgba(255, 255, 255, .54);
  color: var(--blue);
}

.topic-recommendation-list span {
  overflow: hidden;
  font-size: .9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-recommendation-list strong {
  font-size: .78rem;
}

.topic-recommendation-list p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promotion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topic-grid,
  .promotion-grid { grid-template-columns: 1fr; }
  .catalog-zone-divider { margin: 34px 0; }
  .product-detail-actions { align-items: stretch; }
  .product-detail-actions a { width: 100%; text-align: center; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(200, 247, 223, 0.74), transparent 34%),
    radial-gradient(circle at 86% 0%, rgba(158, 201, 244, 0.74), transparent 36%),
    linear-gradient(180deg, #f8fcff 0%, #ffffff 48%, #eef8fb 100%);
  background-attachment: fixed;
}

#interfaceApp {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  max-width: 100vw;
  display: grid;
  grid-template-columns: 220px 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 92px;
  padding: 12px 20px;
  background: linear-gradient(90deg, rgba(200, 247, 223, 0.7), rgba(158, 201, 244, 0.74));
  border-bottom: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 30px rgba(32, 72, 92, 0.1);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 42px;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.logo span {
  font-size: 35px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(24px, 4vw, 48px);
  padding-right: clamp(34px, 4vw, 72px);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 500;
}

.main-nav a {
  padding: 10px 0;
  border-bottom: 4px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.mobile-nav-login {
  display: none;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 8px;
}

.language-btn {
  min-width: 42px;
  border: 0;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  transition: color 160ms ease, transform 160ms ease;
}

.language-btn:hover,
.language-btn:focus-visible {
  color: var(--blue);
  transform: translateY(-1px);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.5);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
  box-shadow: none;
  backdrop-filter: blur(14px);
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.pill-btn:hover,
.pill-btn:focus-visible {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(27, 72, 92, 0.16);
}

.course-apply-btn {
  gap: 8px;
}

.course-apply-btn svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-btn {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 14px 34px rgba(27, 72, 92, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 23px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--ink);
}

.page {
  min-height: calc(100vh - 92px);
  padding: 26px clamp(24px, 3vw, 38px) 54px;
}

.home-page {
  display: grid;
  gap: 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 34px;
  min-height: 460px;
}

.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.02;
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-cta,
.secondary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 28px;
  border: 4px solid var(--ink);
  border-radius: 28px;
  font-size: 25px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
}

.primary-cta {
  background: var(--teal);
  color: #fff;
}

.hero-preview {
  min-height: 390px;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(3, 137, 138, 0.92), rgba(3, 137, 138, 0.76)),
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.32) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 32%, rgba(255, 255, 255, 0.24) 0 3px, transparent 4px),
    linear-gradient(135deg, #e9fbf2, #b8ddff);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feature-box,
.profile-card,
.contact-card,
.post-content {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--panel);
  box-shadow: 0 14px 36px rgba(27, 72, 92, 0.08);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.feature-box {
  min-height: 130px;
  padding: 20px;
  border-radius: 22px;
}

.feature-box strong {
  display: block;
  font-size: 26px;
}

.feature-box span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 30px;
}

.sidebar {
  padding-top: 48px;
}

.sidebar h1 {
  margin: 0 0 22px;
  font-size: clamp(29px, 2.55vw, 38px);
  line-height: 1.12;
  font-weight: 500;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  gap: 4px;
  padding: 0 22px;
}

.filter-group {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.filter-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #606060;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.filter-title span:last-child {
  font-size: 20px;
  transition: transform 150ms ease;
}

.filter-group.is-collapsed .filter-title span:last-child {
  transform: rotate(180deg);
}

.filter-options {
  display: grid;
  gap: 0;
}

.filter-group.is-collapsed .filter-options {
  display: none;
}

.filter-option {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 25px;
  color: var(--blue);
  font-size: 14px;
}

.filter-count {
  color: var(--blue);
  font-weight: 700;
}

.filter-count.is-zero {
  color: #9aa6ad;
  font-weight: 500;
}

.filter-option input {
  width: 14px;
  height: 14px;
  accent-color: var(--teal);
}

.content-area {
  min-width: 0;
}

.search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 26px;
}

.search-box {
  position: relative;
  width: min(540px, 100%);
}

.search-box input {
  width: 100%;
  height: 54px;
  padding: 0 66px 0 20px;
  border: 1.5px solid var(--ink);
  border-radius: 30px;
  font-size: clamp(20px, 2.3vw, 27px);
  outline: none;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-box input:focus {
  box-shadow: 0 0 0 4px rgba(3, 137, 138, 0.14);
}

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  color: #687981;
  pointer-events: none;
}

.search-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px 28px;
}

.community-page .card-grid {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  padding: 0 36px;
}

.course-card {
  overflow: hidden;
  min-height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 14px 34px rgba(27, 72, 92, 0.12);
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.course-card:hover,
.course-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 20px 42px rgba(27, 72, 92, 0.16);
}

.card-cover {
  position: relative;
  height: 105px;
  background: var(--cover-pattern);
  background-color: var(--teal);
}

.card-cover::before,
.card-cover::after {
  display: none;
}

.card-cover-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #050505;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.card-body {
  display: grid;
  min-height: 128px;
  padding: 12px 14px 13px;
}

.card-body h2 {
  display: -webkit-box;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 15px;
  line-height: 1.35;
}

.card-description {
  display: -webkit-box;
  margin: 4px 0 12px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #75828a;
  font-size: 13px;
  line-height: 1.45;
}

.card-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: #2a3439;
  font-size: 13px;
}

.course-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 58%;
}

.course-tag {
  color: #8a969d;
  font-size: 12px;
  line-height: 1.2;
}

.course-tag::after {
  content: "/";
  margin-left: 6px;
  color: #b1bbc0;
}

.course-tag:last-child::after {
  content: "";
  margin: 0;
}

.post-type {
  display: inline-flex;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 99px;
  color: #006465;
  background: rgba(3, 137, 138, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.price-box {
  display: flex;
  align-items: end;
  justify-content: end;
  gap: 7px;
  width: 100%;
  margin-left: auto;
  font-weight: 700;
}

.old-price {
  color: var(--blue);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.sale-price {
  color: var(--red);
  font-size: 16px;
}

.normal-price {
  color: var(--blue);
  font-size: 16px;
}

.community-intro {
  width: min(760px, 100%);
  margin: -10px auto 26px;
  color: #55646d;
  text-align: center;
  font-size: 20px;
  line-height: 1.55;
}

.empty-result {
  grid-column: 1 / -1;
  padding: 40px;
  color: var(--muted);
  text-align: center;
  border: 2px dashed var(--line);
  border-radius: 18px;
}

.single-column-page {
  display: grid;
  gap: 30px;
}

.page-title {
  max-width: 900px;
  margin: 20px auto 0;
  text-align: center;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 74px);
  font-weight: 500;
}

.page-title p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.55;
}

.profile-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(1050px, 100%);
  margin: 0 auto;
}

.profile-card,
.contact-card {
  min-height: 230px;
  padding: 24px;
  border-radius: 22px;
}

.profile-card h2,
.contact-card h2 {
  margin: 0;
  font-size: 28px;
}

.profile-card p,
.contact-card p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.post-detail-page {
  display: grid;
  gap: 24px;
  padding-inline: clamp(18px, 5vw, 70px);
}

.back-link {
  width: fit-content;
}

.post-hero {
  display: grid;
  min-height: 360px;
  align-items: end;
  padding: 34px;
  overflow: hidden;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.66)),
    var(--cover-pattern);
  color: #fff;
  box-shadow: var(--shadow);
}

.post-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.08;
}

.post-content {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 28px;
  border-radius: 18px;
}

.post-content p {
  color: #4d5d66;
  font-size: 20px;
  line-height: 1.75;
}

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: 205px 1fr auto;
  }

  .header-actions {
    display: none;
  }

  .menu-btn {
    display: grid;
    place-content: center;
  }

  .main-nav {
    position: absolute;
    inset: 92px 18px auto;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .mobile-nav-login {
    display: block;
    margin-top: 8px;
    border: 1px solid rgba(7, 95, 154, 0.18);
    border-radius: 14px;
    background: rgba(7, 95, 154, 0.08);
    color: var(--blue);
    font-weight: 700;
    text-align: center;
  }

  .catalog-layout,
  .hero {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-top: 0;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .filter-group {
    padding: 12px 0;
  }

  .filter-options {
    gap: 8px;
  }

  .filter-option {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    min-height: 32px;
    font-size: 16px;
  }

  .card-grid,
  .community-page .card-grid,
  .feature-row,
  .profile-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto;
    min-height: 76px;
  }

  .logo {
    width: 164px;
    height: 38px;
  }

  .logo span {
    font-size: 29px;
  }

  .main-nav {
    inset: 76px 16px auto;
  }

  .page {
    padding: 20px 16px 40px;
  }

  .sidebar h1 {
    white-space: normal;
  }

  .filter-panel,
  .card-grid,
  .community-page .card-grid,
  .feature-row,
  .profile-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .search-box input {
    height: 50px;
    font-size: 20px;
  }

  .pill-btn,
  .primary-cta,
  .secondary-cta {
    min-height: 50px;
    font-size: 21px;
  }
}

/* More Detail home page, corrected by Fix 2 */
.mobile-cart {
  display: none;
}

.home-site {
  background:
    linear-gradient(120deg, rgba(200, 247, 223, 0.94) 0%, rgba(249, 255, 252, 0.86) 38%, rgba(231, 246, 255, 0.9) 68%, rgba(158, 201, 244, 0.9) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.home-site .page {
  min-height: auto;
  background: transparent;
}

.home-landing {
  display: grid;
  min-height: calc(100vh - 92px);
  align-items: center;
  padding-top: clamp(72px, 10vw, 130px);
  padding-bottom: clamp(72px, 10vw, 130px);
}

.hero-copy {
  width: min(1120px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  color: #050505;
  font-size: clamp(48px, 6.4vw, 92px);
  line-height: 1.14;
  font-weight: 760;
}

.hero-highlight {
  color: #e6aa12;
  text-shadow: 0 2px 0 rgba(5, 5, 5, 0.1);
}

.hero-nowrap {
  white-space: nowrap;
}

.hero-title-break {
  display: block;
}

.hero-copy p {
  display: none;
}

.hero-teacher-credit {
  display: block !important;
  max-width: 720px;
  margin: clamp(18px, 2.2vw, 26px) 0 0 clamp(18px, 1.8vw, 32px) !important;
  color: #5d6876 !important;
  font-size: clamp(18px, 1.55vw, 24px);
  font-weight: 400;
  line-height: 1.45;
  white-space: nowrap;
}

.hero-actions {
  justify-content: center;
  gap: 18px;
  margin-top: clamp(34px, 5vw, 58px);
}

.glass-cta {
  display: inline-flex;
  min-width: 236px;
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow: 0 18px 38px rgba(27, 72, 92, 0.15);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.glass-cta:hover,
.glass-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px rgba(27, 72, 92, 0.2);
}

.primary-cta.glass-cta {
  background: rgba(255, 255, 255, 0.72);
  color: #050505;
}

.line-cta {
  background: #09bf60;
  color: #fff;
}

.line-cta .line-label {
  display: inline-block;
  min-width: 0;
  height: auto;
  font-size: inherit;
  text-align: center;
  line-height: 1.05;
}

.line-cta .line-badge {
  display: inline-flex;
  height: 36px;
  min-width: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #08a854;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.section-heading {
  width: min(1020px, 100%);
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading.is-left {
  margin-left: 0;
  text-align: left;
}

.section-heading h2 {
  margin: 0;
  color: #111820;
  font-size: clamp(38px, 4.6vw, 66px);
  line-height: 1.1;
}

.section-heading p {
  max-width: 740px;
  margin: 14px 0 0;
  color: #5f6d75;
  font-size: 20px;
  line-height: 1.6;
}

.tutor-showcase,
.recommended-section,
.why-section,
.faq-section {
  padding-top: clamp(56px, 8vw, 92px);
  padding-bottom: clamp(56px, 8vw, 92px);
}

.tutor-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1fr);
  gap: clamp(34px, 6vw, 82px);
  align-items: center;
}

.tutor-gallery {
  position: relative;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.tutor-photo {
  position: relative;
  width: 100%;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(228, 246, 255, 0.94), rgba(255, 255, 255, 0.78));
  box-shadow: 0 24px 50px rgba(27, 72, 92, 0.14);
}

.tutor-fade-layer {
  position: absolute;
  inset: 0;
}

.tutor-fade-layer.is-old {
  animation: tutorFadeOut 900ms ease both;
}

.tutor-fade-layer.is-new {
  animation: tutorFadeIn 900ms ease both;
}

@keyframes tutorFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tutorFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.tutor-photo.is-teal {
  background: linear-gradient(145deg, #d8fbef, #f7feff);
}

.tutor-photo.is-sky {
  background: linear-gradient(145deg, #ddecff, #f7feff);
}

.tutor-photo.is-mint {
  background: linear-gradient(145deg, #e6fff1, #f7feff);
}

.mock-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 95, 154, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(7, 95, 154, 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
}

.mock-person-head,
.mock-person-body,
.mock-board {
  position: absolute;
  display: block;
}

.mock-person-head {
  top: 72px;
  left: 50%;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f0c5a6;
  transform: translateX(-50%);
}

.mock-person-body {
  left: 50%;
  bottom: 34px;
  width: 210px;
  height: 230px;
  border-radius: 90px 90px 18px 18px;
  background: linear-gradient(160deg, #103459, #05233a);
  transform: translateX(-50%);
}

.mock-board {
  height: 9px;
  border-radius: 999px;
  background: rgba(7, 95, 154, 0.16);
}

.mock-board.one {
  top: 82px;
  left: 44px;
  width: 150px;
}

.mock-board.two {
  top: 124px;
  right: 46px;
  width: 180px;
}

.photo-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 3px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.photo-caption strong {
  color: #075f9a;
  font-size: 22px;
}

.photo-caption span {
  color: #5f6d75;
}

.carousel-arrow {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #1e2b34;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 28px rgba(27, 72, 92, 0.16);
  cursor: pointer;
}

.carousel-arrow svg,
.faq-chevron svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tutor-gallery .carousel-arrow {
  position: absolute;
  top: 44%;
  z-index: 2;
}

.tutor-gallery .is-left {
  left: 18px;
}

.tutor-gallery .is-right {
  right: 18px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.carousel-dots button {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 999px;
  background: #c6d0d8;
  cursor: pointer;
}

.carousel-dots button.active {
  width: 40px;
  background: var(--blue);
}

.tutor-thumbs {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.tutor-thumbs button {
  width: 70px;
  height: 48px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.tutor-thumbs button.active {
  border-color: var(--blue);
}

.tutor-bio ul {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tutor-bio li {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 18px;
  align-items: center;
  color: #41505b;
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.55;
}

.tutor-bio li span {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(7, 95, 154, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--blue);
  box-shadow: 0 12px 26px rgba(27, 72, 92, 0.08);
  font-size: 16px;
  font-weight: 800;
}

.tutor-gem-list {
  grid-template-columns: 1fr;
  gap: clamp(14px, 2vw, 20px);
}

.tutor-gem-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 14px;
  min-height: 0;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.tutor-gem-list .gem-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  justify-self: center;
  border: 0;
  border-radius: 5px;
  background: linear-gradient(135deg, #37b7f4 0%, #178dde 58%, #0b72c8 100%);
  box-shadow: 0 7px 14px rgba(18, 122, 200, 0.14);
  transform: rotate(45deg);
}

.tutor-gem-list p {
  margin: 0;
  color: #30424e;
  font-size: clamp(18px, 1.45vw, 24px);
  line-height: 1.55;
}

.recommended-shell {
  position: relative;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding: 8px 18px 28px;
}

.outside-left,
.outside-right {
  position: absolute;
  top: 43%;
  z-index: 2;
}

.outside-left {
  left: -12px;
}

.outside-right {
  right: -12px;
}

.landing-course-card {
  display: grid;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 38px rgba(27, 72, 92, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.landing-course-card:hover,
.landing-course-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(27, 72, 92, 0.18);
}

.landing-course-cover {
  min-height: 178px;
  background: var(--cover-pattern);
  background-color: var(--teal);
}

.landing-course-body {
  display: grid;
  padding: 18px;
}

.level-label {
  color: #08716c;
  font-weight: 700;
}

.landing-course-body h3 {
  min-height: 58px;
  margin: 8px 0;
  font-size: 21px;
  line-height: 1.3;
}

.landing-course-body p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: #687780;
  line-height: 1.55;
}

.landing-course-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(163, 183, 194, 0.44);
}

.view-all-btn {
  display: flex;
  width: fit-content;
  min-width: 220px;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  margin: 26px auto 0;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
  color: #1e2b34;
  font-size: 20px;
  box-shadow: 0 14px 30px rgba(27, 72, 92, 0.1);
}

.feature-row.upgraded {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-row.upgraded .feature-box {
  min-height: 184px;
  border-radius: 16px;
}

.faq-list {
  width: min(1040px, 100%);
  margin: 0 auto;
  border-top: 1px solid rgba(163, 183, 194, 0.62);
}

.faq-item {
  border-bottom: 1px solid rgba(163, 183, 194, 0.62);
}

.faq-item button {
  display: grid;
  grid-template-columns: 52px 1fr 34px;
  gap: 14px;
  width: 100%;
  align-items: center;
  padding: 24px 4px;
  border: 0;
  background: transparent;
  color: #303a43;
  text-align: left;
  cursor: pointer;
}

.faq-plus {
  color: var(--blue);
  font-size: 42px;
  line-height: 1;
}

.faq-item strong {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 500;
}

.faq-chevron {
  color: #5f6d75;
  transition: transform 160ms ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 86px 24px;
}

.faq-answer p {
  margin: 0;
  color: #5f6d75;
  font-size: 18px;
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  display: block;
}

.site-footer {
  margin: 0 clamp(18px, 3vw, 42px) 34px;
  overflow: hidden;
  color: #1e2b34;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 24px 54px rgba(27, 72, 92, 0.14);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(2, minmax(180px, 0.7fr));
  gap: clamp(34px, 7vw, 92px);
  padding: clamp(42px, 7vw, 76px);
}

.footer-logo {
  display: inline-block;
  color: #050505;
  font-size: 42px;
  font-weight: 900;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: #53626d;
}

.footer-brand p {
  max-width: 420px;
  font-size: 20px;
  line-height: 1.55;
}

.footer-column {
  display: grid;
  gap: 14px;
  align-content: start;
}

.footer-column h3 {
  margin: 0 0 8px;
  color: #1e2b34;
  font-size: 22px;
}

.footer-column a {
  font-size: 19px;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.42);
  font-size: 17px;
}

.social-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(7, 95, 154, 0.08);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.course-detail-page {
  display: grid;
  gap: 26px;
}

.course-detail-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(320px, 1.14fr);
  gap: 34px;
  align-items: stretch;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.course-detail-cover {
  min-height: 410px;
  border-radius: 16px;
  background: var(--cover-pattern);
}

.course-detail-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.course-detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 62px);
  line-height: 1.1;
}

.course-detail-copy p {
  margin: 0;
  color: #5f6d75;
  font-size: 21px;
  line-height: 1.65;
}

.course-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Admin-editable website content */
.logo.has-image {
  justify-content: flex-start;
  gap: 0;
  padding: 0;
}

.logo.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo.has-image span {
  display: none;
}

.home-landing.has-admin-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(248, 252, 255, 0.86), rgba(244, 255, 249, 0.78)),
    var(--hero-banner-image);
  background-size: cover;
  background-position: center;
}

.home-landing.has-admin-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.76)),
    radial-gradient(circle at 12% 22%, rgba(200, 247, 223, 0.46), transparent 36%);
  pointer-events: none;
}

.home-landing.has-admin-hero .hero-copy {
  position: relative;
  z-index: 1;
}

.tutor-real-image {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
}

.tutor-thumbs button {
  overflow: hidden;
}

.tutor-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-card.has-uploaded-cover .card-cover,
.landing-course-card.has-uploaded-cover .landing-course-cover,
.course-detail-hero.has-uploaded-cover .course-detail-cover {
  background-image: var(--course-image);
  background-size: cover;
  background-position: center;
}

.post-hero.has-uploaded-cover {
  background-image:
    linear-gradient(180deg, rgba(4, 24, 38, 0.18), rgba(4, 24, 38, 0.68)),
    var(--course-image);
  background-size: cover;
  background-position: center;
}

.course-card.has-uploaded-cover .card-cover::before,
.course-card.has-uploaded-cover .card-cover::after {
  display: none;
}

.post-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.post-image-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

/* 100% viewport scale tuning */
.topbar {
  grid-template-columns: 176px minmax(0, 1fr) auto auto;
  gap: 14px;
  min-height: 76px;
  padding: 9px 18px;
}

.logo {
  width: 154px;
  height: 34px;
}

.logo span {
  font-size: 28px;
}

.main-nav {
  gap: clamp(18px, 2.9vw, 34px);
  padding-right: clamp(16px, 2.6vw, 42px);
  font-size: clamp(17px, 1.55vw, 23px);
}

.main-nav a {
  padding: 8px 0;
  border-bottom-width: 3px;
}

.language-btn {
  min-width: 36px;
  font-size: 14px;
}

.pill-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 22px;
  font-size: clamp(16px, 1.45vw, 21px);
}

.course-apply-btn svg {
  width: 24px;
  height: 24px;
}

.page {
  min-height: calc(100vh - 76px);
}

.home-landing {
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 0.78fr);
  gap: clamp(18px, 2.4vw, 38px);
  min-height: calc(100vh - 76px);
  align-items: center;
  padding-top: clamp(54px, 7vw, 86px);
  padding-bottom: clamp(54px, 7vw, 86px);
}

.hero-copy {
  width: min(940px, 100%);
  margin: 0;
  text-align: left;
}

.hero-copy h1 {
  max-width: 940px;
  margin-left: clamp(42px, 5.2vw, 92px);
  font-size: clamp(46px, 4.55vw, 82px);
  line-height: 1.06;
  font-weight: 720;
}

.hero-copy p {
  display: block;
  max-width: 620px;
  margin: 22px 0 0;
  color: #4f626d;
  font-size: clamp(17px, 1.3vw, 22px);
  line-height: 1.65;
}

.hero-copy .hero-teacher-credit {
  display: block !important;
  max-width: 920px;
  margin: clamp(18px, 2.2vw, 28px) 0 0 clamp(42px, 5.2vw, 92px) !important;
  color: #4f5d68 !important;
  font-size: clamp(21px, 1.55vw, 28px);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

.hero-actions {
  justify-content: flex-start;
  gap: clamp(18px, 2vw, 28px);
  margin-top: clamp(28px, 3.6vw, 48px);
  margin-left: clamp(42px, 5.2vw, 92px);
}

.glass-cta {
  min-width: clamp(246px, 15vw, 310px);
  min-height: clamp(70px, 5.1vw, 86px);
  padding-inline: clamp(32px, 3vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  font-size: clamp(23px, 1.75vw, 30px);
  font-weight: 500;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 22px 48px rgba(27, 72, 92, 0.15);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
}

.primary-cta.glass-cta {
  background: rgba(255, 255, 255, 0.64);
  color: #050505;
}

.line-cta.glass-cta {
  background: rgba(9, 191, 96, 0.76);
  color: #fff;
}

.line-cta .line-badge {
  height: 42px;
  min-width: 60px;
  font-size: 14px;
}

.pill-btn,
.primary-cta,
.secondary-cta,
.view-all-btn,
.glass-cta,
.mobile-cart,
.menu-btn,
.language-btn,
.carousel-dots button,
.tutor-thumbs button,
.faq-item button {
  position: relative;
  overflow: hidden;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    filter 180ms ease;
  will-change: transform;
}

.primary-cta::after,
.secondary-cta::after,
.view-all-btn::after,
.glass-cta::after,
.pill-btn::after,
.mobile-cart::after,
.menu-btn::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -60%;
  width: 42%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  opacity: 0;
  transform: skewX(-18deg);
}

.primary-cta:hover,
.primary-cta:focus-visible,
.secondary-cta:hover,
.secondary-cta:focus-visible,
.view-all-btn:hover,
.view-all-btn:focus-visible,
.glass-cta:hover,
.glass-cta:focus-visible,
.pill-btn:hover,
.pill-btn:focus-visible,
.mobile-cart:hover,
.mobile-cart:focus-visible,
.menu-btn:hover,
.menu-btn:focus-visible {
  transform: translateY(-3px);
  filter: saturate(1.04);
}

.primary-cta:hover::after,
.primary-cta:focus-visible::after,
.secondary-cta:hover::after,
.secondary-cta:focus-visible::after,
.view-all-btn:hover::after,
.view-all-btn:focus-visible::after,
.glass-cta:hover::after,
.glass-cta:focus-visible::after,
.pill-btn:hover::after,
.pill-btn:focus-visible::after,
.mobile-cart:hover::after,
.mobile-cart:focus-visible::after,
.menu-btn:hover::after,
.menu-btn:focus-visible::after {
  opacity: 1;
  animation: buttonShine 720ms ease both;
}

.primary-cta:active,
.secondary-cta:active,
.view-all-btn:active,
.glass-cta:active,
.pill-btn:active,
.mobile-cart:active,
.menu-btn:active,
.language-btn:active {
  transform: translateY(0) scale(0.985);
}

.line-cta.glass-cta:hover,
.line-cta.glass-cta:focus-visible {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 24px 52px rgba(9, 191, 96, 0.24);
}

.primary-cta.glass-cta:hover,
.primary-cta.glass-cta:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 24px 52px rgba(27, 72, 92, 0.18);
}

.view-all-btn:hover,
.view-all-btn:focus-visible,
.secondary-cta:hover,
.secondary-cta:focus-visible {
  box-shadow: 0 18px 42px rgba(27, 72, 92, 0.16);
}

@keyframes buttonShine {
  from {
    left: -60%;
  }
  to {
    left: 125%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pill-btn,
  .primary-cta,
  .secondary-cta,
  .view-all-btn,
  .glass-cta,
  .mobile-cart,
  .menu-btn,
  .language-btn,
  .carousel-dots button,
  .tutor-thumbs button,
  .faq-item button {
    transition: none;
  }

  .primary-cta:hover::after,
  .primary-cta:focus-visible::after,
  .secondary-cta:hover::after,
  .secondary-cta:focus-visible::after,
  .view-all-btn:hover::after,
  .view-all-btn:focus-visible::after,
  .glass-cta:hover::after,
  .glass-cta:focus-visible::after,
  .pill-btn:hover::after,
  .pill-btn:focus-visible::after,
  .mobile-cart:hover::after,
  .mobile-cart:focus-visible::after,
  .menu-btn:hover::after,
  .menu-btn:focus-visible::after {
    animation: none;
  }
}

.hero-media {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1.18 / 1;
  max-height: 470px;
  justify-self: start;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(231, 246, 255, 0.54)),
    linear-gradient(120deg, rgba(200, 247, 223, 0.6), rgba(158, 201, 244, 0.52));
  box-shadow: 0 26px 56px rgba(27, 72, 92, 0.14);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-media.is-empty {
  display: grid;
  place-items: center;
}

.hero-media-mark {
  color: rgba(7, 95, 154, 0.18);
  font-size: clamp(38px, 4vw, 62px);
  font-weight: 900;
  letter-spacing: 0;
}

.home-landing.has-admin-hero {
  background:
    linear-gradient(120deg, rgba(200, 247, 223, 0.94) 0%, rgba(249, 255, 252, 0.86) 38%, rgba(231, 246, 255, 0.9) 68%, rgba(158, 201, 244, 0.9) 100%);
  background-size: auto;
  background-position: initial;
}

.home-landing.has-admin-hero::before {
  display: none;
}

.home-landing.has-admin-hero .hero-copy,
.home-landing.has-admin-hero .hero-media {
  position: relative;
  z-index: 1;
}

.course-detail-meta > span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(7, 95, 154, 0.1);
  color: var(--blue);
  font-weight: 700;
}

.course-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.legal-page .post-content p + p {
  margin-top: 18px;
}

.catalog-layout {
  grid-template-columns: 285px 1fr;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(290px, 1fr));
  gap: 30px 34px;
}

.course-card {
  min-height: 300px;
}

.card-cover {
  height: 132px;
}

@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 205px 1fr auto auto;
  }

  .mobile-cart {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #1e2b34;
  }

  .mobile-cart svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tutor-layout,
  .course-detail-hero {
    grid-template-columns: 1fr;
  }

  .tutor-gem-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommended-grid,
  .feature-row.upgraded,
  .course-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
  }

  .home-landing {
    min-height: 500px;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 10vw, 56px);
  }

  .hero-actions {
    flex-direction: column;
  }

  .glass-cta {
    width: 100%;
  }

  .section-heading,
  .section-heading.is-left {
    text-align: center;
  }

  .recommended-grid,
  .feature-row.upgraded,
  .course-detail-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .recommended-grid {
    padding-inline: 0;
  }

  .outside-left,
  .outside-right {
    top: 38%;
  }

  .faq-item button {
    grid-template-columns: 42px 1fr 28px;
  }

  .faq-answer {
    padding: 0 8px 22px 56px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Final responsive pass for the calmer 100% scale */
@media (max-width: 1120px) {
  .topbar {
    grid-template-columns: 168px 1fr auto auto;
  }

  .mobile-cart {
    grid-column: 3;
    justify-self: end;
    width: 56px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 14px 34px rgba(27, 72, 92, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-cart svg {
    width: 28px;
    height: 28px;
  }

  .menu-btn {
    grid-column: 4;
    width: 56px;
    height: 46px;
    border-radius: 16px;
  }

  .main-nav {
    gap: 22px;
    padding-right: 22px;
    font-size: 20px;
  }

  .home-landing {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.76fr);
  }

  .hero-copy h1 {
    font-size: clamp(40px, 5.4vw, 62px);
  }
}

@media (max-width: 860px) {
  body {
    background:
      linear-gradient(120deg, rgba(200, 247, 223, 0.94) 0%, rgba(249, 255, 252, 0.88) 48%, rgba(158, 201, 244, 0.74) 100%);
    background-attachment: scroll;
  }

  .home-site {
    background:
      linear-gradient(120deg, rgba(200, 247, 223, 0.94) 0%, rgba(249, 255, 252, 0.88) 48%, rgba(158, 201, 244, 0.74) 100%);
    background-attachment: scroll;
  }

  .home-landing {
    grid-template-columns: 1fr;
    min-height: auto;
    width: 100%;
    max-width: 100vw;
    padding-top: 40px;
    padding-bottom: 52px;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .hero-copy h1 {
    max-width: 100%;
    margin-left: 0;
    overflow-wrap: normal;
  }

  .hero-actions {
    justify-content: center;
    margin-left: 0;
  }

  .hero-media {
    order: -1;
    width: min(78vw, 340px);
    aspect-ratio: 4 / 5;
    max-height: none;
    justify-self: center;
  }

  .hero-copy .hero-teacher-credit {
    max-width: min(100%, 620px);
    margin: 18px auto 0 !important;
    white-space: normal;
  }

  .tutor-gem-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    grid-template-columns: 1fr auto auto;
    min-height: 68px;
  }

  .logo {
    display: none;
  }

  .mobile-cart {
    grid-column: 2;
    width: 56px;
    height: 46px;
    justify-self: end;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
    box-shadow: 0 14px 34px rgba(27, 72, 92, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobile-cart svg {
    width: 28px;
    height: 28px;
  }

  .menu-btn {
    grid-column: 3;
    width: 56px;
    height: 46px;
    border-radius: 16px;
  }

  .hero-copy h1 {
    font-size: clamp(32px, 9vw, 43px);
    line-height: 1.1;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .glass-cta {
    min-height: 50px;
    font-size: 18px;
  }

  .home-landing .glass-cta {
    min-height: 58px;
    width: min(100%, 340px);
  }
}

/* Data-driven media and card proportions */
.home-landing,
.home-landing.has-admin-hero {
  background: transparent;
}

.hero-media {
  width: min(100%, 520px);
  aspect-ratio: 4 / 5;
  max-height: 640px;
  justify-self: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-media.is-empty {
  min-height: 340px;
}

.hero-media-mark {
  color: #050505;
  font-size: clamp(120px, 13vw, 210px);
  font-weight: 900;
  line-height: 1;
}

.hero-copy .hero-teacher-credit {
  white-space: normal;
  text-wrap: balance;
}

.hero-actions {
  width: 100%;
  justify-content: center;
  margin-left: 0;
}

.hero-actions .glass-cta {
  width: clamp(250px, 18vw, 320px);
  min-width: 0;
}

.landing-course-card {
  min-height: 0;
  grid-template-rows: auto auto;
}

.landing-course-cover,
.landing-course-body {
  min-height: 0;
}

.landing-course-cover {
  aspect-ratio: 3 / 2;
}

.landing-course-cover,
.course-detail-cover {
  position: relative;
}

.landing-course-cover .card-cover-mark,
.course-detail-cover .card-cover-mark {
  font-size: clamp(58px, 8vw, 104px);
}

.course-card {
  min-height: 360px;
}

.course-card .card-cover {
  height: 216px;
}

.course-card .card-body {
  min-height: 144px;
}

@media (max-width: 860px) {
  .hero-media {
    width: min(70vw, 360px);
    aspect-ratio: 4 / 5;
    max-height: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .glass-cta {
    width: min(100%, 340px);
  }
}

.content-area .promotion-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-area .topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-area .promotion-grid .course-card,
.content-area .topic-grid .course-card {
  min-height: 0;
}

.content-area .promotion-grid .card-cover,
.content-area .topic-grid .card-cover {
  height: auto;
  aspect-ratio: 3 / 2;
}

.content-area .promotion-grid .card-body,
.content-area .topic-grid .card-body {
  min-height: 170px;
}

@media (max-width: 1180px) {
  .content-area .topic-grid,
  .content-area .promotion-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar,
  .content-area {
    width: 100%;
    min-width: 0;
  }

  .sidebar h1 {
    font-size: clamp(25px, 8vw, 34px);
    white-space: nowrap;
  }

  .content-area .topic-grid,
  .content-area .promotion-grid { grid-template-columns: 1fr; }

  .courses-page .site-footer { margin-top: 56px; }
}
