/* ── Travel & Tour: filters ──
   box-sizing:border-box on every element in this module — without it, an
   element's declared width doesn't include its own padding, so a card
   set to fill its container plus padding renders wider than that
   container on narrow screens, clipping content at the viewport edge. */
.tethbe-tour-wrap, .tethbe-tour-wrap * { box-sizing: border-box; }
.tethbe-tour-wrap { max-width: 100%; }
.tethbe-tour-wrap img { max-width: 100%; }

.tethbe-tour-wrap { margin: 20px 0; }
.tethbe-tour-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tethbe-tour-filter {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--te-border, #e2e8f0);
  background: #fff; color: var(--te-gray, #64748b); font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.tethbe-tour-filter.active, .tethbe-tour-filter:hover {
  background: var(--te-primary, #1a3c6e); color: #fff; border-color: var(--te-primary, #1a3c6e);
}

/* ── Grid ──
   auto-fit + minmax so 1–2 tours fill the available width instead of
   sitting in a narrow column beside empty grid tracks, and to adapt
   correctly to whatever width Elementor gives its container. */
.tethbe-tour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.tethbe-tour-card {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s;
}
.tethbe-tour-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* Fixed aspect ratio so every tour photo frames consistently regardless
   of its raw upload dimensions. */
.tethbe-tour-img { position: relative; aspect-ratio: 4 / 3; background: #f1f5f9; overflow: hidden; }
.tethbe-tour-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tethbe-tour-img-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 48px; }
.tethbe-tour-badge {
  position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95);
  color: var(--te-primary, #1a3c6e); padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700;
}
.tethbe-tour-photo-count {
  position: absolute; bottom: 10px; right: 10px; background: rgba(15,23,42,.75); color: #fff;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
}

.tethbe-tour-thumbstrip { display: flex; gap: 5px; padding: 8px 12px 0; overflow-x: auto; }
.tethbe-tour-thumb {
  width: 52px; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 5px; cursor: pointer;
  border: 2px solid transparent; opacity: .65; transition: all .15s; flex-shrink: 0;
}
.tethbe-tour-thumb:hover { opacity: .9; }
.tethbe-tour-thumb.active { border-color: var(--te-primary, #1a3c6e); opacity: 1; }

.tethbe-tour-body { padding: 16px; }
.tethbe-tour-name { font-size: 16px; font-weight: 800; color: var(--te-dark, #0f172a); margin: 0 0 4px; }
.tethbe-tour-country { font-size: 13px; color: var(--te-gray, #64748b); margin: 0 0 10px; }

.tethbe-tour-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tethbe-tour-spec-pill {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 3px 9px; font-size: 11px; color: #475569;
}

.tethbe-tour-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.tethbe-tour-price { font-size: 18px; font-weight: 800; color: var(--te-primary, #1a3c6e); }

/* ── Featured view ── */
.tethbe-tour-featured { display: flex; flex-direction: column; gap: 28px; }
.tethbe-tour-card-featured {
  display: flex; flex-wrap: wrap; gap: 20px; background: #fff; border-radius: 16px;
  overflow: hidden; box-shadow: 0 2px 16px rgba(0,0,0,.08); padding: 20px;
}
.tethbe-tour-featured-media { flex: 1 1 340px; min-width: 280px; display: flex; flex-direction: column; gap: 8px; }
.tethbe-tour-featured-hero { position: relative; border-radius: 12px; aspect-ratio: 16 / 10; background: #f1f5f9; overflow: hidden; }
.tethbe-tour-featured-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tethbe-tour-featured-gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px;
}
.tethbe-tour-featured-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: pointer;
}
.tethbe-tour-featured-more {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  background: #f1f5f9; border-radius: 8px; font-size: 11px; font-weight: 600; color: #64748b; text-align: center; padding: 4px;
}
.tethbe-tour-featured-body { flex: 1 1 300px; min-width: 260px; padding: 4px 4px 4px 0; }
.tethbe-tour-featured-body .tethbe-tour-name { font-size: 20px; }

/* ── List view ── */
.tethbe-tour-list { display: flex; flex-direction: column; gap: 14px; }
.tethbe-tour-card-list {
  display: flex; flex-wrap: wrap; gap: 16px; background: #fff; border-radius: 14px;
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); transition: box-shadow .2s;
}
.tethbe-tour-card-list:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.tethbe-tour-list-img { position: relative; flex: 0 1 220px; min-width: 160px; aspect-ratio: 4 / 3; background: #f1f5f9; overflow: hidden; }
.tethbe-tour-list-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tethbe-tour-list-body { flex: 1 1 260px; padding: 14px 16px 14px 0; }

@media (max-width: 480px) {
  .tethbe-tour-list-img { flex-basis: 100%; }
  .tethbe-tour-list-body { padding: 0 16px 16px; }

  .tethbe-tour-card-featured { padding: 12px; gap: 14px; }
  .tethbe-tour-featured-media { flex-basis: 100%; min-width: 0; }
  .tethbe-tour-featured-body { flex-basis: 100%; min-width: 0; padding: 0; }
  .tethbe-tour-featured-body .tethbe-tour-name { font-size: 17px; }
  .tethbe-tour-featured-gallery { grid-template-columns: repeat(auto-fit, minmax(56px, 1fr)); }
}

.tethbe-btn-tour-learnmore {
  padding: 9px 12px; background: #fff; color: var(--te-primary, #1a3c6e);
  border: 1.5px solid var(--te-primary, #1a3c6e); border-radius: 9px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.tethbe-btn-tour-learnmore:hover { background: #eff6ff; }

.tethbe-btn-tour-cta {
  padding: 9px 16px; background: var(--te-accent, #f59e0b); color: #1a1a1a;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.tethbe-btn-tour-cta:hover { transform: translateY(-1px); }
.tethbe-btn-tour-disabled, .tethbe-btn-tour-disabled:hover {
  background: #cbd5e1; color: #64748b; cursor: not-allowed; transform: none;
}

/* ── Learn More detail modal ── */
.tethbe-tour-detail-box { max-width: 640px; max-height: 90vh; overflow-y: auto; }
.tethbe-tour-detail-gallery { margin: -28px -28px 16px; }
.tethbe-tour-detail-gallery img.tethbe-tour-detail-main { width: 100%; height: 300px; object-fit: cover; display: block; }
.tethbe-tour-detail-thumbs { display: flex; gap: 6px; padding: 10px 28px 0; overflow-x: auto; }
.tethbe-tour-detail-thumbs img {
  width: 60px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer;
  opacity: .7; transition: opacity .15s; flex-shrink: 0;
}
.tethbe-tour-detail-thumbs img:hover { opacity: 1; }
.tethbe-tour-detail-badge { font-size: 12px; font-weight: 700; color: var(--te-primary, #1a3c6e); margin-bottom: 4px; }
.tethbe-tour-detail-box h2 { margin: 0 0 4px; font-size: 22px; color: #0f172a; }
.tethbe-tour-detail-price { font-size: 22px; font-weight: 800; color: var(--te-primary, #1a3c6e); margin: 12px 0; }
.tethbe-tour-detail-box h4 { font-size: 13px; color: #475569; margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .4px; }

@media (max-width: 480px) {
  .tethbe-tour-detail-gallery { margin: -20px -20px 16px; }
  .tethbe-tour-detail-gallery img.tethbe-tour-detail-main { height: 220px; }
}

/* ── Modals ── */
.tethbe-tour-modal-overlay, .tethbe-tour-success-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6);
  z-index: 99998; align-items: center; justify-content: center; padding: 20px; overflow-y: auto;
}
.tethbe-tour-modal-overlay.open, .tethbe-tour-success-overlay.open { display: flex; }
.tethbe-tour-modal-box, .tethbe-tour-success-box {
  background: #fff; border-radius: 18px; padding: 28px; max-width: 460px; width: 100%;
  position: relative; box-shadow: 0 25px 60px rgba(0,0,0,.3);
}
.tethbe-tour-success-box { text-align: center; }
.tethbe-tour-modal-close {
  position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: none;
  border-radius: 50%; background: #f1f5f9; color: #475569; font-size: 20px; cursor: pointer;
}
.tethbe-tour-modal-box .tethbe-form-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.tethbe-tour-modal-box label { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .4px; }
.tethbe-tour-modal-box input, .tethbe-tour-modal-box textarea, .tethbe-tour-modal-box select {
  padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 15px;
  font-family: inherit; width: 100%; box-sizing: border-box;
}
.tethbe-btn-tour-submit {
  width: 100%; padding: 13px; background: var(--te-primary, #1a3c6e); color: #fff;
  border: none; border-radius: 10px; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 4px;
}

@media (max-width: 480px) {
  .tethbe-tour-modal-box input, .tethbe-tour-modal-box textarea, .tethbe-tour-modal-box select { font-size: 16px; }
}
