/* ============================================================
   Responsive Stylesheet
   Mobile-first breakpoints: sm(576) md(768) lg(992) xl(1200)
============================================================ */

/* ---- XL screens ---- */
@media (min-width: 1400px) {
  .container { max-width: 1320px; }
}

/* ---- LG screens ---- */
@media (max-width: 1199.98px) {
  .hero-title { font-size: 3.6rem; }
  .about-badge { right: -10px; }
  .process-step::after { display: none; }

  .brand-title { font-size: 28px; }
  .brand-subtitle { font-size: 11px; }
  .nav-link { font-size: 15px; padding: 24px 12px !important; }
  .nav-quote-btn { min-height: 52px; padding: 14px 24px; font-size: 15px; }
}

/* ---- MD (tablets) ---- */
@media (max-width: 991.98px) {
  .section-padding { padding: 72px 0; }

  #mainHeader { padding-top: 0; }
  .dropdown-toggle { display: inline-flex; }
  #mainHeader .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .navbar-shell { padding: 0; }
  .navbar-brand { margin-right: 0; }
  .brand-icon { width: auto; height: 46px; font-size: 22px; }
  .brand-icon img { height: 46px; width: auto; }
  .brand-title { font-size: 24px; }
  .brand-subtitle { font-size: 10px; }
  .navbar-collapse {
    background: rgba(22, 38, 53, 0.98);
    margin-top: 16px;
    padding: 18px 16px 12px;
  }
  #mainHeader.scrolled .navbar-collapse {
    background: var(--white);
    box-shadow: 0 14px 34px rgba(11,34,57,0.10);
  }
  .navbar-nav {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
    gap: 0;
  }
  .nav-link {
    font-size: 15px;
    padding: 12px 0 !important;
  }
  #mainHeader.scrolled .nav-link { color: var(--dark) !important; }
  #mainHeader.scrolled .nav-link:hover,
  #mainHeader.scrolled .nav-link.active { color: var(--primary) !important; }
  .nav-extra {
    margin-left: 0;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.12);
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .lang-toggle {
    min-width: 150px;
    justify-content: flex-start;
    padding-left: 0;
  }
  /* Fix lang dropdown overflowing off-screen on mobile (LTR & RTL) */
  .lang-dropdown .lang-menu {
    position: static !important;
    transform: none !important;
    float: none !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(255,255,255,0.08) !important;
    padding: 4px 0 4px 12px !important;
    margin-top: 6px !important;
    min-width: 130px;
  }
  #mainHeader.scrolled .lang-dropdown .lang-menu {
    background: #f0f1f3 !important;
  }
  #mainHeader.scrolled .nav-extra {
    border-top-color: rgba(11,34,57,0.10);
  }
  .nav-quote-btn {
    width: 100%;
    min-height: 50px;
  }
  .nav-link::after { display: none; }
  .dropdown-menu {
    background: rgba(255,255,255,0.05);
    border: none;
    box-shadow: none;
    padding: 6px 0 6px 16px;
  }
  .dropdown-item { color: rgba(255,255,255,0.75); }
  .dropdown-item:hover { background: transparent; color: var(--primary); padding-left: 22px; }
  #mainHeader.scrolled .dropdown-menu {
    background: #f8f9fb;
  }
  #mainHeader.scrolled .dropdown-item {
    color: var(--dark);
  }

  /* About */
  .about-image-wrap { margin-bottom: 60px; }
  .about-badge { right: 20px; bottom: 20px; }

  /* Team */
  .team-social { opacity: 1; transform: translateY(0); }

  /* Footer */
  .footer-col { margin-bottom: 40px; }

  /* Process */
  .process-step::after { display: none; }
  .process-step { margin-bottom: 32px; }

  /* Contact */
  .contact-form { padding: 28px 20px; }

  /* CTA */
  .cta-banner { text-align: center; }
  .cta-banner .d-flex { justify-content: center; }
}

/* ---- SM (large phones landscape) ---- */
@media (max-width: 767.98px) {
  .section-padding { padding: 56px 0; }

  .hero-title { font-size: 2.6rem; }
  .hero-bottom-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-sep { display: none; }
  .scroll-indicator { display: none; }
  .hero-controls { right: 16px; bottom: 22px; padding: 8px 10px; }
  .hero-nav-btn { width: 48px; height: 32px; font-size: 14px; }
  .hero-pagination-wrap .swiper-pagination-bullet { font-size: 12px; }

  .section-title { font-size: 1.9rem; }

  .stats-section { padding: 56px 0; }
  .stat-number { font-size: 2.8rem; }

  .service-card { padding: 28px 22px; }

  .newsletter-input-wrap { flex-direction: column; max-width: 100%; }
  .newsletter-input-wrap .btn-primary-custom { width: 100%; justify-content: center; }

  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }

  .testimonial-card { padding: 28px 24px; }

  .blog-body { padding: 20px 18px; }

  #backToTop { bottom: 20px; right: 20px; }

  .page-hero { padding: 130px 0 60px; }
  .page-hero h1 { font-size: 2rem; }
}

/* ---- XS (phones portrait) ---- */
@media (max-width: 575.98px) {
  /* Prevent Bootstrap row negative-margin overflow inside hero slides */
  .hero-swiper .swiper-slide .row {
    margin-left: 0;
    margin-right: 0;
  }
  .hero-swiper .swiper-slide .container {
    padding-left: 20px;
    padding-right: 20px;
    overflow: hidden;
  }

  .section-padding { padding: 48px 0; }
  .hero-title { font-size: 2.1rem; }
  .hero-label { font-size: 11px; letter-spacing: 2px; }

  .navbar-shell { padding: 12px 14px; }
  .navbar-brand { gap: 10px; }
  .brand-icon { width: auto; height: 40px; font-size: 18px; }
  .brand-icon img { height: 40px; width: auto; }
  .brand-title { font-size: 18px; }
  .brand-subtitle { font-size: 8px; }
  .nav-icon { width: 38px; height: 38px; font-size: 18px; }
  .nav-quote-btn { font-size: 14px; }

  .btn-primary-custom,
  .btn-outline-custom,
  .btn-outline-primary-custom { padding: 12px 26px; font-size: 14px; }

  .service-card { padding: 24px 18px; }
  .service-icon { width: 56px; height: 56px; }
  .service-icon i { font-size: 22px; }

  .about-badge-number { font-size: 2rem; }

  .section-label { font-size: 11px; letter-spacing: 2px; }

  .stat-card { padding: 12px; }
  .stat-number { font-size: 2.2rem; }

  .contact-info-card { padding: 24px 18px; }
  .contact-form { padding: 24px 18px; }

  .team-card img { aspect-ratio: 3/3.5; }

  .blog-meta { flex-wrap: wrap; gap: 10px; }

  .main-footer { padding: 56px 0 0; }
  .footer-brand { font-size: 20px; }

  .top-bar { display: none; }
}

/* ---- Print styles ---- */
@media print {
  #mainHeader, #backToTop, .top-bar, .newsletter-section { display: none !important; }
  body { background: white; color: black; }
  .section-padding { padding: 24px 0; }
}

/* ---- Accessibility ---- */
@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; }
}

/* ---- High contrast ---- */
@media (prefers-color-scheme: dark) {
  /* Optionally implement dark mode here */
}
