/* ============================================================
   BRAND MAKER — responsive-fixes.css
   PASTE: Add <link rel="stylesheet" href="assets/css/responsive-fixes.css"/>
   AFTER the existing 3 CSS links in index.php and portfolio.php <head>
   ============================================================ */

/* ── Global Box-Sizing & Overflow Guard ── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100%;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Touch-friendly minimum hit area ── */
button, a, select, input, textarea {
  touch-action: manipulation;
}

/* ============================================================
   NAVBAR — Mobile Overlay Menu
   ============================================================ */

/* Ensure hamburger is always on top and clickable */
.hamburger {
  position: relative;
  z-index: 10001 !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-width: 44px;
  min-height: 44px;
  display: none; /* hidden on desktop; shown via media query below */
}

/* ── Mobile nav overlay fix ── */
@media (max-width: 768px) {
  /* Navbar pill — no overflow */
  #navbar {
    top: 10px;
    width: calc(100% - 28px);
    padding: 10px 16px;
    border-radius: 16px;
    gap: 0;
    justify-content: space-between;
    overflow: visible;
  }

  /* Show hamburger */
  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
  }

  /* Hide right-group on mobile */
  .nav-right-group {
    display: none !important;
  }

  /* ── Full-screen overlay menu ── */
  .nav-menu {
    display: none !important; /* keeps it OFF until .open added */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* dynamic viewport height for notched phones */
    z-index: 9999 !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 80px 24px 40px !important;
    list-style: none !important;
    background: rgba(6, 2, 16, 0.97) !important;
    backdrop-filter: blur(28px) !important;
    -webkit-backdrop-filter: blur(28px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Safe area for notched phones */
    padding-top: calc(80px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(40px + env(safe-area-inset-bottom)) !important;
  }

  .nav-menu.open {
    display: flex !important;
    animation: mobileMenuIn 0.32s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  @keyframes mobileMenuIn {
    from { opacity: 0; transform: scale(0.97) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
  }

  /* Stagger menu items */
  .nav-menu li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
    text-align: center;
  }
  .nav-menu.open li { opacity: 1; transform: translateY(0); }
  .nav-menu.open li:nth-child(1) { transition-delay: 0.06s; }
  .nav-menu.open li:nth-child(2) { transition-delay: 0.11s; }
  .nav-menu.open li:nth-child(3) { transition-delay: 0.16s; }
  .nav-menu.open li:nth-child(4) { transition-delay: 0.21s; }
  .nav-menu.open li:nth-child(5) { transition-delay: 0.26s; }
  .nav-menu.open li:nth-child(6) { transition-delay: 0.31s; }
  .nav-menu.open li:nth-child(7) { transition-delay: 0.36s; }

  /* Nav link sizing inside overlay */
  .nav-menu a {
    font-size: clamp(1.2rem, 5vw, 1.6rem) !important;
    font-weight: 700 !important;
    padding: 14px 32px !important;
    color: rgba(255, 255, 255, 0.78) !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 160px !important;
    white-space: nowrap !important;
    text-align: center !important;
    transition: color 0.25s ease, background 0.25s ease !important;
  }
  .nav-menu a:hover,
  .nav-menu a:active {
    color: #fff !important;
    background: rgba(124, 58, 237, 0.18) !important;
  }
  .nav-menu a::after { display: none !important; }
}

/* ── Small mobile ── */
@media (max-width: 480px) {
  #navbar {
    width: calc(100% - 20px);
    padding: 9px 12px;
    border-radius: 14px;
  }
  .nav-brand-tagline { display: none; }
  .nav-brand-name    { font-size: 0.85rem !important; }
  .nav-logo          { width: 30px !important; height: 30px !important; }
  .hamburger         { width: 40px !important; height: 40px !important; min-width: 40px; min-height: 40px; }
  .nav-menu a        { font-size: 1.2rem !important; padding: 12px 22px !important; }
}

/* ── 320px ── */
@media (max-width: 360px) {
  #navbar { width: calc(100% - 14px); padding: 8px 10px; border-radius: 12px; }
  .nav-logo       { width: 26px !important; height: 26px !important; }
  .nav-brand-name { font-size: 0.78rem !important; }
  .hamburger      { width: 36px !important; height: 36px !important; min-width: 36px; min-height: 36px; }
  .nav-menu a     { font-size: 1.1rem !important; padding: 11px 18px !important; }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
@media (max-width: 768px) {
  .hero-content {
    padding: 100px 5% 60px;
  }
  .hero-badge-row {
    gap: 8px;
    margin-bottom: 24px;
  }
  .hero-badge {
    font-size: 0.68rem;
    padding: 6px 12px;
  }
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .btn-primary,
  .btn-outline {
    width: 100%;
    max-width: 300px;
    text-align: center;
    justify-content: center;
    padding: 14px 24px;
  }
  .hero-scroll-indicator { display: none; }
}

@media (max-width: 480px) {
  .hero-content { padding: 90px 4% 50px; }
  .hero-badge   { font-size: 0.64rem; padding: 5px 10px; }
}

/* ============================================================
   SECTIONS — Padding & Spacing
   ============================================================ */
@media (max-width: 768px) {
  section { padding: 60px 5%; }
}
@media (max-width: 480px) {
  section { padding: 50px 4%; }
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .about-float-badge.top-right  { top: -10px; right: -10px; }
  .about-float-badge.bottom-left { bottom: -10px; left: -10px; }
}
@media (max-width: 480px) {
  .counters-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .counter-num   { font-size: 2rem; }
  .about-img-inner { min-height: 260px; }
}

/* ============================================================
   MISSION & VISION
   ============================================================ */
@media (max-width: 768px) {
  .mv-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    margin-top: 40px !important;
  }
  .mv-card { padding: 32px 24px; }
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }
}
@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr !important; }
  .service-card  { padding: 24px 18px; }
}

/* ============================================================
   PROCESS / ROADMAP
   ============================================================ */
@media (max-width: 900px) {
  .roadmap-container  { padding: 0 16px; }
  .roadmap-track,
  .roadmap-track-fill { left: 20px !important; }
  .roadmap-step,
  .roadmap-step:nth-child(even) {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-left: 56px !important;
    margin-bottom: 40px !important;
  }
  .roadmap-dot-wrap { left: 0 !important; transform: none !important; top: 0; }
  .roadmap-step-content {
    width: 100% !important;
    margin: 0 !important;
  }
  .roadmap-step:nth-child(even) .roadmap-step-content { margin-left: 0 !important; }
}
@media (max-width: 480px) {
  .roadmap-step { padding-left: 48px !important; }
  .roadmap-dot  { width: 44px !important; height: 44px !important; }
  .roadmap-dot-wrap { width: 44px !important; height: 44px !important; }
  .step-title   { font-size: 1rem; }
}

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
@media (max-width: 768px) {
  .why-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
  .why-card  { padding: 24px 18px; }
}
@media (max-width: 480px) {
  .why-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   REVIEWS SECTION
   ============================================================ */
@media (max-width: 900px) {
  .reviews-layout {
    flex-direction: column !important;
    gap: 32px !important;
  }
  .review-form-wrap,
  .reviews-slider-box {
    width: 100% !important;
    max-width: 100% !important;
  }
}
@media (max-width: 480px) {
  .review-form-wrap  { padding: 24px 18px; }
  .reviews-slider-box { padding: 0; }
  .review-card-inner  { padding: 24px 18px; }
  .review-text        { font-size: 0.85rem; }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    margin-top: 40px !important;
  }
}
@media (max-width: 768px) {
  .contact-form-wrap { padding: 28px 20px; }
  .contact-map-wrap iframe { height: 200px; }
}
@media (max-width: 480px) {
  .contact-form-wrap { padding: 20px 14px; }
  .form-submit-row   { flex-direction: column; }
  .form-submit-row .btn-primary,
  .form-submit-row .btn-wa { width: 100%; justify-content: center; }
  .contact-info-val a,
  .contact-info-val  {
    word-break: break-all;
    overflow-wrap: break-word;
  }
}

/* ============================================================
   ENQUIRY POPUP
   ============================================================ */
@media (max-width: 600px) {
  #enquiry-popup-overlay { padding: 12px; }
  .popup-box {
    padding: 28px 18px !important;
    border-radius: 16px;
    max-height: 96vh;
  }
  .popup-title { font-size: 1.35rem; }
  .form-submit-row {
    flex-direction: column;
  }
  .form-submit-row .btn-primary,
  .form-submit-row .btn-wa {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 36px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 28px; }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 8px !important;
  }
}

/* ============================================================
   SOCIAL FLOAT — Hide on very small or reposition
   ============================================================ */
@media (max-width: 480px) {
  .social-float {
    right: 6px;
    gap: 8px;
  }
  .social-float a {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }
}

/* ============================================================
   BACK-TO-TOP & FLOAT ENQUIRY
   ============================================================ */
@media (max-width: 480px) {
  #back-top     { right: 12px; bottom: 12px; }
  #float-enquiry {
    left: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 0.78rem;
  }
}

/* ============================================================
   SECTION TITLES — responsive clamp
   ============================================================ */
@media (max-width: 480px) {
  .section-title { font-size: clamp(1.6rem, 7vw, 2.4rem) !important; }
  .section-desc  { font-size: 0.88rem; }
}

/* ============================================================
   ABOUT CARDS ROW (if used)
   ============================================================ */
@media (max-width: 600px) {
  .about-cards-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

/* ============================================================
   PREVENT HORIZONTAL SCROLL GLOBALLY
   ============================================================ */
section, footer, header, nav, .hero-content,
.about-grid, .services-grid, .why-grid, .mv-grid,
.contact-grid, .footer-grid, .reviews-layout {
  max-width: 100%;
  overflow-x: hidden;
}

/* Fix long words / emails / URLs overflowing */
p, li, td, .contact-info-val, .detail-value, .detail-msg, .review-text {
  word-break: break-word;
  overflow-wrap: break-word;
}