/* ============================================
   RESPONSIVE STYLES — v2 Immersive Redesign
   ============================================ */

/* --- Tablet (max-width: 1200px) --- */
@media (max-width: 1200px) {
  :root {
    --nav-height: 64px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }

  .container {
    padding: 0 var(--space-lg);
  }

  .section {
    padding: var(--space-3xl) 0;
  }

  /* Top bar */
  .top-bar {
    display: none;
  }

  .header {
    top: 0;
  }

  .header--transparent {
    background: rgba(27, 42, 74, 0.95);
    backdrop-filter: blur(10px);
  }

  /* Nav */
  .nav-toggle {
    display: flex;
  }

  .nav__cta {
    display: block;
    margin-left: 0;
    margin-top: var(--space-lg);
    width: 100%;
  }

  .nav__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .header__inner {
    justify-content: space-between;
  }

  .logo img {
    height: 44px;
    width: 44px;
    padding: 2px;
  }

  .logo__text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .logo__name {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo__tagline {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo__tagline br {
    display: none;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: calc(var(--nav-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
    box-shadow: -4px 0 20px var(--shadow-md);
    transition: right var(--transition);
    overflow-y: auto;
    z-index: 999;
  }

  .nav.active {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav__item {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav__link {
    padding: var(--space-md) 0;
    justify-content: space-between;
    width: 100%;
    color: var(--text);
  }

  .nav__link:hover,
  .nav__link--active {
    color: var(--accent);
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    border-radius: 0;
    display: none;
    background: var(--bg);
    border-left: 3px solid var(--accent);
    margin-bottom: var(--space-sm);
  }

  .dropdown.open {
    display: block;
  }

  .dropdown__link {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.8125rem;
  }

  /* Mobile overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }

  .nav-overlay.active {
    display: block;
  }

  /* Hero Carousel */
  .hero-carousel {
    height: 80vh;
    min-height: 500px;
  }

  .carousel__content {
    padding-top: var(--nav-height);
  }

  .carousel__content h1 {
    font-size: 2.5rem;
  }

  .carousel__arrow--prev { left: 1rem; }
  .carousel__arrow--next { right: 1rem; }

  .carousel__arrow {
    width: 40px;
    height: 40px;
  }

  /* Stats */
  .stats-bar__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
  }

  .stat-item__number {
    font-size: 2rem;
  }

  /* About */
  .about-preview {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .about-preview__image img {
    height: 350px;
  }

  /* Courses */
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* NIRF */
  .nirf-viewer__embed iframe {
    height: 450px;
  }

  /* IQAC */
  .iqac-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* News */
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Grids */
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  /* Footer */
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Content with sidebar */
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

/* --- Mobile Large (max-width: 768px) --- */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .section {
    padding: var(--space-2xl) 0;
  }

  /* Hero */
  .hero-carousel {
    height: 85vh;
    min-height: 480px;
  }

  .carousel__content h1 {
    font-size: 2rem;
  }

  .carousel__content p {
    font-size: 0.9375rem;
  }

  .carousel__badge {
    font-size: 0.75rem;
  }

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

  .carousel__actions .btn {
    justify-content: center;
  }

  .carousel__arrow {
    display: none;
  }

  /* Stats */
  .stats-bar__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-item__number {
    font-size: 2rem;
  }

  /* About features */
  .about-preview__features {
    grid-template-columns: 1fr;
  }

  /* Courses */
  .courses-grid {
    grid-template-columns: 1fr;
  }

  /* NIRF */
  .nirf-viewer__embed iframe {
    height: 350px;
  }

  .nirf-viewer__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .nirf-viewer__actions .btn {
    justify-content: center;
  }

  /* IQAC */
  .iqac-grid {
    grid-template-columns: 1fr;
  }

  /* News */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* Grids */
  .grid--2 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }

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

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

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

  /* Page header */
  .page-header {
    padding: var(--space-2xl) 0;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }

  /* Form */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .footer__bar .container {
    flex-direction: column;
    text-align: center;
    gap: var(--space-sm);
  }

  /* CTA Banner */
  .cta-banner__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-banner__actions .btn {
    justify-content: center;
  }

  /* Lightbox */
  .lightbox__nav--prev { left: var(--space-sm); }
  .lightbox__nav--next { right: var(--space-sm); }
}

/* --- Mobile Small (max-width: 480px) --- */
@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }

  .container {
    padding: 0 var(--space-md);
  }

  /* Hero */
  .carousel__content h1 {
    font-size: 1.75rem;
  }

  .carousel__content p {
    font-size: 0.875rem;
  }

  .carousel__dots {
    bottom: 1.5rem;
  }

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

  .stat-item {
    padding: var(--space-md);
  }

  .stat-item__number {
    font-size: 1.75rem;
  }

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

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

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

  /* Grid fallbacks */
  .grid--4,
  .grid--3,
  .grid--2 {
    grid-template-columns: 1fr;
  }

  /* Buttons full width */
  .btn--lg {
    width: 100%;
    justify-content: center;
  }

  /* NIRF */
  .nirf-viewer__embed iframe {
    height: 280px;
  }

  /* Logo */
  .header__inner {
    position: relative;
  }

  .logo img {
    height: 38px;
    width: 38px;
    padding: 2px;
  }

  .logo__text {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .logo__name {
    display: block;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo__tagline {
    display: block;
    font-size: 0.5rem;
    line-height: 1.2;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .logo__tagline br {
    display: none;
  }

  .logo__tagline > span:nth-of-type(2)::before {
    content: none;
  }

  .logo__tagline > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
