/* ============================================================
   responsive.css — Orill Group Website
   Mobile-First Responsive System
   Breakpoints: 1024px (tablet) | 768px (mobile) | 480px (small)
   ============================================================ */

/* ---- Hamburger Menu Button ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px 12px;
  background: none;
  border: none;
  outline: none;
  z-index: 1100;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav bar row (toggle + label) */
.mobile-nav-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  min-height: 48px;
}
.mobile-nav-bar .mobile-nav-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ============================================================
   TABLET  ≤ 1024px
   ============================================================ */
@media (max-width: 1024px) {
  .header-info-box .info-item:not(:last-child) { display: none; }
  .header-info-box { gap: 16px; }

  .section-about-home .container { flex-direction: column !important; gap: 40px !important; }
  .home-about-title { flex: auto !important; }

  .industries-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .services-carousel { grid-template-columns: repeat(2, 1fr) !important; }
  .approach-steps { grid-template-columns: repeat(2, 1fr) !important; }
  .projects-grid-modern { grid-template-columns: repeat(2, 1fr) !important; }
  .companies-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .about-lists { grid-template-columns: repeat(2, 1fr) !important; }
  .about-cards, .about-cards-modern { grid-template-columns: repeat(2, 1fr) !important; }

  .process-steps { flex-wrap: wrap; gap: 30px; }
  .process-steps::before { display: none; }
  .process-step { flex: 0 0 calc(50% - 15px); }

  .solution-detail,
  .solution-detail.reverse { grid-template-columns: 1fr !important; direction: ltr !important; }

  .contact-wrap { flex-direction: column; gap: 40px; }
  .form-row { flex-direction: column; gap: 0; }
  .about-intro { flex-direction: column; }

  .section-careers-home .container > div { flex-direction: column !important; gap: 40px !important; }
}

/* ============================================================
   MOBILE  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {

  /* Header info - hide completely on mobile to make room for logo + hamburger */
  .header-info-box { display: none !important; }
  
  /* Ensure header container spaces items properly (Logo on left, Hamburger on right) */
  .header-top .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 15px;
    width: 100%;
    overflow: hidden;
  }

  .header-logo img { height: 46px !important; }
  .header-top.shrink .header-logo img { height: 34px !important; }

  /* Hamburger toggle - positioned to the right */
  .nav-toggle { display: flex; margin-left: auto; padding-right: 0;}

  /* Nav collapses to an absolute overlay below header */
  .header-bottom { 
    position: fixed; 
    top: 60px !important; /* height of mobile header */
    left: 0; 
    width: 100%; 
    z-index: 1000; 
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    pointer-events: none; /* Let clicks pass through when closed */
  }
  
  .main-nav { display: block; width: 100%; }
  .main-nav > .container { padding: 0; }
  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: rgba(26, 34, 64, 0.98);
    pointer-events: auto; /* Re-enable clicks for the menu itself */
  }
  .main-nav ul.nav-open { max-height: 700px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
  .main-nav ul li { border-bottom: 1px solid rgba(255,255,255,0.07); width: 100%; display: block; }
  .main-nav ul li a { padding: 15px 25px; font-size: 14px; letter-spacing: 1px; display: block; }
  .main-nav ul li a::after { display: none; }
  .main-nav ul li.get-quote { width: 100%; }
  .main-nav ul li.get-quote a { padding: 15px 25px; text-align: left; border-radius: 0; background: var(--primary); }

  /* Increase side padding for mobile */
  .container { padding: 0 25px !important; }
  .section, .section-bg { padding: 50px 0 !important; }
  
  /* Fix cramped Stats Bar / Flex items */
  [style*="display: flex; justify-content: space-around"],
  [style*="display: flex; justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 25px !important;
  }
  
  /* Fix Stats Bar specifics (about-group.html etc) */
  .stats-grid, 
  section[style*="background-color: var(--secondary)"] .container[style*="display: flex"] {
    flex-direction: column !important;
    gap: 25px !important;
    padding: 30px 25px !important;
  }
  
  .stats-grid div,
  section[style*="background-color: var(--secondary)"] .container div {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* Hero */
  .hero-section { padding: 100px 0 140px !important; min-height: 85vh; }
  .hero-section h1 { font-size: 30px !important; line-height: 1.25; }
  .hero-section h6 { font-size: 11px !important; }
  .hero-section p { font-size: 14px !important; max-width: 100%; }
  .hero-btn-row { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Page header */
  .page-header { padding: 50px 0 65px; }
  .page-header h1 { font-size: 26px !important; }
  .page-header .breadcrumb { font-size: 11px; }

  /* Section spacing */
  .section { padding: 50px 0 !important; }
  .section-companies,
  .section-about-home,
  .section-approach,
  .section-industries,
  .section-projects-home,
  .section-careers-home,
  .process-strip-home,
  .group-services,
  .global-map-section { padding: 55px 0 !important; }

  /* Companies */
  .companies-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* About Us homepage */
  .section-about-home .container { flex-direction: column !important; gap: 30px !important; }
  .home-about-title { flex: auto !important; text-align: center; width: 100%; }
  .home-about-title h2 { font-size: 30px !important; }
  .about-quick-stats { grid-template-columns: repeat(2, 1fr) !important; }

  /* Approach */
  .approach-steps { grid-template-columns: repeat(2, 1fr) !important; }

  /* Industries */
  .industries-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Group Services */
  .services-carousel { grid-template-columns: 1fr !important; }

  /* How We Deliver */
  .process-steps { flex-direction: column; align-items: center; }
  .process-step { width: 100%; max-width: 300px; }
  .process-steps::before { display: none; }

  /* Projects */
  .projects-grid-modern { grid-template-columns: 1fr !important; }

  /* Careers homepage */
  .section-careers-home .container > div { flex-direction: column !important; gap: 30px !important; }
  .section-careers-home .container > div > div { width: 100% !important; }
  .section-careers-home img { width: 100% !important; max-height: 220px; object-fit: cover; border-radius: 8px; }

  /* Logo carousel */
  .logo-carousel-item { width: 110px; padding: 0 18px; }
  .logo-carousel-item i { font-size: 32px; }

  /* Footer */
  .site-footer .container {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 30px !important;
    text-align: left !important;
  }
  .site-footer .container > div {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }
  .footer-socials { justify-content: flex-start !important; }

  /* About page */
  .about-intro { flex-direction: column; gap: 30px; }
  .about-intro-img { flex: auto; text-align: center; }
  .about-intro-img img { max-width: 100%; }
  .about-lists { grid-template-columns: 1fr !important; }
  .about-cards, .about-cards-modern { grid-template-columns: 1fr !important; }

  /* Contact */
  .contact-wrap { flex-direction: column; padding: 40px 0; gap: 40px; }
  .form-row { flex-direction: column; }
  .contact-map { height: 220px; }

  /* Solutions page */
  .solution-detail,
  .solution-detail.reverse { grid-template-columns: 1fr !important; direction: ltr !important; gap: 20px !important; }

  /* Projects page */
  .portfolio-grid { grid-template-columns: 1fr !important; }
  .portfolio-filters { flex-wrap: wrap; justify-content: center; gap: 10px; }

  /* Map */
  .map-container img { padding: 10px; }
  .map-marker { width: 7px; height: 7px; }
  .map-marker .tooltip { font-size: 11px; padding: 5px 10px; }

  /* Stat card */
  .stat-card { padding: 18px 10px; }
}

/* ============================================================
   SMALL MOBILE  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 20px !important; }
  .header-logo img { height: 36px !important; }

  .btn-hero { padding: 10px 18px !important; font-size: 11px !important; }
  .btn-hero-outline { padding: 10px 16px !important; font-size: 11px !important; }
  .btn-blue { padding: 12px 24px !important; font-size: 11px !important; }

  /* Hero */
  .hero-section { padding: 80px 0 120px !important; }
  .hero-section h1 { font-size: 24px !important; }
  .hero-section p { font-size: 13px !important; }

  /* Headings */
  h2 { font-size: 22px !important; }
  .page-header h1 { font-size: 20px !important; }

  /* All grids → 1-col */
  .companies-grid { grid-template-columns: 1fr !important; }
  .approach-steps { grid-template-columns: 1fr !important; }
  .industries-grid { grid-template-columns: 1fr !important; }
  .about-quick-stats { grid-template-columns: 1fr !important; }

  /* CTA banner */
  .cta-banner-modern { padding: 28px 18px !important; }
  .cta-banner-content h4 { font-size: 18px !important; }

  /* Sections */
  .section-companies,
  .section-about-home,
  .section-approach,
  .section-industries,
  .section-projects-home,
  .section-careers-home,
  .process-strip-home,
  .group-services { padding: 45px 0 !important; }

  /* Industry + company cards */
  .industry-card, .company-card { padding: 20px 12px; }
  .company-card .company-logo { font-size: 28px; }
}
