/* ============================================================
   MULTI SKILL HUB — MOBILE-FIRST RESPONSIVE CSS
   Phone-first layout fixes, sliders, 2x2 grids, animations
   ============================================================ */

/* ─── BASE MOBILE FIXES ─────────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, iframe, embed, object {
  max-width: 100%;
}

* {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Prevent any element from breaking viewport width */
[style*="grid-template-columns"] {
  overflow: hidden;
}

/* ─── MOBILE SWIPE SLIDER ────────────────────────────── */
.swipe-slider {
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  gap: 16px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  padding-bottom: 12px;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.swipe-slider::-webkit-scrollbar { display: none; }
.swipe-slider > * {
  flex: 0 0 80vw;
  max-width: 320px;
  scroll-snap-align: start;
}
.swipe-slider .card,
.swipe-slider .service-card,
.swipe-slider .pricing-card,
.swipe-slider .testimonial-card {
  flex: 0 0 80vw;
  max-width: 300px;
  scroll-snap-align: start;
}

/* Slider dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.slider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(123,47,255,0.3);
  transition: all 0.3s;
}
.slider-dot.active {
  width: 20px;
  border-radius: 3px;
  background: linear-gradient(135deg,#7B2FFF,#00D4FF);
}

/* ─── MOBILE ANIMATED BG SHAPES ─────────────────────── */
.hero-shape-1,
.hero-shape-2,
.hero-shape-3 {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0;
  animation: mobileShapeIn 1.2s ease forwards;
}

@keyframes mobileShapeIn {
  to { opacity: 1; }
}

/* ─── SECTION SPACING (MOBILE) ───────────────────────── */
@media (max-width: 768px) {
  .section  { padding: 48px 0; }
  .section-sm { padding: 32px 0; }
  .container { padding: 0 16px; }

  /* Prevent full-width buttons from overflowing */
  .btn-full { width: 100%; justify-content: center; }

  /* ─── HERO ─── */
  .hero { min-height: auto; padding: 60px 0 48px; }
  .hero-content { grid-template-columns: 1fr !important; gap: 32px; }
  .hero-visual { display: none !important; }
  .hero-heading { font-size: clamp(1.75rem, 7vw, 2.4rem) !important; line-height: 1.2; }
  .hero-subheading { font-size: 15px !important; }
  .hero-ctas { flex-direction: column !important; gap: 10px !important; }
  .hero-ctas .btn { width: 100%; justify-content: center; font-size: 15px; padding: 14px 20px; }
  .trust-strip { gap: 10px; flex-wrap: wrap; }
  .hero-pill { font-size: 11px; padding: 5px 12px; }

  /* ─── ANNOUNCEMENT BAR ─── */
  .announcement-bar { font-size: 12px; }

  /* ─── NAVBAR ─── */
  .nav-links { display: none !important; }
  .nav-phone { display: none !important; }
  .nav-actions .btn:not(.hamburger) { display: none !important; }
  .hamburger { display: block !important; }
  .nav-inner { height: 60px !important; }

  /* Mobile nav overlay */
  .mobile-nav {
    padding: 24px 20px;
    gap: 0;
  }
  .mobile-nav a {
    font-size: 1rem !important;
    padding: 14px 0 !important;
    display: block;
    border-bottom: 1px solid rgba(123,47,255,0.1) !important;
  }

  /* ─── STATS STRIP → 2x2 GRID ─── */
  .stats-strip-grid {
    grid-template-columns: repeat(2,1fr) !important;
    gap: 16px !important;
  }

  /* ─── SERVICE GRID → SLIDER ─── */
  .service-grid {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding-bottom: 8px;
    scroll-padding: 0 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .service-grid::-webkit-scrollbar { display: none; }
  .service-card {
    flex: 0 0 75vw !important;
    max-width: 280px !important;
    scroll-snap-align: start !important;
    width: auto !important;
  }

  /* ─── PRICING → SLIDER ─── */
  .pricing-grid {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .pricing-grid::-webkit-scrollbar { display: none; }
  .pricing-card {
    flex: 0 0 82vw !important;
    max-width: 300px !important;
    scroll-snap-align: start !important;
  }

  /* ─── TESTIMONIALS → SLIDER ─── */
  .testimonials-grid {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .testimonials-grid::-webkit-scrollbar { display: none; }
  .testimonial-card {
    flex: 0 0 82vw !important;
    max-width: 300px !important;
    scroll-snap-align: start !important;
  }

  /* ─── PORTFOLIO → 2x2 GRID ─── */
  .portfolio-grid {
    grid-template-columns: repeat(2,1fr) !important;
    gap: 12px !important;
  }
  .portfolio-img { height: 130px !important; }
  .portfolio-info { padding: 12px !important; }
  .portfolio-info h3 { font-size: 13px !important; }
  .portfolio-info .tech { font-size: 11px !important; }

  /* ─── PROCESS STEPS → 1 COLUMN ─── */
  .process-steps { grid-template-columns: 1fr !important; gap: 16px !important; }
  .process-step { padding: 20px !important; text-align: left; display: flex; align-items: flex-start; gap: 16px; }
  .step-number-wrap { flex-shrink: 0; }

  /* ─── FOOTER ─── */
  .footer { padding: 48px 0 80px !important; }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center;
    gap: 12px !important;
  }

  /* ─── BLOG GRID → 1 COLUMN ─── */
  .blog-grid, [class*="grid"][style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* ─── DISPLAY TEXT ─── */
  .display-xl { font-size: clamp(1.8rem,6vw,2.5rem) !important; }
  .display-lg { font-size: clamp(1.6rem,5vw,2rem) !important; }
  .display-md { font-size: clamp(1.4rem,4vw,1.8rem) !important; }

  /* ─── SECTION HEADER ─── */
  .section-header { margin-bottom: 28px !important; }
  .section-header p { font-size: 14px !important; }

  /* ─── CARDS ─── */
  .card { padding: 20px !important; }

  /* ─── BODY BOTTOM PADDING (for bottom nav) ─── */
  body { padding-bottom: 68px; }

  /* ─── MOBILE BOTTOM NAV ─── */
  .mobile-bottom-nav {
    display: block !important;
    padding: 10px 0 14px;
  }
  .mobile-nav-items { justify-content: space-around; }
  .mobile-nav-item { font-size: 10px; padding: 4px 8px; }
  .chat-widget { bottom: 72px; right: 16px; }
  .wa-float { bottom: 78px; right: 16px; width: 46px; height: 46px; }

  /* ─── INLINE STYLE OVERRIDES FOR COMMON GRID PATTERNS ─── */
  /* Override hardcoded grid-template-columns:repeat(4,1fr) */
  [style*="repeat(4,1fr)"], [style*="repeat(4, 1fr)"] {
    grid-template-columns: repeat(2,1fr) !important;
  }
  /* Override 3col on mobile */
  [style*="repeat(3,1fr)"], [style*="repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* ─── CTA SECTION ─── */
  .cta-section { padding: 36px 20px !important; border-radius: 16px !important; }

  /* ─── FORM FIXES ─── */
  .form-input, .form-select, .form-textarea {
    font-size: 16px !important; /* Prevent iOS zoom */
  }

  /* ─── ABOUT / TWO-COL LAYOUTS ─── */
  .about-grid, .two-col-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Fix overflow from absolute elements */
  .hero-bg::before, .hero-bg::after {
    width: 250px !important;
    height: 250px !important;
  }
}

/* ─── SMALL PHONES (≤ 400px) ─────────────────────────── */
@media (max-width: 400px) {
  .service-card { flex: 0 0 85vw !important; }
  .pricing-card { flex: 0 0 88vw !important; }
  .testimonial-card { flex: 0 0 88vw !important; }
  .hero-heading { font-size: 1.65rem !important; }
  .portfolio-grid { grid-template-columns: 1fr !important; }
  .container { padding: 0 12px !important; }
}

/* ─── TABLET (769px–1024px) ─────────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2,1fr) !important; }
  .pricing-grid { grid-template-columns: repeat(2,1fr) !important; }
  .testimonials-grid { grid-template-columns: repeat(2,1fr) !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px !important; }
  .portfolio-grid { grid-template-columns: repeat(2,1fr) !important; }
}

/* ─── SWIPE HINT (First load on mobile) ─────────────── */
@media (max-width: 768px) {
  .swipe-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(136,139,160,0.7);
    margin-bottom: 8px;
    animation: swipeHintFade 3s ease 2s forwards;
    opacity: 1;
  }
  @keyframes swipeHintFade {
    to { opacity: 0; pointer-events: none; }
  }
}
@media (min-width: 769px) {
  .swipe-hint { display: none !important; }
}
