/* GD NOVA — gdnova.si
   Breakpoints follow the original site: wide ≥ 1350px, desktop 981–1349px,
   tablet 768–980px, phone ≤ 767px. Between 981 and 1349px the spacing is a
   percentage of the page width; above that it is fixed, so on large screens
   the whole page fits without scrolling, as on the original. */

:root {
  --text: #666;
  --text-soft: #828282;
  --bg: #fff;
  --page-width: 80%;
  --page-max: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.7 "Open Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.wrap {
  width: var(--page-width);
  max-width: var(--page-max);
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid #19a99f;
  outline-offset: 2px;
}

/* ---------- Home: photo mosaic ---------- */

.home {
  padding: calc(4% + 15px) 0 4%;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: start;
}

.mosaic > * {
  min-width: 0;
}

.mosaic a {
  display: block;
}

.mosaic img {
  width: 100%;
}

/* The wordmark spans two cells and is 350px wide, as on the original; on
   narrower desktops it shrinks with the cells. Its row grows to fit it. */
.cell-logo {
  grid-column: span 2;
}

.cell-logo img {
  width: min(350px, 103.75%);
  max-width: none;
}

/* E-mail and phone, in the teal of the social icons. Sizes follow the
   cell width (cqi = 1% of the cell). */
.cell-contact {
  container-type: inline-size;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.mosaic .cell-contact a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3cqi;
  color: #13a39c;
  font: 400 clamp(10px, 7.2cqi, 14px)/1.3 Poppins, Helvetica, Arial, sans-serif;
  text-decoration: none;
}

.cell-contact a + a {
  margin-top: 9cqi;
}

.cell-contact svg {
  width: 17cqi;
  height: 17cqi;
  fill: currentColor;
}

/* Darker teal than the icons so the small text stays readable (4.8:1). */
.cell-contact span {
  color: #0d7f79;
  white-space: nowrap;
}

.cell-contact a:hover span {
  text-decoration: underline;
}

/* ---------- Kontakt ---------- */

.kontakt {
  padding: calc(10% + 7px) 0 6%;
}

.kontakt-col {
  width: 47.25%;
  margin: 0 auto;
  text-align: center;
}

.kontakt-col > * {
  margin: 0 auto 5.82%;
}

.kontakt-col > :last-child {
  margin-bottom: 0;
}

.kontakt-znak {
  display: block;
  width: 200px;
}

.kontakt-text {
  font: 300 14px/1.7 Poppins, Helvetica, Arial, sans-serif;
}

.kontakt-text p {
  margin: 0;
  padding-bottom: 1em;
}

.kontakt-text p:last-child {
  padding-bottom: 0;
}

.kontakt-text a {
  text-decoration: none;
}

.kontakt-text a:hover,
.kontakt-text .link {
  text-decoration: underline;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 15px 0 5px;
}

.site-footer p {
  margin: 0;
  padding-bottom: 10px;
  color: var(--text-soft);
}

/* ---------- Wide screens ---------- */

@media (min-width: 1350px) {
  .home {
    padding: 69px 0 54px;
  }

  .kontakt {
    padding: 142px 0 81px;
  }
}

/* ---------- Tablet ---------- */

@media (max-width: 980px) {
  .home {
    padding: 65px 0 50px;
  }

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

  .cell-logo img {
    width: 350px;
    max-width: 100%;
  }

  .kontakt {
    padding: 137px 0 110px;
  }

  .kontakt-col {
    width: 100%;
  }

  .kontakt-col > * {
    margin-bottom: 30px;
  }

  .site-footer {
    text-align: center;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 767px) {
  .mosaic {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 5.5%;
  }

  .cell-logo img {
    width: 105.8%;
    max-width: none;
  }

  /* Cells are ~63px wide here: icons only, the text stays for screen readers. */
  .cell-contact a + a {
    margin-top: 14cqi;
  }

  .cell-contact svg {
    width: 36cqi;
    height: 36cqi;
  }

  .cell-contact span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  /* The original shows only the first four cells of each row on phones,
     except the last row, which shows all six. */
  .hide-phone {
    display: none;
  }
}
