/* ==========================================================================
   ECMG – Emirates Confidently Medical Center
   Responsive & Adaptive Breakpoints Stylesheet
   360px, 390px, 576px, 768px, 992px, 1200px, 1440px, 1920px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large Desktops (1440px - 1920px)
   -------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1380px;
  }

  .hero-section {
    padding: 6rem 0 7rem;
  }
}

/* --------------------------------------------------------------------------
   Standard Laptops & Small Desktops (1024px - 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .hero-grid {
    gap: 3rem;
  }

  .desktop-nav {
    gap: 0.85rem;
  }
  .desktop-nav .nav-link {
    font-size: 0.875rem;
  }

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

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   Tablets Landscape (992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .desktop-nav,
  .top-notice-bar {
    display: none;
  }

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

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .hero-visual-col {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .trust-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 2rem;
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .departments-grid,
  .treatments-grid,
  .why-grid,
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .about-visual {
    max-width: 580px;
    margin: 0 auto;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    row-gap: 3rem;
  }

  .google-trust-box {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }

  .google-trust-left {
    flex-direction: column;
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Tablets Portrait (768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section-spacing {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header-container {
    height: 72px;
  }

  .brand-title {
    font-size: 1.35rem;
  }

  .brand-emblem {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .hero-section {
    padding: 3.5rem 0 4.5rem;
  }

  .hero-heading {
    font-size: 2.35rem;
  }

  .hero-description {
    font-size: 1.05rem;
  }

  .hero-floating-card.card-bottom-left {
    bottom: -1rem;
    left: 0;
  }

  .hero-floating-card.card-top-right {
    top: 0.5rem;
    right: 0;
  }

  .departments-grid,
  .treatments-grid,
  .doctors-grid,
  .why-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

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

  .form-group.col-span-2 {
    grid-column: span 1;
  }

  .modal-card {
    max-height: 95vh;
  }

  .modal-header {
    padding: 1.75rem 1.5rem 1.25rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .ba-details-bar {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile Phones (576px, 390px, 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .trust-stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stat-item {
    padding: 0;
  }

  .stat-item::after {
    display: none !important;
  }

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

  .hero-cta-group .btn {
    width: 100%;
  }

  .hero-floating-card {
    position: static;
    margin-top: 1rem;
    width: 100%;
  }

  .floating-contact-widget {
    bottom: 1.25rem;
    right: 1.25rem;
  }

  .about-stat-overlay {
    position: static;
    max-width: 100%;
    margin-top: 1.5rem;
  }

  .filter-tabs,
  .results-category-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 0.5rem;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn,
  .results-tab-btn {
    flex-shrink: 0;
  }
}

/* --------------------------------------------------------------------------
   RTL Arabic Mode (Toggled via Language Switcher)
   -------------------------------------------------------------------------- */
body.rtl {
  direction: rtl;
  text-align: right;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.rtl .brand-link {
  flex-direction: row-reverse;
}

body.rtl .desktop-nav {
  flex-direction: row-reverse;
}

body.rtl .top-notice-inner {
  flex-direction: row-reverse;
}

body.rtl .link-arrow i {
  transform: rotate(180deg);
}

body.rtl .link-arrow:hover i {
  transform: rotate(180deg) translateX(4px);
}

body.rtl .stat-item {
  flex-direction: row-reverse;
}

body.rtl .stat-item:not(:last-child)::after {
  right: auto;
  left: 0;
}

body.rtl .about-point {
  flex-direction: row-reverse;
}

body.rtl .test-author {
  flex-direction: row-reverse;
}

body.rtl .modal-close-btn {
  right: auto;
  left: 1.5rem;
}

body.rtl .footer-links a:hover {
  padding-left: 0;
  padding-right: 4px;
}
