@media (max-width: 640px) {
  .favorites-toast {
    left: 16px;
    right: 16px;
    bottom: 18px;
  }
}

.home-cta-grid {
  align-items: stretch;
}

.home-cta-grid .home-cta-main {
  grid-column: span 2;
}

@media (max-width: 820px) {
  .home-cta-grid {
    grid-template-columns: 1fr;
  }

  .home-cta-grid .home-cta-main {
    grid-column: auto;
  }
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.cta-row .cta-inquiry {
  margin-left: auto;
}

.cta-row .cta-inquiry,
#inquiry-form button[type="submit"] {
  background: linear-gradient(120deg, #ff9a2f, #c45c00);
  color: #ffffff;
}

.cta-row .cta-inquiry:hover,
#inquiry-form button[type="submit"]:hover {
  background: linear-gradient(120deg, #ffad4c, #d36a00);
  text-decoration: none;
}

.cta-row .cta-inquiry:active,
#inquiry-form button[type="submit"]:active {
  transform: scale(0.98);
}

.favorite-action {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  margin-left: auto;
}

.favorite-action + .cta-inquiry {
  margin-left: 0;
}

.favorite-action svg {
  width: 18px;
  height: 18px;
  fill: transparent;
}

.favorite-action.is-active {
  color: #ffffff;
  border-color: rgba(226, 87, 76, 0.65);
  background: rgba(226, 87, 76, 0.18);
}

.favorite-action.is-active svg {
  fill: currentColor;
}

.mini-table {
  display: grid;
  gap: 6px;
}

.mini-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.mini-row>span {
  min-width: 0;
}

.inquiries-table .mini-row {
  grid-template-columns: minmax(150px, 180px) minmax(140px, 180px) minmax(200px, 240px) minmax(180px, 220px) minmax(120px, 150px) minmax(240px, 2fr) minmax(90px, 110px);
  align-items: start;
}

.inquiries-table .mini-row>span,
.inquiries-table .mini-row>form {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inquiries-table .inquiry-message {
  white-space: pre-wrap;
}

.inquiries-table .mini-row a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.inquiries-table .mini-row form {
  margin: 0;
}

.inquiries-table .mini-row .danger-link {
  white-space: nowrap;
}

.mini-head {
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 720px) {
  .mini-table:not(.inquiries-table) .mini-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
  }

  .mini-table:not(.inquiries-table) .mini-row.mini-head {
    display: none;
  }

  .mini-table:not(.inquiries-table) .mini-row>span {
    display: grid;
    gap: 4px;
  }

  .mini-table:not(.inquiries-table) .mini-row>span::before {
    content: attr(data-label);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
}

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.styled-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.styled-list li {
  position: relative;
  padding-left: 30px;
  line-height: 1.5;
}

.styled-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 6px 12px rgba(0, 0, 0, 0.25);
}

.styled-list.included-list li::before {
  background-color: rgba(70, 204, 120, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5 4.5 9 10 3.5' fill='none' stroke='%23e9fff1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 2px rgba(70, 204, 120, 0.25), 0 6px 12px rgba(0, 0, 0, 0.25);
}

.styled-list.excluded-list li::before {
  background-color: rgba(255, 123, 123, 0.25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3L3 9' fill='none' stroke='%23ffecec' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 2px rgba(255, 123, 123, 0.25), 0 6px 12px rgba(0, 0, 0, 0.25);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
}

.timeline-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.timeline-content {
  display: grid;
  gap: 6px;
  align-items: start;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.timeline-title {
  margin: 0;
  padding: 0;
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.itinerary-meta--indented {
  margin-left: 14px;
}

.clamp-wrap--description {
  display: grid;
  gap: 6px;
}

.clamp-wrap--gallery {
  display: grid;
  gap: 6px;
  --thumb-size: 72px;
}

.clamp-wrap--gallery .clamp-text--gallery {
  max-height: calc(var(--thumb-size) + 6px);
  overflow: hidden;
  padding-right: 0;
}

@media (min-width: 821px) {
  .hero-gallery .clamp-wrap--gallery {
    --thumb-size: 82px;
  }

  .hero-gallery .clamp-text--gallery {
    max-height: calc((var(--thumb-size) * 2) + 6px);
  }
}

.clamp-wrap.is-expanded .clamp-text--gallery {
  max-height: none;
}

.clamp-wrap--description .clamp-text--description {
  display: block;
  padding-right: 0;
}

.clamp-wrap.is-expanded .clamp-text--description {
  display: block;
  -webkit-line-clamp: initial;
  overflow: visible;
}

.clamp-wrap.is-expanded .clamp-text--description.rich-text {
  display: grid;
}

.clamp-more--description {
  position: static;
  align-self: flex-start;
  margin-top: 2px;
  display: none;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
}

.clamp-more--description::before {
  content: none;
}

.clamp-more--description:hover {
  text-decoration: underline;
}

.inquiry-date-display--empty {
  color: var(--muted);
}

.clamp-wrap--itinerary {
  display: grid;
  gap: 6px;
  margin-left: 14px;
}

.clamp-wrap--itinerary .clamp-text--itinerary {
  display: block;
  padding-right: 0;
}

.clamp-wrap.is-expanded .clamp-text--itinerary {
  display: block;
  -webkit-line-clamp: initial;
  overflow: visible;
}

.clamp-wrap.is-expanded .clamp-text--itinerary.rich-text {
  display: grid;
}

.clamp-more--itinerary {
  position: static;
  align-self: flex-start;
  margin-top: 2px;
  display: none;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
}

.clamp-more--itinerary::before {
  content: none;
}

.clamp-more--itinerary:hover {
  text-decoration: underline;
}

.clamp-more--gallery {
  position: static;
  align-self: flex-start;
  margin-top: 2px;
}

@media (max-width: 820px) {
  .hero--merged {
    gap: 0;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  }

  body[data-theme='light'] .hero--merged {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 252, 0.9));
    border-color: rgba(15, 27, 45, 0.08);
    box-shadow: 0 20px 40px rgba(15, 27, 45, 0.08);
  }

  .hero--merged .hero-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  .hero--merged .hero-card:not(.hero-card--media) {
    padding: 22px;
  }

  .hero {
    padding: 0;
  }

  .hero--compact {
    padding-top: 0;
  }

  .hero-card--media {
    order: -1;
    display: flex;
  }

  .hero-card--home-media {
    display: none;
  }

  .hero-media {
    border-radius: 0;
  }

  .hero-media {
    height: 240px;
  }

  .hero-media img {
    height: 100%;
  }

  .hero-media__overlay {
    display: none;
  }

  .hero-media__title {
    font-size: 1.05rem;
  }

  .hero-media__nav {
    width: 34px;
    height: 34px;
  }

  .clamp-wrap--gallery {
    --thumb-size: 72px;
  }

  .hero-gallery {
    padding: 10px 12px 14px;
  }

  .clamp-wrap--gallery .clamp-text--gallery {
    padding-right: 0;
  }

  .thumb-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-start;
  }

  .thumb-item {
    width: auto;
    flex: 0 0 var(--thumb-size, 72px);
  }

  .hero-meta-item--extra {
    display: none;
  }

  .hero-card.meta-expanded .hero-meta-item--extra {
    display: flex;
  }

  .clamp-wrap--description .clamp-text--description,
  .clamp-wrap--itinerary .clamp-text--itinerary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
  }

  .clamp-more--description,
  .clamp-more--itinerary {
    display: inline-flex;
  }
}

.itinerary-accordion {
  border: none;
  border-radius: 0;
  padding: 0;
  background: none;
}

.itinerary-accordion summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-weight: 700;
  list-style: none;
  padding: 6px 0;
}

.itinerary-accordion summary::-webkit-details-marker {
  display: none;
}

.itinerary-accordion .caret {
  transition: transform 160ms ease;
}

.itinerary-accordion[open] .caret {
  transform: rotate(180deg);
}

.itinerary-accordion>.timeline {
  margin-top: 10px;
}

.day-birds {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-bird-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  color: #fff;
}

.day-bird-pill small {
  color: var(--muted);
  text-transform: capitalize;
}

.day-birds-list ul {
  margin: 6px 0 0;
  padding-left: 16px;
}

.day-birds-list li {
  margin: 2px 0;
}

.day-bird-link {
  color: var(--text);
  text-decoration: none;
}

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

.guide-list {
  display: grid;
  gap: 8px;
}

.guide-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.accordion details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.accordion summary {
  cursor: pointer;
  font-weight: 700;
}

.review-list {
  display: grid;
  gap: 10px;
}

.review-list blockquote {
  margin: 0;
  color: var(--text);
}

.review-list footer {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.media-slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.media-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 4px 8px 4px;
  scrollbar-width: thin;
}

.media-track::-webkit-scrollbar {
  height: 8px;
}

.media-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.media-slide {
  flex: 0 0 auto;
  min-width: min(420px, 80vw);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  scroll-snap-align: start;
  display: grid;
  gap: 6px;
}

.media-slide img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.media-slide figcaption {
  padding: 6px 10px 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.slider-btn {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-weight: 800;
  cursor: pointer;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.gallery-shell {
  display: grid;
  gap: 12px;
}

.gallery-preview {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  position: relative;
}

.gallery-preview img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.preview-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 8px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent);
  color: var(--text);
  font-weight: 600;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size, 72px), var(--thumb-size, 72px)));
  gap: 6px;
  justify-content: start;
}

.thumb-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease;
  width: var(--thumb-size, 72px);
  aspect-ratio: 1 / 1;
}

.thumb-item:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.2);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  padding: 20px;
  z-index: 1000;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-inner {
  max-width: 90vw;
  max-height: 80vh;
  display: grid;
  gap: 10px;
  justify-items: center;
}

.lightbox img {
  max-width: 92vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-caption {
  color: var(--text);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  font-weight: 600;
}

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

.lightbox-nav,
.lightbox-close {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 22px;
  display: grid;
  place-items: center;
}

.lightbox-nav {
  font-size: 28px;
}

.lightbox-nav:hover,
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-close {
  grid-column: 3;
  grid-row: 1;
}

.lightbox-nav.prev {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
}

.lightbox-nav.next {
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
}

@media (min-width: 768px) {
  .lightbox {
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
  }

  .lightbox-inner {
    justify-self: center;
  }

  .lightbox-nav.prev {
    justify-self: center;
  }

  .lightbox-nav.next {
    justify-self: center;
  }

  .lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    grid-column: auto;
    grid-row: auto;
  }
}

/* Keep bird detail lightbox hidden until opened (overrides generic styles above) */
#bird-lightbox,
#tour-lightbox {
  display: none;
}

#bird-lightbox.open,
#tour-lightbox.open {
  display: flex;
}

#bird-lightbox.open {
  flex-direction: column;
  gap: 10px;
}

#bird-lightbox #lightbox-credit {
  max-width: 90vw;
  text-align: center;
  padding: 6px 12px;
}

#tour-lightbox.open {
  flex-direction: column;
  gap: 10px;
}

#tour-lightbox #tour-lightbox-credit {
  color: #fff;
  max-width: 90vw;
  padding: 6px 12px;
}

.collapse-toggle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.collapse-toggle .caret {
  margin-left: 8px;
  transition: transform 120ms ease;
  display: inline-block;
}

.collapse-toggle[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.collapse-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.1);
}

.media-manager {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.media-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 6px;
  align-content: start;
}

.media-card[draggable="true"] {
  cursor: grab;
}

.media-card.dragging {
  opacity: 0.65;
  cursor: grabbing;
}

.media-card.dragging-hidden {
  display: none;
}

.media-card.placeholder {
  border: 2px dashed rgba(74, 176, 255, 0.4);
  background: rgba(74, 176, 255, 0.08);
  min-height: 120px;
}

.media-manager.drag-active .media-card {
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.media-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.media-caption {
  font-size: 0.95rem;
  color: var(--muted);
  word-break: break-word;
}

.media-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-card.uploader {
  justify-items: center;
  cursor: pointer;
}

.uploader-placeholder {
  width: 100%;
  height: 140px;
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  gap: 6px;
}

.uploader-placeholder .icon {
  font-size: 32px;
}

.upload-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.upload-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  width: 0%;
}
