/**
 * Globalna tipografija — MK skala + CH prilagodba (DE).
 * --bw-text-scale / --bw-lead-em: kumulativno −10% od MK baze (2× −5%).
 * --bw-paragraph-line: line-height paragrafa −2% (1.65 → 1.617).
 */

html {
  font-size: 100%;
}

:root {
  --bw-text-scale: 0.9025;
  --bw-lead-em: 0.81225;
  --bw-paragraph-line: 1.617;
  --bw-font-body: clamp(
    calc(0.9375rem * var(--bw-text-scale)),
    calc((0.82rem + 0.35vw + 0.35vh) * var(--bw-text-scale)),
    calc(1.125rem * var(--bw-text-scale))
  );
  --bw-font-body-sm: clamp(
    calc(0.875rem * var(--bw-text-scale)),
    calc((0.78rem + 0.28vw + 0.25vh) * var(--bw-text-scale)),
    calc(1rem * var(--bw-text-scale))
  );
  --bw-font-title-lg: clamp(calc(1.35rem - 2px), calc(1.05rem + 1.35vw + 0.9vh), calc(3.8125rem - 2px));
  --bw-font-h2: clamp(calc(1.2rem - 2px), calc(1rem + 1vw + 0.5vh), calc(1.85rem - 2px));
  --bw-font-h3: clamp(calc(1.05rem - 2px), calc(0.92rem + 0.75vw + 0.35vh), calc(1.45rem - 2px));
  --bw-font-ttl-24: clamp(calc(0.9375rem - 2px), calc(0.85rem + 0.4vw + 0.2vh), calc(1.125rem - 2px));
  --bw-font-ttl-30: clamp(calc(1rem - 2px), calc(0.9rem + 0.5vw + 0.25vh), calc(1.25rem - 2px));
}

body {
  font-size: var(--bw-font-body);
  line-height: 1.65;
}

p,
.tw-desc,
.fs-24,
.content,
.content li,
.accordion-body,
td,
th,
label,
dd,
dt {
  font-size: var(--bw-font-body) !important;
  line-height: var(--bw-paragraph-line) !important;
}

.fs-20,
.fs-20.tw-desc,
small {
  font-size: var(--bw-font-body) !important;
  line-height: var(--bw-paragraph-line) !important;
}

.accordion-button {
  font-size: var(--bw-font-body) !important;
  line-height: 1.5 !important;
}

.title-lg {
  font-size: var(--bw-font-title-lg) !important;
  line-height: 1.12 !important;
}

.title-lg__lead {
  font-size: calc(var(--bw-lead-em) * 1em) !important;
  line-height: 1.12 !important;
}

.home-banner-swiper .title-main {
  font-size: clamp(calc(2.35rem - 2px), calc(1.75rem + 2.5vw + 1.2vh), calc(5.75rem - 2px)) !important;
}

.title-lg .text-primary.d-block {
  font-size: 0.72em !important;
}

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

h1,
.h1 {
  font-size: clamp(calc(1.5rem - 2px), calc(2.8vw - 2px), calc(2.2rem - 2px)) !important;
  line-height: 1.18 !important;
}

h2,
.h2 {
  font-size: var(--bw-font-h2) !important;
  line-height: 1.2 !important;
}

h3,
.h3 {
  font-size: var(--bw-font-h3) !important;
  line-height: 1.25 !important;
}

h4,
.h4 {
  font-size: var(--bw-font-ttl-24) !important;
  line-height: 1.3 !important;
}

h5,
.h5,
h6,
.h6 {
  font-size: var(--bw-font-ttl-24) !important;
  line-height: 1.35 !important;
}

.ttl-30 {
  font-size: var(--bw-font-ttl-30) !important;
}

.ttl-24 {
  font-size: var(--bw-font-ttl-24) !important;
}

.home-banner-swiper .title-main {
  font-size: clamp(calc(2.35rem - 2px), calc(3.8vw - 2px), calc(5.75rem - 2px)) !important;
  line-height: 1.05 !important;
}

.tw-inner-page-banner .title-main {
  font-size: clamp(calc(2.1rem - 2px), calc(4vw - 2px), calc(3.35rem - 2px)) !important;
  line-height: 1.08 !important;
}

.bw-contact-form-title {
  font-size: clamp(calc(1.2rem - 2px), calc(1rem + 1.2vw + 0.35vh), calc(1.65rem - 2px)) !important;
}

.bw-pkg-card__title {
  font-size: clamp(calc(1.5rem - 2px), calc(1.25rem + 1vw + 0.4vh), calc(2.4375rem - 2px)) !important;
}

.bw-pkg-card__block-title {
  font-size: clamp(calc(1.25rem - 2px), calc(1.1rem + 0.85vw + 0.35vh), calc(2.125rem - 2px)) !important;
}

.bw-contact-page .bw-contact-lead {
  font-size: var(--bw-font-body) !important;
  line-height: var(--bw-paragraph-line) !important;
}

/* Početna fullPage — jedna skala za SVE sekcije (intro = half-fluid = app = …) */
body.home-page.fp-enabled #fullpage {
  --bw-fp-title: clamp(
    calc((1.15rem - 2px) * var(--bw-text-scale)),
    calc((0.9rem + 0.85vw + 0.75vh) * var(--bw-text-scale)),
    calc((2.15rem - 2px) * var(--bw-text-scale))
  );
  --bw-fp-accent: clamp(
    calc((0.72rem - 2px) * var(--bw-text-scale)),
    calc((0.62rem + 0.42vw + 0.45vh) * var(--bw-text-scale)),
    calc(1.05rem * var(--bw-text-scale))
  );
}

@media screen and (max-height: 1020px) {
  body.home-page.fp-enabled #fullpage {
    --bw-fp-title: clamp(
      calc((1.1rem - 2px) * var(--bw-text-scale)),
      calc((0.9rem + 0.75vw + 0.7vh) * var(--bw-text-scale)),
      calc((2.05rem - 2px) * var(--bw-text-scale))
    );
    --bw-fp-accent: clamp(
      calc((0.72rem - 2px) * var(--bw-text-scale)),
      calc((0.62rem + 0.38vw + 0.42vh) * var(--bw-text-scale)),
      calc(1.02rem * var(--bw-text-scale))
    );
  }
}

@media screen and (max-height: 900px) {
  body.home-page.fp-enabled #fullpage {
    --bw-fp-title: clamp(
      calc((1rem - 2px) * var(--bw-text-scale)),
      calc((0.82rem + 0.7vw + 0.55vh) * var(--bw-text-scale)),
      calc((1.85rem - 2px) * var(--bw-text-scale))
    );
    --bw-fp-accent: clamp(
      calc((0.65rem - 2px) * var(--bw-text-scale)),
      calc((0.55rem + 0.32vw + 0.32vh) * var(--bw-text-scale)),
      calc(0.92rem * var(--bw-text-scale))
    );
  }
}

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) h1.title-lg,
body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) h2.title-lg {
  font-size: var(--bw-fp-title) !important;
  line-height: 1.12 !important;
  font-weight: 600;
}

body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .title-lg__lead {
  font-size: calc(var(--bw-lead-em) * 1em) !important;
  line-height: 1.12 !important;
  font-weight: 600;
}

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 {
  font-size: var(--bw-fp-accent) !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
}

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) .fs-24,
body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .content p,
body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .content li,
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,
body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) label,
body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .accordion-body {
  font-size: var(--bw-font-body) !important;
  line-height: var(--bw-paragraph-line) !important;
}

body.home-page.fp-enabled #fullpage .fp-section:not(.fp-auto-height) .mouse_wheel.fs-24 {
  font-size: var(--bw-font-body-sm) !important;
}

footer.footer {
  font-size: 16px !important;
  line-height: 1.5 !important;
}

footer.footer .footer-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 0;
}

footer.footer .footer-brand__logo {
  display: block;
  width: auto !important;
  max-width: none;
  height: 14px !important;
  margin-inline: auto;
  filter: brightness(0) invert(1);
}

footer.footer .footer-brand,
footer.footer .footer-title,
footer.footer h2.footer-title,
footer.footer .footer-loc-app-title,
footer.footer .footer-loc-app-subtitle,
footer.footer .footer-loc-meta,
footer.footer .footer-contact-link,
footer.footer p,
footer.footer a,
footer.footer .copy {
  font-size: 16px !important;
}

footer.footer .footer-legal p,
footer.footer .footer-legal p a {
  font-size: 14px !important;
}

footer.footer .footer-legal p.copy {
  white-space: nowrap;
}

footer.footer .footer-loc-hours__nowrap,
.bw-map-hours .footer-loc-hours__nowrap {
  white-space: nowrap;
}

.breadcrumb {
  font-size: var(--bw-font-body) !important;
}

@media screen and (max-width: 1199.98px) {
  .title-lg {
    font-size: clamp(1.5rem, 5.2vw, 2rem) !important;
    line-height: 1.22 !important;
    font-weight: 600 !important;
    margin-bottom: 0.75rem !important;
  }

  .title-lg__lead {
    font-size: calc(var(--bw-lead-em) * 1em) !important;
    line-height: 1.22 !important;
    font-weight: 600 !important;
  }

  .title-lg .text-primary.d-block,
  h1.title-lg .text-primary.d-block,
  h2.title-lg .text-primary.d-block {
    font-size: clamp(calc(0.9375rem + 2px), calc(3.4vw + 2px), calc(1.0625rem + 2px)) !important;
    line-height: 1.3 !important;
    font-weight: 600 !important;
    margin-bottom: 0.35rem;
  }

  p.tw-desc,
  .fs-24.tw-desc,
  .content .tw-desc,
  .content p.tw-desc {
    font-size: var(--bw-font-body-sm) !important;
    line-height: calc(1.55 * 0.98) !important;
  }

  .content .title-lg + .tw-desc,
  .content .title-lg + p {
    margin-top: 0.5rem;
  }

  .btn,
  body.home-page .btn,
  body.home-page #fullpage .btn {
    font-size: var(--bw-font-body-sm) !important;
  }
}

@media screen and (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
