:root {
  --bg: #f5f7fb;
  --bg-soft: #fafcff;
  --text: #152033;
  --text-soft: #46546c;
  --muted: #6f7c91;
  --line: #d9e3f0;
  --line-strong: #c8d7ea;
  --white: #ffffff;
  --primary: #0a5adf;
  --primary-dark: #0847b1;
  --primary-soft: #eaf2ff;
  --accent: #ffb700;
  --green: #137333;
  --green-soft: #ecfdf3;
  --red: #c5221f;
  --red-soft: #fef3f2;
  --amber: #b26a00;
  --amber-soft: #fff7e6;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, .05);
  --shadow: 0 18px 40px rgba(15, 23, 42, .09);
  --shadow-lg: 0 28px 80px rgba(15, 23, 42, .18);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius: 22px;
  --radius-lg: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #eef3fb 0%, #f5f7fb 100%);
  color: var(--text);
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.container {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 66, 180, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff, #d7e8ff);
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

.brand-copy strong {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.03em;
}

.brand-copy span {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav a {
  color: rgba(255,255,255,.9);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  transition: .2s ease;
}

.topnav a:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #0a5adf;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(8, 53, 145, .38), rgba(8, 53, 145, .58)),
    url("https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1800&auto=format&fit=crop") center/cover no-repeat;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.16), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(255,183,0,.16), transparent 18%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  padding: 60px 0 110px;
}

.hero-content {
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255,255,255,.82);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: 12px;
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.hero-text {
  margin: 0;
  max-width: 700px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(255,255,255,.88);
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-features span {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Search dock */
.search-dock {
  position: relative;
  margin-top: 36px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(8, 24, 66, .24);
  border: 4px solid var(--accent);
  padding: 18px;
}

.search-form {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: span 1;
}

.field-destination {
  grid-column: span 2;
}

.field-hotel {
  grid-column: span 2;
}

.field-submit {
  grid-column: span 1;
}

.field label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-soft);
}

.field input,
.field select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0 14px;
  outline: none;
  transition: .2s ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(10,90,223,.55);
  box-shadow: 0 0 0 4px rgba(10,90,223,.10);
}

.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.child-age-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hidden { display: none !important; }

.btn {
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  transition: .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1e77ff);
  color: #fff;
  box-shadow: 0 14px 28px rgba(10,90,223,.20);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-color: rgba(10,90,223,.2);
}

.btn-search {
  width: 100%;
  min-height: 56px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  font-size: 18px;
  line-height: 1;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.quick-links a {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

/* Partner strip */
.partner-strip {
  position: relative;
  margin-top: -48px;
  z-index: 2;
}

.partner-strip-inner {
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  backdrop-filter: blur(10px);
}

.partner-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
  white-space: nowrap;
}

.partner-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.partner-logos span {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f4f8ff;
  border: 1px solid #dce7fb;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
}

/* Shared sections */
.discover-section,
.themes-section,
.promo-section {
  padding: 42px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head.compact {
  margin-bottom: 18px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.section-text {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

/* Destination grid */
.destination-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 16px;
}

.destination-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #dbe8f6;
}

.destination-tall {
  grid-row: span 2;
  min-height: 520px;
}

.destination-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.destination-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(12, 25, 44, .72) 100%);
}

.destination-card-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
}

.destination-card-content strong {
  display: block;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.destination-card-content span {
  display: block;
  color: rgba(255,255,255,.88);
  line-height: 1.5;
  font-size: 14px;
}

/* Themes */
.theme-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.theme-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition: .2s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
}

.theme-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.theme-card strong {
  display: block;
  padding: 16px 16px 6px;
  font-size: 18px;
  letter-spacing: -.02em;
}

.theme-card span {
  display: block;
  padding: 0 16px 18px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

/* Promo */
.promo-banner {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 20px;
  background: linear-gradient(135deg, #0d4fd1, #1a75ff);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.promo-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.promo-copy p:last-child {
  margin: 0;
  color: rgba(255,255,255,.88);
  line-height: 1.7;
}

.promo-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: center;
}

.promo-chip {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 34px 0 12px;
}

.toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toolbar-left strong {
  font-size: 20px;
  letter-spacing: -.02em;
}

#searchMeta {
  color: var(--muted);
  font-size: 14px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.toolbar-right label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
}

.toolbar-right select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: white;
}

/* Results layout */
.results-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-bottom: 42px;
}

.sidebar {
  position: sticky;
  top: 98px;
}

.panel {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel h3 {
  margin: 0;
  font-size: 18px;
}

.panel-badge {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.filter-group + .filter-group {
  margin-top: 18px;
}

.filter-title {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-soft);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: var(--text-soft);
  font-size: 14px;
}

.filter-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.filter-group input[type="number"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  outline: none;
}

.results-main {
  min-width: 0;
}

/* Status */
.status-box {
  min-height: 62px;
  display: flex;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(217,227,240,.95);
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  color: var(--text-soft);
}

.status-box.info {
  border-color: rgba(10,90,223,.18);
  background: rgba(234,242,255,.92);
  color: var(--primary-dark);
}

.status-box.success {
  border-color: rgba(19,115,51,.18);
  background: rgba(236,253,243,.96);
  color: var(--green);
}

.status-box.warning {
  border-color: rgba(178,106,0,.18);
  background: rgba(255,247,230,.96);
  color: var(--amber);
}

.status-box.error {
  border-color: rgba(197,34,31,.18);
  background: rgba(254,243,242,.96);
  color: var(--red);
}

/* Skeleton */
.loading-skeleton-grid {
  display: none;
  gap: 18px;
  margin-bottom: 18px;
}

.loading-skeleton-grid.is-active {
  display: grid;
}

.skeleton-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, #eef3f9 25%, #f8fbff 50%, #eef3f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 14px;
}

.skeleton-image {
  min-height: 240px;
}

.skeleton-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 4px;
}

.skeleton-line { height: 18px; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-56 { width: 56%; }
.w-60 { width: 60%; }
.w-70 { width: 70%; }
.w-74 { width: 74%; }
.w-90 { width: 90%; }
.w-92 { width: 92%; }
.w-100 { width: 100%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Results cards */
.results-list {
  display: grid;
  gap: 18px;
}

.hotel-card {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(217,227,240,.95);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: .2s ease;
}

.hotel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 54px rgba(15,23,42,.12);
}

.hotel-media {
  overflow: hidden;
  border-radius: 20px;
  background: #edf3fa;
  min-height: 250px;
}

.hotel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hotel-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hotel-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.hotel-top h3 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.hotel-meta {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}

.hotel-address {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.price-box {
  flex: 0 0 auto;
  min-width: 190px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fbff, #edf5ff);
  border: 1px solid #d8e8ff;
}

.price-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  font-weight: 700;
}

.price-box strong {
  display: block;
  font-size: 28px;
  color: var(--primary-dark);
  letter-spacing: -.03em;
}

.hotel-desc {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.75;
  font-size: 15px;
}

.room-preview {
  display: grid;
  gap: 10px;
}

.room-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #fbfdff;
  border-radius: 16px;
}

.room-line strong {
  font-size: 15px;
}

.room-line-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  text-align: right;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge-ok {
  background: var(--green-soft);
  color: var(--green);
}

.badge-warn {
  background: var(--amber-soft);
  color: var(--amber);
}

.badge-danger {
  background: var(--red-soft);
  color: var(--red);
}

.hotel-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

/* Modal */
.modal.hidden {
  display: none !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 15, 32, 0.58);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 10000;
  width: min(1160px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  margin: 12px auto;
  background: #fff;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.94);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  z-index: 2;
}

.modal-empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  background: var(--bg-soft);
  border-radius: 14px;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#reservationSummaryBox {
  scrollbar-width: thin;
}

/* Responsive */
@media (max-width: 1220px) {
  .search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-destination,
  .field-hotel,
  .field-submit,
  .field-wide {
    grid-column: 1 / -1;
  }

  .destination-grid,
  .theme-cards,
  .promo-banner,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .destination-tall {
    min-height: 300px;
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .partner-strip {
    margin-top: 0;
    padding-top: 20px;
  }

  .partner-strip-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hotel-card,
  .skeleton-card {
    grid-template-columns: 1fr;
  }

  .hotel-media,
  .skeleton-image {
    min-height: 240px;
  }

  .hotel-top {
    flex-direction: column;
  }

  .price-box {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 20px, 1380px);
  }

  .topnav {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 36px 0 50px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .search-dock {
    margin-top: 26px;
    border-width: 3px;
    padding: 14px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-right {
    justify-content: space-between;
  }

  .room-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-line-right {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .booking-grid,
  .child-age-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    width: min(100% - 14px, 1160px);
    margin: 7px auto;
    max-height: calc(100vh - 14px);
    border-radius: 22px;
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .brand-badge {
    width: 42px;
    height: 42px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero-text,
  .section-text {
    font-size: 14px;
  }

  .hero-features {
    gap: 8px;
  }

  .hero-features span,
  .quick-links a {
    font-size: 11px;
  }

  .theme-card img {
    height: 160px;
  }
}