/**
 * Početna — Bluewash hibrid (≥1200px desktop).
 * fullPage snap; FAQ→footer bez snap-a (.bw-at-footer).
 */

/* --- Bez fullPage (desktop ≥1200px, visina <700 ili <1200px širina) --- */
@media screen and (min-width: 1200px) {
  body.home-page.bw-normal-scroll:not(.bw-at-footer) {
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) #fullpage {
    height: auto !important;
    overflow: visible !important;
    touch-action: pan-y;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) #fullpage > .section {
    min-height: 0 !important;
    height: auto !important;
    position: relative !important;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) #fullpage > .section .fp-overflow {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) .half-fluid .content {
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) #bluewash.banner-sec {
    min-height: calc(100dvh - 5rem);
    height: auto !important;
  }

  body.home-page.bw-normal-scroll:not(.bw-at-footer) .home-banner-swiper {
    min-height: calc(100dvh - 5rem);
    height: calc(100dvh - 5rem) !important;
    max-height: calc(100dvh - 5rem);
  }
}

/* --- Privremeni režim: skrol do footera (FAQ→footer bez snap-a) --- */
@media screen and (min-width: 1200px) {
  html.fp-enabled.bw-at-footer,
  html.fp-enabled.bw-footer-animating,
  html.fp-enabled:has(body.bw-at-footer),
  html.fp-enabled:has(body.bw-footer-animating) {
    scroll-behavior: auto !important;
  }

  html.fp-enabled.bw-at-footer,
  html.fp-enabled:has(body.bw-at-footer) {
    overflow-y: auto !important;
    height: auto !important;
  }

  html.fp-enabled body.home-page.bw-at-footer {
    overflow-y: auto !important;
    height: auto !important;
  }

  html.fp-enabled body.home-page.bw-at-footer #fullpage {
    height: auto !important;
    touch-action: pan-y;
  }
}

/* --- fullPage uključen (desktop ≥1200×700) --- */
@media screen and (min-width: 1200px) {
  html.fp-enabled,
  body.home-page.fp-enabled {
    overflow: hidden !important;
    height: 100%;
    background-color: #fff;
  }

  body.home-page.fp-enabled #fullpage {
    height: 100% !important;
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) {
    height: 100% !important;
    overflow: hidden !important;
  }

  /* Bez unutrašnjih „pod-sekcija“ — jedan wheel = jedna sekcija */
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height).fp-scrollable,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .fp-overflow.fp-scrollable {
    overflow: hidden !important;
  }

  body.home-page.fp-enabled #fullpage #bluewash .home-banner,
  body.home-page.fp-enabled #fullpage #bluewash .home-banner-swiper {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  body.home-page.fp-enabled .tw-payment-methods-sec,
  body.home-page.fp-enabled .tw-payment-methods-sec > .container,
  body.home-page.fp-enabled .tw-payment-methods-sec > .container > .row,
  body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6.position-xl-absolute.left-half,
  body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6.offset-xl-6 .content.tw-payment-methods-sec_content,
  body.home-page.fp-enabled .tw-drive-coffee-sec_inner,
  body.home-page.fp-enabled .tw-sustain-sec .sec-pd {
    min-height: 0 !important;
    max-height: 100% !important;
    height: 100% !important;
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .fp-overflow,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .fp-overflow.fp-scrollable,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .fp-scrollable-slide {
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box;
  }

  /* Sakrij eventualni unutrašnji skrol od scrollOverflow plugina */
  body.home-page.fp-enabled .fp-overflow .fp-scrollable,
  body.home-page.fp-enabled .fp-overflow .iScrollVerticalScrollbar {
    overflow: hidden !important;
  }

  /* Direktno dete u .fp-overflow — puna visina (half-fluid, корпоративни, intro…) */
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .fp-overflow > * {
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    width: 100%;
    box-sizing: border-box;
  }

  /* Razmaci sekcija — tipografija u typography-global.css (jedna skala za sve fp sekcije) */
  body.home-page.fp-enabled {
    --bw-gap: clamp(0.3rem, calc(0.2rem + 0.75dvh), 0.85rem);
    --bw-content-pad-y: clamp(0.55rem, calc(0.45rem + 1.5dvh), 1.75rem);
  }

  @media screen and (max-height: 1100px) {
    body.home-page.fp-enabled {
      --bw-gap: clamp(0.25rem, calc(0.18rem + 0.55dvh), 0.65rem);
      --bw-content-pad-y: clamp(0.45rem, calc(0.35rem + 1dvh), 1.1rem);
    }
  }

  @media screen and (max-height: 1020px) {
    body.home-page.fp-enabled {
      --bw-gap: clamp(0.22rem, calc(0.14rem + 0.5dvh), 0.55rem);
      --bw-content-pad-y: clamp(0.4rem, calc(0.32rem + 0.85dvh), 0.95rem);
    }

    body.home-page.fp-enabled .half-fluid .image img,
    body.home-page.fp-enabled .half-fluid .nw-swiper .image.fadein-item img,
    body.home-page.fp-enabled .half-fluid figure.image img,
    body.home-page.fp-enabled .image.tw-fleet-visual-wrap img.tw-fleet-visual-img {
      max-height: min(40vh, 100%) !important;
    }
  }

  @media screen and (max-height: 900px) {
    body.home-page.fp-enabled {
      --bw-gap: clamp(0.2rem, calc(0.15rem + 0.45dvh), 0.5rem);
      --bw-content-pad-y: clamp(0.35rem, calc(0.3rem + 0.8dvh), 0.85rem);
    }

    body.home-page.fp-enabled .half-fluid .image img,
    body.home-page.fp-enabled .half-fluid .nw-swiper .image.fadein-item img,
    body.home-page.fp-enabled .half-fluid figure.image img,
    body.home-page.fp-enabled .image.tw-fleet-visual-wrap img.tw-fleet-visual-img {
      max-height: min(38vh, 100%) !important;
    }
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .title-lg,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) h2.title-lg {
    margin-bottom: var(--bw-gap) !important;
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .title-lg .text-primary.d-block,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .title-lg .text-white.d-block {
    margin-bottom: 0.25em !important;
  }

  html[lang="de"] .title-lg__lead {
    display: block;
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) p,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .tw-desc,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .content p {
    margin-bottom: var(--bw-gap) !important;
  }

  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .btn,
  body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .btn-primary {
    padding: 0.5rem 1.25rem !important;
  }

  /* half-fluid u punoj visini sekcije */
  body.home-page.fp-enabled .half-fluid,
  body.home-page.fp-enabled .half-fluid > .container,
  body.home-page.fp-enabled .half-fluid > .container > .row {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  body.home-page.fp-enabled .half-fluid > .container > .row {
    position: relative !important;
    align-items: center !important;
  }

  body.home-page.fp-enabled .half-fluid .content {
    min-height: 0 !important;
    max-height: 100% !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding-top: var(--bw-content-pad-y) !important;
    padding-bottom: var(--bw-content-pad-y) !important;
    box-sizing: border-box;
    overflow: hidden !important;
  }

  body.home-page.fp-enabled .half-fluid .content .tw-pricing-sec_btn,
  body.home-page.fp-enabled .half-fluid .content .btn,
  body.home-page.fp-enabled .half-fluid .content > *:last-child {
    flex-shrink: 0;
  }

  body.home-page.fp-enabled .half-fluid .content .title-lg,
  body.home-page.fp-enabled .half-fluid .content p,
  body.home-page.fp-enabled .half-fluid .content .tw-desc {
    flex-shrink: 1;
    min-height: 0;
  }

  body.home-page.fp-enabled .half-fluid.fluid-right-content .content {
    margin-inline-start: clamp(1.5rem, 3vw, 3.5rem) !important;
  }

  body.home-page.fp-enabled .half-fluid.fluid-left-content .content {
    margin-inline-end: clamp(1.5rem, 3vw, 3.5rem) !important;
    margin-inline-start: 0 !important;
  }

  body.home-page.fp-enabled .half-fluid .col-xl-6 {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
  }

  body.home-page.fp-enabled .half-fluid .left-half,
  body.home-page.fp-enabled .half-fluid .right-half {
    height: 100% !important;
    max-height: 100% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  /* Flotten клиенти (#flotten) — puna plava sekcija 100vh */
  body.home-page.fp-enabled #fullpage .section.tw-home-audience-sec,
  body.home-page.fp-enabled #fullpage .section[data-anchor="flotten"],
  body.home-page.fp-enabled #fullpage .section[data-id="flotten"] {
    height: 100% !important;
  }

  body.home-page.fp-enabled .tw-home-audience-sec .half-fluid.tw-pricing-sec {
    min-height: 100% !important;
    height: 100% !important;
  }

  body.home-page.fp-enabled .tw-home-audience-sec .image.tw-fleet-visual-wrap {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(0.75rem, 2vh, 2rem) !important;
    box-sizing: border-box;
  }

  body.home-page.fp-enabled .half-fluid .image img,
  body.home-page.fp-enabled .half-fluid .nw-swiper .image.fadein-item img,
  body.home-page.fp-enabled .half-fluid figure.image img,
  body.home-page.fp-enabled .image.tw-fleet-visual-wrap img.tw-fleet-visual-img {
    max-height: min(42vh, 100%) !important;
    object-fit: contain !important;
    object-position: center center !important;
  }

  /* Intro */
  body.home-page.fp-enabled #fullpage .intro-sec1 .fp-overflow > .tw-intro-sec,
  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--bw-content-pad-y);
    padding-bottom: var(--bw-content-pad-y);
    box-sizing: border-box;
    overflow: hidden;
  }

  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec .container,
  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec .row_wrap {
    min-height: 0;
    max-height: 100%;
  }

  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec .row_wrap {
    align-items: center !important;
    height: 100%;
  }

  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec_img figure {
    padding-top: 0 !important;
    height: auto !important;
    max-height: min(46vh, 100%);
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  body.home-page.fp-enabled .intro-sec1 .tw-intro-sec_img figure img {
    position: relative !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: min(46vh, 100%) !important;
    object-fit: contain !important;
  }

  /* Aplikacija — bez preliva i paginacije u sledeću sekciju */
  body.home-page.fp-enabled #fullpage .section[data-anchor="app"] .fp-overflow,
  body.home-page.fp-enabled #fullpage .section[data-id="app"] .fp-overflow {
    overflow: hidden !important;
  }

  body.home-page.fp-enabled .tw-app-sec.sec-pd,
  body.home-page.fp-enabled .tw-app-sec {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding-top: var(--bw-content-pad-y) !important;
    padding-bottom: var(--bw-content-pad-y) !important;
    box-sizing: border-box;
  }

  body.home-page.fp-enabled .tw-app-sec > .container,
  body.home-page.fp-enabled .tw-app-sec > .container > .row {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    align-items: center !important;
  }

  body.home-page.fp-enabled .tw-app-sec .mySwiper,
  body.home-page.fp-enabled .tw-app-sec .mySwiper .tw-app-sec_img figure img {
    max-height: min(38vh, 100%) !important;
  }

  body.home-page.fp-enabled .tw-payment-methods-sec,
  body.home-page.fp-enabled .tw-payment-methods-sec > .container,
  body.home-page.fp-enabled .tw-payment-methods-sec > .container > .row {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
  }

  body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6.position-xl-absolute.left-half {
    min-height: 0 !important;
    max-height: 100% !important;
    height: 100% !important;
  }

  body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6 .image.fadein-item {
    max-height: 100% !important;
  }

  body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6 .image.fadein-item img {
    max-width: min(100%, 48vw, min(82dvh, 82vh)) !important;
    max-height: min(82dvh, 82vh, 100%) !important;
  }

  @media screen and (min-width: 1920px) {
    body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6 .image.fadein-item img {
      max-width: min(100%, 44vw, min(88dvh, 88vh, 1050px)) !important;
      max-height: min(88dvh, 88vh, 100%) !important;
    }
  }

  @media screen and (min-width: 2560px) {
    body.home-page.fp-enabled .tw-payment-methods-sec .col-xl-6 .image.fadein-item img {
      max-width: min(100%, 42vw, min(90dvh, 90vh)) !important;
      max-height: min(90dvh, 90vh, 100%) !important;
    }
  }

  body.home-page.fp-enabled #fullpage .section[data-anchor="zahlung"],
  body.home-page.fp-enabled #fullpage .section[data-id="zahlung"] {
    min-height: 0 !important;
    height: 100% !important;
  }

  body.home-page.fp-enabled .half-fluid .image img,
  body.home-page.fp-enabled .half-fluid .nw-swiper .image.fadein-item img {
    max-height: min(42vh, 100%) !important;
  }
}
