/* Stay Bà Rịa — main styles
   Palette: stone light + deep teal (lodging, not cream/orange pet) */

:root {
  --sb-bg: #f3f1ec;
  --sb-bg-elev: #fffcf7;
  --sb-ink: #2c2a28;
  --sb-ink-muted: #5c5752;
  --sb-accent: #0f5c5a;
  --sb-accent-hover: #0a4543;
  --sb-accent-soft: #d8ebe9;
  --sb-line: #ddd6cb;
  --sb-badge-type: #0f5c5a;
  --sb-badge-area: #4a5d4e;
  --sb-radius: 14px;
  --sb-radius-sm: 10px;
  --sb-shadow: 0 8px 28px rgba(44, 42, 40, 0.08);
  --sb-font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sb-font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --sb-header-h: 4rem;
  --sb-max: 72rem;
  --sb-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sb-font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--sb-ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 92, 90, 0.08), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(74, 93, 78, 0.07), transparent 55%),
    var(--sb-bg);
  min-height: 100vh;
}

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

a {
  color: var(--sb-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sb-accent-hover);
}

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.6rem 1rem;
  background: var(--sb-ink);
  color: #fff;
  border-radius: 999px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--sb-bg-elev) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--sb-line) 70%, transparent);
}

.site-header__inner {
  max-width: var(--sb-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--sb-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  text-decoration: none;
  color: var(--sb-ink);
}

.site-brand__name {
  font-family: var(--sb-font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
}

.site-nav__list a {
  color: var(--sb-ink);
  text-decoration: none;
  font-weight: 500;
}

.site-nav__list a:hover {
  color: var(--sb-accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--sb-line);
  background: var(--sb-bg-elev);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font: inherit;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--sb-header-h);
    left: 0;
    right: 0;
    background: var(--sb-bg-elev);
    border-bottom: 1px solid var(--sb-line);
    padding: 1rem 1.25rem 1.25rem;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--sb-ease), background 0.2s ease, color 0.2s ease;
}

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

.btn--primary {
  background: var(--sb-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--sb-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: color-mix(in srgb, #fff 55%, transparent);
  color: #fff;
}

.btn--ghost:hover {
  background: color-mix(in srgb, #fff 12%, transparent);
  color: #fff;
}

.btn--small {
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
  background: var(--sb-accent);
  color: #fff;
}

.text-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--sb-accent);
}

.text-link:hover {
  text-decoration: underline;
}

/* Hero */

.hero {
  position: relative;
  min-height: calc(100svh - var(--sb-header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(15, 40, 38, 0.55), rgba(15, 92, 90, 0.35)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cpath fill='%23ffffff' fill-opacity='0.04' d='M0 80h160v2H0zM80 0v160h2V0z'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #1a4a48 0%, #0f5c5a 45%, #2f4a3c 100%);
  background-size: cover, 80px 80px, cover;
  animation: hero-fade 1.1s var(--sb-ease) both;
}

.hero__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 40%, transparent 0%, rgba(20, 24, 22, 0.45) 70%);
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.25rem 3rem;
  max-width: 40rem;
  animation: rise-in 0.9s var(--sb-ease) 0.15s both;
}

.hero__brand {
  margin: 0 0 0.75rem;
  font-family: var(--sb-font-display);
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero__lead {
  margin: 0 0 1.75rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: color-mix(in srgb, #fff 88%, transparent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@keyframes hero-fade {
  from { opacity: 0; transform: scale(1.03); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */

.section {
  padding: 4rem 0;
}

.section__inner {
  max-width: var(--sb-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section__header {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section__header--page {
  margin-bottom: 2.5rem;
}

.section__title {
  margin: 0 0 0.5rem;
  font-family: var(--sb-font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section__desc {
  margin: 0;
  color: var(--sb-ink-muted);
}

.section__more {
  margin: 2rem 0 0;
}

.empty-note {
  color: var(--sb-ink-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  color: var(--sb-ink-muted);
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--sb-accent);
}

/* Cards / grids */

.stay-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .stay-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .stay-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }
}

.stay-card,
.post-card {
  background: var(--sb-bg-elev);
  border: 1px solid color-mix(in srgb, var(--sb-line) 80%, transparent);
  border-radius: var(--sb-radius);
  overflow: hidden;
  box-shadow: var(--sb-shadow);
  transition: transform 0.35s var(--sb-ease), box-shadow 0.35s var(--sb-ease);
  opacity: 0;
  animation: rise-in 0.7s var(--sb-ease) both;
}

.stay-card:nth-child(1), .post-card:nth-child(1) { animation-delay: 0.05s; }
.stay-card:nth-child(2), .post-card:nth-child(2) { animation-delay: 0.12s; }
.stay-card:nth-child(3), .post-card:nth-child(3) { animation-delay: 0.19s; }
.stay-card:nth-child(4), .post-card:nth-child(4) { animation-delay: 0.26s; }
.stay-card:nth-child(5), .post-card:nth-child(5) { animation-delay: 0.33s; }
.stay-card:nth-child(6), .post-card:nth-child(6) { animation-delay: 0.4s; }

.stay-card:hover,
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(44, 42, 40, 0.12);
}

.stay-card__link,
.post-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.stay-card__media,
.post-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--sb-accent-soft);
}

.stay-card__media img,
.post-card__media img,
.stay-card__placeholder,
.post-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-card__placeholder,
.post-card__placeholder,
.stay-list__placeholder {
  background:
    linear-gradient(135deg, var(--sb-accent-soft), #e7e2d8);
}

.stay-card__body,
.post-card__body {
  padding: 1rem 1.1rem 1.2rem;
}

.stay-card__title,
.post-card__title {
  margin: 0.45rem 0 0.35rem;
  font-family: var(--sb-font-display);
  font-size: 1.2rem;
  line-height: 1.25;
}

.stay-card__meta,
.stay-card__price,
.post-card__excerpt,
.post-card__meta {
  margin: 0;
  color: var(--sb-ink-muted);
  font-size: 0.95rem;
}

.post-card__excerpt {
  margin-bottom: 0.75rem;
}

.post-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  margin-right: 0.25rem;
}

.badge--type {
  background: var(--sb-badge-type);
}

.badge--area {
  background: var(--sb-badge-area);
}

/* Map layout (Timboss-inspired) */

.site-main--map {
  padding: 0;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(20rem, 26rem) 1fr;
  min-height: calc(100svh - var(--sb-header-h));
}

.map-list {
  display: flex;
  flex-direction: column;
  background: var(--sb-bg-elev);
  border-right: 1px solid var(--sb-line);
  max-height: calc(100svh - var(--sb-header-h));
}

.map-list__header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--sb-line);
}

.map-list__title {
  margin: 0;
  font-family: var(--sb-font-display);
  font-size: 1.6rem;
}

.map-list__count {
  margin: 0.25rem 0 0.85rem;
  color: var(--sb-ink-muted);
  font-size: 0.95rem;
}

.map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.map-filters select {
  font: inherit;
  padding: 0.45rem 0.65rem;
  border-radius: var(--sb-radius-sm);
  border: 1px solid var(--sb-line);
  background: #fff;
  color: var(--sb-ink);
}

.map-tabs {
  display: none;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.map-tabs__btn {
  flex: 1;
  font: inherit;
  border: 1px solid var(--sb-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.map-tabs__btn.is-active {
  background: var(--sb-accent);
  border-color: var(--sb-accent);
  color: #fff;
}

.map-list__body {
  overflow: auto;
  padding: 0.75rem 1rem 1.5rem;
  flex: 1;
}

.stay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stay-list__link {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  padding: 0.65rem;
  border-radius: var(--sb-radius-sm);
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--sb-line) 75%, transparent);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.stay-list__link:hover,
.stay-list__item.is-active .stay-list__link {
  border-color: var(--sb-accent);
  box-shadow: var(--sb-shadow);
}

.stay-list__media,
.stay-list__placeholder {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.stay-list__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-list__title {
  margin: 0.35rem 0 0.25rem;
  font-size: 1.05rem;
  font-family: var(--sb-font-display);
  line-height: 1.25;
}

.stay-list__address,
.stay-list__price {
  margin: 0;
  font-size: 0.9rem;
  color: var(--sb-ink-muted);
}

.map-panel {
  position: relative;
  min-height: 20rem;
}

.stay-map {
  width: 100%;
  height: 100%;
  min-height: calc(100svh - var(--sb-header-h));
  background: #dce5e2;
}

.stay-map--single {
  min-height: 22rem;
  border-radius: var(--sb-radius);
  overflow: hidden;
  border: 1px solid var(--sb-line);
}

@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-tabs {
    display: flex;
  }

  .map-list {
    max-height: none;
  }

  .map-panel {
    display: none;
  }

  .map-layout.is-map .map-list__body {
    display: none;
  }

  .map-layout.is-map .map-panel {
    display: block;
  }

  .map-layout.is-map .stay-map {
    min-height: calc(100svh - var(--sb-header-h) - 11rem);
  }
}

/* Single stay */

.stay-gallery {
  position: relative;
  background: #1c2422;
}

.stay-gallery__item {
  display: none;
  margin: 0;
}

.stay-gallery__item.is-active {
  display: block;
}

.stay-gallery__item img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  margin: 0 auto;
}

.stay-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  overflow-x: auto;
  background: color-mix(in srgb, #1c2422 92%, #0f5c5a);
}

.stay-gallery__thumb {
  flex: 0 0 auto;
  width: 4.5rem;
  height: 3.25rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  opacity: 0.7;
}

.stay-gallery__thumb.is-active,
.stay-gallery__thumb:hover {
  opacity: 1;
  border-color: #fff;
}

.stay-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stay-single__inner {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.stay-single__title {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--sb-font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.1;
}

.stay-single__lead {
  margin: 0;
  font-size: 1.15rem;
  color: var(--sb-ink-muted);
}

.stay-attrs {
  margin: 2rem 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.stay-attrs > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--sb-line);
}

.stay-attrs dt {
  margin: 0;
  color: var(--sb-ink-muted);
  font-weight: 500;
}

.stay-attrs dd {
  margin: 0;
}

.stay-map-block {
  margin-top: 2.5rem;
}

.stay-map-block__title {
  font-family: var(--sb-font-display);
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
}

.stay-cta-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
  padding: 0.85rem 1rem;
  background: color-mix(in srgb, var(--sb-bg-elev) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--sb-line);
}

.stay-cta-bar .btn--ghost {
  border-color: var(--sb-accent);
  color: var(--sb-accent);
}

.stay-cta-bar .btn--ghost:hover {
  background: var(--sb-accent-soft);
}

/* Blog / page single */

.post-single,
.page-single {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.post-single__title,
.page-single__title {
  margin: 0 0 0.75rem;
  font-family: var(--sb-font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.12;
}

.post-single__meta {
  display: flex;
  gap: 1rem;
  color: var(--sb-ink-muted);
  margin: 0 0 1.5rem;
}

.post-single__hero {
  margin: 0 0 2rem;
  border-radius: var(--sb-radius);
  overflow: hidden;
}

.post-single__hero img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  font-family: var(--sb-font-display);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.entry-content p,
.entry-content li {
  max-width: 65ch;
}

.entry-content img {
  border-radius: var(--sb-radius-sm);
}

/* Pagination */

.navigation.pagination {
  margin-top: 2rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--sb-line);
  text-decoration: none;
  color: var(--sb-ink);
  background: #fff;
}

.page-numbers.current,
.page-numbers:hover {
  background: var(--sb-accent);
  border-color: var(--sb-accent);
  color: #fff;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--sb-line);
  padding: 2.5rem 0;
  background: color-mix(in srgb, var(--sb-bg) 70%, #e8e4dc);
}

.site-footer__inner {
  max-width: var(--sb-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-footer__brand {
  margin: 0;
  font-family: var(--sb-font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.site-footer__tag,
.site-footer__copy {
  color: var(--sb-ink-muted);
  margin: 0.4rem 0 0;
}

.site-footer__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 0;
  padding: 0;
}

.site-footer__list a {
  color: var(--sb-ink);
  text-decoration: none;
}

/* Leaflet marker tweak */

.leaflet-container {
  font: inherit;
}

.sb-map-popup {
  font-size: 0.92rem;
}

.sb-map-popup a {
  font-weight: 600;
  text-decoration: none;
}
