/* ==========================================================================
   UI.CSS — Review Carousels, GetYourGuide Grid, Lightbox & Enquiry Modals
   Mobile-First Responsive Architecture
   ========================================================================== */

/* Reset legacy inline padding:0 30px wrapper around review widgets */
.wcustomhtml > div[style*="padding"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 1. Reviews Carousel Widget (.reviews-widget) — Mobile-First */
.reviews-widget {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-subtle);
  text-align: left;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.reviews-widget-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.reviews-widget-head h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.reviews-brand {
  color: var(--accent-secondary);
}

.reviews-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.reviews-rating strong {
  font-size: 16px;
  color: var(--text-primary);
}

.reviews-rating span {
  color: #D97706;
  letter-spacing: 1px;
}

.reviews-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.reviews-post:hover {
  background: var(--bg-elevated);
  border-color: var(--text-primary);
}

@media screen and (max-width: 520px) {
  .reviews-post {
    width: 100%;
  }
}

@media screen and (min-width: 640px) {
  .reviews-widget {
    padding: 28px 26px;
  }

  .reviews-widget-head {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 18px;
  }

  .reviews-widget-head h3 {
    font-size: 1.65rem;
  }
}

.review-carousel {
  position: relative;
}

.review-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.review-track::-webkit-scrollbar {
  display: none;
}

/* Mobile-First Review Card Widths (88% -> 50% -> 33.33%) */
.review-card {
  flex: 0 0 88%;
  min-width: 240px;
  scroll-snap-align: start;
  background: var(--bg-primary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media screen and (min-width: 640px) {
  .review-track {
    gap: 18px;
  }

  .review-card {
    flex: 0 0 calc(50% - 9px);
    min-width: 250px;
    padding: 20px;
  }
}

@media screen and (min-width: 961px) {
  .review-card {
    flex: 0 0 calc(33.333% - 12px);
    min-width: 260px;
  }
}

/* Single column carousels inside Home page 2-column review split */
.home-guest-reviews .review-card {
  flex: 0 0 100%;
  min-width: 0;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-deep-forest);
  color: #FAF9F6;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-author a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.review-author a:hover {
  color: var(--accent-primary);
}

.review-date {
  font-size: 12px;
  color: var(--text-muted);
}

.review-stars {
  color: #D97706;
  font-size: 13px;
  letter-spacing: 1.5px;
}

.review-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.review-summary {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.review-read {
  align-self: flex-start;
  padding: 4px 0;
  background: none;
  border: 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.review-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-subtle);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

@media screen and (min-width: 640px) {
  .review-arrow {
    display: inline-flex;
  }
}

.review-arrow:hover {
  background: var(--text-primary);
  color: #FFFFFF;
}

.review-prev {
  left: 8px;
}

.review-next {
  right: 8px;
}

.review-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.review-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border-subtle);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.review-dot[aria-current="true"] {
  width: 22px;
  border-radius: 99px;
  background: var(--accent-primary);
}

/* 2. GetYourGuide Review Grid (.janaka-gyg) — Mobile-First */
.janaka-gyg {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  box-shadow: var(--shadow-subtle);
  text-align: left;
}

.janaka-gyg-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-hairline);
}

.janaka-gyg-header h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0 0 4px 0;
}

.janaka-gyg-note {
  font-size: 13.5px;
  color: var(--text-muted);
}

.janaka-gyg-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
}

.janaka-gyg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media screen and (min-width: 640px) {
  .janaka-gyg {
    padding: 32px;
  }

  .janaka-gyg-header {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
  }

  .janaka-gyg-header h3 {
    font-size: 1.75rem;
  }

  .janaka-gyg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media screen and (min-width: 961px) {
  .janaka-gyg-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.janaka-gyg-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.janaka-gyg-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.janaka-gyg-date {
  font-size: 12px;
  color: var(--text-muted);
}

.janaka-gyg-stars {
  color: #D97706;
  font-size: 13px;
  letter-spacing: 1px;
  margin: 4px 0;
}

.janaka-gyg-card blockquote {
  margin: 6px 0 10px 0;
  padding: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.janaka-gyg-source {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 3. Dialog Modals (Photo Lightbox, Review Detail, Enquiry Preview) */
dialog {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-elevated);
  max-width: min(560px, calc(100vw - 24px));
  width: 100%;
}

dialog::backdrop {
  background: rgba(12, 15, 13, 0.78);
  backdrop-filter: blur(6px);
}

.message-dialog {
  padding: 24px 20px;
  position: relative;
}

@media screen and (min-width: 640px) {
  .message-dialog {
    padding: 32px;
  }
}

.dialog-close,
.photo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.review-detail-platform {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.message-dialog h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 36px 12px 0;
}

.review-detail-text,
.enquiry-intro {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.enquiry-message {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.enquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Photo Viewer Lightbox */
.photo-dialog {
  max-width: min(1080px, calc(100vw - 20px));
  background: #121211;
  color: #FAF9F6;
  border-color: rgba(255, 255, 255, 0.14);
  padding: 14px;
}

@media screen and (min-width: 640px) {
  .photo-dialog {
    padding: 20px;
  }
}

.photo-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-frame {
  margin: 0;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  max-height: 75vh;
}

.photo-full {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.photo-previous,
.photo-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(18, 18, 17, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-previous {
  left: 8px;
}

.photo-next {
  right: 8px;
}

.photo-close {
  background: rgba(18, 18, 17, 0.78);
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  z-index: 10;
}

.photo-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 14px;
  padding-bottom: 4px;
}

.photo-thumb-btn {
  flex: 0 0 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.photo-thumb-btn[aria-current="true"] {
  opacity: 1;
  border-color: #F59E0B;
}

.photo-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   4. On-Page Image & Text Editor Overlays + Curated Firebase Section Gallery
   ========================================================================== */

.admin-dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #FAF9F6;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.admin-dock-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
}

.admin-dock-btn.is-active,
.admin-dock-btn.is-primary {
  background: #D97706;
  border-color: #F59E0B;
  color: #FFFFFF;
}

/* Highlight editable images when Edit Mode is active */
body.admin-edit-mode [data-admin-slot] {
  position: relative;
  cursor: pointer !important;
  outline: 2px dashed #F59E0B !important;
  outline-offset: 3px;
  transition: outline-color 0.2s ease, transform 0.2s ease;
}

body.admin-edit-mode [data-admin-slot]:hover {
  outline: 3px solid #D97706 !important;
}

.admin-hero-edit-btn {
  display: none;
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  padding: 10px 16px;
  background: rgba(18, 18, 17, 0.9);
  color: #FAF9F6;
  border: 1px solid #F59E0B;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

body.admin-edit-mode .admin-hero-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Inline Image Editor Modal (Mobile-First) */
.admin-inline-dialog {
  max-width: min(520px, calc(100vw - 24px));
  width: 100%;
  background: #171B18;
  color: #FAF9F6;
  border: 1px solid #2C352F;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #1E2420;
  border-bottom: 1px solid #2C352F;
}

.admin-modal-header h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  color: #FAF9F6;
  margin: 0;
}

.admin-modal-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F59E0B;
  margin-bottom: 2px;
}

.admin-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #2C352F;
  background: #141815;
  color: #A3ADA6;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media screen and (min-width: 480px) {
  .admin-preview-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-preview-box {
  background: #111412;
  border: 1px solid #2C352F;
  border-radius: 10px;
  height: 130px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.admin-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-preview-box.is-upload {
  border-style: dashed;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  text-align: center;
  color: #9CA69F;
  font-size: 12px;
}

.admin-preview-box.is-upload:hover {
  border-color: #F59E0B;
  color: #FAF9F6;
}

.admin-field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9CA69F;
  margin-bottom: 6px;
}

.admin-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2C352F;
  background: #111412;
  color: #FAF9F6;
  font-family: var(--font-sans);
  font-size: 14px;
}

.admin-input:focus {
  outline: none;
  border-color: #F59E0B;
}

.admin-scope-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media screen and (min-width: 480px) {
  .admin-scope-row {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-scope-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #2C352F;
  background: #111412;
  font-size: 12px;
  cursor: pointer;
}

.admin-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  background: #1E2420;
  border-top: 1px solid #2C352F;
}

/* Highlight editable text elements when Text Edit Mode is active */
body.admin-text-edit-mode [data-admin-text-slot] {
  cursor: pointer !important;
  outline: 2px dashed #10B981 !important;
  outline-offset: 3px;
  border-radius: 4px;
  transition: outline-color 0.2s ease, background-color 0.2s ease;
}

body.admin-text-edit-mode [data-admin-text-slot]:hover {
  outline: 2px solid #059669 !important;
  background-color: rgba(16, 185, 129, 0.08);
}

/* Curated Firebase Section Wildlife Gallery (Mobile-First) */
.firebase-section-showcase {
  padding: 40px 0;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
}

.firebase-section-showcase .firebase-section-header,
.firebase-section-showcase .firebase-section-grid {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

@media screen and (min-width: 640px) {
  .firebase-section-showcase {
    padding: 56px 0;
  }

  .firebase-section-showcase .firebase-section-header,
  .firebase-section-showcase .firebase-section-grid {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.firebase-section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

@media screen and (min-width: 640px) {
  .firebase-section-header {
    flex-direction: row;
    align-items: flex-end;
    margin-bottom: 28px;
  }
}

.firebase-section-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.firebase-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.12;
}

.firebase-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media screen and (min-width: 580px) {
  .firebase-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 961px) {
  .firebase-section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
}

.firebase-section-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.firebase-section-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.firebase-section-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #18221D;
  overflow: hidden;
}

.firebase-section-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.firebase-section-card:hover .firebase-section-card-media img {
  transform: scale(1.04);
}

.firebase-section-card-body {
  padding: 18px 20px 20px;
}

.firebase-section-card-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.firebase-section-card-heading {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.firebase-section-card-caption {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.firebase-section-card-actions {
  display: none;
  padding: 10px 16px;
  background: #171B18;
  border-top: 1px solid #2C352F;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body.admin-edit-mode .firebase-section-card-actions {
  display: flex;
}

/* Custom Added Text Blocks Section */
.firebase-custom-texts-wrap {
  max-width: var(--container-max);
  margin: 28px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media screen and (min-width: 640px) {
  .firebase-custom-texts-wrap {
    margin: 36px auto;
    padding: 0 24px;
  }
}

.firebase-custom-text-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-subtle);
}

.firebase-custom-text-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--text-primary);
}

.firebase-custom-text-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}
