:root {
  --ink: #141d23;
  --muted: #56616b;
  --primary: #064d9b;
  --primary-dark: #003f87;
  --blue-soft: #eaf3ff;
  --line: #dce3ea;
  --surface: #f6faff;
  --filter-bar-height: 128px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: white;
  background: #173348 url("https://www.destino.foz.br/wp-content/uploads/2025/03/cataratas-do-iguacu-002.webp") center 30% / cover no-repeat;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #0718232e, #071b2ad1);
}
.page-hero__content {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1128px);
  margin: 0 auto;
  padding: 32px 0 34px;
}
.page-hero__brand { display: inline-block; margin-bottom: 28px; }
.page-hero__brand img {
  display: block;
  width: 166px;
  max-width: 48vw;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 4px 12px #00000038);
}
.page-hero__text { max-width: 690px; }
.page-hero__eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  padding: 7px 12px;
  border: 1px solid #ffffff4d;
  border-radius: 999px;
  background: #ffffff29;
  backdrop-filter: blur(5px);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.page-hero h1 {
  margin: 0 0 8px;
  max-width: none;
  color: white;
  font-size: clamp(36px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-shadow: 0 2px 12px #00000047;
}
.page-hero p { margin: 0; font-size: 15px; line-height: 1.5; text-shadow: 0 1px 5px rgba(0,0,0,.35); }

.overview {
  position: relative;
  z-index: 4;
  width: min(100% - 40px, 1128px);
  margin: -23px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}
.overview-card {
  min-height: 78px;
  padding: 14px 15px;
  border: 1px solid #d5dee7;
  border-radius: 9px;
  background: #fffffffa;
  box-shadow: 0 7px 20px rgba(24, 48, 68, .08);
}
.overview-card span { display: block; margin-bottom: 7px; color: #6a7c8e; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.overview-card strong { color: #293f55; font-size: 25px; line-height: 1; }
.overview + .filter-bar { margin-top: 18px; }

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid #78aef2;
  outline-offset: 2px;
}

.filter-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fffffff5;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  display: grid;
  gap: 12px;
}

.filter-search-row {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 32px 0;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

.mobile-filter-trigger,
.active-filter-chips,
.mobile-filter-sheet,
.filter-sheet-backdrop { display: none; }

.filter-scroll {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 32px 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-scroll::-webkit-scrollbar { display: none; }

.filter {
  border: 1px solid #d7e1ec;
  border-radius: 999px;
  padding: 10px 16px;
  color: #45515d;
  background: #f3f7fb;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
  transition: .2s ease;
}
.filter:hover { background: #e8f0f9; transform: translateY(-1px); }
.filter.active {
  background: #c8ddff;
  border-color: #a9c9f8;
  color: #06427e;
  box-shadow: 0 2px 7px #0a417d14;
}
.divider { width: 1px; height: 28px; flex: 0 0 1px; background: var(--line); margin: 0 4px; }
.region-filter,
.classification-filter {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  white-space: nowrap;
}
.region-filter select,
.classification-filter select {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  outline: none;
}
.classification-filter { display: none; }
.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #d7e1ec;
  border-radius: 999px;
  background: white;
  min-width: 320px;
  max-width: 560px;
  width: 100%;
}

.filter-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
}

.workspace {
  min-height: calc(100vh - var(--filter-bar-height));
  display: grid;
  grid-template-columns: minmax(610px, 1.25fr) minmax(410px, .75fr);
  max-width: 1800px;
  margin: auto;
}

.catalog { padding: 46px 34px 64px 52px; }
.catalog-header { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 22px; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 3.4vw, 54px);
  line-height: 1.06;
  letter-spacing: -.045em;
}
.subtitle { margin: 12px 0 0; color: var(--muted); font-size: 18px; line-height: 1.5; }
.subtitle strong { color: var(--ink); }
.sort { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.sort select { border: 0; background: transparent; color: var(--primary); font-weight: 800; }
.result-count { margin: 0 0 14px; color: #66727d; font-size: 13px; }

.mobile-search { display: none; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #c2c6d48c;
  border-radius: 16px;
  box-shadow: 0 2px 7px #16273a12;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px #16273a21; }
.image-wrap { position: relative; aspect-ratio: 4 / 2.7; overflow: hidden; background: #dfe9f3; }
.card-image-link { position: absolute; z-index: 1; inset: 0; display: block; }
.image-wrap img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.card:hover .image-wrap img { transform: scale(1.045); }
.image-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: grid; place-items: center; font-size: 54px; background: linear-gradient(145deg,#d9eaff,#edf7ff); }
.badge {
  position: absolute;
  z-index: 2;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 68px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 6px 10px;
  color: white;
  background: #004b96e6;
  backdrop-filter: blur(5px);
  font-size: 11px;
  font-weight: 750;
}
.favorite {
  position: absolute;
  z-index: 2;
  top: 11px;
  right: 11px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff80;
  border-radius: 50%;
  background: #0f203052;
  color: white;
  font-size: 24px;
  line-height: 1;
  backdrop-filter: blur(7px);
}
.favorite.selected { color: #ff5b67; background: #ffffffeb; }
.card-content { padding: 16px; }
.location { margin: 0 0 7px; color: var(--primary); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.card h2 { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; }
.card-title-link { color: inherit; text-decoration: none; }
.card-title-link:hover { color: var(--primary); }
.description {
  margin: 9px 0 14px;
  min-height: 60px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* Standard property for compatibility */
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta-row { border-top: 1px solid #edf0f3; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meta-row > span { min-width: 0; color: #4b5762; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta-row button { border: 0; background: none; color: var(--primary); font-size: 12px; font-weight: 800; white-space: nowrap; }
.meta-row button i { margin-left: 2px; font-size: 13px; }
.detail-link { margin-top: 12px; display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 13px; font-weight: 800; text-decoration: none; }
.detail-link:hover { text-decoration: underline; }

.load-more {
  display: block;
  margin: 38px auto 0;
  padding: 12px 28px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  background: transparent;
  font-weight: 750;
}
.load-more:hover { background: var(--blue-soft); }
.status { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); }
.status.error { color: #a31b24; }

.map-panel {
  position: sticky;
  top: var(--filter-bar-height);
  height: calc(100vh - var(--filter-bar-height));
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #dfe8ef;
}
.map-panel .map {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.map-search {
  position: absolute;
  z-index: 1100;
  top: 18px;
  left: 58px;
  right: 18px;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid #707f8e47;
  border-radius: 13px;
  background: #fffffff5;
  box-shadow: 0 7px 22px #16273a29;
}
.map-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; }
.map-search button { border: 0; background: none; color: #52606c; font-size: 22px; }
.nearby-button {
  display: none;
  position: absolute;
  z-index: 1100;
  top: 76px;
  left: 58px;
  border: 1px solid #707f8e47;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--primary);
  background: #fffffff5;
  box-shadow: 0 5px 16px #16273a29;
  font-size: 13px;
  font-weight: 750;
}
.nearby-button.active { color: white; background: var(--primary); }
.nearby-button:disabled { cursor: wait; opacity: .75; }
.map-status {
  position: absolute;
  z-index: 1200;
  inset: 50% auto auto 50%;
  width: min(320px, calc(100% - 40px));
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #fffffff2;
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 28px #16273a2e;
}
.map-status[hidden] { display: none; }
.map-card {
  position: absolute;
  z-index: 1100;
  left: 18px;
  right: 18px;
  bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  max-height: calc(100% - 110px);
  overflow-y: auto;
  border-radius: 14px;
  background: #fffffff7;
  box-shadow: 0 8px 28px #16273a2e;
}
.map-card[hidden] { display: none; }
.map-card-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #52606c;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}
.map-card-close:hover { background: #eaf0f6; color: var(--ink); }
.map-card-info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.map-card small { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.map-card strong { margin: 3px 28px 0 0; font-size: 16px; }
.map-card-info > span { margin-top: 3px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: 32px;
}
.map-card-actions a {
  border-radius: 999px;
  padding: 10px 13px;
  color: white;
  background: var(--primary);
  text-align: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}
.map-card-actions a[hidden] { display: none; }
.map-card-actions #ticket-link { background: #27ae60; }
.selected-details {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  margin-top: 12px;
}
.selected-details .contact-row {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}
.selected-details .contact-phones,
.selected-details .contact-icons {
  flex-flow: row nowrap;
}
.selected-details a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.selected-details .contact-phone {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 9px;
  max-width: 220px;
  margin-right: 5px;
  font-size: 14px;
  line-height: 1.55;
  white-space: nowrap;
}
.selected-details .contact-phone i {
  margin-top: 4px;
  font-size: 16px;
}
.selected-details .contact-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #465d73;
  font-size: 17px;
}
.selected-details .contact-icon:hover,
.selected-details .contact-icon:focus-visible {
  color: var(--primary);
  background: var(--blue-soft);
}
.selected-details .contact-phone:hover { color: #0878d1; }
.selected-details .contact-empty { color: var(--muted); font-size: 11px; }
.selected-marker-icon {
  border: 0;
  background: transparent;
}
.selected-marker-icon i {
  display: block;
  color: #dc2626;
  font-size: 40px;
  line-height: 40px;
  text-align: center;
  -webkit-text-stroke: 2px white;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.38));
}
.map-fab { display: none; }
.map-fab[hidden] { display: none; }
.back-to-top {
  position: fixed;
  z-index: 21;
  right: 18px;
  bottom: 76px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d3deea;
  border-radius: 999px;
  padding: 11px 15px;
  color: var(--primary);
  background: #fffffff5;
  box-shadow: 0 6px 20px #16273a29;
  font-size: 13px;
  font-weight: 750;
}
.back-to-top[hidden] { display: none; }

@media (max-width: 1260px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { gap: 8px; }
  .filter-search-row {
    padding: 12px 18px 0;
  }
  .filter-search {
    flex: 1 1 0;
    width: 0;
    display: flex;
    max-width: none;
    min-width: 0;
    min-height: 46px;
  }
  .filter-search input { font-size: 16px; }
  .filter-scroll { display: none; }
  .mobile-filter-trigger {
    flex: 0 0 auto;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    padding: 0 15px;
    color: var(--primary);
    background: white;
    font-weight: 800;
  }
  .mobile-filter-trigger.active { color: white; background: var(--primary); }
  .mobile-filter-trigger strong {
    min-width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--primary);
    background: white;
    font-size: 11px;
  }
  .active-filter-chips {
    padding: 0 18px 12px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .active-filter-chips[hidden] { display: none; }
  .active-filter-chips::-webkit-scrollbar { display: none; }
  .active-filter-chips button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #b9d0eb;
    border-radius: 999px;
    padding: 7px 11px;
    color: #06427e;
    background: var(--blue-soft);
    font-size: 12px;
    font-weight: 700;
  }
  .filter-sheet-backdrop {
    position: fixed;
    z-index: 1400;
    inset: 0;
    display: block;
    background: #0d203566;
  }
  .filter-sheet-backdrop[hidden],
  .mobile-filter-sheet[hidden] { display: none; }
  .mobile-filter-sheet {
    position: fixed;
    z-index: 1500;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    max-height: min(86dvh, 680px);
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 8px 20px max(20px, env(safe-area-inset-bottom));
    background: white;
    box-shadow: 0 -12px 36px #10243838;
  }
  .filter-sheet-handle {
    width: 42px;
    height: 4px;
    margin: 2px auto 10px;
    border-radius: 999px;
    background: #cbd5df;
  }
  .filter-sheet-header { display: flex; align-items: center; justify-content: space-between; }
  .filter-sheet-header h2 { margin: 0; font-size: 20px; }
  .filter-sheet-header button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #465664;
    background: #eef3f7;
    font-size: 20px;
  }
  .filter-sheet-content { display: grid; gap: 18px; margin-top: 22px; }
  .sheet-field { display: grid; gap: 8px; color: var(--ink); font-size: 13px; font-weight: 800; }
  .sheet-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cdd9e4;
    border-radius: 12px;
    padding: 0 13px;
    color: #344454;
    background: white;
    font-size: 16px;
  }
  .sheet-favorites {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #cdd9e4;
    border-radius: 12px;
    padding: 0 14px;
    color: #344454;
    background: white;
    font-weight: 750;
  }
  .sheet-favorites.active { border-color: #a9c9f8; color: var(--primary); background: var(--blue-soft); }
  .filter-sheet-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 24px; }
  .filter-sheet-actions button { min-height: 48px; border-radius: 12px; padding: 0 16px; font-weight: 800; }
  .sheet-clear { border: 1px solid #cdd9e4; color: #465664; background: white; }
  .sheet-apply { border: 0; color: white; background: var(--primary); }
  body.filter-sheet-open { overflow: hidden; }
  .workspace { display: block; min-height: auto; }
  .catalog { padding: 34px 20px 80px; }
  .map-panel {
    position: relative;
    top: 0;
    height: calc(100dvh - var(--filter-bar-height));
    min-height: 420px;
    border: 0;
  }
  .nearby-button { display: flex; align-items: center; gap: 7px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-fab {
    display: block;
    position: fixed;
    z-index: 20;
    right: 18px;
    bottom: 18px;
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    color: white;
    background: var(--primary);
    box-shadow: 0 7px 22px #002d6447;
    font-weight: 750;
  }
  .mobile-search { display: none; }
}

@media (max-width: 640px) {
  .page-hero { min-height: 300px; }
  .page-hero__content { width: min(100% - 28px, 1128px); padding-bottom: 42px; }
  .page-hero__brand { margin-bottom: 22px; }
  .page-hero__brand img { width: 140px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero p { font-size: 14px; }
  .overview { width: min(100% - 24px, 1128px); margin-top: -26px; gap: 9px; }
  .overview-card { min-height: 72px; padding: 12px; }
  .overview-card span { font-size: 9px; }
  .overview-card strong { font-size: 22px; }
  .filter-search-row { padding: 10px 12px 0; }
  .filter-search {
    padding-inline: 12px;
    border-radius: 12px;
  }
  .active-filter-chips { padding: 0 12px 10px; }
  .filter {
    min-height: 42px;
    padding: 9px 13px;
  }
  .catalog-header { display: block; }
  .sort { margin-top: 18px; justify-content: flex-end; }
  .cards { grid-template-columns: 1fr; }
  h1 { font-size: 38px; }
  .subtitle { font-size: 16px; }
  .region-filter > i,
  .classification-filter > i { display: none; }
  .mobile-filter-trigger span { display: inline; }
  .back-to-top { width: 46px; height: 46px; justify-content: center; padding: 0; }
  .back-to-top span { display: none; }
  .map-card { align-items: stretch; flex-direction: column; }
  .map-card-actions {
    align-self: flex-start;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
