/* ============================================================
   RiskFreeFeel Technologies — Complete Mobile Responsive Fixes
   v2.0 — Full-site audit (all 7 pages)
   
   Breakpoints covered:
     ≤ 1024px  tablet
     ≤  768px  mobile
     ≤  480px  small phones
     ≤  360px  very small phones
     ≤  320px  minimum supported
   
   Rules:
   - NEVER modifies desktop styles (>1024px)
   - Uses !important ONLY where overriding inline styles
   - Fixes root causes, not symptoms
   ============================================================ */


/* ===========================================================
   0. GLOBAL SAFETY — applied unconditionally
   =========================================================== */

/* Box-sizing reset — ensures padding doesn't add to width */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent horizontal scroll at the document level */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  min-width: 0;
}

/* All images scale within their containers */
img,
video,
iframe,
embed,
object,
svg {
  max-width: 100%;
  height: auto;
}

/* ===========================================================
   1. TESTIMONIAL CARD — Fix fixed 380px width at all sizes
   
   Root cause: .testimonial-card { width: 380px; flex-shrink: 0 }
   On mobile, 3 cards × 380px = 1140px → massive overflow.
   Use min() so desktop keeps 380px but mobile is viewport-bound.
   This also fixes the "text breaking character by character" bug
   shown in the screenshots.
   =========================================================== */
.testimonial-card {
  width: min(380px, calc(100vw - 48px));
}


/* ===========================================================
   2. PORTFOLIO GRID — Fix minmax(320px) overflow at 320px
   
   Root cause: grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))
   At 320px viewport + 20px padding each side = 280px usable.
   280px < 320px min → browser creates overflow. Fix: lower minmax.
   =========================================================== */
.portfolio-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}


/* ===========================================================
   3. SERVICES GRID — Fix minmax(300px) overflow at small screens
   
   Root cause: repeat(auto-fill, minmax(300px, 1fr))
   Same issue as portfolio. Fix with responsive minmax.
   =========================================================== */
.services-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}


/* ===========================================================
   4. 1024px — TABLET ADJUSTMENTS
   =========================================================== */
@media (max-width: 1024px) {

  /* Hero padding */
  .hero-section {
    padding: 120px 20px 80px;
  }

  /* Footer padding */
  .footer {
    padding: 60px 20px 32px;
  }

  /* Page hero padding */
  .page-hero {
    padding: 130px 24px 80px;
  }
}


/* ===========================================================
   5. 768px — PRIMARY MOBILE BREAKPOINT
   =========================================================== */
@media (max-width: 768px) {

  /* ── 5.1 CONTAINER ── */
  .container {
    padding: 0 20px;
    width: 100%;
    max-width: 100%;
  }

  /* ── 5.2 SECTION SPACING ── */
  .section {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  /* ── 5.3 HERO SECTION ── */
  .hero-section {
    padding: 100px 20px 60px;
  }

  /* Hero badge — allow wrapping on narrow screens */
  .hero-badge {
    white-space: normal;
    flex-wrap: wrap;
    text-align: center;
    justify-content: center;
    line-height: 1.5;
    padding: 8px 16px;
    gap: 4px;
  }

  /* Hero CTA buttons — stack on very small, keep row on 768 */
  .hero-cta {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Hero stats — allow wrapping */
  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  /* Hero orbs — shrink to prevent horizontal overflow */
  .hero-orb-1 {
    width: 300px !important;
    height: 300px !important;
    opacity: 0.08 !important;
    left: -50px !important;
  }

  .hero-orb-2 {
    width: 250px !important;
    height: 250px !important;
    opacity: 0.08 !important;
    right: -50px !important;
  }

  /* ── 5.4 STATS GRID ── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-section {
    padding: 60px 20px;
  }

  .stat-item {
    padding: 28px 16px;
  }

  /* ── 5.5 WHY GRID ── */
  .why-grid {
    grid-template-columns: 1fr;
  }

  /* ── 5.6 SERVICES GRID ── */
  .services-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── 5.7 TECH GRID — stays auto-fit but shrinks minimum */
  .tech-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
  }

  /* ── 5.8 PORTFOLIO FILTERS ── */
  .portfolio-filters {
    gap: 8px;
  }

  .filter-btn {
    padding: 6px 14px;
    font-size: 0.8125rem;
  }

  /* ── 5.9 PORTFOLIO GRID ── */
  .portfolio-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── 5.10 TESTIMONIALS ── */
  .testimonials-wrapper {
    overflow: hidden;
  }

  /* On mobile, each card fills available width */
  .testimonial-card {
    width: calc(100vw - 40px) !important;
    min-width: 0 !important;
    padding: 24px;
  }

  /* ── 5.11 PROCESS TIMELINE ── */
  .process-timeline {
    grid-template-columns: 1fr;
  }

  .process-timeline::before {
    display: none !important;
  }

  /* ── 5.12 PRICING GRID ── */
  .pricing-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .pricing-card.featured {
    transform: none !important;
  }

  /* ── 5.13 CONTACT GRID ── */
  .contact-grid {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }

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

  .contact-form-card {
    padding: 28px 24px;
  }

  /* ── 5.14 FOOTER ── */
  .footer {
    padding: 48px 20px 28px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* Newsletter form — stack on mobile */
  .footer-newsletter-form {
    flex-wrap: wrap;
  }

  .footer-newsletter-input {
    min-width: 0;
  }

  /* ── 5.15 NAVBAR ── */
  .navbar {
    padding: 0 16px;
  }

  .navbar-inner {
    gap: 10px;
  }

  /* Dropdown positioning — prevent right-side overflow */
  .navbar-dropdown-menu {
    left: auto !important;
    right: 0;
    min-width: 200px;
    transform: none !important;
  }

  /* ── 5.16 PAGE HERO (inner pages) ── */
  .page-hero {
    padding: 120px 20px 60px;
  }

  .page-hero-inner {
    padding: 0 !important;
  }

  /* About page hero uses inline padding style — override it */
  div[style*="padding:120px 24px 80px"],
  .page-hero-inner[style*="padding:120px 24px 80px"] {
    padding: 80px 20px 48px !important;
  }

  /* ── 5.17 CTA SECTION ── */
  .cta-section {
    padding: 80px 20px;
  }

  .cta-subtitle {
    font-size: 1rem;
    padding: 0 4px;
  }

  /* CTA buttons — allow stack on very small, wrap on mobile */
  .cta-buttons {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ── 5.18 FLOATING BUTTONS — prevent overlap ── */

  /* WhatsApp fab */
  .whatsapp-fab {
    bottom: 20px !important;
    left: 20px !important;
  }

  /* Chatbot fab */
  .chatbot-fab {
    bottom: 20px !important;
    right: 20px !important;
  }

  /* Chatbot window — full width on mobile */
  .chatbot-window {
    width: calc(100vw - 32px) !important;
    right: 0 !important;
    left: auto !important;
    bottom: 68px !important;
  }

  /* Back-to-top button — move away from chatbot
     Inline style: position:fixed;bottom:96px;right:32px
     Move it to left side on mobile to avoid overlap with chatbot */
  #back-to-top {
    right: auto !important;
    left: 80px !important;
    bottom: 24px !important;
  }

  /* Hide WhatsApp tooltip to prevent overflow */
  .whatsapp-tooltip {
    display: none !important;
  }

  /* ── 5.19 ABOUT PAGE — FOUNDER SECTION ──
     Inline style: display:grid;grid-template-columns:1fr 1.2fr;gap:72px
     Must use !important to override inline style */
  #founder .container > div[style*="grid-template-columns"],
  #founder .container > .reveal[style*="grid-template-columns"],
  section#founder div[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* ── 5.20 ABOUT PAGE — LEADERSHIP TEAM ──
     Inline style: display:grid;grid-template-columns:1fr 1fr 1fr */
  #team .container div[style*="grid-template-columns:1fr 1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
  }

  /* Each team card fills full width */
  #team .container div[style*="grid-template-columns:1fr 1fr 1fr"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 5.21 ABOUT PAGE — SEENIVASAN CO-FOUNDER SECTION ──
     Inline style: display:grid;grid-template-columns:1.15fr 1fr;gap:72px */
  #cofounder .container > div[style*="1.15fr"],
  #cofounder .container > div[style*="gap:72px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* Card above text for Seenivasan on mobile */
  #cofounder .container .reveal-right {
    order: -1;
  }

  /* ── 5.22 ABOUT PAGE — VENKATESH CO-FOUNDER SECTION ──
     Inline style: display:grid;grid-template-columns:1fr 1.15fr;gap:72px */
  #venkatesh .container > div[style*="1.15fr"],
  #venkatesh .container > div[style*="gap:72px"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* Card above text for Venkatesh on mobile */
  #venkatesh .container .reveal-right {
    order: -1;
  }

  /* ── 5.23 ABOUT PAGE — MISSION/VISION/VALUES ──
     Inline style: display:grid;grid-template-columns:repeat(3,1fr);gap:28px */
  #mission .container div[style*="grid-template-columns:repeat(3,1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
  }

  #mission .container div[style*="grid-template-columns:repeat(3,1fr)"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 5.24 ABOUT PAGE — INDUSTRIES SECTION ──
     Inline style: display:grid;grid-template-columns:repeat(3,1fr);gap:20px */
  #industries .container div[style*="grid-template-columns:repeat(3,1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }

  #industries .container div[style*="grid-template-columns:repeat(3,1fr)"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 5.25 ABOUT PAGE — TESTIMONIALS GRID ──
     Inline style: display:grid;grid-template-columns:repeat(3,1fr);gap:24px
     (This is a DIFFERENT section from the homepage testimonials slider) */
  #testimonials .container > div[style*="grid-template-columns:repeat(3,1fr)"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    width: 100% !important;
  }

  #testimonials .container > div[style*="grid-template-columns:repeat(3,1fr)"] > .card {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* ── 5.26 INDEX.HTML — FOUNDER STORY SECTION ──
     Inline style: display:grid;grid-template-columns:1fr 1fr;gap:72px */
  section#founder div[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
  }

  /* ── 5.27 CARD PADDING REDUCTION ── */
  /* Cards with large inline padding values */
  .card[style*="padding:44px"],
  div[style*="padding:44px"] {
    padding: 24px !important;
  }

  .card[style*="padding:40px"],
  div.card[style*="padding:40px"] {
    padding: 24px !important;
  }

  .card[style*="padding:36px"],
  div.card[style*="padding:36px"] {
    padding: 24px !important;
  }

  .card[style*="padding:32px"],
  div.card[style*="padding:32px"] {
    padding: 20px !important;
  }

  /* Inner profile card wrappers (gradient border cards) */
  div[style*="border-radius:calc(var(--radius-2xl) - 2px)"] {
    padding: 24px 20px !important;
  }

  /* ── 5.28 FLOATING BADGES & RIBBONS — top right alignment on mobile ──
     Badges sit statically aligned to top-right above content so they never cover founder names or photos */
  .founder-badge,
  div[style*="position:absolute;top:16px;right:16px"],
  div[style*="position:absolute;top:20px;right:20px"],
  div[style*="position:absolute;top:20px"],
  div[style*="position:absolute;top:-16px"] {
    position: static !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    margin-bottom: 14px !important;
    width: fit-content !important;
    max-width: 100% !important;
    font-size: 0.72rem !important;
    padding: 5px 12px !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  /* Allow overflow:visible on the relative-positioned parent 
     so the now-static badge flows naturally */
  #founder .container div[style*="position:relative"],
  #cofounder .container div[style*="position:relative"],
  #venkatesh .container div[style*="position:relative"],
  #team .container div[style*="position:relative"],
  section#founder div[style*="position:relative"] {
    overflow: visible;
  }

  /* ── 5.29 TEAM CARD AVATARS & PROFILE IMAGES ── */
  /* Photo + identity row — reduce gap and prevent flex squeeze */
  div[style*="align-items:center;gap:22px"],
  div[style*="align-items:center;gap:20px"] {
    gap: 14px !important;
  }

  /* All avatar circular image containers */
  div[style*="border-radius:50%"] {
    flex-shrink: 0 !important;
  }

  /* Team member avatar circle size on mobile */
  div[style*="width:90px;height:90px;border-radius:50%"] {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    flex-shrink: 0 !important;
  }

  div[style*="width:120px;height:120px;border-radius:50%"] {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
    flex-shrink: 0 !important;
  }

  /* Image tag styling inside all avatars & cards */
  div[style*="border-radius:50%"] img,
  .card img,
  .service-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
  }

  /* ── 5.30 VENKATESH STRENGTH GRID ──
     Inline: display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:36px
     Collapse from 2-col to 1-col on mobile */
  div[style*="grid-template-columns:1fr 1fr;gap:12px;margin-bottom:36px"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Full-span "Innovate" item stays full width */
  div[style*="grid-column:1/-1"] {
    grid-column: 1 / -1 !important;
  }

  /* ── 5.31 INLINE BUTTON ROWS ── */
  div[style*="display:flex;gap:14px;flex-wrap:wrap"],
  div[style*="display:flex;gap:16px;flex-wrap:wrap"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  /* Page hero CTA button row */
  div[style*="display:flex;justify-content:center;gap:16px;flex-wrap:wrap"] {
    gap: 12px !important;
    flex-wrap: wrap !important;
  }

  /* ── 5.32 TEXT OVERFLOW PROTECTION ──
     Prevents character-by-character wrapping from narrow containers */
  h1, h2, h3, h4, h5, h6 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  p, li {
    overflow-wrap: break-word;
  }

  /* Long URL / email links in footer / contact */
  a {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* ── 5.33 CAREERS PAGE — benefit cards (inline flex rows) ──
     Careers uses .grid-2, .grid-3 class names — covered by globals.css.
     But inline flex items inside those cards need min-width: 0 */
  .why-card,
  .service-card,
  .card {
    min-width: 0;
  }
}


/* ===========================================================
   6. 480px — SMALL PHONES
   =========================================================== */
@media (max-width: 480px) {

  /* ── Container ── */
  .container {
    padding: 0 16px;
  }

  /* ── Sections ── */
  .section {
    padding: 48px 0;
  }

  .section-header {
    margin-bottom: 28px;
  }

  /* ── Hero ── */
  .hero-section {
    padding: 80px 16px 48px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
    line-height: 1.15;
  }

  /* Force CTA buttons to full-width stack on small phones */
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

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

  .hero-stats {
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .hero-stat {
    min-width: calc(50% - 7px);
  }

  /* ── Page hero ── */
  .page-hero {
    padding: 100px 16px 48px;
  }

  div[style*="padding:120px 24px 80px"],
  .page-hero-inner[style*="padding"] {
    padding: 72px 16px 40px !important;
  }

  /* ── Typography ── */
  .section-title {
    font-size: clamp(1.4rem, 6vw, 2rem) !important;
    line-height: 1.25;
  }

  .display-lg {
    font-size: clamp(1.5rem, 7vw, 2.25rem) !important;
  }

  .cta-title {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
    line-height: 1.25;
  }

  .body-md {
    font-size: 0.9375rem;
    line-height: 1.7;
  }

  /* ── Stats ── */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    border-radius: var(--radius-lg);
  }

  .stat-item {
    padding: 20px 12px;
  }

  .stat-number {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.8125rem;
  }

  /* ── Cards ── */
  .card,
  .service-card,
  .why-card,
  .pricing-card {
    padding: 20px !important;
  }

  .card[style*="padding:40px"],
  div.card[style*="padding:40px"],
  .card[style*="padding:36px"],
  div.card[style*="padding:36px"] {
    padding: 20px !important;
  }

  .card[style*="padding:44px"],
  div.card[style*="padding:44px"] {
    padding: 18px !important;
  }

  /* Inner profile card wrapper */
  div[style*="border-radius:calc(var(--radius-2xl) - 2px)"] {
    padding: 18px 16px !important;
  }

  /* ── Floating badges ── */
  div[style*="position:absolute;top:-16px;right:-12px"],
  div[style*="position:absolute;top:-16px;right:-16px"] {
    font-size: 0.65rem !important;
    padding: 5px 10px !important;
  }

  /* ── Buttons ── */
  .btn-lg {
    padding: 14px 24px !important;
    font-size: 0.9rem !important;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.875rem;
  }

  .btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
  }

  /* CTA buttons stack to full width */
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .cta-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Navbar ── */
  .navbar {
    padding: 0 12px;
  }

  .navbar-inner {
    height: 60px;
    gap: 8px;
  }

  .navbar-logo img {
    height: 36px !important;
    width: auto !important;
  }

  .mobile-menu {
    top: 60px;
    padding: 20px 16px;
  }

  /* ── Avatars ── */
  div[style*="width:120px;height:120px;border-radius:50%"] {
    width: 88px !important;
    height: 88px !important;
    min-width: 88px !important;
  }

  div[style*="width:90px;height:90px;border-radius:50%"] {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px !important;
  }

  div[style*="width:80px;height:80px;border-radius:50%"] {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
  }

  /* ── Footer ── */
  .footer {
    padding: 40px 16px 24px;
  }

  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .footer-bottom {
    gap: 8px;
    flex-direction: column;
  }

  .footer-legal {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ── Contact ── */
  .contact-info-card {
    padding: 18px 16px;
  }

  .contact-form-card {
    padding: 20px 16px;
  }

  /* ── Pricing ── */
  .pricing-card {
    padding: 24px 20px !important;
  }

  /* ── Testimonials ── */
  .testimonial-card {
    width: calc(100vw - 32px) !important;
    padding: 20px;
  }

  /* ── Process ── */
  .process-step {
    padding: 0 8px;
  }

  /* ── Services ── */
  .services-grid {
    gap: 16px !important;
  }

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

  /* ── FABs ── */
  .chatbot-btn {
    width: 52px !important;
    height: 52px !important;
  }

  .whatsapp-btn {
    width: 48px !important;
    height: 48px !important;
  }

  #back-to-top {
    left: 72px !important;
    bottom: 20px !important;
    width: 40px !important;
    height: 40px !important;
  }

  /* ── Tech grid ── */
  .tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .tech-item {
    padding: 18px 12px;
  }

  .tech-logo {
    font-size: 1.5rem;
  }

  .tech-name {
    font-size: 0.75rem;
  }

  /* ── Portfolio card body ── */
  .portfolio-body {
    padding: 18px;
  }

  /* ── Stats section ── */
  .stats-section {
    padding: 48px 16px;
  }

  /* ── Section CTA ── */
  .cta-section {
    padding: 60px 16px;
  }
}


/* ===========================================================
   7. 360px — VERY SMALL PHONES
   =========================================================== */
@media (max-width: 360px) {

  /* ── Container ── */
  .container {
    padding: 0 12px;
  }

  /* ── Navbar ── */
  .navbar {
    padding: 0 10px;
  }

  /* Nav CTA button — shrink text on very small screens */
  .navbar-right .btn-sm,
  #nav-cta {
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
    white-space: nowrap;
  }

  /* ── Sections ── */
  .section {
    padding: 40px 0;
  }

  /* ── Stats ── */
  .stat-item {
    padding: 16px 8px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  /* ── Leadership photo + name — switch to column layout ──
     At 360px the avatar + name row becomes too narrow */
  div[style*="align-items:center;gap:22px"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  div[style*="width:90px;height:90px;border-radius:50%"] {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
  }

  /* ── Cards ── */
  .why-card,
  .service-card {
    padding: 18px !important;
  }

  /* ── Buttons ── */
  .btn-lg {
    padding: 12px 18px !important;
    font-size: 0.85rem !important;
  }

  /* ── Chatbot window ── */
  .chatbot-window {
    width: calc(100vw - 16px) !important;
    right: 8px !important;
  }

  /* ── Contact form ── */
  .contact-form-card {
    padding: 16px 12px !important;
  }

  /* ── Footer ── */
  .footer {
    padding: 36px 12px 20px;
  }

  /* ── Process ── */
  .process-num {
    width: 52px;
    height: 52px;
    font-size: 1rem;
  }

  /* ── Hero badge — ensure no overflow at 360px ── */
  .hero-badge {
    font-size: 0.7rem;
    padding: 6px 12px;
    max-width: 100%;
  }
}


/* ===========================================================
   8. 320px — MINIMUM SUPPORTED SIZE
   =========================================================== */
@media (max-width: 320px) {

  .container {
    padding: 0 10px;
  }

  .navbar {
    padding: 0 8px;
  }

  .navbar-right .btn-sm,
  #nav-cta {
    display: none; /* Hide "Get a Quote" CTA in nav at 320px — hamburger handles it */
  }

  .hero-title {
    font-size: 1.6rem !important;
  }

  .section-title {
    font-size: 1.35rem !important;
  }

  .btn-lg {
    padding: 11px 16px !important;
    font-size: 0.8rem !important;
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-badge {
    font-size: 0.65rem;
  }

  /* Footer top — single column */
  .footer-top {
    grid-template-columns: 1fr !important;
  }
}


/* ===========================================================
   9. OVERFLOW GUARD — elements that can create horizontal scroll
   =========================================================== */
@media (max-width: 768px) {

  /* Marquee strip — it uses width:max-content internally,
     but the outer wrapper handles overflow:hidden already.
     Ensure parent doesn't leak. */
  .industries-strip {
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
  }

  /* Scroll indicator — can sometimes cause overflow */
  #scroll-indicator {
    left: 50%;
    transform: translateX(-50%);
  }

  /* Pricing badge (absolute-positioned inside pricing card) */
  .pricing-badge {
    position: static !important;
    display: inline-flex;
    margin-bottom: 12px;
  }

  /* Filter buttons — wrap on mobile */
  .portfolio-filters {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Career page benefit rows that use inline flex */
  div[style*="display:flex;align-items:flex-start;gap:14px"],
  div[style*="display:flex;align-items:flex-start;gap:16px"] {
    flex-wrap: nowrap;
    min-width: 0;
  }

  div[style*="display:flex;align-items:flex-start;gap:14px"] > div,
  div[style*="display:flex;align-items:flex-start;gap:16px"] > div {
    min-width: 0;
    flex: 1;
  }

  /* General min-width: 0 on grid/flex children 
     to prevent content blowout */
  .grid > *,
  .grid-2 > *,
  .grid-3 > *,
  .grid-4 > * {
    min-width: 0;
  }

  /* Gradient separator stays centered */
  .gradient-separator {
    margin-left: auto;
    margin-right: auto;
  }
}
