/* =========================================
   RESPONSIVE.CSS (Clean + Conflict-Free)
   Load AFTER style.css
   ========================================= */

/* ===========================
   TABLETS (991px and below)
   =========================== */
@media (max-width: 991px) {
  /* Footer: 2 columns */
  .footer-row { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  /* Services layout stack */
  .services-layout { flex-direction: column; }
  .service-sidebar { width: 100%; position: relative; top: 0; }
  .sidebar-box ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  /* Team page profile rows stack */
  .profile-row { flex-direction: column; gap: 30px; text-align: center; }
  .reverse-layout { flex-direction: column; }
  .profile-img-col { flex: 0 0 100%; max-width: 100%; width: 100%; }
  .profile-frame { max-width: 400px; margin: 0 auto; }
  .profile-info-col h3 { text-align: center; }
  .profile-info-col .divider { margin: 15px auto !important; }
}

/* ===========================
   MOBILE (768px and below)
   =========================== */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  html, body { overflow-x: hidden; }
  .section-padding { padding: 70px 0; }

  /* HERO */
  .hero-wrapper-responsive { height: auto; min-height: auto; display: flex; flex-direction: column; margin-top: 70px; }
  .video-responsive { position: relative; width: 100%; height: auto; max-height: 420px; object-fit: cover; }
  .hero-overlay-responsive { position: relative; height: auto; padding: 40px 20px; background: var(--navy-dark); top: 0; left: 0; text-align: center; }

  /* NAVIGATION */
  .mobile-menu-icon { display: block; font-size: 1.9rem; color: #fff; cursor: pointer; }
  
  .main-header .navbar {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%;
    background: var(--navy-main); border-top: 2px solid var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,.6);
    max-height: 0; overflow: hidden; transition: max-height .35s ease; z-index: 99999;
  }
  .main-header .navbar.active { max-height: 900px; overflow-y: auto; }
  
  .main-header .navbar ul { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; }
  .main-header .navbar ul li { width: 100%; margin: 0; text-align: left; border-bottom: 1px solid rgba(255,255,255,.08); }
  .main-header .navbar ul li a { display: block; padding: 16px 22px; font-size: 0.95rem; color: #fff; text-align: left; }
  .main-header .navbar ul li a:hover { background: rgba(197,160,89,.12); color: var(--gold); }

  /* MOBILE DROPDOWN (Position Static fixes overlap) */
  .main-header .dropdown-content {
    display: none; 
    position: static; /* KEY FIX: Pushes items down */
    width: 100%; background: rgba(0,0,0,.25); box-shadow: none; border-top: 1px solid rgba(255,255,255,.06);
    opacity: 1; visibility: visible; transform: none; padding: 0; margin: 0;
  }
  .main-header .dropdown.open > .dropdown-content { display: block; }
  .main-header .dropdown-content li { border-bottom: 1px solid rgba(255,255,255,.06); }
  .main-header .dropdown-content li:last-child { border-bottom: none; }
  .main-header .dropdown-content li a { padding: 14px 35px; font-size: 0.9rem; color: #dcdcdc; text-align: left; }
  .main-header .dropdown-content li a:hover { background: rgba(255,255,255,.06); color: var(--gold); }

  /* General Stacking */
  .row-flex { flex-direction: column; gap: 28px; align-items: stretch; }
  .col-half { min-width: 0; width: 100%; flex: 0 0 100%; }
  .workflow-container { flex-direction: column; align-items: center; }
  .step-arrow { transform: rotate(90deg); margin: 10px 0; padding: 0; }
  .work-step { width: 100%; margin-bottom: 20px; text-align: center; }
  .side-panel { width: 100%; max-width: 100%; padding: 20px; }
  .exp-badge { display: none; }
  .partners-grid { flex-direction: column; gap: 16px; }
  .sidebar-box ul { grid-template-columns: 1fr; }
  .icon-header { flex-direction: column; align-items: center; text-align: center; }
  .icon-header i { margin-right: 0; margin-bottom: 15px; }

  /* About Page Typography */
  .about-page p, .about-page li { text-align: left !important; }
  .about-page h1, .about-page h2, .about-page h3, .about-page h4, .about-page h5, .about-page h6 { text-align: center !important; }
  .about-page .section-subtitle { text-align: center !important; }
  .about-page .divider, .about-page .center-divider { margin-left: auto !important; margin-right: auto !important; }

  /* Footer */
  .main-footer { text-align: left !important; }
  .footer-row { grid-template-columns: 1fr !important; text-align: left !important; gap: 25px; }
  .footer-col { text-align: left !important; }
  .footer-col ul, .footer-col ul li { text-align: left !important; }
  .contact-detail { flex-direction: row !important; justify-content: flex-start !important; text-align: left !important; }
  .contact-detail i { margin-right: 12px !important; margin-left: 0 !important; }
  .social-links { display: flex; justify-content: flex-start !important; }
  .copyright { text-align: left !important; }
}

/* DESKTOP HOVER FIXES */
@media (min-width: 769px) {
  .dropdown.open > .dropdown-content { display: none !important; } /* Hide js-opened dropdowns on desktop */
}
