@font-face {
  font-family: "PT Sans Local";
  src: url("/static/fonts/PTSans/PTSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Sans Local";
  src: url("/static/fonts/PTSans/PTSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f8f5ee;
  --panel: #ffffff;
  --ink: #2c2a26;
  --muted: #7d786f;
  --accent: #c8aa6e;
  --line: rgba(128, 112, 83, 0.2);
  --btn-bg: #4ab0ff;
  --btn-text: #d6effc;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

/* h1, h2, h3, h4 { font-family: "Playfair Display", serif; letter-spacing: 0.02em; margin: 0 0 14px; color: #191814; } */
a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1240px, 93vw);
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.muted {
  color: var(--muted);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1200;
  background: rgba(12, 14, 18, 0.14);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(14, 16, 20, 0.62);
  border-bottom: 1px solid rgba(255, 255, 255, .24);
}

.site-header .main-nav,
.site-header .brand {
  color: #fff;
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
  color: #141414;
  font-size: 20px;
}

.brand-logo {
  height: 46px;
}

.main-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  color: #fff;
}

.main-nav a {
  position: relative;
  padding-bottom: 4px;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  /* background: var(--accent); */
  background: #47affd;
  transform: translateX(-50%);
  transition: width .28s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.admin-link {
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(8, 8, 8, .15);
}

.lang-select-wrap select {
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(8, 8, 8, .15);
  color: #fff;
  width: 58px;
}

.login-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid #3ea4f2;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .25s ease, box-shadow .25s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(74, 176, 255, 0.35);
  filter: brightness(1.03);
}

.btn-small {
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 12px;
  margin-right: 4px;
  margin-top: 4px;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.parallax-section {
  background-attachment: fixed;
}

.slides {
  position: absolute;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .65s ease-in-out;
  background-size: cover;
  background-position: center;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(9, 10, 12, 0.7) 0%, rgba(9, 10, 12, 0.45) 45%, rgba(9, 10, 12, 0.65) 100%);
}

.slide.active {
  opacity: 1;
}

.overlay {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  max-width: 700px;
  color: #fff;
}

.overlay h1 {
  font-size: clamp(38px, 5vw, 72px);
  color: #fff;
}

.overlay p {
  color: #f1ede4;
  max-width: 540px;
}

.hero-search {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: 36px;
  width: min(1080px, 93vw);
}

.search-grid {
  background: rgba(15, 17, 20, 0.46);
  border: 1px solid rgba(240, 223, 191, 0.35);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.filters,
.admin-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.check-inline input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  background: #fff;
  color: #2f2a23;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.intro-lux {
  position: relative;
}

.intro-lux::before {
  content: "";
  position: absolute;
  left: -6vw;
  top: 24px;
  width: 40vw;
  height: 220px;
  background: radial-gradient(circle, rgba(200, 170, 110, .18), transparent 72%);
  pointer-events: none;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 18px;
  margin-top: 20px;
}

.catalog-list-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.apartment-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}

.apartment-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(145, 126, 96, 0.2);
}

.apartment-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.apartment-card-body {
  padding: 14px;
  display: grid;
  gap: 8px;
  grid-template-rows: auto 28px auto auto auto 44px;
  align-items: center;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.old-price {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 13px;
}

.availability-badge {
  display: inline-block;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  min-width: 112px;
  text-align: center;
}

.availability-badge.available {
  background: rgba(42, 157, 75, .18);
  color: #1b6f34;
  border: 1px solid rgba(42, 157, 75, .35);
}

.availability-badge.unavailable {
  background: rgba(200, 68, 68, .15);
  color: #9a2525;
  border: 1px solid rgba(200, 68, 68, .3);
}

.map-box {
  background: #f9f9f7;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  min-height: 520px;
}

#catalog-map,
#apartment-map {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.custom-map-dot span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: block;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

.apartment-detail .gallery-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 20px;
}

.apartment-detail .gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform .3s ease;
}

.gallery-zoom-trigger {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: zoom-in;
}

.apartment-detail .gallery-grid img:hover {
  transform: scale(1.02);
}

.apartment-main {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 360px;
  align-items: start;
}

.booking-widget,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.booking-form {
  display: grid;
  gap: 10px;
}

.price {
  font-size: 22px;
  color: #aa8642;
}

.amenities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
}

.amenities li {
  background: rgba(200, 170, 110, .13);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 6px 10px;
  font-size: 13px;
}

.booking-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.booking-result.success {
  background: rgba(42, 120, 86, 0.16);
}

.booking-result.error {
  background: rgba(158, 60, 60, 0.12);
}

.steps-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.steps-grid>div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 40px 0;
  color: #d0d0d0;
  background: #202020;
}

.site-footer h4 {
  color: #f2f2f2;
}

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

.footer-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}

.admin-body {
  background: #f4f1eb;
  color: #2d2a25;
}

.admin-body main {
  padding-top: 92px;
}

.admin-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: 240px 1fr;
}

.admin-menu {
  display: grid;
  gap: 10px;
  align-content: start;
}

.admin-menu a {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 10px;
}

.admin-menu a:hover {
  border-color: var(--accent);
  color: #7a5b23;
}

.kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.admin-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.photo-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.photo-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 8px;
}

.login-card {
  width: min(420px, 92vw);
  margin: 12vh auto 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: grid;
  gap: 10px;
}

.error-text {
  color: #b43d3d;
}

.apartment-card .btn {
  text-align: center;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
}

.apartment-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
}

.amenities-editor {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.drag-handle {
  cursor: move;
  user-select: none;
  color: #7d786f;
  font-weight: 700;
  width: 24px;
  text-align: center;
}

tr[data-draggable-row].dragging {
  opacity: 0.5;
  background: rgba(74, 176, 255, 0.12);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2200;
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox-inner {
  position: relative;
  width: min(1100px, 95vw);
  height: min(90vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-inner img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}

.image-lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

.booking-row.booking-pending {
  background: rgba(255, 215, 64, 0.2);
}

.booking-row.booking-canceled {
  background: rgba(231, 76, 60, 0.16);
}

.booking-row.booking-confirmed {
  background: rgba(46, 204, 113, 0.18);
}

.booking-history-inline {
  margin-top: 10px;
  color: #5d574f;
}

.invalid-field {
  border: 1px solid #d84242 !important;
  box-shadow: 0 0 0 1px rgba(216, 66, 66, .2);
}

.page-hero {
  min-height: 42vh;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.page-hero-overlay {
  min-height: 42vh;
  display: flex;
  align-items: center;
  background: rgba(18, 20, 25, 0.55);
  color: #fff;
}

.page-hero h1 {
  color: #fff;
}

.pdf-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.pdf-modal.open {
  display: flex;
}

.pdf-modal-inner {
  width: min(1024px, 95vw);
  height: min(90vh, 760px);
  background: #fff;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

#pdf-modal-frame {
  width: 100%;
  height: 100%;
  border: 0;
}

.pdf-modal-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

@media (max-width: 980px) {

  .catalog-layout,
  .apartment-main,
  .admin-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  #catalog-map,
  #apartment-map {
    min-height: 360px;
  }

  .main-nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}