/* Penyesuaian khusus beranda MathSMP. Tidak mengubah halaman lain. */
.home-page .nav-wrap {
  min-height: 76px;
}

.home-page .brand-mark {
  flex: 0 0 40px;
}

.home-page .brand-mark svg {
  width: 23px;
  height: 23px;
  display: block;
}

.home-page .nav-menu-shell {
  display: contents;
}

.home-page .mobile-menu-toggle {
  display: none;
}

.home-page .main-nav {
  align-items: center;
}

.home-page .main-nav > a,
.home-page .nav-dropdown > summary {
  font-size: 13px;
}

.home-page .main-nav > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-page .main-nav > a.nav-cta {
  display: inline-flex !important;
}

.home-page .main-nav > a svg,
.home-page .text-link svg,
.home-page .card-bottom svg,
.home-page .btn svg,
.home-page .footer-repo-link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.home-page .nav-leading-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.home-page .chevron {
  width: 15px;
  height: 15px;
  font-size: initial;
  transition: transform .18s ease;
}

.home-page .nav-dropdown[open] > summary .chevron {
  transform: rotate(180deg);
}

.home-page .eyebrow svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.home-page .hero-copy-column {
  min-width: 0;
}

.home-page .hero-visual {
  min-width: 0;
  min-height: 315px;
}

.home-page .math-card {
  width: min(100%, 370px);
  transform: rotate(1.5deg);
}

.home-page .math-card-top {
  letter-spacing: .5px;
}

.home-page .sample-question {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f4f7fc;
}

.home-page .sample-question strong {
  color: #193765;
  font-size: 14px;
  line-height: 1.45;
}

.home-page .sample-question span {
  color: #52647d;
  font-size: 13px;
  line-height: 1.5;
}

.home-page .sample-solution {
  margin-top: 11px;
  border: 1px solid #d5e4ff;
  border-radius: 10px;
  background: #eef5ff;
  color: #1d55ad;
  padding: 10px 12px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
}

.home-page .sample-caption {
  margin: 10px 0 0;
  color: #586a82;
  font-size: 13px;
  line-height: 1.5;
}

.home-page .float-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.home-page .float-note svg {
  width: 16px;
  height: 16px;
}

.home-page .class-grid {
  align-items: stretch;
}

.home-page .class-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.home-page .class-icon svg,
.home-page .feature-icon svg {
  display: block;
  width: 25px;
  height: 25px;
}

.home-page .class-icon.icon-blue {
  color: #2563eb;
  background: #eaf2ff;
}

.home-page .class-icon.icon-violet {
  color: #7654cf;
  background: #f1edff;
}

.home-page .class-icon.icon-green {
  color: #0b946b;
  background: #e7f8f1;
}

.home-page .class-tag {
  font-size: 12px;
}

.home-page .class-card > p,
.home-page .feature-card > p {
  color: #53647b;
  font-size: 14px;
  line-height: 1.6;
}

.home-page .class-topics {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.home-page .class-topics span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  background: #f7f9fc;
  color: #455872;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.home-page .class-card .card-bottom {
  margin-top: auto;
  padding-top: 16px;
}

.home-page .feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.home-page .feature-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.home-page .feature-card .card-bottom {
  margin-top: auto;
  padding-top: 18px;
}

.home-page .feature-icon {
  width: 48px;
  height: 48px;
  font-size: initial;
}

.home-page .feature-icon.green {
  color: #0b946b;
}

.home-page .feature-icon.purple {
  color: #7553ce;
}

.home-page .feature-icon.orange {
  color: #d66d25;
}

.home-page .tka-highlight-section {
  padding-top: 8px;
  padding-bottom: 60px;
}

.home-page .tka-highlight {
  grid-template-columns: 1.1fr .9fr;
  gap: 25px;
  padding: 27px 32px;
}

.home-page .tka-highlight h2 {
  color: #fff;
  font-size: clamp(24px, 2.8vw, 31px);
  line-height: 1.22;
}

.home-page .tka-highlight h2 em {
  color: #a9ccff;
  font-style: normal;
}

.home-page .tka-highlight-copy > p {
  color: #e0eaff;
  font-size: 14px;
  line-height: 1.6;
}

.home-page .tka-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid #ffffff45;
  border-radius: 30px;
  background: #ffffff16;
  color: #f0f5ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .7px;
}

.home-page .tka-mini-grid {
  grid-template-columns: 1fr;
  gap: 9px;
}

.home-page .tka-mini-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  background: #ffffff12;
}

.home-page .tka-mini-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid #ffffff2a;
  border-radius: 11px;
  background: #ffffff0c;
  color: #c9dcff;
}

.home-page .tka-mini-icon svg {
  display: block;
  width: 21px;
  height: 21px;
}

.home-page .tka-mini-card > div {
  display: grid;
  gap: 2px;
}

.home-page .tka-mini-card strong {
  color: #fff;
  font-size: 14px;
}

.home-page .tka-mini-card small {
  color: #e0eaff;
  font-size: 13px;
  line-height: 1.45;
}

.home-page .footer-grid {
  grid-template-columns: 1.2fr .7fr 1.1fr;
  gap: 34px;
}

.home-page .footer-heading {
  display: block;
  color: #fff;
}

.home-page .footer-links {
  margin-top: 12px;
}

.home-page .footer-project-copy {
  max-width: 290px;
  margin: 12px 0;
  color: #aebfd9;
  font-size: 13px;
  line-height: 1.6;
}

.home-page .footer-repo-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dce8ff;
  font-size: 13px;
  font-weight: 700;
}

.home-page .footer-repo-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-page .footer-repo-link svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 1000px) {
  .home-page .main-nav > a,
  .home-page .nav-dropdown > summary {
    font-size: 12px;
    padding: 8px 9px;
  }
}

@media (max-width: 850px) {
  .home-page .nav-wrap {
    min-height: 68px;
    padding: 10px 0;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .home-page .nav-menu-shell {
    position: relative;
    display: block;
    margin-left: auto;
  }

  .home-page .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border: 1px solid #dce5f2;
    border-radius: 11px;
    background: #fff;
    color: #1c3b6e;
    font: 700 14px 'DM Sans', Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 13px #102a560c;
  }

  .home-page .mobile-menu-toggle svg {
    display: block;
    width: 19px;
    height: 19px;
  }

  .home-page .mobile-menu-toggle:focus-visible,
  .home-page .main-nav a:focus-visible,
  .home-page .nav-dropdown summary:focus-visible {
    outline: 3px solid #8bb8ff;
    outline-offset: 2px;
  }

  .home-page .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 50;
    display: none;
    width: min(320px, calc(100vw - 28px));
    padding: 10px;
    border: 1px solid #e2e9f3;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 45px #102a5625;
    overflow: visible;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .home-page .nav-menu-shell.is-open .main-nav {
    display: flex;
  }

  .home-page .main-nav > a,
  .home-page .nav-dropdown > summary {
    display: flex;
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
  }

  .home-page .main-nav > a.nav-cta {
    display: flex !important;
    justify-content: center;
    margin-top: 5px;
    padding: 11px 14px !important;
    color: #fff !important;
  }

  .home-page .nav-dropdown {
    width: 100%;
  }

  .home-page .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin: 3px 0 5px 12px;
    padding: 3px 0 3px 9px;
    border: 0;
    border-left: 2px solid #dbe7fb;
    border-radius: 0;
    box-shadow: none;
  }

  .home-page .nav-dropdown-menu a {
    padding: 9px 11px;
    font-size: 13px;
  }

  .home-page .hero-grid {
    grid-template-columns: 1.1fr .9fr;
    gap: 24px;
  }

  .home-page .hero-visual {
    min-height: 280px;
  }

  .home-page .float-note {
    right: -3px;
  }

  .home-page .tka-highlight {
    grid-template-columns: 1fr .85fr;
    padding: 25px 24px;
  }
}

@media (max-width: 700px) {
  .home-page .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-page .hero-visual {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .home-page .math-card {
    width: min(100%, 380px);
    transform: none;
  }

  .home-page .float-note {
    position: static;
    align-self: center;
    margin-top: 12px;
    transform: none;
  }

  .home-page .class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .tka-highlight {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .home-page .tka-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-page .tka-mini-card {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px;
  }
}

@media (max-width: 480px) {
  .home-page .container {
    width: min(100% - 28px, 1160px);
  }

  .home-page .hero {
    padding: 48px 0 46px;
  }

  .home-page .hero h1 {
    font-size: clamp(34px, 9vw, 39px);
    letter-spacing: -1.2px;
  }

  .home-page .hero-copy {
    font-size: 15px;
  }

  .home-page .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .home-page .hero-actions .btn {
    width: 100%;
  }

  .home-page .class-grid,
  .home-page .feature-grid {
    grid-template-columns: 1fr;
  }

  .home-page .class-card,
  .home-page .feature-card {
    padding: 20px;
  }

  .home-page .section {
    padding: 46px 0;
  }

  .home-page .tka-highlight-section {
    padding-top: 0;
    padding-bottom: 46px;
  }

  .home-page .tka-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-page .tka-mini-card {
    min-width: 0;
    padding: 12px 10px;
  }

  .home-page .tka-mini-card strong {
    font-size: 13px;
  }

  .home-page .tka-mini-card small {
    font-size: 12px;
  }

  .home-page .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page *,
  .home-page *::before,
  .home-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== Perbaikan hero: label selalu berada di luar kartu ===== */
.home-page .hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 315px;
}

.home-page .math-card {
  width: min(100%, 420px);
  max-width: 100%;
  transform: none;
}

.home-page .float-note {
  position: static;
  right: auto;
  bottom: auto;
  align-self: flex-end;
  margin: 12px max(0px, calc((100% - 420px) / 2)) 0 0;
  transform: none;
}

@media (max-width: 850px) {
  .home-page .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .home-page .hero-visual {
    width: 100%;
    min-height: 0;
  }

  .home-page .math-card {
    width: min(100%, 460px);
  }

  .home-page .float-note {
    margin-right: max(0px, calc((100% - 460px) / 2));
  }
}

@media (max-width: 480px) {
  .home-page .float-note {
    align-self: center;
    margin: 12px 0 0;
  }
}
