/* =========================================================
   X RPL-1 — responsive.css
   Breakpoints: 1366 / 1024 / 768 / 412 / 390 / 360
   ========================================================= */

/* ----- 1366px and below (large laptop) ----- */
@media (max-width: 1366px) {
  :root {
    --container: 1080px;
  }
}

/* ----- 1024px and below (tablet landscape) ----- */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .hero-media {
    order: -1;
  }

  .hero-photo-frame img {
    height: 320px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .struktur-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .siswa-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.is-wide {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--sp-4);
  }
}

/* ----- 768px and below (tablet portrait / mobile menu kicks in) ----- */
@media (max-width: 768px) {
  .navbar-links,
  .navbar-actions .btn-ig {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .section {
    padding: var(--sp-6) 0;
  }

  .hero {
    padding: var(--sp-6) 0 var(--sp-5);
  }

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2);
  }

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

  .is-wali {
    flex-direction: column;
    text-align: center;
    padding: var(--sp-5);
  }

  .is-wali .avatar {
    margin: 0 auto;
  }

  .siswa-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .gallery-item.is-wide {
    grid-column: span 1;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* ----- 412px and below (large phones) ----- */
@media (max-width: 412px) {
  .container {
    padding: 0 var(--sp-4);
  }

  .hero-title {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
  }

  .hero-photo-frame img {
    height: 240px;
  }

  .stat-card {
    padding: var(--sp-3);
  }

  .stat-number {
    font-size: 1.5rem;
  }
}

/* ----- 390px and below ----- */
@media (max-width: 390px) {
  .navbar-inner {
    height: 64px;
  }

  .navbar-brand {
    font-size: 0.95rem;
  }

  .navbar-brand img {
    width: 28px;
    height: 28px;
  }

  .btn {
    padding: 0.75rem 1.2rem;
    font-size: 0.88rem;
  }
}

/* ----- 360px and below (smallest supported) ----- */
@media (max-width: 360px) {
  .container {
    padding: 0 var(--sp-3);
  }

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

  .hero-typing {
    font-size: 0.95rem;
  }
}
