/* ============================================================
   LEORA DIGITAL AMIGOS — Mobile Fixes + Text Readability
   Patches all contrast, readability & mobile layout issues
   ============================================================ */

/* ============================================================
   1. GLOBAL TEXT READABILITY FIXES
   ============================================================ */

/* Dark theme — boost all text contrast significantly */
:root {
  --text-primary:   #FFFFFF;
  --text-secondary: #EDE0E5;
  --text-muted:     #C8B4BE;
  --glass-bg:       rgba(200, 16, 46, 0.07);
  --glass-border:   rgba(200, 16, 46, 0.22);
  --bg-card:        #1C1018;
  --bg-surface:     #160D14;
}

/* Light theme — dark readable text */
body.light-theme {
  --text-primary:   #0E0208;
  --text-secondary: #2A0A18;
  --text-muted:     #5A3040;
  --bg-card:        #FFFFFF;
  --bg-surface:     #F5EEF1;
  --glass-bg:       rgba(200, 16, 46, 0.05);
  --glass-border:   rgba(200, 16, 46, 0.18);
}

/* Force all body text to be legible */
body {
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p { color: var(--text-secondary); }
h1, h2, h3, h4, h5, h6 { color: var(--text-primary); }

/* ============================================================
   2. GLASS CARD — Stronger Background + Readable Text
   ============================================================ */
.glass-card {
  background: rgba(26, 10, 20, 0.75) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(200, 16, 46, 0.25) !important;
}

body.light-theme .glass-card {
  background: rgba(255, 255, 255, 0.90) !important;
  border: 1px solid rgba(200, 16, 46, 0.15) !important;
}

/* All text inside glass cards — white on dark, near-black on light */
.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4 {
  color: #FFFFFF !important;
}
.glass-card p, .glass-card .service-card p, .glass-card .testimonial-text {
  color: #DDD0D6 !important;
}
body.light-theme .glass-card h1,
body.light-theme .glass-card h2,
body.light-theme .glass-card h3,
body.light-theme .glass-card h4 { color: #0E0208 !important; }
body.light-theme .glass-card p,
body.light-theme .glass-card .testimonial-text { color: #2A0A18 !important; }

/* ============================================================
   3. SECTION BACKGROUNDS — contrast fix
   ============================================================ */
section[style*="background:var(--bg-surface)"],
section[style*="background: var(--bg-surface)"] {
  background: var(--bg-surface) !important;
}

/* ============================================================
   4. SERVICE CARDS — full fix
   ============================================================ */
.service-card h3 {
  color: #FFFFFF !important;
  font-size: 1.05rem !important;
  line-height: 1.35 !important;
  margin-bottom: 10px !important;
}
.service-card p {
  color: #CEC0C6 !important;
  font-size: 0.875rem !important;
  line-height: 1.75 !important;
}
body.light-theme .service-card h3 { color: #0E0208 !important; }
body.light-theme .service-card p  { color: #3A1828 !important; }

/* ============================================================
   5. TESTIMONIAL CARDS — readable
   ============================================================ */
.testimonial-text {
  color: #DDD0D6 !important;
  font-size: 0.92rem !important;
  line-height: 1.85 !important;
}
.testimonial-name  { color: #FFFFFF !important; font-size: 0.92rem !important; }
.testimonial-role  { color: #C8A8B4 !important; font-size: 0.8rem  !important; }
body.light-theme .testimonial-text { color: #2A0A18 !important; }
body.light-theme .testimonial-name { color: #0E0208 !important; }
body.light-theme .testimonial-role { color: #6A3040 !important; }

/* ============================================================
   6. TEAM CARDS
   ============================================================ */
.team-name { color: #FFFFFF !important; font-size: 0.95rem !important; }
.team-role { color: #FF8099 !important; font-size: 0.8rem  !important; }
.team-card p { color: #CEC0C6 !important; font-size: 0.82rem !important; line-height: 1.65 !important; }
body.light-theme .team-name { color: #0E0208 !important; }
body.light-theme .team-role { color: #C8102E !important; }
body.light-theme .team-card p { color: #3A1828 !important; }

/* ============================================================
   7. BLOG CARDS — fix metadata & text
   ============================================================ */
.blog-title { color: #FFFFFF !important; font-size: 1rem !important; line-height: 1.45 !important; }
.blog-excerpt { color: #CEC0C6 !important; font-size: 0.87rem !important; line-height: 1.75 !important; }
.blog-meta   { color: #A090A0 !important; font-size: 0.78rem !important; }
body.light-theme .blog-title   { color: #0E0208 !important; }
body.light-theme .blog-excerpt { color: #2A0A18 !important; }
body.light-theme .blog-meta    { color: #7A4050 !important; }

/* ============================================================
   8. JOB CARDS
   ============================================================ */
.job-title { color: #FFFFFF !important; font-size: 1.05rem !important; }
.job-dept  { color: #FF8099 !important; font-size: 0.82rem !important; }
.job-meta  { color: #CEC0C6 !important; font-size: 0.82rem !important; }
body.light-theme .job-title { color: #0E0208 !important; }
body.light-theme .job-dept  { color: #C8102E !important; }
body.light-theme .job-meta  { color: #3A1828 !important; }

/* ============================================================
   9. HERO TEXT — strong readable contrast
   ============================================================ */
.hero-title       { color: #FFFFFF !important; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-subtitle    { color: #000000 !important; text-shadow: 0 1px 10px rgba(0,0,0,0.4); }
.hero-eyebrow     { color: #FF8099 !important; }
.hero-title .red-text { color: #FF3355 !important; text-shadow: 0 0 40px rgba(200,16,46,0.5); }

/* ============================================================
   10. SECTION HEADINGS & SUBTITLES
   ============================================================ */
.section-title    { color: #FFFFFF !important; }
.section-subtitle { color: #DDD0D6 !important; }
body.light-theme .section-title    { color: #0E0208 !important; }
body.light-theme .section-subtitle { color: #3A1828 !important; }

/* ============================================================
   11. MASONRY OVERLAY — gradient for readable labels
   ============================================================ */
.masonry-overlay {
  background: linear-gradient(to top,
    rgba(6, 2, 9, 0.95) 0%,
    rgba(6, 2, 9, 0.55) 50%,
    transparent 80%) !important;
  opacity: 0 !important;
}
.masonry-item:hover .masonry-overlay { opacity: 1 !important; }
.masonry-info h3, .masonry-info h4 { color: #FFFFFF !important; font-size: 0.95rem !important; }
.masonry-info span { color: #FF8099 !important; }

/* ============================================================
   12. STATS BAND TEXT
   ============================================================ */
.stat-number { color: #FF3355 !important; text-shadow: 0 0 30px rgba(200,16,46,0.35); }
.stat-label  { color: #C8B4BE !important; font-size: 0.78rem !important; }
body.light-theme .stat-number { color: #C8102E !important; }
body.light-theme .stat-label  { color: #5A3040 !important; }

/* ============================================================
   13. FOOTER TEXT
   ============================================================ */
.footer-desc        { color: #B8A0A8 !important; }
.footer-link        { color: #B8A0A8 !important; }
.footer-link:hover  { color: #FF8099 !important; }
.contact-info-text  { color: #B8A0A8 !important; }
.footer-copy        { color: #8A7080 !important; }
body.light-theme .footer-desc       { color: #5A3040 !important; }
body.light-theme .footer-link       { color: #5A3040 !important; }
body.light-theme .contact-info-text { color: #5A3040 !important; }

/* ============================================================
   14. FORM CONTROLS — readable placeholder + text
   ============================================================ */
.form-control {
  color: #FFFFFF !important;
  background: rgba(200, 16, 46, 0.06) !important;
  border: 1px solid rgba(200, 16, 46, 0.22) !important;
}
.form-control::placeholder { color: #8A7080 !important; }
.form-label { color: #E0D0D6 !important; letter-spacing: 0.05em; }
body.light-theme .form-control { color: #0E0208 !important; background: rgba(200,16,46,0.04) !important; }
body.light-theme .form-label   { color: #3A1828 !important; }
body.light-theme .form-control::placeholder { color: #9A7080 !important; }

/* ============================================================
   15. PAGE HERO — inner pages
   ============================================================ */
.page-hero-title    { color: #FFFFFF !important; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.page-hero-subtitle { color: #E0D0D6 !important; }
.breadcrumb         { color: #9A8090 !important; }
body.light-theme .page-hero-title    { color: #0E0208 !important; }
body.light-theme .page-hero-subtitle { color: #3A1828 !important; }

/* ============================================================
   16. NAV LINKS
   ============================================================ */
.nav-link { color: #E0D0D6 !important; }
.nav-link:hover, .nav-link.active { color: #FFFFFF !important; }
body.light-theme .nav-link { color: #3A1828 !important; }
body.light-theme .nav-link:hover { color: #C8102E !important; }
.dropdown-item-text { color: #E0D0D6 !important; }
body.light-theme .dropdown-item-text { color: #2A0A18 !important; }

/* ============================================================
   17. SECTION TAG BADGE
   ============================================================ */
.section-tag {
  color: #FF8099 !important;
  background: rgba(200,16,46,0.12) !important;
  border: 1px solid rgba(200,16,46,0.30) !important;
}
body.light-theme .section-tag { color: #C8102E !important; }

/* ============================================================
   18. CTA BOX
   ============================================================ */
.cta-title    { color: #FFFFFF !important; }
.cta-subtitle { color: #E0D0D6 !important; }
body.light-theme .cta-title    { color: #0E0208 !important; }
body.light-theme .cta-subtitle { color: #3A1828 !important; }

/* ============================================================
   19. INLINE STYLE TEXT OVERRIDES (About, Why sections)
   ============================================================ */
/* Catch all inline-styled muted text inside glass cards */
.glass-card [style*="color:var(--text-muted)"],
.glass-card [style*="color: var(--text-muted)"] {
  color: #C8B4BE !important;
}
.glass-card [style*="color:var(--text-secondary)"],
.glass-card [style*="color: var(--text-secondary)"] {
  color: #DDD0D6 !important;
}
.glass-card [style*="color:var(--text-primary)"],
.glass-card [style*="color: var(--text-primary)"] {
  color: #FFFFFF !important;
}
body.light-theme .glass-card [style*="color:var(--text-muted)"]      { color: #5A3040 !important; }
body.light-theme .glass-card [style*="color:var(--text-secondary)"]  { color: #2A0A18 !important; }
body.light-theme .glass-card [style*="color:var(--text-primary)"]    { color: #0E0208 !important; }

/* ============================================================
   ============================================================
   MOBILE RESPONSIVENESS — COMPLETE FIX
   ============================================================
   ============================================================ */

/* ============================================================
   MOBILE BASE — applies ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-py: 56px;
    --nav-h: 64px;
  }

  /* --- TYPOGRAPHY SCALE DOWN --- */
  .section-title          { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; margin-bottom: 12px !important; }
  .section-subtitle       { font-size: 0.92rem !important; line-height: 1.7 !important; }
  .page-hero-title        { font-size: clamp(2rem, 8vw, 3rem) !important; line-height: 1.1 !important; }
  .page-hero-subtitle     { font-size: 0.9rem !important; }
  .cta-title              { font-size: clamp(1.8rem, 6vw, 2.5rem) !important; }

  /* --- CONTAINER PADDING --- */
  .container { padding: 0 16px !important; }

  /* --- SECTION PADDING --- */
  .section-py    { padding: 56px 0 !important; }
  .section-py-sm { padding: 36px 0 !important; }

  /* ============================================================
     NAVBAR — MOBILE
     ============================================================ */
  #navbar { height: var(--nav-h) !important; }

  .nav-logo img { height: 38px !important; }

  /* Mobile menu slides down */
  .nav-menu {
    position: fixed !important;
    top: var(--nav-h) !important;
    left: 0 !important; right: 0 !important;
    background: rgba(10, 4, 13, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(200,16,46,0.2) !important;
    flex-direction: column !important;
    padding: 12px 0 20px !important;
    gap: 0 !important;
    transform: translateY(-110vh) !important;
    opacity: 0 !important;
    transition: transform 0.35s ease, opacity 0.35s ease !important;
    overflow-y: auto !important;
    max-height: calc(100vh - var(--nav-h)) !important;
    z-index: 999 !important;
    display: flex !important;
  }

  .nav-menu.open {
    transform: translateY(0) !important;
    opacity: 1 !important;
  }

  .nav-link {
    padding: 14px 20px !important;
    font-size: 0.95rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    width: 100% !important;
    border-radius: 0 !important;
    color: #EDE0E5 !important;
  }

  .nav-link.active::after { display: none !important; }

  /* Dropdown in mobile */
  .has-dropdown .dropdown {
    position: static !important;
    transform: none !important;
    min-width: auto !important;
    width: 100% !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 8px 0 8px 16px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    box-shadow: none !important;
    border: none !important;
    background: rgba(200,16,46,0.06) !important;
  }

  .has-dropdown.open .dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
  }

  .dropdown-item { padding: 10px 16px !important; }
  .dropdown-item-text { font-size: 0.85rem !important; color: #DDD0D6 !important; }

  .hamburger { display: flex !important; }

  /* Brochure button — icon only on mobile */
  .nav-brochure-btn span { display: none !important; }
  .nav-brochure-btn { padding: 8px 10px !important; font-size: 0 !important; }
  .nav-brochure-btn svg { width: 18px; height: 18px; }

  /* ============================================================
     HERO — MOBILE
     ============================================================ */
  .hero { min-height: 100svh !important; padding-top: var(--nav-h) !important; align-items: flex-start !important; }

  .hero-slide { padding: 40px 0 30px !important; }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4.5rem) !important;
    line-height: 0.95 !important;
    letter-spacing: 0.01em !important;
    margin-bottom: 14px !important;
  }

  .hero-subtitle {
    font-size: 0.9rem !important;
    line-height: 1.75 !important;
    margin-bottom: 28px !important;
  }

  .hero-eyebrow { font-size: 0.72rem !important; margin-bottom: 14px !important; }

  .hero-ctas {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .hero-ctas .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 14px 20px !important;
  }

  .hero-float-stats { display: none !important; }
  .hero-visual { display: none !important; }

  .slider-dots { margin-top: 28px !important; }

  .scroll-indicator { display: none !important; }

  /* ============================================================
     STATS BAND — MOBILE (2x2 grid)
     ============================================================ */
  .stats-band {
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 24px 16px !important;
    gap: 0 !important;
    border-radius: 16px !important;
  }

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

  .stat-item + .stat-item::before { display: none !important; }

  /* Add grid separators via box-shadow */
  .stat-item:nth-child(1),
  .stat-item:nth-child(3) {
    border-right: 1px solid rgba(200,16,46,0.15) !important;
  }
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) {
    border-bottom: 1px solid rgba(200,16,46,0.15) !important;
  }

  .stat-number { font-size: clamp(2rem, 8vw, 2.8rem) !important; }
  .stat-label  { font-size: 0.7rem !important; margin-top: 4px !important; }

  /* ============================================================
     SERVICES GRID — MOBILE (1 column)
     ============================================================ */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* About snippet 2-col → 1-col */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Remove RTL direction trick on mobile */
  [style*="direction:rtl"] { direction: ltr !important; }
  [style*="direction: rtl"] { direction: ltr !important; }

  /* ============================================================
     SERVICE CARDS — MOBILE
     ============================================================ */
  .service-card { padding: 24px 20px !important; }
  .service-icon-wrap { width: 48px !important; height: 48px !important; font-size: 20px !important; margin-bottom: 16px !important; }
  .service-card h3 { font-size: 1rem !important; }
  .service-card p  { font-size: 0.85rem !important; }

  /* ============================================================
     PORTFOLIO MASONRY — MOBILE (1-2 cols)
     ============================================================ */
  .masonry-grid {
    columns: 2 150px !important;
    column-gap: 10px !important;
  }
  .masonry-item { margin-bottom: 10px !important; }

  .portfolio-filters {
    gap: 8px !important;
    margin-bottom: 24px !important;
  }
  .filter-btn { padding: 6px 14px !important; font-size: 0.75rem !important; }

  /* ============================================================
     TESTIMONIALS — MOBILE
     ============================================================ */
  .testimonial-card { padding: 24px 18px !important; }
  .testimonial-text { font-size: 0.87rem !important; padding-top: 16px !important; }
  .testimonial-quote { font-size: 3rem !important; top: 14px !important; left: 18px !important; }

  /* ============================================================
     BLOG CARDS — MOBILE
     ============================================================ */
  .blog-thumb { height: 170px !important; }
  .blog-body  { padding: 18px !important; }
  .blog-title { font-size: 0.95rem !important; }

  /* ============================================================
     TEAM CARDS — MOBILE
     ============================================================ */
  .team-card { padding: 24px 18px !important; }
  .team-photo { width: 70px !important; height: 70px !important; margin-bottom: 12px !important; }
  .team-name { font-size: 0.92rem !important; }
  .team-role { font-size: 0.78rem !important; }

  /* ============================================================
     CAREER JOB CARDS — MOBILE
     ============================================================ */
  .job-card { padding: 20px !important; }
  .job-header { flex-direction: column !important; gap: 10px !important; align-items: flex-start !important; }
  .job-meta   { flex-direction: column !important; gap: 8px !important; }

  /* ============================================================
     FORM — MOBILE
     ============================================================ */
  .form-wrapper { padding: 24px 18px !important; }
  .form-row { grid-template-columns: 1fr !important; gap: 0 !important; }
  .form-control { font-size: 16px !important; } /* Prevent iOS zoom */

  /* ============================================================
     CTA BOX — MOBILE
     ============================================================ */
  .cta-box { padding: 40px 20px !important; }
  .cta-title { font-size: clamp(1.8rem, 7vw, 2.5rem) !important; }

  .cta-box [style*="display:flex"],
  .cta-box [style*="display: flex"] {
    flex-direction: column !important;
    gap: 10px !important;
  }

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

  /* ============================================================
     PAGE HERO — MOBILE (inner pages)
     ============================================================ */
  .page-hero {
    padding: calc(var(--nav-h) + 48px) 0 48px !important;
  }

  .page-hero-title { font-size: clamp(2rem, 8vw, 3rem) !important; line-height: 1.1 !important; }

  /* ============================================================
     ABOUT — MOBILE
     ============================================================ */
  /* Values 2-col grid in small card */
  .glass-card [style*="grid-template-columns:1fr 1fr"],
  .glass-card [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important; /* keep 2x2 for stats inside about card */
  }

  /* ============================================================
     CASE STUDIES — MOBILE
     ============================================================ */
  /* Force single column for case study inner grid */
  .glass-card .grid-2[style],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ============================================================
     CONTACT PAGE — MOBILE
     ============================================================ */
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.4fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ============================================================
     SERVICES PAGE — RTL alternating layout fix
     ============================================================ */
  .grid-2[style*="direction:rtl"] > div { direction: ltr !important; }

  /* ============================================================
     FOOTER — MOBILE
     ============================================================ */
  .footer-top { padding: 48px 0 36px !important; }

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

  .footer-logo { width: 110px !important; margin-bottom: 14px !important; }
  .footer-tagline { font-size: 1.2rem !important; }
  .footer-desc { font-size: 0.85rem !important; max-width: 100% !important; }

  .footer-socials { flex-wrap: wrap !important; gap: 8px !important; }
  .social-icon { width: 36px !important; height: 36px !important; font-size: 14px !important; }

  .footer-heading { font-size: 0.8rem !important; }
  .footer-link { font-size: 0.85rem !important; padding: 4px 0 !important; }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center !important;
    gap: 10px !important;
    padding: 20px 0 !important;
  }

  .footer-bottom-links {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 14px !important;
  }

  .footer-copy { font-size: 0.78rem !important; }

  /* ============================================================
     FLOATING BUTTONS — MOBILE POSITION
     ============================================================ */
  .whatsapp-fab {
    bottom: 20px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }

  #back-to-top {
    bottom: 84px !important;
    right: 16px !important;
    width: 40px !important;
    height: 40px !important;
  }

  #cookie-banner {
    left: 12px !important;
    right: 12px !important;
    max-width: calc(100% - 24px) !important;
    bottom: 16px !important;
    padding: 18px !important;
  }

  /* ============================================================
     LOADER — MOBILE
     ============================================================ */
  .loader-logo img { width: 120px !important; }

  /* ============================================================
     LIGHTBOX — MOBILE
     ============================================================ */
  .lightbox-content { max-width: 100% !important; }
  .lightbox-content img { max-width: 96vw !important; max-height: 80vh !important; }

  /* ============================================================
     SECTION INLINE GRID STYLES — FORCE SINGLE COLUMN
     ============================================================ */
  /* Blog sidebar layout */
  [style*="grid-template-columns:1fr 280px"],
  [style*="grid-template-columns: 1fr 280px"] {
    grid-template-columns: 1fr !important;
  }

  /* Admin: hide sidebar in mobile handled via admin.css */

  /* Services overview alternating grid */
  [style*="grid-template-columns:1fr 1fr;gap:60px"],
  [style*="grid-template-columns: 1fr 1fr; gap: 60px"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* ============================================================
     AURORA BG — REDUCE SIZE ON MOBILE
     ============================================================ */
  .aurora-bg::before { width: 300px !important; height: 250px !important; opacity: 0.08 !important; }
  .aurora-bg::after  { width: 250px !important; height: 200px !important; opacity: 0.06 !important; }

  /* ============================================================
     HERO CANVAS PARTICLES — HIDE ON MOBILE
     ============================================================ */
  #hero-canvas { display: none !important; }
}

/* ============================================================
   SMALL MOBILE — ≤ 480px additional fixes
   ============================================================ */
@media (max-width: 480px) {
  .masonry-grid { columns: 1 !important; }

  .hero-title { font-size: clamp(2.6rem, 13vw, 4rem) !important; }

  .stats-band { grid-template-columns: repeat(2, 1fr) !important; }

  .portfolio-filters { gap: 6px !important; }
  .filter-btn { padding: 5px 12px !important; font-size: 0.72rem !important; }

  .cta-box { padding: 32px 16px !important; }

  .form-wrapper { padding: 20px 14px !important; }

  .page-hero { padding-top: calc(var(--nav-h) + 36px) !important; }

  .section-tag { font-size: 0.7rem !important; padding: 5px 14px !important; }

  .btn { padding: 12px 22px !important; font-size: 0.85rem !important; }

  /* Team grid 2x2 on small screens */
  .grid-4[role="list"] { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }

  .team-photo { width: 58px !important; height: 58px !important; }
  .team-name { font-size: 0.82rem !important; }
  .team-card p { display: none !important; } /* hide description on tiny screens */
}

/* ============================================================
   TABLET — 769px to 1024px
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  :root { --section-py: 72px; }

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

  .hero-title { font-size: clamp(3rem, 7vw, 5rem) !important; }
  .hero-float-stats { display: none !important; }
  .hero-visual { display: none !important; }

  .stats-band { grid-template-columns: repeat(4, 1fr) !important; padding: 28px 24px !important; }

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

  .masonry-grid { columns: 2 200px !important; }

  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 1.4fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
  }

  /* About and service 50/50 on tablet */
  [style*="grid-template-columns:1fr 1fr;gap:60px"],
  [style*="grid-template-columns: 1fr 1fr; gap: 60px"] {
    gap: 36px !important;
  }

  .cta-box { padding: 60px 40px !important; }
}

/* ============================================================
   UTILITY — NO HORIZONTAL SCROLL EVER
   ============================================================ */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

* { box-sizing: border-box !important; }

/* Prevent images overflowing containers */
img { max-width: 100% !important; height: auto !important; }

/* ============================================================
   DISABLE 3D TILT ON TOUCH DEVICES (performance)
   ============================================================ */
@media (hover: none) {
  .card-3d { transform: none !important; }
  .glass-card:hover { transform: translateY(-4px) !important; }
}
