/* =========================================================
   Responsive
   Clean tablet + mobile layout
========================================================= */

/* -------------------------------
   <= 1380px
-------------------------------- */

@media (max-width: 1380px) {
  .site-brand {
    min-width: 300px;
  }

  .site-brand img {
    width: 340px;
  }

  .dropdown-menu {
    gap: 4px;
  }

  .dropdown-menu-link {
    padding: 0 11px;
    font-size: 0.88rem;
  }

  .iu-hero {
    --iu-hero-frame-width: min(88vw, 1480px);
    --iu-hero-height: clamp(340px, 24vw, 420px);
  }
}

/* -------------------------------
   <= 1180px
   Tablet / small laptop
-------------------------------- */

@media (max-width: 1180px) {
  .dropdown-primary-nav,
  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-inner {
    min-height: 84px;
  }

  .site-brand {
    min-width: 300px;
  }

  .site-brand img {
    width: 330px;
  }

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

  .iu-hero {
    --iu-hero-frame-width: min(94vw, 1120px);
    --iu-hero-height: clamp(315px, 30vw, 390px);
  }

  .iu-news-grid,
  .iu-student-layout,
  .iu-achievement-grid,
  .iu-discover-grid,
  .archive-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .iu-spotlight-layout,
  .iu-spotlight-feature,
  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-sidebar {
    position: static;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -------------------------------
   <= 900px
   Tablet portrait
-------------------------------- */

@media (max-width: 900px) {
  .section,
  .iu-home .section {
    padding: 42px 0;
  }

  .site-topbar {
    display: none;
  }

  .admin-bar .site-header {
    top: 0;
  }

  .header-inner {
    min-height: 78px;
  }

  .site-brand {
    min-width: 0;
  }

  .site-brand img {
    width: 285px;
  }

  .search-button,
  .menu-toggle {
    width: 44px;
    height: 44px;
  }

  .mobile-panel {
    max-height: calc(100vh - 78px);
    overflow-y: auto;
  }

  .iu-hero {
    --iu-hero-frame-width: 100vw;
    --iu-hero-height: clamp(280px, 42vw, 360px);
  }

  .hero,
  .hero-track,
  .hero-slide,
  .hero-slide-image,
  .hero-slide-inner {
    min-height: var(--iu-hero-height) !important;
    height: var(--iu-hero-height);
  }

  .hero-slide-inner {
    align-items: end;
    padding: 40px 0 78px;
  }

  .hero-content {
    max-width: 720px;
  }

  .hero-kicker {
    padding: 6px 13px;
    margin-bottom: 12px;
    font-size: 0.76rem;
  }

  .hero h1 {
    max-width: 680px;
    font-size: clamp(2.1rem, 6.5vw, 3.1rem);
    line-height: 1.02;
  }

  .hero h1 span {
    margin-top: 10px;
    font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  }

  .hero p {
    display: -webkit-box;
    overflow: hidden;
    max-width: 680px;
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .hero-dots {
    bottom: 22px;
  }

  .iu-section-head {
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
  }

  .iu-section-head h2 {
    font-size: 1.18rem;
  }

  .iu-section-head h2::before {
    width: 32px;
  }

  .iu-section-head a {
    font-size: 0.9rem;
  }

  .iu-news-grid,
  .iu-student-layout,
  .iu-achievement-grid,
  .iu-discover-grid,
  .archive-news-grid {
    gap: 18px;
  }

  .iu-news-image {
    aspect-ratio: 16 / 10;
  }

  .iu-news-card h3,
  .iu-student-card h3 {
    font-size: 0.98rem;
  }

  .iu-news-card p,
  .iu-student-card p {
    font-size: 0.88rem;
  }
}

/* -------------------------------
   <= 760px
   Mobile
-------------------------------- */

@media (max-width: 760px) {
  .section,
  .iu-home .section {
    padding: 36px 0;
  }

  .header-inner {
    min-height: 72px;
    gap: 12px;
  }

  .site-brand img {
    width: 245px;
  }

  .search-button,
  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .mobile-menu-title {
    padding: 12px 14px;
    font-size: 0.96rem;
  }

  .mobile-menu-group li a {
    padding: 9px 0;
    font-size: 0.9rem;
  }

  .iu-hero {
    --iu-hero-frame-width: 100vw;
    --iu-hero-height: 300px;
  }

  .hero-slide-inner {
    align-items: end;
    padding: 34px 0 70px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-kicker {
    max-width: 100%;
    font-size: 0.72rem;
  }

  .hero h1 {
    font-size: 2.05rem;
    line-height: 1.03;
  }

  .hero h1 span {
    font-size: 1rem;
    line-height: 1.22;
  }

  .hero p {
    margin-top: 12px;
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }

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

  .hero-dots {
    bottom: 18px;
    padding: 8px 12px;
  }

  .hero-dot {
    width: 8px;
    height: 8px;
  }

  .hero-dot.is-active {
    width: 28px;
  }

  /*
    Banner slide trên mobile:
    Không cố nhét decor nữa vì sẽ rối.
    Banner chiếm full ngang, giữ tỷ lệ rõ chữ.
  */
  .iu-hero .hero-slide.is-banner-white::before,
  .iu-hero .hero-slide.is-banner-white::after,
  .iu-hero .hero-slide.is-banner-only::before,
  .iu-hero .hero-slide.is-banner-only::after {
    display: none;
  }

  .iu-hero .hero-slide.is-banner-white .hero-slide-image,
  .iu-hero .hero-slide.is-banner-only .hero-slide-image {
    width: 100vw;
    height: var(--iu-hero-height);
    object-fit: cover;
  }

  .iu-section-head {
    flex-direction: row;
    align-items: center;
    margin-bottom: 18px;
  }

  .iu-section-head h2 {
    font-size: 1.05rem;
  }

  .iu-section-head h2::before {
    width: 28px;
    height: 3px;
  }

  .iu-section-head a {
    font-size: 0.86rem;
  }

  .iu-news-grid,
  .iu-student-layout,
  .iu-achievement-grid,
  .iu-discover-grid,
  .archive-news-grid,
  .single-sidebar {
    grid-template-columns: 1fr;
  }

  .iu-news-card {
    border-radius: 0;
  }

  .iu-news-image {
    aspect-ratio: 16 / 9;
  }

  .iu-news-body {
    padding: 13px 14px 16px;
  }

  .iu-news-category,
  .iu-spotlight-feature-body span,
  .iu-spotlight-item small,
  .iu-student-card span {
    font-size: 0.74rem;
  }

  .iu-news-card h3,
  .iu-student-card h3 {
    font-size: 0.98rem;
  }

  .iu-news-card p,
  .iu-student-card p {
    font-size: 0.88rem;
  }

  .iu-spotlight-item {
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .iu-mini-date {
    width: 54px;
    height: 54px;
  }

  .iu-mini-date b {
    font-size: 1.1rem;
  }

  .iu-mini-date em {
    font-size: 0.66rem;
  }

  .iu-spotlight-feature-body {
    padding: 22px;
  }

  .iu-spotlight-feature-body h3 {
    font-size: 1.45rem;
  }

  .iu-achievement-card,
  .iu-discover-card {
    min-height: auto;
    padding: 22px;
  }

  .footer-main,
  .footer-bottom {
    display: block;
  }

  .footer-col {
    margin-bottom: 26px;
  }

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

  .single-article,
  .sidebar-card,
  .archive-empty {
    padding: 24px;
  }

  .single-post-nav {
    flex-direction: column;
  }
}

/* -------------------------------
   <= 520px
   Small mobile
-------------------------------- */

@media (max-width: 520px) {
  .site-brand img {
    width: 215px;
  }

  .search-button,
  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .iu-hero {
    --iu-hero-height: 260px;
  }

  .hero-slide-inner {
    padding: 28px 0 64px;
  }

  .hero-kicker {
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: 1.78rem;
  }

  .hero h1 span {
    font-size: 0.94rem;
  }

  .hero p {
    font-size: 0.84rem;
  }

  .btn {
    min-height: 42px;
    padding: 0 15px;
    font-size: 0.84rem;
  }

  .iu-section-head h2 {
    font-size: 1rem;
  }

  .iu-section-head a {
    font-size: 0.82rem;
  }
}

/* -------------------------------
   <= 420px
   Very small mobile
-------------------------------- */

@media (max-width: 420px) {
  .site-brand img {
    width: 190px;
  }

  .header-actions {
    gap: 7px;
  }

  .search-button,
  .menu-toggle {
    width: 38px;
    height: 38px;
  }

  .iu-hero {
    --iu-hero-height: 310px;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero h1 span {
    font-size: 0.9rem;
  }

  .hero p {
    -webkit-line-clamp: 1;
  }
}
