html,
body {
  margin: 0;
  padding: 0;
}

/* Make tabs closer horizontally */
.cottages-tabs {
  gap: 5px; /* controls space between tabs */
}

.cottages-tabs .nav-item {
  margin: 0; /* remove Bootstrap margin */
}

/* ================= SECTIONS ================= */

.cottages-section,
.amenities-section,
.apartments-reviews {
  padding: clamp(72px, 9vw, 120px) 0;
  overflow-x: clip;
}

.cottages-section,
.apartments-reviews {
  background: #f2f5f1;
}

.amenities-section {
  background: #fff;
}

/* ================= TITLES ================= */

.section-title {
  margin: 0;
  color: var(--river);
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: "";
  display: block;
  width: 72px;
  height: 5px;
  margin: 16px auto 0;
  border-radius: 6px 2px 6px 2px;
  background: linear-gradient(90deg, var(--bamboo), var(--lodge-green));
}

.section-intro {
  max-width: 640px;
  margin: 14px auto 0;
  color: #56636e;
  font-size: 1.02rem;
  line-height: 1.7;
}

/* ================= TABS ================= */
.cottages-tabs .nav-link {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid #8b5a2b;
  border-radius: 16px 4px 16px 4px;
  color: #8b5a2b;
  font-size: 0.88rem;
  font-weight: 500;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-radius 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cottages-tabs .nav-link:hover {
  border-radius: 4px 16px 4px 16px;
  background: rgba(139, 90, 43, 0.1);
}

.cottages-tabs .nav-link.active {
  border-color: transparent;
  background: linear-gradient(135deg, #2fa36b 0%, #1f7a4f 48%, #145637 100%);
  box-shadow: 0 10px 22px -10px rgba(20, 86, 55, 0.85);
  color: #fff;
}

/* Accommodation cards */

.cottage-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.cottage-image {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--river);
}

.cottage-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 380ms ease;
}

.cottage-image:focus-visible {
  outline: 3px solid var(--bamboo-light);
  outline-offset: -5px;
}

.cottage-image-label {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 50%;
  background: rgba(8, 24, 38, 0.78);
  color: #fff;
  font-size: 0.875rem;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

@media (hover: hover) {
  .cottage-image:hover img {
    transform: scale(1.04);
  }
}

.cottage-image:hover .cottage-image-label,
.cottage-image:focus-visible .cottage-image-label {
  background: #fff;
  color: var(--river);
}

.cottage-content {
  padding: clamp(20px, 3vw, 32px);
  color: #485761;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.cottage-content h4 {
  margin: 0 0 5px;
  color: var(--river);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.cottage-content .stars {
  margin-bottom: 12px;
  color: #8c672b;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.cottage-card--preview {
  height: auto;
  background: var(--river);
}

.cottage-card--preview .cottage-content {
  position: absolute;
  inset: auto 0 0;
  padding: 46px 20px 19px;
  background: linear-gradient(
    to top,
    rgba(8, 24, 38, 0.96) 0%,
    rgba(8, 24, 38, 0.83) 52%,
    rgba(8, 24, 38, 0) 100%
  );
  color: #fff;
  pointer-events: none;
}

.cottage-card--preview .cottage-content h4 {
  color: #fff;
}

.cottage-card--preview .stars,
.cottage-card--preview p,
.cottage-card--preview .nb-btn-book {
  display: none;
}

/* Accommodation lightbox */

.cottage-viewer {
  --photo-height: min(65dvh, 39rem);
  width: clamp(
    min(26rem, calc(100% - 32px)),
    calc(var(--photo-height) * var(--photo-aspect, 1.5) + 8px),
    min(70rem, calc(100% - 32px))
  );
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 4px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
}

.cottage-viewer[open] {
  display: flex;
  flex-direction: column;
}

.cottage-viewer::backdrop {
  background: rgba(8, 24, 38, 0.94);
  backdrop-filter: blur(8px);
}

.cottage-viewer-header {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
}

.cottage-viewer-header h2 {
  margin: 0;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.cottage-viewer-header form {
  flex: none;
  margin: 0;
}

.cottage-viewer-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: pointer;
}

.cottage-viewer-close:hover {
  background: #fff;
  color: var(--river-deep);
}

.cottage-viewer-close:focus-visible {
  outline: 2px solid var(--bamboo-light);
  outline-offset: 2px;
}

.cottage-viewer-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #8496a3 transparent;
}

.cottage-viewer-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--photo-height);
  margin-inline: auto;
  border-radius: 14px;
  outline: 1px solid rgba(255, 255, 255, 0.2);
  outline-offset: -1px;
  filter: brightness(1.045) contrast(1.02) saturate(1.02);
}

.cottage-viewer-media img[data-low-light] {
  filter: brightness(1.13) contrast(0.95) saturate(1.035);
}

.cottage-viewer-details {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 24px;
  margin-top: 16px;
  padding: 15px 0 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #e1e7ec;
  font-size: 0.9rem;
  line-height: 1.65;
}

.cottage-viewer-description {
  flex: 1 1 18rem;
  min-width: 0;
  margin: 0;
}

.cottage-viewer-actions {
  flex: 0 1 13rem;
}

.cottage-viewer-details .nb-btn-book {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 7px;
  background: transparent;
  color: #fff;
  box-shadow: none;
  transition:
    background-color 180ms ease,
    color 180ms ease;
}

.cottage-viewer-details .nb-btn-book::after {
  content: none;
}

.cottage-viewer-details .nb-btn-book:hover {
  background: #fff;
  color: var(--river-deep);
  transform: none;
}

.cottage-viewer-details .nb-btn-book:focus-visible {
  outline: 2px solid var(--bamboo-light);
  outline-offset: 2px;
  transform: none;
}

@media (max-width: 480px) {
  .cottage-viewer {
    --photo-height: 56dvh;
  }

  .cottage-viewer-actions {
    flex-basis: 100%;
  }
}

@media (max-width: 768px) {
  .cottages-tabs {
    gap: 4px;
  }
}

/* ================= AMENITIES ================= */

.amenity-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  height: 100%;
  padding: 24px;
  border: 1px solid rgba(12, 34, 50, 0.07);
  border-radius: 26px 8px 26px 8px;
  background: #f2f5f1;
  transition:
    border-color 0.4s ease,
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.amenity-item:hover {
  border-color: var(--bamboo);
  border-radius: 8px 26px 8px 26px;
  transform: translateY(-4px);
}

.amenity-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 20px 6px 20px 6px;
  background: var(--river);
  color: var(--bamboo-light);
  font-size: 1.5rem;
}

.amenities-section h5 {
  margin-bottom: 6px;
  color: var(--river);
  font-size: 1.05rem;
  font-weight: 600;
}

.amenities-section .amenity-item p {
  margin: 0;
  color: #56636e;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ================= REVIEWS ================= */

.apartments-reviews .review-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 36px 30px;
  border-radius: 32px 8px 32px 8px;
  background: #fff;
  box-shadow: 0 26px 50px -34px rgba(8, 24, 38, 0.45);
  text-align: center;
  transition:
    border-radius 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.apartments-reviews .review-card:hover {
  border-radius: 8px 32px 8px 32px;
  transform: translateY(-4px);
}

.review-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  padding: 8px;
  border-radius: 22px 6px 22px 6px;
  background: #fff;
  box-shadow: 0 10px 24px -10px rgba(8, 24, 38, 0.45);
  object-fit: contain;
}

.apartments-reviews .stars {
  color: var(--bamboo);
  font-size: 1.05rem;
  letter-spacing: 2px;
}

.apartments-reviews .review-card h5 {
  margin: 0;
  color: var(--river);
  font-weight: 600;
}

.apartments-reviews .review-card p {
  margin: 0;
  color: #56636e;
  line-height: 1.75;
}

.review-logo-wrapper,
.review-link {
  position: relative;
  display: inline-block;
}

/* "See More Reviews" appears over the logo on hover */
.review-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 22px 6px 22px 6px;
  background: rgba(12, 34, 50, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.review-link:hover .review-overlay,
.review-link:focus-visible .review-overlay {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .cottage-image img,
  .cottage-image-label,
  .cottage-viewer-details .nb-btn-book,
  .amenity-item,
  .apartments-reviews .review-card {
    transition: none;
  }
}

/* "All" tab: every room from every tab in one centered grid.
   The tab panes and their rows step aside (display: contents)
   so all the cards flow together. */
.tab-content.is-showing-all {
  --bs-gutter-x: 1.5rem;
  --bs-gutter-y: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: calc(-1 * var(--bs-gutter-y));
  margin-right: calc(-0.5 * var(--bs-gutter-x));
  margin-left: calc(-0.5 * var(--bs-gutter-x));
}

.tab-content.is-showing-all > .tab-pane,
.tab-content.is-showing-all > .tab-pane > .row {
  display: contents;
}

