/* Kontakt — booking + address + map.
   Tokens, .section, .link-arrow live in styles.css. */

/* The header straddles two backdrops on this page: the cream column (left —
   logo + nav stay dark) and the portrait photo (right — the "Rezerviraj termin"
   CTA, shown ≥1024px). Over the photo's darker areas the default dark CTA text
   disappears, so make it light here — and flip it back to dark once the header
   gets its solid white bar on scroll. */
@media (min-width: 1024px) {
  .site-cta {
    color: var(--color-invert);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);   /* keeps it legible over the photo's lighter patches too */
  }
  html.header-solid .site-cta {
    color: var(--color-fg);
    text-shadow: none;
  }
}

.contact {
  padding-block: var(--space-7) var(--space-7);
}

.contact__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  gap: var(--space-7);
}

.contact__column {
  display: grid;
  gap: var(--space-7);
}

/* ---------- Booking card ---------- */
.contact__booking {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  text-align: center;
  padding-bottom: var(--space-6);
  /* the rule that separates this from the details below is the details box's
     own top border (see .contact__details) — not a border here. */
}

.contact__eyebrow {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: -0.04em;
  color: var(--color-fg-muted);
  margin: 0;
}

.contact__heading {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.625rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 0;
}

.contact__lead {
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 32ch;
}

/* Solid dark circle with a white arrow (Sketch: black Ellipse 3, 80×80). */
.contact__booking-cta {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid var(--color-fg);
  background: var(--color-fg);
  color: var(--color-invert);
  display: grid;
  place-items: center;
  margin-top: var(--space-5);
  transition: opacity 0.2s;
}

.contact__booking-cta svg { width: 26px; height: 16px; }

.contact__booking-cta:hover { opacity: 0.85; }

/* ---------- Details (address + hours) ---------- */
/* A bordered box: top + bottom rules, and a rule between the two groups
   (horizontal on mobile where they stack, vertical on desktop — see @media). */
.contact__details {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--color-line);
}
.contact__group:first-child { border-bottom: 1px solid var(--color-line); }

/* .contact__group is the bordered cell (stays padding-free so the rules line up
   exactly); .contact__group-body is the inner sub-element that carries the
   content's spacing. (The gap on .contact__group is a fallback for markup that
   doesn't wrap its content in a body.) */
.contact__group { display: flex; flex-direction: column; gap: var(--space-3); }
/* title at the top of the cell, the content block below it after a generous gap
   (on desktop justify-content:space-between in the @media rule pushes the
   content to the bottom of the tall cell — mirrors the Sketch). */
.contact__group-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding-block: var(--space-6);
}
.contact__group-content { display: grid; gap: var(--space-5); }

.contact__group-title {
  font-size: var(--fs-sm);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}

.contact__list,
.contact__hours {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  font-size: var(--fs-xs);
  line-height: 1.3;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.contact__list li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  align-items: baseline;
  gap: var(--space-2);
}

.contact__list a {
  color: inherit;
  text-decoration: none;
  /* Shrink-wrap to the text so the underline matches the text width, not the
     full 1fr grid column (default justify-self: stretch would span the column). */
  justify-self: start;
  /* Underline grows left → right on hover (animated background gradient). */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.3s ease;
}

.contact__list a:hover,
.contact__list a:focus-visible { background-size: 100% 1px; }

.contact__list-key {
  color: var(--color-fg-muted);
  font-style: italic;
}

/* Društvene mreže — 46px circles (same pattern as the homepage/footer icons);
   on the cream contact page the circle is white, matching the Sketch. */
.contact__social-icons {
  display: flex;
  gap: 17px;
  margin: 0;
}

.contact__social-icons a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-fg);
  display: grid;
  place-items: center;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.contact__social-icons a:hover {
  background: var(--color-fg);
  color: var(--color-invert);
}

.contact__social-icons svg { width: 18px; height: 18px; display: block; }

/* legacy static html/kontakt.html still renders plain text links here */
.contact__social {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.contact__social a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.3s ease;
}

.contact__social a:hover,
.contact__social a:focus-visible { background-size: 100% 1px; }

/* Hours render as a plain text block — one line per day ("DAY OD X — Y SATI"),
   one colour (no table, no muted time column). */

/* ---------- Portrait ---------- */
.contact__portrait {
  margin: 0;
  aspect-ratio: 375 / 468;
  overflow: hidden;
}

.contact__portrait img {
  display: block;
  width: 100%;
  height: 180%;
  margin-top: -40%;
  object-fit: cover;
  will-change: transform;
}

/* ---------- Map section ---------- */
.contact-map {
  padding-block: var(--space-7) 0;
}

.contact-map__intro {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--space-6);
  display: grid;
  gap: var(--space-5);
}

.contact-map__heading {
  font-size: clamp(3.75rem, 9vw, 8.125rem);   /* → 130px (Sketch) */
  line-height: 0.846;                          /* 110 / 130 */
  letter-spacing: -0.1em;                      /* kerning -13 */
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
}

.contact-map__address-line {
  font-size: var(--fs-md);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

.contact-map__address-body {
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 60ch;
  /* admin content sometimes arrives with &nbsp; between words — let it wrap
     instead of overflowing the column. */
  overflow-wrap: anywhere;
}
.contact-map__address-body > :first-child { margin-top: 0; }
.contact-map__address-body > :last-child { margin-bottom: 0; }

.contact-map__media {
  margin: 0;
  aspect-ratio: 375 / 320;
  overflow: hidden;
}

.contact-map__media img {
  display: block;
  width: 100%;
  height: 180%;
  margin-top: -40%;
  object-fit: cover;
  will-change: transform;
}
.contact-map__media iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Approximate the design's light-monochrome look on Google's default tiles.
     Filter affects ALL iframe contents (controls, attribution, marker). */
  filter: grayscale(1) contrast(1.05) brightness(1.05);
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  /* Full-bleed 2-column band — cream left (booking + details), portrait right
     reaching the viewport edge and the top of the page (Sketch Rectangle 5832
     spans x 720→1440, y 0→900). The page bg (cream) shows through the left. */
  .contact { padding: 0; }

  .contact__inner {
    max-width: none;
    margin-inline: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0;
    align-items: stretch;
  }

  .contact__column {
    padding: clamp(6rem, 12vw, 10rem) var(--gutter) var(--space-9);
    gap: var(--space-8);
    align-content: start;
  }

  .contact__booking {
    align-items: center;
    padding-bottom: var(--space-8);
  }

  .contact__heading {
    font-size: clamp(2rem, 4vw, 2.625rem);
  }

  /* Details = a bordered 2-column box (Sketch: top + bottom rules + a centre
     divider; Line 97 at the midpoint x=365). The rules are flush — the cells
     carry no padding; the inner .contact__group-body provides the spacing.
     The group-to-group rule is vertical here (it's horizontal on mobile). */
  .contact__details {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0;
    align-items: stretch;
  }
  .contact__group:first-child {
    border-bottom: 0;
    border-right: 1px solid var(--color-line);
  }
  .contact__group-body {
    justify-content: space-between;   /* title up top, content block down low */
  }
  .contact__group:first-child .contact__group-body { padding-right: var(--space-6); }
  .contact__group:last-child  .contact__group-body { padding-left: var(--space-6); }

  .contact__portrait {
    aspect-ratio: 720 / 900;   /* fallback; height:100% (stretch) drives it */
    align-self: stretch;
    height: 100%;
  }

  /* "Kako do nas ?" band — cream heading left, white address block right
     (Sketch Rectangle 5864 spans x 720→1440, y 900→1258), then the
     full-width map below. */
  .contact-map { padding: 0; }

  .contact-map__intro {
    max-width: none;
    margin-inline: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 0;
    align-items: stretch;
  }

  .contact-map__heading {
    padding: clamp(5rem, 9vw, 7.5rem) var(--gutter) var(--space-7);
    margin: 0;
  }

  .contact-map__address {
    background: #fff;
    padding: clamp(5rem, 9vw, 7.5rem) var(--gutter) var(--space-7);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-7);
  }

  .contact-map__media {
    aspect-ratio: 1440 / 540;
  }
}

/* ---------- Compare map (Leaflet + OSM, below the Google embed) ---------- */
.contact-map-osm {
  background: var(--color-bg);
}
.contact-map-osm__label {
  margin: 0;
  padding: var(--space-3) var(--gutter);
  text-align: center;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  color: var(--color-fg-muted);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.contact-map-osm__container {
  width: 100%;
  aspect-ratio: 375 / 320;
  background: #ddd;
}
@media (min-width: 1024px) {
  .contact-map-osm__container {
    aspect-ratio: 1440 / 400;
  }
}
/* Leaflet creates child layers; make sure they fit the container box. */
.contact-map-osm__container .leaflet-container {
  width: 100%;
  height: 100%;
}
