/* ============================================
   IMCS Academy — Responsive Styles
   ============================================ */

/* ---------- Large Desktops (1400px+) ---------- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero-title {
    font-size: 4.25rem;
  }
}

/* ---------- Laptops / Desktops (992px – 1199px) ---------- */
@media (min-width: 992px) {
  .float-card {
    display: flex;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .float-card--1 {
    left: 0;
  }

  .float-card--2 {
    right: 0;
  }

  .float-card--4 {
    right: -20px;
  }

  .testimonial-card {
    flex: 0 0 calc(50% - 12px);
  }
}

@media (min-width: 1200px) {
  .testimonial-card {
    flex: 0 0 calc(33.333% - 16px);
  }
}

@media (max-width: 991.98px) {
  .test-series-card {
    flex: 0 0 calc(50% - 10px);
  }
}

/* ---------- Tablets (768px – 991px) ---------- */
@media (max-width: 991.98px) {
  .section {
    padding: 70px 0;
  }

  /* Mobile Navigation */
  .navbar-collapse {
    background: rgba(11, 18, 32, 0.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid var(--glass-border);
  }

  .navbar-nav .nav-link {
    padding: 12px 16px !important;
  }

  .nav-actions {
    flex-direction: column;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
  }

  .nav-phone {
    display: flex !important;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
  }

  .btn-nav-cta {
    width: 100%;
    justify-content: center;
  }

  /* Hero */
  .hero-section {
    min-height: auto;
    padding-bottom: 60px;
  }

  .hero-visual {
    margin-top: 20px;
  }

  .float-card {
    display: none;
  }

  .video-glass-wrap {
    padding-bottom: 20px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* About */
  .about-img-accent {
    width: 100px;
    right: 10px;
    bottom: -10px;
  }

  .about-experience {
    left: 10px;
    top: 20px;
    padding: 16px 20px;
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  /* Testimonials */
  .testimonial-card {
    flex: 0 0 calc(100% - 0px);
  }

  /* Scholarship */
  .scholarship-card {
    padding: 32px 24px;
  }

  .scholarship-card__img {
    display: none;
  }

  /* Contact CTA */
  .contact-cta {
    padding: 36px 28px;
    text-align: center;
  }

  .contact-cta__actions {
    align-items: center;
  }
}

/* ---------- Mobile Landscape / Small Tablets (576px – 767px) ---------- */
@media (max-width: 767.98px) {
  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 1.85rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-typing {
    font-size: 1.15rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-trust {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* Feature cards */
  .feature-card {
    padding: 24px;
  }

  .subject-card {
    padding: 22px 16px;
  }

  .subject-card p {
    font-size: 0.8rem;
  }

  /* Faculty */
  .faculty-card__body {
    padding: 20px;
  }

  /* Coaching Way */
  .coaching-way-timeline::before {
    left: 27px;
  }

  .coaching-step {
    grid-template-columns: 56px 1fr;
    gap: 16px;
  }

  .coaching-step__num {
    width: 56px;
    height: 56px;
    font-size: 1.1rem;
    border-radius: 14px;
  }

  .coaching-step__card {
    padding: 22px 20px;
  }

  .coaching-step:hover .coaching-step__card {
    transform: none;
  }

  .faq-accordion .accordion-button {
    padding: 16px 18px;
    font-size: 0.95rem;
  }

  .faq-accordion .accordion-body {
    padding: 0 18px 18px;
  }

  .test-series-card {
    flex: 0 0 calc(50% - 10px);
  }

  /* Results */
  .results-slide img {
    height: 200px;
  }

  /* Footer */
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom__links {
    justify-content: center;
  }

  /* Sticky actions — compact on mobile */
  .sticky-actions {
    top: auto;
    bottom: 80px;
    transform: none;
    flex-direction: row;
    right: 0;
    left: 0;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    pointer-events: none;
  }

  .sticky-action {
    transform: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
    pointer-events: auto;
    flex-shrink: 0;
  }

  .sticky-action span {
    display: none;
  }

  .sticky-action i {
    font-size: 1.1rem;
  }

  /* Back to top — avoid overlap */
  .back-to-top {
    bottom: 140px;
    right: 16px;
    width: 42px;
    height: 42px;
  }
}

/* ---------- Mobile Portrait (up to 575px) ---------- */
@media (max-width: 575.98px) {
  :root {
    --nav-height: 88px;
  }

  #mainNav:not(.scrolled) .navbar-brand {
    margin-left: 6px;
    margin-top: 4px;
  }

  #mainNav:not(.scrolled) .nav-logo--default {
    height: 64px;
  }

  #mainNav.scrolled .nav-logo {
    height: 56px;
  }

  #mainNav {
    padding: 12px 0;
  }

  .hero-section {
    padding-top: calc(var(--nav-height) + 24px);
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .video-play-btn {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .about-experience {
    position: relative;
    top: auto;
    left: auto;
    margin-top: -40px;
    margin-left: 20px;
    display: inline-block;
  }

  .about-img-accent {
    display: none;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .page-hero__title {
    font-size: 1.85rem;
  }

  .course-hero__title {
    font-size: 2rem;
  }

  .course-enquiry-form {
    padding: 20px;
  }

  /* Gallery single column on very small screens */
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  /* News cards */
  .news-card__body {
    padding: 20px;
  }

  /* Contact CTA buttons full width */
  .contact-cta__actions .btn {
    width: 100%;
  }

  /* Footer spacing */
  .site-footer {
    padding-top: 60px;
  }

  .site-footer .col-lg-4 {
    margin-bottom: 20px;
  }

  .coaching-way-timeline {
    gap: 22px;
  }

  .test-series-card {
    flex: 0 0 calc(85% - 10px);
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-hero {
    padding-bottom: 60px;
  }

  .course-hero {
    padding-bottom: 60px;
  }

  .course-hero__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .brochure-cta {
    padding: 32px 24px;
  }

  .test-series-filters {
    position: static;
    padding: 20px;
  }

  .test-series-filters__list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .test-series-filter-btn {
    width: auto;
    flex: 0 0 auto;
  }

  .test-series-detail-actions {
    flex-direction: column;
  }

  .test-series-detail-actions .btn {
    width: 100%;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .results-track {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- High Contrast / Print ---------- */
@media print {
  .site-header,
  .back-to-top,
  .sticky-actions,
  .float-card,
  .hero-cta,
  .contact-cta-section {
    display: none !important;
  }

  .hero-section {
    min-height: auto;
    padding: 20px 0;
  }

  .section {
    padding: 30px 0;
    break-inside: avoid;
  }
}
