@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
}

:root {
  --color-bg: #fbfaf7; /* Legacy: replace after remaining pages are updated. */
  --color-surface: #ffffff;
  --color-surface-muted: #e9f2f9;
  --color-text: #1b325f;
  --color-muted: #6d675f; /* Legacy: replace after remaining pages are updated. */
  --color-line: #ded8cd; /* Legacy: replace after remaining pages are updated. */
  --color-primary: #8a1f22; /* Legacy: replace after remaining pages are updated. */
  --color-primary-dark: #641416; /* Legacy: replace after remaining pages are updated. */
  --color-header-action: #1b325f;
  --color-hero-button: #3a89c9;
  --color-hero-button-hover: #1b325f;
  --color-hero-button-text: #e9f2f9;
  --color-ink: #1b325f;
  --shadow-soft: 0 18px 50px rgba(27, 50, 95, 0.09);
  --radius: 8px;
  --container: 1120px;
}

/*
  Target palette: #1B325F, #3A89C9, #E9F2F9, #FFFFFF.
  Remove legacy direct colors in hero fallbacks and unit placeholders when their
  pages are redesigned. The transparent black hero overlay remains for text
  readability.
*/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 247, 0.94);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-weight: 700;
}

.brand img {
  width: 102px;
  height: auto;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  background: var(--color-surface);
  font: inherit;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-header-action);
  content: "";
}

.nav-toggle {
  flex-direction: column;
  gap: 4px;
}

.site-nav {
  display: none;
  position: absolute;
  inset: 72px 16px auto;
  padding: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.site-nav[data-open] {
  display: grid;
}

.site-nav a {
  color: var(--color-header-action);
  padding: 12px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 650;
}

.site-nav a:hover {
  background: var(--color-surface-muted);
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--color-line);
}

.language-switch span {
  padding: 6px 8px;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.language-switch .is-active {
  color: var(--color-header-action);
  font-weight: 700;
}

.hero {
  min-height: 74svh;
  display: grid;
  align-items: end;
  padding: 120px 0 32px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
    linear-gradient(135deg, #6f7f5a 0%, #a88765 55%, #503e33 100%);
}

.hero--homepage {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
    url("/assets/img/hero/homepage-hero-01-mobile.webp");
  background-position: center;
  background-size: cover;
}

.hero--pension {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
    url("/assets/img/hero/pension-hero-01-mobile.webp");
  background-position: center;
  background-size: cover;
}

.hero--ubytovna {
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
    url("/assets/img/hero/ubytovna-hero-02-mobile.webp");
  background-position: center;
  background-size: cover;
}

.hero--compact {
  min-height: 54svh;
}

.hero__content {
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 10vw, 3.8rem);
  line-height: 1.06;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  line-height: 1.14;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.lead {
  max-width: 660px;
  color: var(--color-muted);
  font-size: 1.08rem;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}

.button--secondary {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.12);
}

.hero--homepage .button {
  border-color: var(--color-hero-button);
  background: var(--color-hero-button);
  color: var(--color-hero-button-text);
}

.hero--homepage .button--secondary {
  border-color: var(--color-hero-button);
  background: var(--color-hero-button);
  color: var(--color-hero-button-text);
}

.hero--homepage .button:hover,
.hero--homepage .button:focus-visible {
  border-color: var(--color-hero-button-hover);
  background: var(--color-hero-button-hover);
  outline: 0;
}

.button--light {
  border-color: var(--color-line);
  background: var(--color-surface);
  color: var(--color-text);
}

.button--small {
  min-height: 42px;
  padding: 9px 13px;
  font-size: 0.95rem;
}

.section {
  padding: 56px 0;
}

.section--muted {
  background: var(--color-surface-muted);
}

.homepage main > section > .container {
  max-width: 760px;
}

.stack > *:last-child {
  margin-bottom: 0;
}

.choice-grid,
.unit-grid,
.gallery-grid,
.grid-two {
  display: grid;
  gap: 16px;
}

.choice-card,
.info-panel,
.unit-card {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.choice-card,
.info-panel {
  padding: 20px;
}

.choice-card p {
  color: var(--color-muted);
}

.feature-list,
.check-list {
  display: grid;
  gap: 18px 42px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  padding: 12px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 36px;
}

.feature-list img {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
}

.facts div {
  display: grid;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}

.facts dt {
  color: var(--color-muted);
  font-size: 0.86rem;
}

.facts dd {
  margin: 0;
  font-weight: 700;
}

.facts--panel {
  padding: 12px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}

.unit-card {
  overflow: hidden;
}

.unit-card--link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.unit-card--link:hover,
.unit-card--link:focus-visible {
  outline: 3px solid var(--color-hero-button);
  outline-offset: 3px;
}

.unit-card__body {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.unit-card__body h3 {
  margin-bottom: 0;
}

.unit-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.unit-card__facts {
  display: grid;
  gap: 4px;
  color: var(--color-text);
  font-size: 0.92rem;
}

.unit-card__facts p {
  margin: 0;
}

.unit-index main > section > .container {
  max-width: 760px;
}

.unit-index .lead,
.unit-index .facts dt {
  color: var(--color-text);
}

.unit-index .unit-card {
  border-color: var(--color-surface-muted);
}

.unit-index .facts div {
  padding: 0;
  border-bottom: 0;
}

.unit-index .image-placeholder {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.image-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(138, 31, 34, 0.12), rgba(111, 127, 90, 0.22)),
    #e5dfd2;
  color: var(--color-muted);
  font-weight: 800;
}

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

.gallery-item {
  min-height: 140px;
  display: grid;
  place-items: center;
  background: #e5dfd2;
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  color: var(--color-muted);
  font-weight: 750;
}

.unit-map {
  display: grid;
  gap: 22px;
}

.map-preview {
  margin: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.map-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.map-preview figcaption {
  padding: 12px 16px;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.location-block {
  display: grid;
  gap: 22px;
}

.location-block .lead {
  color: var(--color-text);
}

.transport-info {
  color: var(--color-text);
}

.transport-info a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.transport-info a:hover,
.transport-info a:focus-visible {
  color: var(--color-hero-button);
}

.location-map {
  display: block;
  overflow: hidden;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.location-map:hover,
.location-map:focus-visible {
  outline: 3px solid var(--color-hero-button);
  outline-offset: 3px;
}

.location-map img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.contact-block {
  background: var(--color-ink);
  color: #fff;
}

.contact-block .lead,
.contact-block .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.contact-links {
  display: grid;
  gap: 10px;
}

.contact-link {
  display: block;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 750;
}

.contact-block--homepage .contact-links {
  align-content: center;
  gap: 12px;
}

.contact-block--homepage {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.contact-block--homepage .lead {
  color: var(--color-text);
}

.contact-block--homepage .contact-link {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.contact-block--homepage [data-phone] {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 800;
}

.contact-block--homepage [data-email] {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-block--homepage .contact-link:hover,
.contact-block--homepage .contact-link:focus-visible {
  color: var(--color-hero-button);
}

.site-footer {
  padding: 28px 0;
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.site-footer a {
  color: #fff;
}

@media (min-width: 680px) {
  .actions {
    flex-direction: row;
  }

  .hero--homepage .actions .button {
    min-width: 210px;
    padding-inline: 28px;
  }

  .choice-grid,
  .grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .unit-map {
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.4fr);
    align-items: center;
  }

  .location-block {
    grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.45fr);
    align-items: center;
  }
}

@media (min-width: 940px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .site-nav a {
    padding: 10px 12px;
  }

  .language-switch {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--color-line);
    padding-left: 8px;
  }

  .hero {
    padding-bottom: 56px;
  }

  .hero--homepage {
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
      url("/assets/img/hero/homepage-hero-01-desktop.webp");
  }

  .hero--pension {
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
      url("/assets/img/hero/pension-hero-01-desktop.webp");
  }

  .hero--ubytovna {
    background-image:
      linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.62) 100%),
      url("/assets/img/hero/ubytovna-hero-02-desktop.webp");
    background-position: center;
  }

  .section {
    padding: 78px 0;
  }

  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .unit-index .unit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
