/* ==========================================================================
   LAYER RESPONSIF MOBILE
   Dimuat setelah styles.css, assets/sky-theme.css, dan assets/app.css.
   Semua aturan di dalam file ini hanya berlaku untuk layar kecil.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DASAR & KEAMANAN LAYOUT
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 88px;
  }

  /* clip (bukan hidden) supaya position: sticky tetap bekerja */
  html,
  body {
    overflow-x: clip;
  }

  body {
    -webkit-tap-highlight-color: rgba(22, 139, 210, 0.12);
  }

  /* Cegah teks panjang (email, URL, nomor) merusak lebar kolom */
  body {
    overflow-wrap: break-word;
    word-break: normal;
  }

  img,
  svg,
  video,
  canvas,
  iframe,
  table {
    max-width: 100%;
  }

  /* Target sentuh minimum 44px sesuai pedoman aksesibilitas */
  a,
  button,
  [role="button"],
  summary,
  label:has(> input[type="checkbox"]),
  label:has(> input[type="radio"]) {
    touch-action: manipulation;
  }

  button,
  .button,
  .menu-toggle,
  .nav-profile-toggle,
  .nav-education-toggle {
    -webkit-appearance: none;
    appearance: none;
  }

  button,
  .button,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  :focus-visible {
    outline: 3px solid rgba(22, 139, 210, 0.45);
    outline-offset: 2px;
  }

  /* Cegah zoom otomatis iOS pada kolom input */
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   2. TOPBAR HALAMAN CBT & ADMIN
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;

    padding: 12px 16px;

    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .topbar-brand {
    width: 100%;
    min-width: 0;
    gap: 8px;
  }

  .topbar-logo {
    min-width: 0;
    gap: 9px;
  }

  .topbar-logo-mark {
    width: 36px;
    height: 36px;
    padding: 4px;
    border-radius: 11px;
  }

  .topbar-logo-copy {
    min-width: 0;
  }

  .topbar-logo-copy strong {
    font-size: 12px;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
  }

  .topbar-brand .muted {
    min-width: 0;
    font-size: 11px;
    line-height: 1.4;
  }

  /* Aksi topbar menjadi baris penuh dengan tombol yang membagi rata */
  .topbar-actions,
  .topbar > .button-row {
    width: 100%;
    margin: 0;
    gap: 8px;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }

  .topbar-actions .button,
  .topbar > .button-row .button,
  .topbar-logout {
    flex: 1 1 auto;
    width: auto;
    min-width: 108px;
    min-height: 42px;
    font-size: 12px;
    text-align: center;
  }

  /* Navigasi horizontal di dalam topbar */
  .topbar .dashboard-nav,
  .topbar-actions .dashboard-nav {
    order: 3;
    width: 100%;
    margin: 0;
    padding: 4px;
    justify-content: flex-start;

    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .topbar .dashboard-nav::-webkit-scrollbar,
  .topbar-actions .dashboard-nav::-webkit-scrollbar {
    display: none;
  }

  .topbar .dashboard-nav a,
  .topbar-actions .dashboard-nav a {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
    white-space: nowrap;
  }
}

/* --------------------------------------------------------------------------
   3. SIDEBAR DASHBOARD
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .dashboard-sidebar {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;

    width: 100%;
    padding: 14px 0 12px;

    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  }

  .sidebar-heading {
    gap: 4px;
    padding: 0 16px 10px;
    margin-bottom: 10px;
  }

  .sidebar-heading strong {
    font-size: 15px;
  }

  /* Menu sidebar jadi chip mendatar yang bisa digeser */
  .dashboard-sidebar .dashboard-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;

    width: 100%;
    margin: 0;
    padding: 0 16px 4px;

    border: 0;
    border-radius: 0;
    background: none;

    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .dashboard-sidebar .dashboard-nav::-webkit-scrollbar {
    display: none;
  }

  .dashboard-sidebar .dashboard-nav a {
    flex: 0 0 auto;
    width: auto;
    min-height: 40px;
    padding: 0 14px;

    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.55);

    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    white-space: nowrap;
    align-items: center;
    gap: 8px;
  }

  .dashboard-sidebar .dashboard-nav a::before {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
    margin-right: 0;
  }

  .dashboard-sidebar .dashboard-nav a:hover {
    transform: none;
  }

  .dashboard-sidebar .dashboard-nav a[aria-current="page"] {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.16));
    border-color: rgba(139, 92, 246, 0.34);
    color: #ffffff;
  }

  .dashboard-sidebar .dashboard-nav a[aria-current="page"]::after {
    display: none;
  }

  .dashboard-content {
    width: min(1180px, 100%);
    margin: 18px auto 0;
  }
}

@media (max-width: 700px) {
  .dashboard-sidebar {
    padding: 12px 0 10px;
  }

  .sidebar-heading {
    padding: 0 16px 8px;
  }

  /* Perbaikan tampilan teacher card untuk mobile landscape */
  .teacher-grid,
  .teacher-page .teacher-grid {
    gap: 14px;
  }

  .teacher-card,
  .teacher-page .teacher-card {
    padding: 16px;
  }

  .teacher-card img,
  .teacher-page .teacher-card img {
    height: 200px;
  }

  .teacher-page .teacher-card h2 {
    font-size: 15px;
  }
}

/* --------------------------------------------------------------------------
   4. KONTAINER, KARTU, DAN GRID
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .container {
    margin: 18px auto 0;
    padding: 0 14px 34px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .dashboard-content,
  .parent-data-card {
    width: auto;
    margin: 18px 0 0;
  }

  .parent-data-card {
    margin-bottom: 24px;
  }

  .card,
  .panel,
  .exam-card,
  .question-card {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .card {
    margin-bottom: 16px;
  }

  /* Judul card tidak lagi memaksa lebar */
  .card > h1,
  .card > h2 {
    overflow-wrap: anywhere;
  }

  .card > p.muted {
    font-size: 13.5px;
    line-height: 1.75;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-heading > * {
    min-width: 0;
  }

  /* Semua grid otomatis turun ke satu kolom di layar sempit */
  .grid,
  .split-grid,
  .mini-grid,
  .summary-grid,
  .filter-grid,
  .bank-grid,
  .teacher-grid,
  .admin-shortcut-grid,
  .exam-select-row {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .summary-grid div {
    padding: 14px;
  }

  .summary-grid strong {
    font-size: 26px;
  }

  .summary-grid span {
    font-size: 12px;
    line-height: 1.4;
  }

  .profile-info {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-item,
  .profile-item:nth-child(n) {
    grid-column: 1 / -1;
  }

  .profile-item {
    padding: 11px 13px;
  }

  .profile-label {
    font-size: 11px;
  }

  .profile-value {
    font-size: 14px;
  }

  .filter-grid,
  .bank-grid {
    gap: 10px;
    margin-top: 16px;
  }

  .bank-card {
    padding: 15px;
  }

  .bank-card .option-list li {
    padding: 9px;
    font-size: 13.5px;
  }

  .option-list {
    padding-left: 18px;
  }

  .option-list li {
    font-size: 14px;
    line-height: 1.6;
  }

  .demo-box {
    padding: 13px;
  }

  .message {
    padding: 11px 13px;
    font-size: 13.5px;
  }

  .badge {
    padding: 4px 9px;
    font-size: 11px;
  }

  .section-marker {
    margin-bottom: 12px;
  }
}

/* --------------------------------------------------------------------------
   5. TOMBOL DAN FORM
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .button-row {
    gap: 10px;
    margin-top: 18px;
  }

  .button-row,
  .button-row > .button {
    width: 100%;
  }

  .button-row > .button {
    min-height: 46px;
  }

  .action-row .button,
  .button-row.compact .button {
    width: auto;
  }

  .action-row {
    gap: 8px;
  }

  .action-row .button,
  .button.small {
    flex: 1 1 auto;
    min-width: 96px;
    min-height: 42px;
  }

  .button {
    min-height: 46px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
  }

  .button.small {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 12.5px;
  }

  .form,
  .form-panel {
    gap: 10px;
  }

  .input,
  input[type="email"],
  input[type="password"],
  input[type="text"],
  input[type="number"],
  textarea.input,
  select.input {
    padding: 12px 13px;
    border-radius: 14px;
  }

  textarea.input {
    min-height: 96px;
  }

  .check-row {
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .check-row input {
    margin-top: 3px;
    flex: 0 0 auto;
  }

  .timer {
    padding: 9px 12px;
    font-size: 14px;
  }

  .teacher-image-preview {
    width: 110px;
    height: 110px;
    margin: 6px 0 14px;
    border-radius: 15px;
  }

  .teacher-card {
    padding: 18px;
  }

  .teacher-card img {
    width: 132px;
    height: 132px;
  }

  .teacher-order-button {
    width: 40px;
    min-height: 40px;
  }
}

/* --------------------------------------------------------------------------
   6. TABEL -> KARTU
   Ditogether dengan assets/mobile.js yang mengisi atribut data-label.
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .table-wrap table,
  .table-wrap table.min-width,
  .table-wrap table[class] {
    display: block;
    min-width: 0;
    width: 100%;
    background: none;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr {
    display: grid;
    gap: 2px;
    padding: 13px 14px;

    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(34, 89, 124, 0.07);
  }

  .table-wrap tbody tr:hover {
    background: #fff;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 10px;
    align-items: start;

    padding: 5px 0;
    border: 0;
    font-size: 13.5px;
    line-height: 1.55;
    vertical-align: top;
    overflow-wrap: anywhere;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    line-height: 1.5;
    text-transform: uppercase;
  }

  .table-wrap td:empty {
    display: none;
  }

  /* Sel tanpa label (tabel tanpa thead) tetap tampil satu kolom */
  .table-wrap td:not([data-label]) {
    display: block;
  }

  /* Kolom pertama menjadi judul kartu */
  .table-wrap td:first-child {
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 800;
  }

  .table-wrap td:first-child::before {
    grid-column: 1 / -1;
    color: #176fa8;
  }

  .table-wrap td .input,
  .table-wrap td .note-input {
    min-width: 0;
    width: 100%;
    padding: 9px 11px;
    font-size: 14px;
  }

  .table-wrap td select.input {
    padding: 9px 8px;
  }

  .table-wrap td img,
  .table-wrap td .teacher-table-image {
    width: 84px;
    height: 84px;
  }

  .table-wrap .action-row {
    margin-top: 8px;
  }

  .parent-data-table td {
    line-height: 1.7;
  }
}

/* --------------------------------------------------------------------------
   7. FORMULIR ADMIN (PPDB, BERITA, PRESTASI)
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .ppdb-layout,
  .news-admin-layout,
  .achievement-admin-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 700px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
  }

  .stat {
    padding: 13px;
  }

  .stat strong {
    font-size: 22px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .toolbar .input {
    max-width: none;
    width: 100%;
  }

  .toolbar .button {
    width: 100%;
  }

  .news-admin-item,
  .achievement-admin-item {
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 13px;
  }

  .news-admin-item img,
  .news-admin-placeholder {
    width: 96px;
    height: 96px;
  }

  .achievement-admin-item img,
  .achievement-admin-placeholder {
    width: 96px;
    height: 96px;
  }

  .news-admin-item h3,
  .achievement-admin-item h3 {
    font-size: 16px;
  }

  .news-admin-item p,
  .achievement-admin-item p {
    font-size: 12.5px;
  }

  .empty-state {
    padding: 24px 16px;
    font-size: 13px;
  }

  .file-current {
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .news-admin-item,
  .achievement-admin-item {
    grid-template-columns: 1fr;
  }

  .news-admin-item img,
  .news-admin-placeholder,
  .achievement-admin-item img,
  .achievement-admin-placeholder {
    width: 100%;
    height: 168px;
  }
}

/* --------------------------------------------------------------------------
   8. HALAMAN LOGIN & VERIFIKASI
   -------------------------------------------------------------------------- */

@media (max-width: 850px) {
  .auth-page {
    padding: 20px 14px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    align-items: flex-start;
  }

  .auth-shell {
    display: block;
    width: min(520px, 100%);
    min-height: 0;
    border-radius: 22px;
  }

  .auth-visual {
    display: none;
  }

  .auth-form-card.login-card {
    min-height: 0;
    width: 100%;
    padding: 30px 22px;
    border-radius: 22px;
  }

  .auth-form-heading {
    margin-top: 28px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 12px;
  }

  .auth-form-card.login-card {
    padding: 24px 18px;
  }

  .auth-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .auth-form-heading h2 {
    font-size: 28px;
  }

  .auth-submit {
    min-height: 48px;
  }
}

@media (max-width: 700px) {
  .center-page {
    padding: 14px;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .login-back-button {
    min-height: 44px;
    padding: 10px 14px;
  }

  .verify-action,
  .center-page .button-row > .button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   9. HALAMAN UJIAN
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .question-card {
    margin: 14px 0;
    padding: 15px;
    border-radius: 16px;
  }

  .question-card legend {
    padding: 0 4px;
    font-size: 15px;
    line-height: 1.5;
  }

  .option-row {
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
  }

  .option-row input {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-top: 1px;
  }

  .option-row span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .exam-card {
    padding: 15px;
    border-radius: 16px;
  }

  .exam-card h3 {
    font-size: 15px;
    line-height: 1.4;
  }
}

/* --------------------------------------------------------------------------
   10. SITUS PUBLIK: NAVIGASI & HERO
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  .header {
    padding-top: env(safe-area-inset-top);
  }

  .nav {
    height: 62px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand span {
    font-size: 11px;
    white-space: normal;
    line-height: 1.2;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 11px;
    margin: 0;
    border-radius: 12px;
    cursor: pointer;
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: rgba(22, 139, 210, 0.08);
  }

  /* Panel menu dibatasi tinggi agar tidak menutupi layar */
  .nav-links {
    position: fixed;
    top: calc(62px + env(safe-area-inset-top));
    right: 0;
    left: 0;
    max-height: calc(100dvh - 62px - env(safe-area-inset-top));
    padding: 14px 16px calc(20px + env(safe-area-inset-bottom));

    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links > a,
  .nav-profile-toggle,
  .nav-education-toggle {
    min-height: 46px;
    padding: 13px 4px;
    font-size: 12px;
  }

  .nav-links .button {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
  }

  .nav-profile-menu a,
  .nav-education-menu a {
    min-height: 44px;
    padding: 12px;
    font-size: 13px;
  }

  .hero,
  .hero-grid {
    min-height: 0;
  }

  .hero {
    padding: 92px 0 64px;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-copy > p {
    margin: 20px 0 26px;
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 480px) {
  .nav {
    height: 58px;
  }

  .nav-links {
    top: calc(58px + env(safe-area-inset-top));
    max-height: calc(100dvh - 58px - env(safe-area-inset-top));
  }

  .hero {
    padding: 78px 0 54px;
  }

  .brand span {
    font-size: 10px;
  }
}

/* --------------------------------------------------------------------------
   11. SITUS PUBLIK: TIPOGRAFI & KONTEN
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  /* Naikkan ukuran teks kecil agar tetap terbaca di layar HP */
  .section-number,
  .program-index,
  .profile-label,
  .profile-value,
  .announcement time,
  .announcement span,
  .announcement p,
  .school-news-meta,
  .school-news-copy > p,
  .school-news-copy .text-link,
  .footer-grid p,
  .footer-grid h4,
  .footer-grid a:not(.brand),
  .copyright,
  .text-link,
  .scroll-cue,
  .admission-copy li,
  .admission-subheading small,
  .form-heading small,
  .news-excerpt,
  .map-link {
    font-size: 12.5px;
    line-height: 1.65;
  }

  .section-number,
  .profile-label,
  .school-news-meta,
  .footer-grid h4,
  .admission-subheading small,
  .form-heading small {
    font-size: 10.5px;
    letter-spacing: 0.08em;
  }

  .announcement-heading a,
  .public-news-link,
  .news-attachment,
  .education-price-label,
  .education-poster figcaption,
  .achievement-type,
  .public-news-meta,
  .site-footer .footer-bottom .container,
  .site-footer .footer-bottom a,
  .site-footer > .copyright {
    font-size: 11px;
  }

  .site-footer .footer-grid a:not(.brand),
  .site-footer .footer-navigation a,
  .site-footer .footer-contact-column > a {
    font-size: 12.5px;
    line-height: 1.9;
  }

  /* Judul panjang tidak lagi terpotong diam-diam */
  .hero h1,
  .section-title h2,
  .news-heading h2,
  .welcome-content h2,
  .admission h2,
  .accreditation-copy h2,
  .map-heading h2,
  .education-hero-copy h1,
  .education-heading h2,
  .scholarship-grid h2,
  .registration-heading h2,
  .education-subpage-hero h1,
  .news-page-heading h1,
  .news-detail h1,
  .teacher-page-heading h1,
  .profile-detail-card .welcome-content h1,
  .profile-detail-card .section-title h1,
  .profile-detail-card.profile-information h1,
  .section-title h2,
  .news-heading h2,
  .news-page-heading h1,
  .teacher-page-heading h1,
  .welcome-content h2 {
    max-width: none;
    overflow-wrap: anywhere;
  }

  .section,
  .welcome-section,
  .news,
  .admission,
  .map-section,
  .accreditation-section,
  .programs {
    padding: 64px 0;
  }

  .section-number,
  .section-title h2,
  .welcome-content h2,
  .admission h2,
  .accreditation-copy h2,
  .map-heading h2,
  .education-heading h2,
  .scholarship-grid h2,
  .registration-heading h2,
  .news-page-heading h1,
  .teacher-page-heading h1 {
    margin-bottom: 14px;
  }

  .section-content > p,
  .welcome-copy p,
  .admission-copy > p,
  .accreditation-copy > p,
  .education-heading > p,
  .scholarship-grid > div > p,
  .news-page-heading p,
  .teacher-page-heading > p:last-child,
  .education-hero-copy > p,
  .education-subpage-hero p,
  .news-content {
    font-size: 14.5px;
    line-height: 1.8;
  }

  .profile-item {
    padding: 13px 0;
  }

  .program-item {
    padding: 18px 16px;
  }

  .program-item h3 {
    font-size: 16px;
  }

  .admission-form {
    padding: 20px 16px;
    gap: 15px;
  }

  .admission-form input,
  .admission-form select,
  .admission-form textarea {
    padding: 12px 13px;
    border-radius: 12px;
  }

  .admission-form .button {
    width: 100%;
    min-height: 48px;
  }

  .accreditation-visual {
    min-height: 300px;
  }

  .accreditation-orbit-one {
    width: 260px;
    height: 260px;
  }

  .accreditation-orbit-two {
    width: 180px;
    height: 180px;
  }

  .accreditation-card {
    width: min(300px, 88%);
    padding: 18px 16px 20px;
  }

  .accreditation-seal-wrap {
    min-height: 190px;
  }

  .numbers-grid strong {
    font-size: 26px;
  }

  .announcement {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .announcement time {
    margin-bottom: 2px;
  }

  .map-frame {
    height: 300px;
    border-radius: 16px;
  }

  .welcome-photo-card {
    width: min(280px, 100%);
  }

  .profile-page-next {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .text-link {
    min-height: 44px;
  }

  .public-news-image,
  .public-news-placeholder {
    height: 190px;
  }

  .public-news-copy {
    padding: 18px 16px;
  }

  .public-news-card h2 {
    font-size: 18px;
  }

  .news-detail {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .news-excerpt {
    padding: 14px 16px;
  }

  .news-detail-image {
    margin: 20px 0;
    border-radius: 16px;
  }

  .news-attachment {
    min-height: 44px;
  }

  .education-price-card,
  .registration-card,
  .registration-callout {
    padding: 20px 18px;
  }

  .registration-card ol {
    padding-left: 20px;
    font-size: 14.5px;
  }

  .scholarship-list div {
    padding: 16px 0;
  }

  .achievement-copy {
    padding: 16px;
  }

  .achievement-copy h3 {
    font-size: 18px;
  }

  .site-footer .footer-grid {
    padding-top: 34px;
    padding-bottom: 26px;
  }

  .site-footer .footer-logo {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .education-footer {
    padding: 22px 0;
  }
}

/* --------------------------------------------------------------------------
   12. GRID GURU: SATU KOLOM DI LAYAR KECIL
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .teacher-grid,
  .teacher-page .teacher-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .teacher-card,
  .teacher-page .teacher-card {
    padding: 20px 16px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .teacher-card img,
  .teacher-page .teacher-card img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
  }

  .teacher-page .teacher-card h2 {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #17364f;
    font-weight: 700;
  }

  .teacher-page .teacher-card p {
    font-size: 13px;
    line-height: 1.5;
    color: #52738b;
    margin: 0;
  }

  .school-news-card > img,
  .school-news-placeholder {
    height: 180px;
  }

  .achievement-grid {
    grid-template-columns: 1fr;
  }

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

/* --------------------------------------------------------------------------
   13. AKSESIBILITAS & GERAK
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .button,
  .teacher-card,
  .achievement-card,
  .public-news-card,
  .nav-links,
  .header {
    transition: none !important;
  }
}

@media print {
  .topbar,
  .dashboard-sidebar,
  .header,
  .site-footer,
  .button,
  .button-row {
    display: none !important;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  table {
    min-width: 0 !important;
  }
}
