/* ══════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE - Universal responsive fixes for ALL pages
   Handles: Navbar, Footer, Containers, Text, Mega-Menu
   Load this LAST on every page.
   ══════════════════════════════════════════════════════════════ */

/* ── GLOBAL RESETS ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── NAVBAR / TOPBAR — MOBILE ──────────────────────────────── */
@media (max-width: 920px) {
  body {
    overflow-x: hidden;
  }

  .topbar {
    padding: 10px 16px !important;
    height: auto !important;
    min-height: 56px !important;
    max-height: none !important;
    contain: none !important;
  }

  .logo {
    width: 40px !important;
    height: auto !important;
  }

  /* Hamburger menu toggle — always visible on mobile */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
  }

  .menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
  }

  /* UNDO nav-item hiding from navbar-responsive.css */
  .nav-item,
  .nav-item:nth-child(3),
  .nav-item:nth-child(4),
  .nav-item:nth-child(5),
  .nav-item:nth-child(6),
  .nav-item:nth-child(7),
  .nav-item:nth-child(8) {
    display: block !important;
    width: 100% !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  /* Mobile nav — full-screen slide panel */
  .navbar {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 85% !important;
    max-width: 360px !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    background: rgba(5, 12, 28, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 80px 20px 32px !important;
    gap: 0 !important;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1001 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-left: 1px solid rgba(255,255,255,0.08) !important;
    flex-wrap: nowrap !important;
    opacity: 1 !important;
  }

  .navbar.open {
    right: 0 !important;
  }

  .nav-link {
    width: 100% !important;
    padding: 14px 0 !important;
    font-size: 14px !important;
    justify-content: space-between !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    height: auto !important;
    min-height: 44px !important;
  }

  .dropdown-trigger {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .contact-btn {
    margin-left: 0 !important;
    margin-top: 16px !important;
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
  }

  /* Mega menu on mobile — accordion style */
  .mega-menu,
  .mega-menu.tech-menu,
  .mega-menu.industry-menu {
    position: static !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
    padding: 0 !important;
    gap: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease !important;
    transform: none !important;
    border: none !important;
    box-shadow: none !important;
    background: rgba(8, 18, 37, 0.7) !important;
    margin-top: 0 !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    border-radius: 8px !important;
  }

  .dropdown-item.open .mega-menu {
    max-height: 2000px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 8px 0 12px !important;
    overflow: visible !important;
  }

  /* Also support hover-triggered open */
  .dropdown-item:hover .mega-menu {
    max-height: 2000px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 8px 0 12px !important;
  }

  .mega-col {
    padding: 6px 12px !important;
  }

  .mega-col h4 {
    font-size: 11px !important;
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
    color: #3b82f6 !important;
    letter-spacing: 0.08em !important;
  }

  .mega-col a,
  .mega-link {
    font-size: 13px !important;
    padding: 10px 8px !important;
    margin: 1px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 40px !important;
  }

  .mega-link i {
    font-size: 14px !important;
    min-width: 18px !important;
  }

  .caret {
    font-size: 10px !important;
    transition: transform 0.3s ease !important;
  }

  .dropdown-item.open .caret {
    transform: rotate(180deg) !important;
  }
}

/* ── CONTAINER PADDING — FIX INLINE 8% ON MOBILE ────────── */
@media (max-width: 1024px) {
  .container[style*="padding-left: 8%"],
  .container[style*="padding-left:8%"],
  .container[style*="padding-left: 8%;"] {
    padding-left: 4% !important;
    padding-right: 4% !important;
  }
}

@media (max-width: 768px) {
  .container[style*="padding-left: 8%"],
  .container[style*="padding-left:8%"],
  .container[style*="padding-left: 8%;"],
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ── TEXT OVERFLOW FIX ──────────────────────────────────────── */
@media (max-width: 768px) {
  h1, h2, h3, h4, h5, h6 {
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }
  p, li, span, a {
    overflow-wrap: break-word !important;
  }
}

/* ── SECTION SPACING ───────────────────────────────────────── */
@media (max-width: 768px) {
  .sec, section {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
}

@media (max-width: 480px) {
  .sec, section {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }
}

/* ── FOOTER — ALL PAGES ────────────────────────────────────── */
@media (max-width: 768px) {
  .site-footer .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .ft-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  .ft-brand, .ft-phone, .ft-social-block {
    width: 100% !important;
    text-align: center !important;
  }

  .ft-brand p {
    font-size: 13px !important;
  }

  .footer-logo {
    height: 60px !important;
  }

  .ft-columns {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px !important;
  }

  .footer-col {
    text-align: center !important;
  }

  .footer-col h4 {
    font-size: 13px !important;
  }

  .footer-col a {
    font-size: 12px !important;
  }

  .footer-bottom p {
    font-size: 11px !important;
  }

  .footer-social a {
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .ft-columns {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .footer-col h4 {
    font-size: 12px !important;
  }

  .footer-col a {
    font-size: 11px !important;
  }

  .footer-bottom p {
    font-size: 10px !important;
  }

  .footer-logo {
    height: 48px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   ABOUT PAGE SPECIFIC
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .about-hero {
    padding: 100px 16px 48px !important;
  }

  .about-hero h1 {
    font-size: clamp(24px, 6vw, 36px) !important;
  }

  .hero-subtitle {
    font-size: 14px !important;
  }

  .hero-highlights {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }

  .highlight-item {
    font-size: 12px !important;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .stat-box {
    padding: 16px 12px !important;
  }

  .stat-number {
    font-size: 28px !important;
  }

  .stat-label {
    font-size: 11px !important;
  }

  .hero-cta-buttons {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .hero-cta-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Intro grid */
  .intro-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .intro-content h2 {
    font-size: clamp(20px, 5vw, 28px) !important;
  }

  .intro-content p {
    font-size: 14px !important;
  }

  /* Services showcase */
  .services-showcase {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .service-item {
    padding: 20px 16px !important;
  }

  .service-item h3 {
    font-size: 16px !important;
  }

  .service-item p {
    font-size: 13px !important;
  }

  /* Mission & Vision */
  .mv-wrapper {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .mv-box {
    padding: 24px 20px !important;
  }

  .mv-box h2 {
    font-size: 20px !important;
  }

  .mv-box p {
    font-size: 13px !important;
  }

  /* Timeline */
  .timeline-item {
    padding-left: 40px !important;
    padding-right: 0 !important;
  }

  .timeline-item.left,
  .timeline-item.right {
    text-align: left !important;
  }

  .timeline-content h3 {
    font-size: 16px !important;
  }

  .timeline-content p {
    font-size: 13px !important;
  }

  /* Values */
  .values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .value-card {
    padding: 20px 14px !important;
  }

  .value-card h3 {
    font-size: 15px !important;
  }

  .value-card p {
    font-size: 12px !important;
  }

  /* Awards */
  .awards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px !important;
  }

  .award-card {
    padding: 20px 14px !important;
  }

  .award-card h3 {
    font-size: 14px !important;
  }

  /* Why choose */
  .why-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .why-item {
    padding: 20px 16px !important;
  }

  /* Approach */
  .approach-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .approach-card {
    padding: 24px 20px !important;
  }

  .approach-card h3 {
    font-size: 16px !important;
  }

  .approach-card p {
    font-size: 13px !important;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .testimonial-card {
    padding: 20px 16px !important;
  }

  .testimonial-text {
    font-size: 13px !important;
  }

  /* Tech categories */
  .tech-categories {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .tech-tags {
    gap: 6px !important;
  }

  .tech-tag {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }

  /* Section titles */
  .section-title {
    font-size: clamp(20px, 5.5vw, 30px) !important;
  }

  .section-subtitle {
    font-size: 14px !important;
  }
}

@media (max-width: 480px) {
  .about-hero h1 {
    font-size: clamp(20px, 5.5vw, 28px) !important;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .stat-number {
    font-size: 24px !important;
  }

  .values-grid {
    grid-template-columns: 1fr !important;
  }

  .awards-grid {
    grid-template-columns: 1fr !important;
  }

  .service-features li {
    font-size: 12px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   CONTACT PAGE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .contact-form {
    padding: 24px 16px !important;
  }

  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    font-size: 14px !important;
    padding: 12px !important;
  }

  .contact-info-card {
    padding: 20px 16px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   SERVICE / TECHNOLOGY / INDUSTRY PAGES — UNIVERSAL
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Page hero banners */
  .page-hero,
  .service-hero,
  .tech-hero,
  .industry-hero,
  [class*="-hero"] {
    padding: 100px 16px 40px !important;
    min-height: auto !important;
  }

  [class*="-hero"] h1 {
    font-size: clamp(22px, 6vw, 32px) !important;
  }

  [class*="-hero"] p {
    font-size: 14px !important;
  }

  /* Feature / info grids */
  [class*="-grid"],
  [class*="-features"],
  [class*="-cards"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Cards in sub-pages */
  [class*="-card"] {
    padding: 20px 16px !important;
  }

  [class*="-card"] h3 {
    font-size: 16px !important;
  }

  [class*="-card"] p {
    font-size: 13px !important;
  }

  /* Two column layouts */
  [class*="-split"],
  [class*="-cols"],
  [class*="-columns"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* CTA sections */
  .cta-section,
  [class*="-cta"] {
    padding: 40px 16px !important;
  }

  .cta-section h2,
  [class*="-cta"] h2 {
    font-size: clamp(20px, 5vw, 28px) !important;
  }

  /* Process/steps */
  [class*="-steps"],
  [class*="-process"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Pricing tables */
  [class*="-pricing"],
  [class*="-plans"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* FAQ on subpages */
  .faq-item summary,
  [class*="faq"] summary {
    padding: 14px 16px !important;
    font-size: 14px !important;
  }

  /* Tags / badges */
  [class*="-tag"],
  [class*="-badge"] {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
}

@media (max-width: 480px) {
  [class*="-hero"] {
    padding: 80px 12px 32px !important;
  }

  [class*="-hero"] h1 {
    font-size: clamp(18px, 5.5vw, 26px) !important;
  }

  [class*="-card"] {
    padding: 16px 12px !important;
  }

  [class*="-card"] h3 {
    font-size: 15px !important;
  }

  [class*="-card"] p {
    font-size: 12px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   Portfolio PAGE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .case-studies-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .case-study-card {
    padding: 20px 16px !important;
  }

  .case-study-card img {
    border-radius: 8px !important;
  }
}

/* ══════════════════════════════════════════════════════════════
   SPLASH SCREEN
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .splash-logo {
    width: 60px !important;
  }

  .splash-text {
    font-size: 24px !important;
  }

  .splash-tagline {
    font-size: 11px !important;
  }
}

/* ── PARTNER GRID OVERRIDE ──────────────────────────────────── */
@media (max-width: 920px) {
  .partner-grid, .partner-grid-5 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

