/* ============================================================
   RESPONSIVE OVERRIDES — Veltrion Capital
   ------------------------------------------------------------
   The site markup is authored almost entirely with inline
   `style="..."` attributes (exported from a no-code visual
   editor), which have higher CSS specificity than any class
   selector. Rather than rewriting every page's markup (risky
   on a production-ready site), this file uses `!important`
   media-query overrides to collapse the fixed-width desktop
   grids/paddings/font-sizes down to tablet and mobile sizes.

   Breakpoints chosen:
     - Tablet : max-width 768px
     - Mobile : max-width 480px

   Verify visually in a real browser at 768px and 375px widths
   after deploy — this was authored without a live browser.
   Load this file AFTER css/site.css in every <head>.
   ============================================================ */

/* ------------------------------------------------------------
   Mobile nav (hamburger) — works with the small toggle script
   added to the shared inline <script> block at the bottom of
   every page. Desktop nav is untouched above 768px.
   ------------------------------------------------------------ */
.nav-toggle-btn { display: none; }

@media (max-width: 768px) {
  header > div {
    padding: 0 20px !important;
    height: 72px !important;
  }
  header img[alt="Veltrion Capital"] {
    height: 56px !important;
  }

  /* Hide the desktop inline-flex nav + CTA, replace with hamburger */
  header nav {
    position: fixed !important;
    top: 72px !important;
    left: 0 !important;
    right: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    background: #1E0F04 !important;
    border-bottom: 1px solid rgba(214,169,86,0.33) !important;
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 220ms ease !important;
    z-index: 199 !important;
  }
  header nav.nav-open {
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
  header nav .nav-link,
  header nav .nav-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px 24px !important;
    border-bottom: 1px solid rgba(214,169,86,0.10) !important;
    justify-content: space-between !important;
  }
  header nav [data-dropdown="1"] { width: 100%; }
  header nav [data-dropdown="1"] > .nav-btn { width: 100%; }
  header #nav-dropdown-menu {
    position: static !important;
    padding-top: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  header #nav-dropdown-menu > div {
    min-width: 0 !important;
    width: 100% !important;
    box-shadow: none !important;
    border-left: none !important;
    border-right: none !important;
  }

  header .cta-btn {
    display: none !important;
  }
  header nav .cta-btn.nav-cta-mobile {
    display: inline-flex !important;
    margin: 16px 24px !important;
    width: calc(100% - 48px) !important;
    justify-content: center !important;
  }

  .nav-toggle-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid rgba(214,169,86,0.35);
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-toggle-btn svg { pointer-events: none; }
}

/* ------------------------------------------------------------
   Generic containers / sections
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  section > div[style*="max-width:1200px"],
  section > div[style*="max-width:1400px"],
  header > div,
  footer > div {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  section[style*="padding:80px 0"],
  section[style*="padding: 80px 0"] {
    padding: 48px 0 !important;
  }
  div[style*="padding:72px 48px"],
  div[style*="padding:96px 48px"] {
    padding: 48px 24px !important;
  }

  h1 { font-size: clamp(26px, 7vw, 34px) !important; }
  h2 { font-size: clamp(24px, 6vw, 30px) !important; line-height: 1.25 !important; }
}

@media (max-width: 480px) {
  section > div[style*="max-width:1200px"],
  section > div[style*="max-width:1400px"],
  header > div,
  footer > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  div[style*="padding:72px 48px"],
  div[style*="padding:96px 48px"] {
    padding: 36px 16px !important;
  }
}

/* ------------------------------------------------------------
   Grids → stack to 1 column on tablet/mobile
   Covers: 1fr 1fr / 1fr 1.4fr / 1fr 2.2fr / 2fr 3fr / 220px 1fr,
   repeat(3,1fr), repeat(4,1fr), footer's auto 1fr 1fr 1fr
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns"] {
    gap: 32px !important;
  }
  /* Small icon/stat tiles read better at 2-up than full stack on tablet */
  section[id="metodologia"] div[style*="grid-template-columns:1fr 2.2fr"] + div,
  div[style*="display:flex; align-items:flex-start; gap:0"] {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 480px) {
  div[style*="grid-template-columns"] {
    gap: 20px !important;
  }
}

/* ------------------------------------------------------------
   Footer 4-column grid → stack, center
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  footer > div[style*="grid-template-columns:auto 1fr 1fr 1fr"] {
    gap: 32px !important;
    text-align: left !important;
  }
  footer > div[style*="display:flex; justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
  }
}

/* ------------------------------------------------------------
   "Régua de vantagens" strip (6 flex items in a row on desktop)
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  section div[style*="align-items:stretch"] {
    flex-wrap: wrap !important;
  }
  section div[style*="align-items:stretch"] > div[style*="flex:1"] {
    flex: 1 1 50% !important;
    min-width: 50% !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 480px) {
  section div[style*="align-items:stretch"] > div[style*="flex:1"] {
    flex: 1 1 100% !important;
    min-width: 100% !important;
  }
}

/* ------------------------------------------------------------
   Diferenciais / metodologia step rows that use flex (not grid)
   for horizontal step layouts — wrap on small screens
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  div[style*="display:flex; align-items:flex-start; gap:0"] > div[style*="flex:1"] {
    flex: 1 1 33% !important;
    min-width: 33% !important;
  }
}
@media (max-width: 480px) {
  div[style*="display:flex; align-items:flex-start; gap:0"] > div[style*="flex:1"] {
    flex: 1 1 50% !important;
    min-width: 50% !important;
  }
}

/* ------------------------------------------------------------
   Hero sections (min-height:72vh, clamp() headline) — reduce
   min-height on short mobile viewports so CTA is not pushed
   below the fold, and tighten padding.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  section[style*="min-height:72vh"] {
    min-height: auto !important;
    padding: 40px 0 !important;
  }
  section[style*="min-height:72vh"] > div[style*="padding:96px 48px 80px"] {
    padding: 40px 24px 48px !important;
  }
  section[style*="min-height:72vh"] div[style*="max-width:560px"] {
    max-width: 100% !important;
  }
}

/* ------------------------------------------------------------
   Breadcrumb bar — allow wrap so it doesn't overflow
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  div[style*="padding:12px 48px"] {
    padding: 10px 16px !important;
    flex-wrap: wrap !important;
  }
}

/* ------------------------------------------------------------
   Contact form / legal pages — inputs already width:100%
   via .vc-input, just ensure two-col form rows stack (handled
   by generic grid-template-columns rule above).
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   WhatsApp floating button — shrink slightly + inset on mobile
   so it doesn't crowd small screens
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .wa-float {
    width: 50px !important;
    height: 50px !important;
    bottom: 18px !important;
    right: 18px !important;
  }
}

/* ------------------------------------------------------------
   "ANTES/DEPOIS" comparison row (home) and footer legal-links row
   both use display:flex; align-items:center; gap:20px with two
   flex:1 children side by side — this pattern wasn't caught by the
   grid-template-columns overrides above, so it overflowed on
   mobile. Stack it.
   ------------------------------------------------------------ */
@media (max-width: 600px) {
  div[style="display:flex; align-items:center; gap:20px;"] {
    flex-direction: column !important;
  }
}
