/* ==========================================================================
   Responsive Styles
   Breakpoints:
   xl: >= 1280px (Desktops)
   lg: 1024 - 1279px (Small Laptops / Landscape Tablets)
   md: 768 - 1023px (Tablets)
   sm: 480 - 767px (Large Phones)
   xs: < 480px (Small Phones)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Touch Targets & Accessibility (Global)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .btn, .nav__link, .mega-menu__list a, .footer__links a, .pill-btn {
    min-height: 44px; /* Ensure 44x44px minimum touch target for mobile/tablet */
  }
}

/* --------------------------------------------------------------------------
   Large Tablets & Small Laptops (lg: max-width 1279px)
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .header__logo img {
    height: 50px;
  }

  .header.scrolled  .header__logo img {
    height: 40px;
  }
  
  .header__logo a {
    gap: 8px;
  }

  /* Header & Logo */
  .logo-title {
    font-size: 1.5rem;
    letter-spacing: 2.5px;
    margin-right: -2.5px;
  }
  .logo-subtitle {
    font-size: 0.54rem;
    letter-spacing: 2px;
    margin-right: -2px;
    margin-top: 1px;
  }

  .nav__list {
    gap: 4px;
  }

  .nav__link {
    padding: 8px 6px;
    font-size: 0.78rem;
  }

  .nav__item--btn {
    margin-left: 8px;
  }

  .nav-btn-link {
    padding: 10px 14px;
    font-size: 0.78rem;
  }

  .hero-slide__title {
    font-size: 3.5rem !important;
  }
  
  .about__grid {
    gap: 40px;
  }

  .specialities__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .item-large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* --------------------------------------------------------------------------
   Tablets (md: max-width 1023px) - MOBILE NAV ACTIVATION
   -------------------------------------------------------------------------- */
@media (max-width: 1350px) {
  /* Top Bar */
  .top-bar {
    display: none; /* Hide top bar on mobile/tablet to save space */
  }
  
  .header {
    top: 0;
    height: 70px; /* Thinner header for mobile */
  }

  .hero, .hero-slider {
    margin-top: 70px;
  }

  .hero-slider {
    height: 80vh !important;
    min-height: 550px !important;
  }

  .hero-slide__title {
    font-size: 3rem !important;
  }

  .hero-slide__subtitle {
    font-size: 1.25rem !important;
    margin-bottom: 30px !important;
  }

  .slider-arrow {
    width: 45px !important;
    height: 45px !important;
    font-size: 1rem !important;
  }

  .slider-arrow.prev {
    left: 15px !important;
  }

  .slider-arrow.next {
    right: 15px !important;
  }

  /* Header & Logo */
  .logo-title {
    font-size: 1.6rem;
    letter-spacing: 3px;
    margin-right: -3px;
  }
  .logo-subtitle {
    font-size: 0.58rem;
    letter-spacing: 2.2px;
    margin-right: -2.2px;
    margin-top: 1px;
  }

  /* Mobile Nav Toggle */
  .nav-toggle {
    display: flex;
  }

  /* Mobile Navigation Container */
  .nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--white);
    overflow-y: auto;
    transition: var(--transition);
    padding: 20px 0 100px;
  }

  .nav.active {
    left: 0;
  }

  .nav__list {
    flex-direction: column;
    height: auto;
    gap: 0;
  }

  .nav__item {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--light-gray);
  }

  .nav__link {
    width: 100%;
    padding: 15px 20px;
    justify-content: space-between;
    font-size: 1rem;
  }
  
  .nav__item--btn {
    width: 100%;
    padding: 15px 20px;
    border-bottom: none;
  }

  .nav-btn-link {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border-radius: 6px;
    text-align: center;
    background-color: var(--royal-blue);
    color: var(--white);
    display: block;
  }

  /* Mega Menu as Accordion */
  .mega-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none; /* Controlled by JS in mobile */
    padding: 0 0 15px;
    background: var(--off-white);
    width: 100%;
  }

  .nav__item.active .mega-menu {
    display: block; /* Show when active class added via JS */
  }

  .nav__item:hover .mega-menu {
    display: none; /* Prevent hover from overriding click on tablet */
  }
  .nav__item.active:hover .mega-menu {
    display: block;
  }

  .mega-menu__container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 15px 20px !important;
  }

  .mega-menu--wide .mega-menu__container {
    display: flex !important;
    flex-direction: column !important;
  }

  .mega-menu__col {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .mega-menu__featured {
    border-left: none !important;
    padding-left: 0 !important;
    margin-top: 15px !important;
  }

  .mega-menu__title {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
    margin-top: 10px !important;
  }

  .mega-menu__list a {
    padding: 8px 0;
    font-size: 1rem;
  }
}

@media (max-width: 1023px) {
  /* Layout Sections */
  .about__grid {
    grid-template-columns: 1fr;
  }
  
  .about__content {
    order: 2;
  }
  
  .about__image {
    order: 1;
    max-width: 600px;
    margin: 0 auto;
  }

  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero__floating-stats {
    flex-wrap: wrap;
    bottom: -80px;
  }

  .quick-links {
    padding-top: 100px;
  }

  .cta-banner__inner {
    flex-direction: column;
    text-align: center;
  }
  
  .cta-banner__form-wrapper {
    flex: auto;
    width: 100%;
    max-width: 500px;
  }
}

/* --------------------------------------------------------------------------
   Large Phones (sm: max-width 767px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* Header & Logo */
  .logo-title {
    font-size: 1.25rem;
    letter-spacing: 2px;
    margin-right: -2px;
  }
  .logo-subtitle {
    font-size: 0.45rem;
    letter-spacing: 1px;
    margin-right: -1px;
    margin-top: 1px;
  }
  
  .header__logo img {
    height: 45px;
  }
  
  .header__logo a {
    gap: 10px;
  }

  .section {
    padding: 60px 0;
  }

  .about__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .section__title {
    font-size: 2rem;
  }

  .premium-title-white {
    font-size: 2rem !important;
  }

  .program-glass-card h3 {
    font-size: 1.5rem !important;
  }

  .bento-content h3 {
    font-size: 1.3rem !important;
  }

  .hero-slide__title {
    font-size: 2.2rem !important;
  }

  .hero-slide__subtitle {
    font-size: 1rem !important;
    margin-bottom: 25px !important;
  }

  .hero-slide__badge {
    font-size: 0.8rem !important;
    padding: 6px 16px !important;
    margin-bottom: 15px !important;
  }

  .hero-slide__actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    gap: 12px !important;
  }

  .hero-slide__actions .btn {
    width: 100% !important;
    max-width: 300px !important;
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
  }

  .slider-arrow {
    display: none !important;
  }

  .slider-dots {
    bottom: 30px !important;
  }

  .specialities__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  #tab-ug .program-card {
    flex-direction: column;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr);
  }

  .item-large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer__brand {
    text-align: center;
  }
  
  .footer__contact-list {
    align-items: center;
  }
  
  .social-links {
    justify-content: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .student-grid,
  .patient-grid {
    grid-template-columns: 1fr;
  }
  .patient-card {
    flex-direction: column;
  }
  .patient-card__img {
    width: 100%;
    height: 250px;
  }
  .patient-card__content {
    width: 100%;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }
  .bento-item--large, .bento-item--medium {
    grid-column: span 1;
  }
  
  .programs-premium__grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Small Phones (xs: max-width 479px)
   -------------------------------------------------------------------------- */
@media (max-width: 479px) {
  .header__logo-text {
    display: flex;
  }

  .logo-title {
    font-size: 1.4rem;
    letter-spacing: 2px;
    margin-right: -2px;
  }
  .logo-subtitle {
    font-size: 0.5rem;
    letter-spacing: 1.8px;
    margin-right: -1.8px;
    margin-top: 1px;
  }

  .header__logo img {
    height: 35px;
  }

  .header__logo a {
    gap: 6px;
  }

  .hero__floating-stats {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    bottom: -150px;
  }

  .hero-slide__title {
    font-size: 1.8rem !important;
  }

  .hero-slide__subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
  }

  .quick-links {
    padding-top: 170px;
  }

  .stat-card-mini {
    width: 100%;
    justify-content: center;
  }

  .stats__grid {
    grid-template-columns: 1fr;
  }

  .specialities__grid {
    grid-template-columns: 1fr;
  }

  .about__highlights {
    grid-template-columns: 1fr;
  }

  .gallery-masonry {
    grid-template-columns: 1fr;
  }
  
  .testimonial-card {
    padding: 30px 20px;
  }
}

@media (max-width: 992px) {
  /* Campus Gallery Mobile Stack */
  .campus-gallery {
    flex-direction: column;
    height: auto;
  }
  .campus-gallery__item--large {
    height: 400px;
  }
  .campus-gallery__stack {
    height: 700px; /* Space for two stacked items */
  }
}

@media (max-width: 576px) {
  .campus-gallery__item--large {
    height: 350px;
  }
  .campus-gallery__stack {
    height: 600px;
  }
  .campus-glass-float {
    flex-direction: column;
    text-align: center;
    align-items: center;
    bottom: 15px;
    left: 15px;
    right: 15px;
    padding: 15px;
  }
  .campus-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  .campus-glass-float h3 {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 768px) {
  .appointment-glass-title {
    font-size: 1.6rem;
  }
  .appointment-glass-card {
    padding: 30px 20px;
  }
  .glass-form .form-row {
    flex-direction: column;
    gap: 20px;
  }
  .floating-contact {
    bottom: 90px;
    right: 20px;
    gap: 12px;
  }
  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 22px;
  }
  .about__actions .btn--lg {
    padding: 12px 25px;
    font-size: 1rem;
    width: 100%;
  }
  .btn--confirm-appointment {
    padding: 12px 20px;
    font-size: 1rem;
    width: 100%;
  }
}


