
/* =========================================================
   OTTO SAFARI GUIDE — TOUR DETAIL v1.1.6
   Premium UX/UI layer. Loaded after Bootstrap.
   Brand: #28B5A4 / #E48E45 / #26786E
   ========================================================= */
:root{
  --otto-teal:#28B5A4;
  --otto-teal-dark:#26786E;
  --otto-orange:#E48E45;
  --otto-heading:#232323;
  --otto-body:#494D41;
  --otto-light:rgba(40,181,164,.05);
  --otto-accent-1:#F5FBF6;
  --otto-accent-2:#FCF7EF;
  --otto-border:#E3E8E5;
  --otto-shadow:0 12px 34px rgba(35,35,35,.08);
  --otto-radius:16px;
}

/* ---------- Page canvas ---------- */
.tour-detail-page{
  background:#fff !important;
  color:var(--otto-body);
  overflow:clip;
}
.tour-detail-page .main-content-detail,
.tour-detail-page .sidebar-detail{
  min-width:0;
}
.tour-detail-page .container{
  max-width:1240px;
}

/* ---------- Hero ---------- */
.tour-detail-page .tour-hero{
  height:390px;
  background:#173d39;
}
.tour-detail-page .tour-hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(8,77,42,.05) 25%,rgba(8,30,27,.78) 100%);
  pointer-events:none;
}
.tour-detail-page .tour-hero img{
  transition:transform .6s ease;
}
.tour-detail-page .tour-hero:hover img{
  transform:scale(1.015);
}
.tour-detail-page .hero-overlay{
  z-index:2;
  padding:clamp(24px,4vw,48px);
  background:linear-gradient(to top,rgba(8,30,27,.78),rgba(8,30,27,.04) 78%);
}
.tour-detail-page .tour-title{
  max-width:960px;
  width:auto;
  flex:1 1 auto;
  color:#fff !important;
  font-size:clamp(30px,4vw,52px) !important;
  line-height:1.08;
  font-weight:700;
  letter-spacing:-.025em;
  text-wrap:balance;
  text-shadow:0 3px 18px rgba(0,0,0,.55);
}
.tour-detail-page .btn-heart-hero{
  background:rgba(255,255,255,.14) !important;
  border:1px solid rgba(255,255,255,.55) !important;
  backdrop-filter:blur(8px);
  width:48px;height:48px;
  flex:0 0 48px;
  transition:.2s ease;
}
.tour-detail-page .btn-heart-hero:hover{
  background:#fff !important;
  color:var(--otto-orange) !important;
  transform:translateY(-2px);
}

/* ---------- Quick trust/summary strip ---------- */
.tour-detail-page .content-section:first-child{
  margin-top:28px;
}
.tour-detail-page .quick-adventure{
  margin:0;
  padding:20px 22px;
  background:linear-gradient(135deg,var(--otto-accent-1),#fff);
  border:1px solid rgba(40,181,164,.18);
  border-left:4px solid var(--otto-teal);
  border-radius:14px;
  color:var(--otto-body) !important;
  line-height:1.7;
}

/* ---------- Sections ---------- */
.tour-detail-page .content-section{
  margin-bottom:30px;
  padding:26px;
  background:#fff;
  border:1px solid var(--otto-border);
  border-radius:var(--otto-radius);
  box-shadow:0 6px 24px rgba(35,35,35,.035);
}
.tour-detail-page .section-title{
  color:var(--otto-heading) !important;
  font-size:clamp(22px,2.2vw,29px) !important;
  line-height:1.25;
  font-weight:700;
  letter-spacing:-.015em;
  margin-bottom:20px;
}
.tour-detail-page .section-title::after{
  content:"";
  display:block;
  width:42px;
  height:3px;
  margin-top:9px;
  border-radius:99px;
  background:var(--otto-orange);
}
.tour-detail-page p,
.tour-detail-page li{
  color:var(--otto-body) !important;
  line-height:1.72;
}
.tour-detail-page a{
  color:var(--otto-teal) !important;
}
.tour-detail-page a:hover{
  color:var(--otto-teal-dark) !important;
}

/* ---------- Sticky section navigation ---------- */
.tour-detail-page .tour-nav-tabs{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--otto-border);
  box-shadow:0 4px 18px rgba(35,35,35,.06);
}
.tour-detail-page .tour-nav-tabs .container{
  overflow-x:auto;
  scrollbar-width:none;
}
.tour-detail-page .tour-nav-tabs .container::-webkit-scrollbar{display:none}
.tour-detail-page .tour-nav-tabs .nav-tabs{
  flex-wrap:nowrap;
  border:0;
  gap:4px;
  min-width:max-content;
}
.tour-detail-page .tour-nav-tabs .nav-link{
  border:0 !important;
  border-bottom:3px solid transparent !important;
  border-radius:0 !important;
  padding:15px 16px 12px;
  color:var(--otto-body) !important;
  font-weight:600;
  white-space:nowrap;
  background:transparent !important;
}
.tour-detail-page .tour-nav-tabs .nav-link:hover,
.tour-detail-page .tour-nav-tabs .nav-link.active{
  color:var(--otto-teal-dark) !important;
  border-bottom-color:var(--otto-teal) !important;
}

/* ---------- Features ---------- */
.tour-detail-page .features-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
.tour-detail-page .feature-item{
  display:flex;
  gap:14px;
  padding:17px;
  border:1px solid var(--otto-border);
  border-radius:13px;
  background:linear-gradient(180deg,#fff,var(--otto-accent-1));
}
.tour-detail-page .feature-icon{
  flex:0 0 42px;
  width:42px;height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:rgba(40,181,164,.11);
  color:var(--otto-teal-dark) !important;
}
.tour-detail-page .feature-content strong{
  color:var(--otto-heading) !important;
  display:block;
  margin-bottom:3px;
}

/* ---------- Sidebar booking card ---------- */
.tour-detail-page .sidebar-detail{
  position:relative;
}
.tour-detail-page .quote-card-combined{
  position:sticky;
  top:78px;
  padding:0 !important;
  overflow:hidden;
  border:1px solid var(--otto-border);
  border-radius:18px;
  box-shadow:var(--otto-shadow);
  background:#fff !important;
}
.tour-detail-page .quote-pricing-section{
  padding:24px 24px 20px !important;
  background:linear-gradient(135deg,var(--otto-accent-2),#fff);
  border-bottom:1px solid var(--otto-border);
}
.tour-detail-page .tour-price-large{
  color:var(--otto-orange) !important;
  font-size:clamp(28px,3vw,38px);
  line-height:1.05;
  letter-spacing:-.025em;
}
.tour-detail-page .tour-price-large .price-unit{
  color:var(--otto-body) !important;
  font-size:14px;
}
.tour-detail-page .included-link-blue{
  color:var(--otto-teal-dark) !important;
  font-size:14px;
  text-decoration:none;
  font-weight:600;
}
.tour-detail-page .quote-form-section-new{
  padding:22px 24px 24px !important;
}
.tour-detail-page .quote-form-title{
  color:var(--otto-heading) !important;
  font-size:22px !important;
  margin-bottom:15px;
}
.tour-detail-page .quote-input-field{
  min-height:52px;
  border:1px solid #D9E2DF !important;
  border-radius:11px !important;
  background:#fff !important;
  transition:border-color .2s,box-shadow .2s;
}
.tour-detail-page .quote-input-field:focus-within{
  border-color:var(--otto-teal) !important;
  box-shadow:0 0 0 3px rgba(40,181,164,.12);
}
.tour-detail-page .quote-input-icon{
  color:var(--otto-teal-dark) !important;
}
.tour-detail-page .btn-quote-orange,
.tour-detail-page .quote-submit-btn,
.tour-detail-page button[type="submit"]{
  background:var(--otto-orange) !important;
  color:#fff !important;
  border-radius:11px !important;
  min-height:52px;
  font-weight:700;
  border:0 !important;
  box-shadow:0 8px 18px rgba(228,142,69,.22);
}
.tour-detail-page .btn-quote-orange:hover,
.tour-detail-page .quote-submit-btn:hover,
.tour-detail-page button[type="submit"]:hover{
  background:var(--otto-teal) !important;
  transform:translateY(-1px);
}

/* ---------- Rates: premium matrix + responsive scroll ---------- */
.tour-detail-page .rates-table-container{
  background:#fff !important;
  border:1px solid var(--otto-border);
  border-radius:14px;
  overflow-x:auto;
  box-shadow:none;
}
.tour-detail-page .rates-table{
  min-width:850px;
  background:#fff !important;
}
.tour-detail-page .rates-table thead{
  background:var(--otto-teal-dark) !important;
}
.tour-detail-page .rates-table th{
  background:var(--otto-teal-dark) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.18) !important;
  padding:13px 12px;
  font-size:12px;
  white-space:nowrap;
}
.tour-detail-page .rates-table th .room-info{
  color:rgba(255,255,255,.72) !important;
}
.tour-detail-page .rates-table td{
  color:var(--otto-body) !important;
  background:#fff !important;
  border-color:var(--otto-border) !important;
  padding:14px 12px;
  font-size:13px;
}
.tour-detail-page .rates-table tbody tr:nth-child(even) td{
  background:#FAFCFB !important;
}
.tour-detail-page .rates-table tbody tr:hover td{
  background:var(--otto-accent-1) !important;
}
.tour-detail-page .rates-table td:not(:first-child){
  color:var(--otto-heading) !important;
  font-weight:700;
}
.tour-detail-page .get-quote-link{
  color:#fff !important;
  background:var(--otto-orange);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:7px 11px;
  border-radius:8px;
  font-weight:700;
  text-decoration:none !important;
}
.tour-detail-page .get-quote-link:hover{
  background:var(--otto-teal);
}
.otto-rate-visual{
  margin-top:18px;
  padding:20px;
  border:1px solid var(--otto-border);
  border-radius:14px;
  background:linear-gradient(135deg,#fff,var(--otto-accent-1));
}
.otto-rate-visual-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:end;
  margin-bottom:16px;
}
.otto-rate-visual-title{
  margin:0;
  color:var(--otto-heading);
  font-size:18px;
  font-weight:700;
}
.otto-rate-visual-note{
  margin:0;
  color:#69736d;
  font-size:12px;
}
.otto-rate-bars{
  display:grid;
  gap:11px;
}
.otto-rate-row{
  display:grid;
  grid-template-columns:88px minmax(0,1fr) 105px;
  align-items:center;
  gap:10px;
}
.otto-rate-label{
  font-size:13px;
  font-weight:700;
  color:var(--otto-body);
}
.otto-rate-track{
  height:10px;
  border-radius:99px;
  background:#E8EFEC;
  overflow:hidden;
}
.otto-rate-bar{
  height:100%;
  width:var(--rate-width,60%);
  border-radius:99px;
  background:linear-gradient(90deg,var(--otto-teal),var(--otto-teal-dark));
}
.otto-rate-value{
  text-align:right;
  color:var(--otto-orange);
  font-weight:800;
  font-size:14px;
  white-space:nowrap;
}

/* ---------- Related tours ---------- */
.tour-detail-page .related-tours-section{
  background:var(--otto-accent-1);
  border-color:rgba(40,181,164,.16);
}
.tour-detail-page .related-tours-section .safari-card{
  border:1px solid var(--otto-border);
  box-shadow:0 8px 24px rgba(35,35,35,.07);
  border-radius:14px;
  overflow:hidden;
}
.tour-detail-page .related-tours-section .safari-title-overlay{
  color:#fff !important;
  text-shadow:0 2px 10px rgba(0,0,0,.7);
}
.tour-detail-page .related-tours-section .safari-price{
  color:var(--otto-orange) !important;
}

/* ---------- Full-width related safari cards ---------- */
.tour-detail-page .related-tours-container{
  width:100%;
  max-width:1200px;
  margin:28px auto 0;
  padding:0 20px;
}
.tour-detail-page .related-tours-container .related-tours-section{
  width:100%;
  margin:0;
}
.tour-detail-page .related-tours-section .related-tours-intro{
  max-width:760px;
  margin:-8px 0 22px;
  color:var(--otto-body);
  line-height:1.6;
}
.tour-detail-page .related-tours-section .row{
  margin-left:-10px;
  margin-right:-10px;
}
.tour-detail-page .related-tours-section .row > [class*="col-"]{
  padding-left:10px;
  padding-right:10px;
}
.tour-detail-page .related-tours-section .safari-card-link{
  display:flex;
  height:100%;
  color:inherit;
  text-decoration:none;
}
.tour-detail-page .related-tours-section .safari-card{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
}
.tour-detail-page .related-tours-section .safari-image{
  height:210px;
  overflow:hidden;
}
.tour-detail-page .related-tours-section .safari-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.tour-detail-page .related-tours-section .safari-content{
  min-width:0;
  flex:1;
}
.tour-detail-page .related-tours-section .safari-title-overlay{
  overflow-wrap:anywhere;
  color:#fff !important;
}
.tour-detail-page .related-tours-section .safari-quick-adventure{
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  line-clamp:3;
}

/* ---------- Mobile ---------- */
@media (max-width:767.98px){
  .tour-detail-page .tour-hero{
    height:310px;
  }
  .tour-detail-page .hero-overlay{
    padding:20px 16px;
  }
  .tour-detail-page .tour-title{
    font-size:27px !important;
    line-height:1.12;
    max-width:calc(100% - 58px);
  }
  .tour-detail-page .tour-nav-tabs .nav-link{
    padding:13px 12px 10px;
    font-size:13px;
  }
  .tour-detail-page .content-section{
    padding:19px 16px;
    margin-bottom:18px;
    border-radius:13px;
  }
  .tour-detail-page .features-grid{
    grid-template-columns:1fr;
  }
  .tour-detail-page .feature-item{
    padding:14px;
  }
  .tour-detail-page .sidebar-detail{
    order:-1;
  }
  .tour-detail-page .quote-card-combined{
    position:relative;
    top:auto;
    margin:0 0 18px;
  }
  .tour-detail-page .quote-pricing-section{
    padding:20px 18px 16px !important;
  }
  .tour-detail-page .quote-form-section-new{
    padding:18px !important;
  }
  .tour-detail-page .tour-price-large{
    font-size:30px;
  }
  .otto-rate-visual{
    padding:16px;
  }
  .otto-rate-visual-head{
    display:block;
  }
  .otto-rate-visual-note{
    margin-top:5px;
  }
  .otto-rate-row{
    grid-template-columns:74px minmax(0,1fr) 82px;
    gap:8px;
  }
  .otto-rate-label,.otto-rate-value{
    font-size:12px;
  }
}

@media (max-width:767.98px){
  .tour-detail-page .related-tours-container{
    margin-top:18px;
    padding:0 14px;
  }
  .tour-detail-page .related-tours-section .safari-image{
    height:205px;
  }
  .tour-detail-page .related-tours-section .row{
    margin-left:-7px;
    margin-right:-7px;
  }
  .tour-detail-page .related-tours-section .row > [class*="col-"]{
    padding-left:7px;
    padding-right:7px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  .tour-detail-page *{
    scroll-behavior:auto !important;
    transition:none !important;
  }
}


/* v2.0.5 — related safari tours and itinerary-matched useful articles */
.tour-detail-page .tour-interested-section .tour-interested-intro{margin:0 0 12px;color:var(--stm-body,#494D41);font-size:14px}
.tour-detail-page .interested-tour-list{display:grid;grid-template-columns:1fr;gap:10px;margin:0 0 4px}
.tour-detail-page .interested-tour-mini{display:flex;min-width:0;gap:11px;padding:8px;border:1px solid #E3E8E5;border-radius:11px;background:#fff;text-decoration:none;box-shadow:0 3px 12px rgba(35,35,35,.05);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.tour-detail-page .interested-tour-mini:hover{transform:translateY(-1px);border-color:#28B5A4;box-shadow:0 7px 18px rgba(35,35,35,.09)}
.tour-detail-page .interested-tour-mini img{width:86px;height:70px;object-fit:cover;border-radius:8px;flex:0 0 86px}
.tour-detail-page .interested-tour-mini-body{display:flex;min-width:0;flex-direction:column;justify-content:center;gap:2px}
.tour-detail-page .interested-tour-mini strong{color:#232323;font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tour-detail-page .interested-tour-days{font-size:11px;font-weight:700;color:#26786E;text-transform:uppercase;letter-spacing:.04em}
.tour-detail-page .interested-tour-link{font-size:12px;font-weight:700;color:#E48E45}
.tour-detail-page .related-articles-section{margin-top:0}
.tour-detail-page .related-articles-kicker{display:block;color:#28B5A4;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-bottom:5px}
.tour-detail-page .related-articles-heading{margin-bottom:18px}
.tour-detail-page .related-article-card{height:100%;overflow:hidden;border:1px solid #E3E8E5;border-radius:14px;background:#fff;box-shadow:0 5px 20px rgba(35,35,35,.06);transition:transform .2s ease,box-shadow .2s ease}
.tour-detail-page .related-article-card:hover{transform:translateY(-3px);box-shadow:0 12px 28px rgba(35,35,35,.11)}
.tour-detail-page .related-article-image-link{display:block;overflow:hidden}
.tour-detail-page .related-article-card img{display:block;width:100%;height:180px;object-fit:cover;transition:transform .35s ease}
.tour-detail-page .related-article-card:hover img{transform:scale(1.035)}
.tour-detail-page .related-article-body{padding:15px}
.tour-detail-page .related-article-category{display:inline-block;color:#26786E;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px}
.tour-detail-page .related-article-body h3{margin:0 0 7px;font-size:17px;line-height:1.35}
.tour-detail-page .related-article-body h3 a{color:#232323;text-decoration:none}
.tour-detail-page .related-article-body h3 a:hover{color:#28B5A4}
.tour-detail-page .related-article-body p{margin:0 0 11px;color:#494D41;font-size:13px;line-height:1.55}
.tour-detail-page .related-article-read{font-size:13px;font-weight:800;color:#E48E45;text-decoration:none}
.tour-detail-page .related-article-read:hover{color:#28B5A4}
@media (max-width:767.98px){.tour-detail-page .related-article-card img{height:205px}.tour-detail-page .related-article-body{padding:14px}.tour-detail-page .interested-tour-mini img{width:82px;height:66px;flex-basis:82px}}


/* v2.0.9 accessibility/mobile refinement: Tripadvisor CTA */
.otto-tripadvisor-reviews .otto-tripadvisor-read-more,
.otto-tripadvisor-reviews .otto-tripadvisor-read-more:visited {
    color:#fff!important;background:#28B5A4!important;-webkit-text-fill-color:#fff!important;
}
.otto-tripadvisor-reviews .otto-tripadvisor-read-more:hover,
.otto-tripadvisor-reviews .otto-tripadvisor-read-more:focus,
.otto-tripadvisor-reviews .otto-tripadvisor-read-more:active {
    color:#fff!important;background:#26786e!important;-webkit-text-fill-color:#fff!important;
}
.otto-tripadvisor-reviews .otto-tripadvisor-read-more:focus-visible {
    outline:3px solid #E48E45!important;outline-offset:2px;
}
.otto-tripadvisor-reviews,.otto-tripadvisor-reviews *{box-sizing:border-box}
.otto-tripadvisor-reviews{width:100%;max-width:100%;overflow:hidden}
@media(max-width:767px){
 .otto-tripadvisor-reviews .otto-tripadvisor-read-more{display:flex;width:100%;min-height:44px;align-items:center;justify-content:center;text-align:center;white-space:normal;line-height:1.3;padding:11px 16px}
 .otto-tripadvisor-reviews .otto-tripadvisor-slide{overflow-wrap:anywhere}
}


/* v2.1.0 — Mobile visibility fix for Photo Gallery + Tripadvisor Reviews.
   Scoped to the tour detail so existing desktop/booking functionality is untouched. */
@media (max-width: 767px) {
  /* Never hide the two tour-detail cards on phones. */
  .otto-tripadvisor-reviews,
  .otto-tour-photo-gallery,
  .otto-photo-gallery,
  .tour-photo-gallery,
  .photo-gallery-card,
  .photo-album-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Keep review/gallery cards inside the mobile content width. */
  .otto-tripadvisor-reviews,
  .otto-tour-photo-gallery,
  .otto-photo-gallery,
  .tour-photo-gallery,
  .photo-gallery-card,
  .photo-album-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* Do not let images or slider tracks force horizontal overflow. */
  .otto-tripadvisor-reviews img,
  .otto-tour-photo-gallery img,
  .otto-photo-gallery img,
  .tour-photo-gallery img,
  .photo-gallery-card img,
  .photo-album-card img {
    max-width: 100%;
    height: auto;
  }

  .otto-tripadvisor-reviews .otto-tripadvisor-slider,
  .otto-tripadvisor-reviews .otto-tripadvisor-track,
  .otto-tripadvisor-reviews .otto-tripadvisor-slide {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  /* If a parent sidebar/column was collapsed or clipped, restore its flow. */
  .tour-detail-sidebar,
  .tour-sidebar,
  .tour-detail__sidebar,
  .tour-detail-main-sidebar {
    min-width: 0;
  }
}


/* v2.1.1 — FINAL MOBILE STRUCTURAL VISIBILITY FIX
   The gallery/reviews cards are part of the tour-detail sidebar stack.
   Keep the sidebar/card wrappers in normal document flow on phones.
   Scoped to tour detail only; no desktop rules are changed. */
@media (max-width: 767px) {
  /* Restore the tour-detail sidebar itself to a visible, normal-flow block. */
  .tour-detail-premium .tour-detail-sidebar,
  .tour-detail-premium .tour-sidebar,
  .tour-detail-premium .sidebar,
  .tour-detail .tour-detail-sidebar,
  .tour-detail .tour-sidebar,
  .tour-detail .sidebar,
  .single-tour .tour-detail-sidebar,
  .single-tour .tour-sidebar {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
  }

  /* Explicitly restore any direct sidebar card children. */
  .tour-detail-premium .tour-detail-sidebar > *,
  .tour-detail-premium .tour-sidebar > *,
  .tour-detail .tour-detail-sidebar > *,
  .tour-detail .tour-sidebar > *,
  .single-tour .tour-detail-sidebar > *,
  .single-tour .tour-sidebar > * {
    visibility: visible !important;
    opacity: 1 !important;
    max-height: none !important;
  }

  /* Gallery/review cards: never collapse, clip or become desktop-only on mobile. */
  .otto-tripadvisor-reviews,
  .otto-tour-photo-gallery,
  .otto-photo-gallery,
  .tour-photo-gallery,
  .photo-gallery-card,
  .photo-album-card,
  .tripadvisor-reviews-card,
  .tripadvisor-review-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* If the card is inside a Bootstrap grid column, keep it full-width. */
  .otto-tripadvisor-reviews[class*="col-"],
  .otto-tour-photo-gallery[class*="col-"],
  .otto-photo-gallery[class*="col-"],
  .photo-gallery-card[class*="col-"],
  .photo-album-card[class*="col-"] {
    flex: 0 0 100% !important;
  }

  /* Prevent slider/gallery inner wrappers from hiding their first child. */
  .otto-tripadvisor-reviews [hidden],
  .otto-tripadvisor-reviews [aria-hidden="true"] {
    /* Do not override semantic hidden content globally; only the slider's
       active-state is controlled by its JS. */
  }

  .otto-tripadvisor-reviews .otto-tripadvisor-read-more,
  .otto-tripadvisor-reviews .otto-tripadvisor-read-more:visited {
    color: #fff !important;
    background: #28B5A4 !important;
    -webkit-text-fill-color: #fff !important;
  }

  .otto-tripadvisor-reviews .otto-tripadvisor-read-more:hover,
  .otto-tripadvisor-reviews .otto-tripadvisor-read-more:focus,
  .otto-tripadvisor-reviews .otto-tripadvisor-read-more:active {
    color: #fff !important;
    background: #26786e !important;
    -webkit-text-fill-color: #fff !important;
  }
}


/* =========================================================
   v2.1.2 — ACTUAL MOBILE SIDEBAR FIX
   Root cause: custom-booking.css intentionally sets
   .col-lg-4.sidebar-detail { display:none !important; }
   on mobile. That hides the Photo Gallery and Tripadvisor
   cards because both live inside that sidebar.
   On mobile we expose the sidebar but keep the desktop
   booking/quote card hidden. The gallery and reviews remain
   in normal flow immediately below the gallery card.
   ========================================================= */
@media (max-width: 767.98px) {
  .tour-detail-page .col-lg-4.sidebar-detail {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
    order: -1 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* The mobile page already has its dedicated quote interface.
     Do not duplicate the desktop sidebar booking card. */
  .tour-detail-page .col-lg-4.sidebar-detail > .quote-card-combined {
    display: none !important;
  }

  /* Actual gallery wrapper used by the rendered tour template. */
  .tour-detail-page .col-lg-4.sidebar-detail > .sidebar-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0 0 14px !important;
    box-sizing: border-box !important;
  }

  .tour-detail-page .col-lg-4.sidebar-detail .gallery-preview {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;
    min-height: 0 !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    margin: 0 0 10px !important;
  }

  .tour-detail-page .col-lg-4.sidebar-detail .gallery-link {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    color: #26786e !important;
    font-weight: 700 !important;
  }

  /* Actual Tripadvisor card class used by the template. */
  .tour-detail-page .otto-tripadvisor-reviews-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: 0 0 18px !important;
  }

  .tour-detail-page .otto-tripadvisor-reviews-card * {
    box-sizing: border-box !important;
  }

  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:link,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:visited,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:hover,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:focus,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: #28B5A4 !important;
    text-decoration: none !important;
  }

  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:hover,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:focus,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:active {
    background: #26786e !important;
  }
}

/* Also enforce the Tripadvisor CTA color on desktop/tablet. */
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:link,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:visited {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #28B5A4 !important;
}
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:hover,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:focus,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #26786e !important;
}


/* =========================================================
   v2.1.3 — MOBILE-ONLY FINAL CARD ORDER
   Desktop is intentionally unchanged.
   Mobile shows ONLY:
   1) Photo Gallery
   2) Tripadvisor Reviews
   immediately before Related Tanzania Safari.
   The quote/price card remains hidden on mobile.
   ========================================================= */
.otto-mobile-late-cards{display:none!important;}

@media (max-width:767.98px){
  /* Hide original top sidebar copies. */
  .tour-detail-page .otto-original-sidebar-gallery,
  .tour-detail-page .otto-original-sidebar-review{
    display:none!important;
  }

  /* Hide the duplicate mobile price/quote card. */
  .tour-detail-page .sidebar-detail .quote-card-combined{
    display:none!important;
  }

  /* The only two cards we add on mobile. */
  .tour-detail-page .otto-mobile-late-cards{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin:22px 0 28px!important;
    padding:0!important;
    clear:both!important;
    box-sizing:border-box!important;
  }

  .tour-detail-page .otto-mobile-late-cards .otto-mobile-gallery-card,
  .tour-detail-page .otto-mobile-late-cards .otto-mobile-review-card{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    float:none!important;
    position:relative!important;
    box-sizing:border-box!important;
    overflow:visible!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  .tour-detail-page .otto-mobile-late-cards .otto-mobile-gallery-card{
    margin-bottom:14px!important;
  }

  .tour-detail-page .otto-mobile-late-cards .gallery-preview{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:220px!important;
    min-height:0!important;
    object-fit:cover!important;
    border-radius:12px!important;
  }

  .tour-detail-page .otto-mobile-late-cards .gallery-link{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:44px!important;
    box-sizing:border-box!important;
  }

  /* Tripadvisor CTA: white text on ALL devices/states. */
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:link,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:visited,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:hover,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:focus,
  .tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:active{
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    background:#28B5A4!important;
    text-decoration:none!important;
  }

  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-reviews-card{
    margin-top:0!important;
  }
}

/* Desktop/tablet readability — preserve layout, only correct CTA contrast. */
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:link,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:visited{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#28B5A4!important;
}
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:hover,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:focus,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:active{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  background:#26786e!important;
}


/* =========================================================
   v2.1.5 — MOBILE: KEEP THE TOP MOBILE QUOTE, REMOVE ONLY
   DUPLICATE SIDEBAR COPIES
   Desktop is unchanged.
   On phones:
   - Keep the existing top mobile quote/pricing section.
   - Keep its floating Get a Free Quote behavior.
   - Hide only the duplicate desktop/sidebar quote card.
   - Hide only the duplicate sidebar Photo Gallery.
   - Hide only the duplicate sidebar Tripadvisor review slider.
   - Keep the separate mobile Gallery + Tripadvisor cards
     immediately before Related Tanzania Safaris.
   ========================================================= */
@media (max-width:767.98px){
  /* IMPORTANT: do NOT hide the whole sidebar container.
     The top mobile quote/pricing block is separate and must remain. */
  .tour-detail-page .sidebar-detail{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  /* Remove the duplicate quote/pricing/sidebar booking card only. */
  .tour-detail-page .sidebar-detail .quote-card-combined{
    display:none!important;
    visibility:hidden!important;
  }

  /* Remove the duplicate Photo Gallery from the sidebar only. */
  .tour-detail-page .sidebar-detail .otto-original-sidebar-gallery{
    display:none!important;
    visibility:hidden!important;
  }

  /* Remove the duplicate Tripadvisor slider from the sidebar only. */
  .tour-detail-page .sidebar-detail .otto-original-sidebar-review{
    display:none!important;
    visibility:hidden!important;
  }

  /* The relocated mobile cards remain visible and are the ONLY
     Gallery + Tripadvisor cards shown before Related Tanzania Safaris. */
  .tour-detail-page .otto-mobile-late-cards{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    margin:22px 0 28px!important;
    padding:0!important;
    clear:both!important;
    box-sizing:border-box!important;
  }

  .tour-detail-page .otto-mobile-late-cards .otto-mobile-gallery-card,
  .tour-detail-page .otto-mobile-late-cards .otto-mobile-review-card{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    position:relative!important;
    float:none!important;
    box-sizing:border-box!important;
  }

  .tour-detail-page .otto-mobile-late-cards .otto-mobile-gallery-card{
    margin-bottom:14px!important;
  }

  .tour-detail-page .otto-mobile-late-cards .gallery-preview{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:220px!important;
    min-height:0!important;
    object-fit:cover!important;
    border-radius:12px!important;
  }

  .tour-detail-page .otto-mobile-late-cards .gallery-link{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:44px!important;
    box-sizing:border-box!important;
  }

  /* Read More Reviews stays white on mobile. */
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all,
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all:link,
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all:visited,
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all:hover,
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all:focus,
  .tour-detail-page .otto-mobile-late-cards .otto-tripadvisor-all:active{
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    background:#28B5A4!important;
    text-decoration:none!important;
  }
}

/* Desktop/tablet: no layout/content change; only preserve CTA contrast. */
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:link,
.tour-detail-page .otto-tripadvisor-reviews-card .otto-tripadvisor-all:visited{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}



/* =========================================================
   v2.1.6 — MOBILE DUPLICATE SIDEBAR REMOVAL
   The top mobile quote bar (.mobile-hero-quote) is intentionally
   preserved. On phones, remove the original desktop sidebar
   completely because it duplicates the late mobile Gallery +
   Tripadvisor cards. Desktop/tablet remain unchanged.
   ========================================================= */
@media (max-width: 767.98px) {
  .tour-detail-page .container > .row > .col-lg-4.sidebar-detail,
  .tour-detail-page .sidebar-detail {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    flex: 0 0 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Keep only the intentionally relocated mobile cards. */
  .tour-detail-page .otto-mobile-late-cards {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}


/* =========================================================
   v2.1.7 FINAL MOBILE STRUCTURAL FIX
   The original quote/gallery/review sidebar is desktop-only.
   The separate .otto-mobile-late-cards block is the mobile
   Gallery + Tripadvisor block. The top mobile quote is NOT
   inside this sidebar and is untouched.
   ========================================================= */
@media screen and (max-width: 767.98px) {
  html body .tour-detail-page .otto-desktop-tour-sidebar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    flex: 0 0 0 !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html body .tour-detail-page .otto-mobile-late-cards {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Desktop: the original sidebar remains exactly as before. */
@media screen and (min-width: 768px) {
  .tour-detail-page .otto-desktop-tour-sidebar {
    display: block;
  }
}
