/* BMP d.o.o. — site stylesheet (SPEC 003 AC18).
   "Same identity, modernised": the old site's blue/teal palette and Open Sans, laid out
   mobile-first. Base rules are for phones; @media (min-width: …) blocks add wider layouts.
   Everything is local: no imported stylesheets, no remote fonts, no scripts. */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/open-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(/assets/fonts/open-sans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --blue: #0079c2;
  --blue-dark: #005b93;
  --teal: #00a890;
  --text: #4d4d4d;
  --surface: #f5f5f5;
  --line: #e6e6e6;
  --white: #fff;
  --radius: 6px;
  --gap: 1rem;
  --max: 72rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-dark);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
  color: var(--blue);
  line-height: 1.25;
  margin: 1.4em 0 0.5em;
}

h1 {
  font-size: 1.75rem;
}

h2 {
  font-size: 1.4rem;
}

h3 {
  font-size: 1.15rem;
}

/* Skip link: hidden until focused. */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--blue);
  color: var(--white);
  z-index: 10;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* ---------------------------------------------------------------- header & menu */

.site-header {
  border-bottom: 3px solid var(--blue);
  background: var(--white);
}

.header-bar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem var(--gap);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.logo img {
  display: block;
  max-height: 3rem;
  width: auto;
}

.languages {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.languages a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.languages a[aria-current="true"] {
  color: var(--text);
  font-weight: 700;
}

/* CSS-only mobile toggle: the checkbox is visually hidden but keyboard-focusable. */
.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.nav-toggle-label {
  cursor: pointer;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  color: var(--blue);
  font-weight: 600;
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.menu {
  display: none;
  flex-basis: 100%;
}

.nav-toggle:checked ~ .menu {
  display: block;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu ul ul {
  padding-left: 1rem;
}

.menu a,
.menu span {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
}

.menu span {
  color: var(--text);
}

.menu a[aria-current="page"] {
  color: var(--teal);
}

/* ---------------------------------------------------------------- main content */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--gap);
}

.banner {
  text-align: right;
  margin-bottom: var(--gap);
}

.banner-wide {
  text-align: center;
}

.banner img {
  display: inline-block;
  max-height: 8rem; /* brand logos; the old site showed them small */
  width: auto;
}

.banner-wide img {
  max-height: none;
}

/* The old pages used a small PDF icon next to download links (sized by inline styles that
   extraction removed). */
.page-body img[alt="PDF" i],
.page-body img[src*="pdf.png" i] {
  width: 2.5rem;
  vertical-align: middle;
  margin-right: 0.4rem;
}

/* Embedded YouTube players (youtube-nocookie, lazy-loaded): full width, 16:9. */
.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 1rem 0;
  background: var(--surface);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.page-body table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  max-width: 100%;
}

.page-body td,
.page-body th {
  border: 1px solid var(--line);
  padding: 0.4rem 0.6rem;
  vertical-align: top;
}

.page-body th {
  background: var(--surface);
}

.landing-section {
  margin-bottom: 2rem;
}

.intro {
  text-align: center;
}

.tiles {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.tiles li {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}

.tiles a {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.tiles img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain; /* old tile pictures are wide collages: show them whole */
  background: var(--white);
}

.tiles h3 {
  margin: 0.75rem 1rem 0.25rem;
  color: var(--blue);
  text-transform: uppercase;
}

.tiles p {
  margin: 0 1rem 1rem;
  color: var(--teal);
  font-weight: 600;
}

.tiles a:hover h3 {
  color: var(--teal);
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  margin-top: 3rem;
  background: var(--surface);
  border-top: 3px solid var(--teal);
  font-size: 0.925rem;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--gap);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.footer-group h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
  text-transform: uppercase;
}

.footer-group h2 a {
  text-decoration: none;
}

.footer-group ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.footer-group li {
  padding: 0.15rem 0;
}

.footer-text {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 40em) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64em) {
  h1 {
    font-size: 2.1rem;
  }

  .tiles {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-cols {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Menu always visible as a horizontal bar; submenus drop down on hover / keyboard focus. */
  .nav-toggle,
  .nav-toggle-label {
    display: none;
  }

  .menu {
    display: block;
  }

  .menu > ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.5rem;
  }

  .menu > ul > li {
    position: relative;
  }

  .menu a,
  .menu span {
    border-bottom: 0;
    text-transform: uppercase;
    font-size: 0.9rem;
  }

  .menu li ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 16rem;
    padding: 0.25rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue);
    z-index: 5;
  }

  .menu li ul ul {
    position: static;
    border: 0;
    padding-left: 1rem;
  }

  .menu li:hover > ul,
  .menu li:focus-within > ul {
    display: block;
  }

  .menu li ul a,
  .menu li ul span {
    text-transform: none;
  }
}
