/* M2M Solutions — overrides peste m2m-solutions.webflow.css.
 * Reguli aplicate global pe toate paginile (linkate via sync-partials).
 */

/* Hero → tranziție lină către secțiunea următoare. Doar bottom 25% al hero-ului fade-uie
 * la primary-background, ca să nu acopere poza/animația din hero-effect.
 * Aplicat pe toate paginile (homepage + subpagini servicii + policy + eu-funding). */
.hero-homepage::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 25%;
  background: linear-gradient(to bottom, transparent 0%, var(--primary-background) 80%);
  pointer-events: none;
  z-index: 4;
}

/* DOAR prima secțiune după hero să aibă primary-background → gradient-ul hero-ului se
 * topește lin în ea. Restul secțiunilor își păstrează culorile alternative (rythm vizual). */
.hero-homepage + section,
.hero-homepage + div + section,
.hero-homepage + .div-block-281 + section {
  background-color: var(--primary-background) !important;
}

/* Floating CTA "Consultanță gratuită" — fără drop-shadow, păstrează doar gradient-ul de fundal. */
.m2m-cta-sticky,
.m2m-cta-sticky:hover {
  box-shadow: none !important;
}

/* Side-scroll fix — webflow's `.button_lottie` (absolute) overflows ~6-8px peste right edge
 * pe mobil. Tăiem orice depășire orizontală la nivel de body. */
html, body {
  overflow-x: hidden;
}

/* Apel cards (homepage hero + /eu-funding listing) — pe mobil reducem padding-ul cardului,
 * micșorăm dimensiunea valorilor KPI ca "5.000.000" să nu împingă celelalte coloane,
 * și permitem KPI-urilor să wrap-uiască la nevoie. */
@media (max-width: 767px) {
  .m2m-apel-card {
    padding: 1.5rem !important;
  }
  .m2m-apel-card .m2m-card-kpi {
    padding: 0.85rem 0.65rem !important;
  }
  .m2m-apel-card .m2m-card-kpi-value {
    font-size: 1.15rem !important;
    letter-spacing: -0.01em !important;
  }
  .m2m-apel-card .m2m-card-kpi-label {
    font-size: 0.55rem !important;
    letter-spacing: 0.06em !important;
  }
  /* Hero cards de pe homepage — side padding ca să nu fie edge-to-edge */
  #m2m-hero-cards {
    padding: 0 1.25rem !important;
  }
  /* /eu-funding apel cards — un singur card pe rând, full width container, side padding */
  #apeluri > div {
    padding: 0 0.5rem !important;
  }
}

/* Hero auto-sized GLOBAL — unbind de la 100vh pe toate paginile (homepage / subpagini / eu-funding).
 * Crește natural cu content + padding, fără overflow. */
.hero-homepage,
.hero-homepage .hero-layout {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

/* Desktop mari (≥1440px) — hero ia mai multă înălțime ca să umple viewport-ul corect.
 * Pe laptop-uri (1280px) păstrăm auto-size ca să nu suprasolicităm verticalul.
 * Padding suplimentar + min-height împreună evită colapsul când conținutul e scurt
 * (ex. hero-ul de pe subpagini fără cards). */
@media (min-width: 1440px) {
  .hero-homepage .hero-layout {
    min-height: 86vh !important;
    padding: 9em 0 7em !important;
  }
}

/* Desktop foarte mari (≥1920px) — un pic mai generos. */
@media (min-width: 1920px) {
  .hero-homepage .hero-layout {
    min-height: 82vh !important;
    padding: 10em 0 8em !important;
  }
}

/* Mobile: column flow, padding generos, fingerprint+bg-glow ascunse, image full-width. */
@media (max-width: 991px) {
  .hero-homepage .hero-layout {
    flex-direction: column !important;
    padding: 9em 1.5em 4em !important;
    gap: 2rem !important;
  }
  .hero-homepage .hero-effect {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 2 !important;
    align-items: stretch !important;
  }
  .hero-homepage .section-title_component-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    order: 1 !important;
  }
  .hero-homepage .hero-fingerprint { display: none !important; }
  .hero-homepage .hero-bg { display: none !important; }
  .hero-homepage .m2m-hero-img {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 60vw !important;
    object-fit: cover !important;
  }
}

/* Webflow link reset — replicat din inline `<style>` din static pages.
 * Necesar pe paginile React (/eu-funding) unde inline-ul nu există → linkurile rămân la
 * culoarea default rgba(0,0,0,.16) în loc să moștenească body-ul (white).
 * Aici (în m2m-overrides.css încărcat ULTIMA) avem prioritate peste webflow.css. */
a,
.w-tab-link,
.w-nav-link,
.w-dropdown-btn,
.w-dropdown-toggle,
.w-dropdown-link {
  color: inherit;
  text-decoration: inherit;
  font-size: inherit;
}
.w-input,
.w-select {
  color: inherit;
}
