/* ============================================
   RESPONSIVE STYLES
   Breakpoints:
   - Mobile:  < 768px
   - Tablet:  768px - 1024px
   - Desktop: > 1024px
   ============================================ */


/* ============================================
   MOBILE - max-width: 768px
   ============================================ */
@media (max-width: 768px) {

  /* Show hamburger */
  .hamburger {
    display: flex;
  }

  /* Hide CTA button on very small screens */
  .nav-cta {
    display: none;
  }

  /* Nav links - hidden by default on mobile */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--clr-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-md);

    /* Hidden state */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  /* Open state - JS adds this class */
  .nav-links.open {
    max-height: 100vh;
    overflow-y: auto;
    padding: 1rem 1.5rem;
  }

  .nav-link {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--clr-gray-mid);
    font-size: 1rem;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  /* Hide underline effect on mobile */
  .nav-link::after {
    display: none;
  }

  /* Dropdown on mobile - always visible when menu open */
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0;
    border-left: 2px solid var(--clr-gray-mid);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .dropdown-menu.open {
    max-height: 300px;
    padding: 0.25rem 0 0.5rem 1rem;
  }


  .dropdown-arrow {
    display: inline-block;
  }

  /* Shrink brand name slightly */
  .brand-name {
    font-size: 0.95rem;
  }

  .brand-location {
    display: none;
  }

  .enquire-btn {
    visibility: hidden;
  }

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

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

  /* About section - stack vertically */
  .about-grid {
    flex-direction: column;
  }

  .about-img-wrapper img {
    height: 300px;
  }

  /* About & Admissions page layout */
  .about-page-grid {
    grid-template-columns: 1fr;
  }

  .about-sidebar {
    position: static;
    padding: 1.25rem;
  }

  .about-content {
    padding: 1.75rem;
    min-height: auto;
  }

  /* Sidebar buttons — readable on mobile */
  .sidebar-btn {
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
  }

  /* Vision Mission */
  .vm-grid {
    display: block;
  }

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

  /* Eligibility cards */
  .eligibility-cards {
    grid-template-columns: 1fr;
  }

  /* Documents grid */
  .documents-grid {
    grid-template-columns: 1fr;
  }

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

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

  .news-slide-image {
    height: 200px;
  }

  .news-slide-text {
    padding: 1.5rem 2rem 2rem;
  }

  .carousel-prev { left: 0.5rem; }
  .carousel-next { right: 0.5rem; }

  /* Panel title */
  .panel-title {
    font-size: 1.6rem;
  }

  /* PSD tables — scrollable on mobile */
  .psd-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Disclosure items */
  .disclosure-item {
    flex-direction: column;
    align-items: flex-start;
  }

  /* About page hero title */
  .page-hero-title {
    font-size: 1.4rem;
    padding: 0.75rem 1.5rem;
  }

  /* Contact hero grid */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Hero text sizing */
  .hero-title {
    font-size: 2.2rem;
  }

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

  .stat-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom .container {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  /* Programmes grid */
  .programmes-grid {
    grid-template-columns: 1fr;
  }

  /* Why study grid */
  .why-study-grid {
    grid-template-columns: 1fr;
  }

  /* CTA section */
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-text h2 {
    font-size: 1.5rem;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* ============================================
   COURSE PAGE - MOBILE
   ============================================ */

  .course-hero {
    width: 100%;
  }

  .course-hero-inner {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .course-hero-title {
    font-size: 1.8rem;
  }

  .course-apply-btn {
    width: 100%;
    text-align: center;
  }

  /* Main course layout */
  .course-page {
    width: 100%;
  }

  .course-page-grid {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  /* Prevent grid children from forcing horizontal width */
  .course-sidebar,
  .course-content {
    width: 100%;
    min-width: 0;
  }

  .course-sidebar {
    position: static;
  }

  .course-sidebar-box {
    width: 100%;
  }

  .course-overview-box .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  /* Course content */
  .course-content {
    padding: 1.75rem;
  }

  /* Course fee table */
  .fee-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Inner grids */
  .highlights-grid,
  .careers-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Admissions */
  .admission-docs-list {
    grid-template-columns: 1fr;
  }

  .admission-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }

  .eligibility-table {
    font-size: 0.82rem;
  }

  /* Facilities */
  .facility-row,
  .facility-row.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    min-height: auto;
  }

  .facility-image {
    height: 250px;
  }

  .facility-text {
    padding: 2rem 1.5rem;
  }

  .facility-number {
    font-size: 2.5rem;
  }

  .facility-name {
    font-size: 1.4rem;
  }

  /* Gallery */
  .gallery-grid {
    columns: 2;
  }

  .gallery-filters {
    gap: 0.5rem;
  }

  .gallery-filter-btn {
    font-size: 0.82rem;
    padding: 0.5rem 1rem;
  }

  /* Notices */
  .notice-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .notice-download {
    width: 100%;
    justify-content: center;
  }

  /* Downloads table */
  .downloads-table thead {
    display: none;
  }

  .downloads-table tbody tr {
    display: block;
    padding: 1.25rem;
    border-bottom: 1px solid var(--clr-gray-mid);
  }

  .downloads-table td {
    display: block;
    padding: 0.4rem 0;
    border: none;
  }

  .col-sno { display: none; }

  .col-size,
  .col-download {
    width: auto;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-heading {
    font-size: 1.8rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .contact-map-section iframe {
    height: 300px;
  }

  /* Application page */
  .application-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .app-form-grid {
    grid-template-columns: 1fr;
  }

  .step-indicators {
    padding: 1rem;
  }

  .step-indicator span {
    font-size: 0.7rem;
  }

  .application-form-card {
    padding: 1.5rem;
  }
}

/* ============================================
   SMALL MOBILE - max-width: 480px
   ============================================ */
@media (max-width: 480px) {

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

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

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

  .hero-title {
    font-size: 1.8rem;
  }

  h2 { font-size: 1.6rem; }

  .gallery-grid {
    columns: 1;
  }

  .step-indicators {
    gap: 0;
  }

  .step-indicator span {
    display: none;
  }
}