:root {
  --primary: #6c3fc5;
  --primary-dark: #432275;
  --primary-light: #eee6ff;
  --secondary: #ffd43b;
  --success: #2ead68;
  --warning: #ff8a34;
  --danger: #e94b5a;
  --ink: #29243a;
  --muted: #777286;
  --soft: #f7f5fb;
  --line: #e7e1f0;
  --white: #fff;
  --shadow: 0 12px 32px rgba(67, 34, 117, 0.09);
  --radius: 22px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

/* =========================
   TYPOGRAPHY
========================= */

body {
  font-family: "Google Sans", sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.65;
}

h1,
h2,
h3,
h4,
.navbar-brand {
  font-family: "Plus Jakarta Sans", sans-serif;
  letter-spacing: -0.035em;
}

/* Judul */
h1,
h2 {
  font-weight: 800;
}

h3,
h4 {
  font-weight: 700;
}

/* Navigasi */
.navbar-nav .nav-link {
  font-family: "Google Sans", sans-serif;
  font-weight: 500;
}

/* Tombol */
.btn {
  font-family: "Google Sans", sans-serif;
  font-weight: 600;
}

/* Formulir */
input,
select,
textarea,
.form-control,
.form-select {
  font-family: "Google Sans", sans-serif;
}

/* Tabel */
table {
  font-family: "Google Sans", sans-serif;
}

a {
  transition:
    color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.navbar {
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(67, 34, 117, 0.04);
}
.navbar-brand {
  font-size: 1.22rem;
  letter-spacing: -0.05em;
  color: var(--primary-dark) !important;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  width: 38px;
  height: 38px;
  border-radius: 13px;
  margin-right: 7px;
}
.brand-dot {
  color: var(--warning);
}
.nav-link {
  font-weight: 700;
  color: #625b72 !important;
  padding: 0.65rem 0.85rem !important;
  border-radius: 12px;
}
.nav-link:hover,
.nav-link:focus {
  color: var(--primary) !important;
  background: var(--primary-light);
}
.navbar .btn-primary {
  margin-left: 0.25rem;
}
.btn {
  font-weight: 700;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(108, 63, 197, 0.2);
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 85% 18%,
      rgba(255, 212, 59, 0.35),
      transparent 20%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(46, 173, 104, 0.14),
      transparent 24%
    ),
    linear-gradient(130deg, #fbf9ff 0%, #f0eaff 58%, #fff9df 100%);
}
.hero:after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border: 38px solid rgba(108, 63, 197, 0.06);
  border-radius: 50%;
  right: -100px;
  bottom: -145px;
  pointer-events: none;
}
.hero-inner {
  padding: 86px 0 78px;
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #ded0ff;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  border-radius: 100px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.55rem, 5vw, 4.65rem);
  line-height: 1.08;
  font-weight: 800;
  margin: 22px 0;
  color: var(--primary-dark);
}
.text-gradient {
  color: var(--primary);
  position: relative;
}
.hero p {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--muted);
  max-width: 590px;
}
.hero-visual {
  min-height: 340px;
  display: grid;
  place-items: center;
  position: relative;
}
.hero-avatar {
  width: 250px;
  height: 250px;
  border-radius: 39% 61% 56% 44% / 41% 42% 58% 59%;
  background: linear-gradient(145deg, var(--primary), #9b76ed);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 6rem;
  box-shadow: 0 30px 70px rgba(108, 63, 197, 0.28);
  transform: rotate(-5deg);
  position: relative;
}
.hero-avatar:after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 2px dashed rgba(108, 63, 197, 0.35);
  border-radius: inherit;
}
.floating-note {
  position: absolute;
  background: #fff;
  padding: 14px 17px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-weight: 800;
  font-size: 0.9rem;
}
.floating-note i {
  color: var(--primary);
  margin-right: 7px;
}
.note-one {
  top: 32px;
  right: 0;
  border-bottom: 4px solid var(--secondary);
}
.note-two {
  bottom: 26px;
  left: 0;
  border-bottom: 4px solid var(--success);
}
.section {
  padding: 76px 0;
}
.section-soft {
  background: var(--soft);
}
.section-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.13em;
}
.section-title {
  font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin: 10px 0 12px;
  color: var(--primary-dark);
}
.section-subtitle {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.85;
}
.feature-card,
.content-card {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  transition:
    transform 0.22s,
    box-shadow 0.22s,
    border-color 0.22s;
  overflow: hidden;
}
.feature-card {
  padding: 27px;
  position: relative;
}
.feature-card:before {
  content: "";
  height: 5px;
  position: absolute;
  inset: 0 0 auto;
  background: var(--primary);
}
.feature-card:nth-child(4n + 2):before {
  background: var(--secondary);
}
.feature-card:nth-child(4n + 3):before {
  background: var(--success);
}
.feature-card:nth-child(4n):before {
  background: var(--warning);
}
.feature-card:hover,
.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(67, 34, 117, 0.12);
  border-color: #d8c9f5;
}
.icon-box {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 17px;
  font-size: 1.3rem;
  margin-bottom: 18px;
}
.feature-card:nth-child(4n + 2) .icon-box {
  background: #fff6cf;
  color: #9b7700;
}
.feature-card:nth-child(4n + 3) .icon-box {
  background: #e2f7eb;
  color: var(--success);
}
.feature-card:nth-child(4n) .icon-box {
  background: #fff0e5;
  color: var(--warning);
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-dark);
}
.feature-card p,
.content-card p {
  color: var(--muted);
  line-height: 1.75;
}
.content-card .card-body {
  padding: 23px;
}
.cover-placeholder {
  height: 175px;
  background: linear-gradient(135deg, #eee6ff, #fff4c2);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 3rem;
}
.video-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #eee6ff;
}
.badge-soft {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 7px 11px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 0.78rem;
}
.filter-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 26px rgba(67, 34, 117, 0.045);
}
.page-hero {
  padding: 52px 0;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(255, 212, 59, 0.3),
      transparent 20%
    ),
    linear-gradient(120deg, #f4edff, #fbf9ff 60%, #eaf8ef);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-weight: 850;
  color: var(--primary-dark);
  font-size: clamp(2rem, 4vw, 3rem);
}
.form-control,
.form-select {
  border-color: #ded7eb;
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  color: var(--ink);
}
.form-control:focus,
.form-select:focus {
  border-color: #a98ae8;
  box-shadow: 0 0 0 0.2rem rgba(108, 63, 197, 0.12);
}
.site-footer {
  border-top: 1px solid #594184;
  background: var(--primary-dark);
  color: #fff;
}
.site-footer .text-secondary {
  color: #d6cbe9 !important;
}
.site-footer .brand-dot {
  color: var(--secondary);
}
/* Admin */
.admin-body {
  background: #f7f5fb;
  min-height: 100vh;
}
.admin-sidebar {
  width: 258px;
  min-height: 100vh;
  background: linear-gradient(180deg, #432275, #32185d);
  color: #e8def8;
  position: fixed;
  left: 0;
  top: 0;
  padding: 24px 16px;
  box-shadow: 8px 0 28px rgba(50, 24, 93, 0.08);
  z-index: 10;
}
.admin-sidebar > a:first-child {
  color: #fff !important;
}
.admin-sidebar a {
  color: #e0d5f2;
  text-decoration: none;
  display: block;
  padding: 11px 13px;
  border-radius: 12px;
  margin: 4px 0;
  font-weight: 600;
  transition: 0.2s;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255, 212, 59, 0.16);
  color: #ffe16c;
}
.admin-sidebar hr {
  border-color: rgba(255, 255, 255, 0.18) !important;
}
.admin-main {
  margin-left: 258px;
  padding: 30px;
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding: 20px 23px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 7px 24px rgba(67, 34, 117, 0.04);
}
.admin-top h1 {
  color: var(--primary-dark);
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 23px;
  border-radius: 20px;
  box-shadow: 0 7px 24px rgba(67, 34, 117, 0.04);
}
.stat-number {
  font-size: 2rem;
  font-weight: 850;
  color: var(--primary);
}
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  overflow: auto;
  box-shadow: 0 7px 24px rgba(67, 34, 117, 0.04);
}
.table thead th {
  background: #f0eaff;
  color: var(--primary-dark);
  border-bottom-color: #dfd2f6;
  white-space: nowrap;
}
.table td {
  vertical-align: middle;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 212, 59, 0.35),
      transparent 24%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(46, 173, 104, 0.18),
      transparent 26%
    ),
    linear-gradient(135deg, #f1eaff, #fff);
}
.login-card {
  width: min(440px, calc(100% - 30px));
  background: #fff;
  border: 1px solid var(--line);
  padding: 36px;
  border-radius: 26px;
  box-shadow: 0 24px 80px rgba(67, 34, 117, 0.15);
}
.login-card h1,
.login-card h2 {
  color: var(--primary-dark);
}
@media (max-width: 991px) {
  .hero-inner {
    padding: 58px 0;
  }
  .hero-visual {
    min-height: 285px;
    margin-top: 12px;
  }
  .hero-avatar {
    width: 215px;
    height: 215px;
    font-size: 5rem;
  }
  .admin-sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
  }
  .admin-main {
    margin-left: 0;
    padding: 18px;
  }
  .admin-sidebar .admin-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-top {
    gap: 15px;
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 575px) {
  .section {
    padding: 54px 0;
  }
  .hero h1 {
    font-size: 2.55rem;
  }
  .floating-note {
    font-size: 0.78rem;
    padding: 10px 12px;
  }
  .note-one {
    right: -2px;
  }
  .note-two {
    left: -2px;
  }
  .feature-card {
    padding: 22px;
  }
  .login-card {
    padding: 26px;
  }
}

/* =========================================================
   NAVBAR UNGU + HAMBURGER RESPONSIF
   ========================================================= */
.navbar.navbar-theme {
  background: var(--primary-dark, #432275) !important;
  background-color: #432275 !important;
  border-bottom: 3px solid #ffd43b !important;
  box-shadow: 0 5px 20px rgba(67, 34, 117, 0.16);
}

.navbar.navbar-theme .navbar-brand,
.navbar.navbar-theme .navbar-brand:hover,
.navbar.navbar-theme .navbar-brand:focus {
  color: #ffffff !important;
}

.navbar.navbar-theme .brand-mark {
  background: rgba(255, 212, 59, 0.18);
  color: #ffd43b;
}

.navbar.navbar-theme .brand-dot {
  color: #ffd43b;
}

.navbar.navbar-theme .navbar-nav .nav-link {
  color: #f4edff !important;
  border: 1px solid transparent;
}

.navbar.navbar-theme .navbar-nav .nav-link:hover,
.navbar.navbar-theme .navbar-nav .nav-link:focus {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.navbar.navbar-theme .navbar-nav .nav-link.active,
.navbar.navbar-theme .navbar-nav .nav-link.active:hover,
.navbar.navbar-theme .navbar-nav .nav-link.active:focus {
  color: #432275 !important;
  background: #ffd43b !important;
  font-weight: 800;
  border-color: #ffd43b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.navbar.navbar-theme .navbar-toggler.custom-navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.08);
}

.navbar.navbar-theme .navbar-toggler.custom-navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 212, 59, 0.28);
}

.hamburger-lines {
  display: flex;
  width: 25px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-lines span {
  display: block;
  height: 3px;
  width: 100%;
  border-radius: 99px;
  background: #ffd43b;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

/* Hamburger berubah menjadi X saat menu terbuka */
.navbar
  .navbar-toggler[aria-expanded="true"]
  .hamburger-lines
  span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}
.navbar
  .navbar-toggler[aria-expanded="true"]
  .hamburger-lines
  span:nth-child(2) {
  opacity: 0;
}
.navbar
  .navbar-toggler[aria-expanded="true"]
  .hamburger-lines
  span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

@media (max-width: 991.98px) {
  .navbar.navbar-theme .navbar-collapse {
    padding: 12px 0 8px;
  }

  .navbar.navbar-theme .navbar-nav {
    align-items: stretch !important;
    gap: 4px !important;
  }

  .navbar.navbar-theme .navbar-nav .nav-link {
    display: block;
    padding: 11px 14px !important;
    border-radius: 10px;
  }

  .navbar.navbar-theme .navbar-nav .nav-link.active::after {
    left: auto;
    right: 14px;
    top: 50%;
    bottom: auto;
    width: 8px;
    height: 8px;
    transform: translateY(-50%);
    border-radius: 50%;
  }

  .navbar.navbar-theme .navbar-nav .nav-item.ms-lg-2 {
    margin-left: 0 !important;
    margin-top: 6px;
  }

  .navbar.navbar-theme .navbar-nav .btn-primary {
    display: inline-block;
    width: fit-content;
    margin-left: 0;
    padding: 9px 16px;
  }
}

/* ===== Modern learning portal refresh ===== */
:root {
  --primary: #6541c8;
  --primary-dark: #33205f;
  --primary-light: #f0eaff;
  --ink: #211b32;
  --muted: #777187;
  --soft: #f8f7fc;
  --line: #e9e5f2;
  --shadow: 0 18px 50px rgba(47, 29, 88, 0.09);
  --radius: 24px;
}
body {
  font-size: 15px;
  letter-spacing: -0.01em;
}
.navbar-theme {
  padding: 0.75rem 0;
  border-color: rgba(101, 65, 200, 0.1) !important;
}
.navbar-brand {
  display: flex;
  align-items: center;
  font-size: 1.15rem;
}
.navbar .nav-link {
  font-size: 0.92rem;
  border-radius: 12px;
  transition: all 0.2s;
}
.navbar .nav-link.active {
  color: var(--primary) !important;
  background: var(--primary-light);
}
.hero {
  background:
    radial-gradient(
      circle at 82% 15%,
      rgba(255, 212, 59, 0.3),
      transparent 20%
    ),
    radial-gradient(
      circle at 8% 90%,
      rgba(46, 173, 104, 0.12),
      transparent 25%
    ),
    linear-gradient(120deg, #fbfaff 0%, #f1ecff 57%, #fffbed 100%);
}
.hero-inner {
  padding: 78px 0 82px;
}
.hero h1 {
  letter-spacing: -0.065em;
  line-height: 1.04;
  font-size: clamp(2.7rem, 5vw, 4.6rem);
}
.hero p {
  font-size: 1.06rem;
  max-width: 560px;
}
.hero-visual {
  min-height: 390px;
}
.hero-profile-wrap {
  position: relative;
  width: min(340px, 78vw);
  height: 365px;
  margin: auto;
  transform: rotate(2deg);
}
.hero-profile-photo,
.hero-avatar-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 30px 36% 30px 30px;
  border: 8px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 28px 75px rgba(67, 34, 117, 0.22);
  background: linear-gradient(145deg, #6c3fc5, #a58be8);
}
.hero-avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 7rem;
}
.hero-profile-wrap:before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid rgba(101, 65, 200, 0.25);
  border-radius: 46% 46% 28px 28px;
  z-index: -1;
}
.profile-caption {
  position: absolute;
  bottom: 18px;
  left: -32px;
  right: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
  backdrop-filter: blur(12px);
}
.profile-caption strong,
.profile-caption small {
  display: block;
}
.profile-caption strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1rem;
  color: var(--ink);
}
.profile-caption small {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.profile-status {
  width: 11px;
  height: 11px;
  background: #2ead68;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #e4f7ec;
  flex: 0 0 auto;
}
.floating-note {
  border: 1px solid rgba(233, 229, 242, 0.8);
  font-size: 0.82rem;
  z-index: 2;
}
.note-one {
  right: -16px;
  top: 42px;
}
.note-two {
  left: -28px;
  bottom: 44px;
}
.section {
  padding: 82px 0;
}
.section-title {
  letter-spacing: -0.05em;
}
.section-kicker {
  letter-spacing: 0.12em;
}
.feature-card {
  height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 6px 24px rgba(47, 29, 88, 0.035);
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    border-color 0.25s;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: #d6c9f7;
}
.icon-box {
  border-radius: 16px;
  background: var(--primary-light);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.icon-box i {
  font-size: 1.2rem;
}
.feature-card h3 {
  font-size: 1.08rem;
  letter-spacing: -0.025em;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.75;
}
.btn {
  border-radius: 13px;
  font-weight: 700;
}
.btn-lg {
  padding: 0.85rem 1.3rem;
  font-size: 0.96rem;
}
.btn-primary {
  box-shadow: 0 9px 22px rgba(101, 65, 200, 0.2);
}
.btn-outline-primary {
  border-width: 1.5px;
}
.site-footer {
  background: #432275;
  border-top: 3px solid var(--warning);
}
.login-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 15%, #efe7ff, transparent 35%),
    linear-gradient(135deg, #faf9ff, #fff9e8);
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(100%, 460px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(26px, 5vw, 44px);
  box-shadow: var(--shadow);
}
.form-control,
.form-select {
  border: 1px solid #e2ddeb;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}
.form-control:focus,
.form-select:focus {
  border-color: #9a80e5;
  box-shadow: 0 0 0 0.22rem rgba(101, 65, 200, 0.12);
}
.admin-sidebar {
  box-shadow: 8px 0 35px rgba(20, 13, 40, 0.08);
}
.admin-top {
  backdrop-filter: blur(12px);
}
.table {
  vertical-align: middle;
}
.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #756d86;
  background: #f8f6fc;
  border-bottom: 0;
}
.table > :not(caption) > * > * {
  padding: 0.85rem 0.9rem;
}
.alert,
.modal-content {
  border-radius: 16px;
}
@media (max-width: 767.98px) {
  .hero-inner {
    padding: 55px 0 62px;
  }
  .hero-visual {
    min-height: 330px;
    margin-top: 10px;
  }
  .hero-profile-wrap {
    height: 300px;
    width: 260px;
  }
  .floating-note.note-one {
    right: -10px;
  }
  .floating-note.note-two {
    left: -10px;
  }
  .profile-caption {
    left: -15px;
    right: 10px;
    padding: 12px 14px;
  }
  .section {
    padding: 58px 0;
  }
  .feature-card {
    padding: 23px;
  }
}

/* ==========================================================
   FIX RESPONSIF: MENCEGAH HORIZONTAL OVERFLOW
   Diletakkan paling bawah agar menimpa aturan sebelumnya.
   ========================================================== */

/* Pengaman lebar viewport */
html {
    max-width: 100%;
    overflow-x: clip;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
}


/* =========================================
   MOBILE FIX - HORIZONTAL OVERFLOW
   ========================================= */

@media screen and (max-width: 767px) {

    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body {
        position: relative;
    }

    /* Container */
    .container,
    .container-fluid,
    .wrap,
    .spmb-page {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .spmb-page .wrap {
        width: calc(100% - 32px);
        margin-left: auto;
        margin-right: auto;
    }

    /* Grid */
    .row {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .row > * {
        min-width: 0;
    }

    /* Grid khusus halaman SPMB */
    .spmb-hero-grid,
    .spmb-process-grid,
    .spmb-contact-grid,
    .spmb-info-grid,
    .spmb-form-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }

    /* Gambar dan media */
    img,
    video,
    iframe {
        max-width: 100%;
    }

    /* Mencegah teks panjang melebar */
    h1, h2, h3, p, a, span, label {
        overflow-wrap: break-word;
    }

    /* Elemen dekorasi */
    .spmb-page::before,
    .spmb-page::after,
    .spmb-bottom-cta::before,
    .spmb-bottom-cta::after {
        max-width: 100%;
        pointer-events: none;
    }

    /* CTA */
    .spmb-bottom-cta,
    .spmb-bottom-cta-in {
        max-width: 100%;
        overflow: hidden;
    }

    /* Form */
    input,
    select,
    textarea,
    .form-control,
    .form-select {
        width: 100%;
        max-width: 100%;
    }

    /* Tabel */
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
    }
}

/* =====================================
   HERO SECTION - MOBILE SPACING FIX
===================================== */

@media (max-width: 576px) {

    .hero {
        padding: 48px 0 40px;
        overflow: hidden;
    }

    .hero .hero-inner {
        width: 100%;
        max-width: 100%;
        padding-left: 25px;
        padding-right: 25px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .hero .row {
        margin-left: 0;
        margin-right: 0;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
        line-height: 1.12;
        margin-bottom: 20px;
    }

    .hero p {
        font-size: 15px;
        line-height: 1.85;
        margin-bottom: 22px;
    }

    .hero .d-flex {
        gap: 12px !important;
    }

    .hero .btn {
        font-size: 14px;
        padding: 11px 20px !important;
    }

    .hero .small {
        gap: 12px 18px !important;
        line-height: 1.6;
    }

    .hero .hero-visual {
        margin-top: 24px;
    }
}