/*
Theme Name: Travelers of Madagascar
Theme URI: https://travelersofmadagascar.com/
Author: Travelers of Madagascar
Author URI: https://travelersofmadagascar.com/
Description: Fully editable WordPress theme for Travelers of Madagascar — Gutenberg-friendly, masonry tours/blog, structured templates (Beaches, Cities, National Parks, Sights, Experiences), interactive maps, itinerary builder, multilingual-ready.
Version: 21.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tom
Tags: travel, gutenberg, block-editor, custom-colors, custom-menu, custom-logo, featured-images, full-width-template, threaded-comments, translation-ready
*/

:root {
  --tom-accent-start: #e11d2e;
  --tom-accent-end: #f97316;
  --tom-gradient: linear-gradient(90deg, var(--tom-accent-start) 0%, var(--tom-accent-end) 100%);
  --tom-text: #1a1a1a;
  --tom-muted: #666;
  --tom-bg: #fff;
  --tom-bg-alt: #faf7f2;
  --tom-border: #e5e5e5;
  --tom-radius: 12px;
  --tom-shadow: 0 6px 20px rgba(0,0,0,.08);
  --tom-shadow-lg: 0 12px 40px rgba(0,0,0,.12);
  --tom-font-body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --tom-font-display: 'Montserrat', system-ui, -apple-system, sans-serif;
  --tom-header-h: 110px;
  --tom-link: #2563eb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--tom-font-body); color: var(--tom-text); background: var(--tom-bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--tom-link); text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; }
h1, h2, h3, h4 { font-family: var(--tom-font-display); font-weight: 800; line-height: 1.15; margin: 0 0 .5em; text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-weight: 900; }
h2 { font-weight: 800; }
h3 { font-weight: 700; text-transform: none; }
h4 { font-weight: 700; text-transform: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================
   STICKY HEADER WRAP (topbar + header pinned)
   ============================================ */
.tom-header-wrap {
  position: sticky;
  top: 0;
  z-index: 250;
  background: #fff;
  transition: box-shadow .2s ease;
}
.tom-header-wrap.is-scrolled {
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.tom-header-wrap.is-scrolled .tom-topbar { padding: 2px 0; font-size: 11px; }
.tom-header-wrap.is-scrolled .tom-topbar-contact a span { display: none; }
.tom-header-wrap.is-scrolled .tom-header .container { padding-top: 6px; padding-bottom: 6px; }
.tom-header-wrap.is-scrolled .tom-logo img { max-height: 38px; }
.tom-header-wrap.is-scrolled .tom-logo { font-size: 18px; }
.tom-header {
  background: #fff;
  border-bottom: 1px solid var(--tom-border);
}

.tom-topbar {
  background: var(--tom-gradient);
  color: #fff;
  font-size: 13px;
  padding: 6px 0;
}
.tom-topbar .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.tom-topbar-contact { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.tom-topbar a { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.tom-topbar a:hover { opacity: .85; color: #fff; }
.tom-topbar svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Language switcher */
.tom-lang-switch { display: inline-flex; align-items: center; gap: 6px; }
.tom-lang-switch select {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.tom-lang-switch select option { color: #1a1a1a; }
#google_translate_element { display: inline-block; }
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.skiptranslate { display: none !important; }

.tom-header .container { display: flex; align-items: center; justify-content: flex-start; padding-top: 12px; padding-bottom: 12px; gap: 20px; }
.tom-logo { font-family: var(--tom-font-display); font-size: 22px; font-weight: 700; background: var(--tom-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-flex; align-items: center; margin-right: auto; flex-shrink: 0; }
.tom-header .tom-nav { margin-left: auto; }
.tom-logo img { max-height: 56px; width: auto; display: block; }
.tom-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.tom-nav a { color: var(--tom-text); font-weight: 600; font-size: 14px; }
.tom-nav a:hover { color: var(--tom-accent-start); }
.tom-itinerary-count { background: var(--tom-gradient); color: #fff !important; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.tom-mobile-toggle { display: none; background: none; border: 0; font-size: 26px; cursor: pointer; padding: 4px 8px; }

@media (max-width: 980px) {
  .tom-mobile-toggle { display: block; }
  .tom-header .container { flex-wrap: wrap; }
  .tom-nav { display: none; width: 100%; order: 3; padding: 12px 0; }
  .tom-nav.open { display: block; }
  .tom-nav ul { flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
  .tom-nav li { width: 100%; }
  .tom-topbar { font-size: 12px; }
  .tom-topbar .container { justify-content: center; }
  .tom-topbar-contact { gap: 10px; }
  .tom-topbar-contact span { display: none; }
  .tom-topbar-contact a span.tom-show-mobile { display: inline; }
}
@media (max-width: 600px) {
  .tom-logo img { max-height: 44px; }
  .tom-logo { font-size: 18px; }
}

/* Buttons */
.tom-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; transition: transform .2s, box-shadow .2s, opacity .2s; text-decoration: none; }
.tom-btn-primary { background: var(--tom-gradient); color: #fff; }
.tom-btn-primary:hover { transform: translateY(-2px); box-shadow: var(--tom-shadow); color: #fff; }
.tom-btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.tom-btn-outline:hover { background: #fff; color: var(--tom-accent-start); }
.tom-btn-ghost { background: #fff; color: var(--tom-accent-start); border: 2px solid var(--tom-accent-start); }
.tom-btn-ghost:hover { background: var(--tom-gradient); color: #fff; border-color: transparent; }

/* Hero — full-width 1920+ */
.tom-hero { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; background: #222 center/cover no-repeat; overflow: hidden; }
.tom-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.55) 100%); }
.tom-hero-inner { position: relative; max-width: 800px; padding: 60px 20px; }
.tom-hero h1 { font-size: clamp(32px, 6vw, 60px); margin: 0 0 16px; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.tom-hero p { font-size: clamp(15px, 2vw, 19px); margin: 0 0 28px; opacity: .95; }
.tom-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Detail hero — full image visible (contain) over a blurred backdrop */
.tom-detail-hero {
  position: relative; display: flex; align-items: flex-end; color: #fff;
  background: #111 center/cover no-repeat; /* used as blurred backdrop via ::after */
  min-height: 360px;
  max-height: 80vh;
  overflow: hidden;
}
.tom-detail-hero::after {
  content: ''; position: absolute; inset: 0;
  background: inherit; filter: blur(28px) brightness(.55);
  transform: scale(1.15); z-index: 0;
}
.tom-detail-hero .tom-detail-hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center; z-index: 1;
  background: transparent;
}
.tom-detail-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.75) 100%);
  pointer-events: none;
}
.tom-detail-hero .container { position: relative; z-index: 3; padding-bottom: 36px; padding-top: 24px; }
.tom-detail-hero h1 { font-size: clamp(28px, 4vw, 48px); text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.tom-detail-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; opacity: .95; margin-top: 6px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }

/* Blog/itinerary item hero — slightly shorter */
.tom-detail-hero--blog { min-height: 320px; max-height: 70vh; }
.tom-detail-hero--blog .tom-detail-hero-img { object-fit: contain; }

@media (min-width: 900px) {
  .tom-detail-hero { min-height: 520px; }
}

.tom-color-bar { height: 6px; background: var(--tom-gradient); }

/* Sections */
.tom-section { padding: 50px 0; }
.tom-section-tight { padding: 24px 0; }
.tom-section-alt { background: var(--tom-bg-alt); }
.tom-section-head { text-align: center; margin-bottom: 32px; }
.tom-section-head h2 { font-size: clamp(26px, 4vw, 38px); }
.tom-section-head .lead { color: var(--tom-muted); font-size: 16px; max-width: 600px; margin: 0 auto; }
.tom-eyebrow { display: inline-block; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; background: var(--tom-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; margin-bottom: 10px; }
.tom-intro { max-width: 820px; margin: 0 auto; text-align: center; font-size: 17px; color: var(--tom-muted); }

/* Masonry */
.tom-masonry { column-count: 3; column-gap: 20px; }
.tom-masonry > * { break-inside: avoid; margin-bottom: 20px; display: block; }
@media (max-width: 900px) { .tom-masonry { column-count: 2; } }
@media (max-width: 600px) { .tom-masonry { column-count: 1; } }

/* Card */
.tom-card { background: #fff; border-radius: var(--tom-radius); overflow: hidden; box-shadow: var(--tom-shadow); transition: transform .25s, box-shadow .25s; text-decoration: none; color: inherit; display: block; }
.tom-card:hover { transform: translateY(-4px); box-shadow: var(--tom-shadow-lg); color: inherit; }
.tom-card-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.tom-card-body { padding: 18px; }
.tom-card-title { font-size: 19px; margin: 0 0 8px; text-transform: none; }
.tom-card-title a { color: inherit; }
.tom-card-title a:hover { color: var(--tom-link); }
.tom-card-meta { font-size: 13px; color: var(--tom-muted); display: flex; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.tom-card-excerpt { color: var(--tom-muted); font-size: 14px; margin: 0 0 14px; }
.tom-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tom-card-actions .tom-btn { padding: 8px 14px; font-size: 13px; }

/* Quick links */
.tom-quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tom-quicklink { position: relative; border-radius: var(--tom-radius); overflow: hidden; aspect-ratio: 4/3; display: flex; align-items: flex-end; padding: 18px; color: #fff; font-weight: 700; font-size: 18px; text-shadow: 0 2px 10px rgba(0,0,0,.5); background: #333 center/cover; transition: transform .25s; }
.tom-quicklink::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.7) 100%); }
.tom-quicklink span { position: relative; z-index: 1; }
.tom-quicklink:hover { transform: scale(1.03); color: #fff; }

/* Map */
.tom-map-teaser { border-radius: var(--tom-radius); overflow: hidden; box-shadow: var(--tom-shadow); }
.tom-map { width: 100%; height: 500px; background: #eef3f8; }
.tom-map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

/* Filter buttons for map */
.tom-filter { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 999px; border: 2px solid var(--tom-border); background: #fff; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; color: var(--tom-text); }
.tom-filter:hover { border-color: var(--pin, var(--tom-accent-start)); color: var(--pin, var(--tom-accent-start)); }
.tom-filter.active { background: var(--pin, var(--tom-accent-start)); color: #fff; border-color: var(--pin, var(--tom-accent-start)); }
.tom-filter em { font-style: normal; font-size: 11px; opacity: .75; }

/* Pin styling */
.tom-pin-wrap { background: none !important; border: none !important; }
.tom-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; width: 34px; height: 34px; font-size: 18px; line-height: 1; position: relative; }
.tom-pin::after { content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--pin, #e11d2e); }
.tom-pin span { position: relative; z-index: 1; }
.tom-pin-label { border-radius: 8px; padding: 4px 10px; background: var(--tom-accent-start, #e11d2e); color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; height: auto; width: auto; box-shadow: 0 2px 8px rgba(0,0,0,0.25); }
.tom-pin-label::after { border-top-color: var(--tom-accent-start, #e11d2e); }

/* Testimonials */
.tom-testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tom-testimonial { background: #fff; border-radius: var(--tom-radius); padding: 24px; box-shadow: var(--tom-shadow); }
.tom-testimonial p { font-style: italic; margin: 10px 0; }
.tom-testimonial cite { color: var(--tom-muted); font-size: 13px; }
.tom-stars { color: #f59e0b; }

/* Detail pages */
.tom-detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .tom-detail-grid { grid-template-columns: 1fr; } }
.tom-detail-section { margin-bottom: 28px; }
.tom-sidebar { background: #fff; border: 1px solid var(--tom-border); border-radius: var(--tom-radius); padding: 22px; box-shadow: var(--tom-shadow); position: sticky; top: 90px; }
.tom-sidebar h3 { font-size: 20px; margin-bottom: 8px; text-transform: none; }
.tom-sidebar .price { font-size: 22px; font-weight: 700; background: var(--tom-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tom-sidebar ul li { padding: 6px 0; border-bottom: 1px solid var(--tom-border); font-size: 14px; }

/* Tabs */
.tom-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 2px solid var(--tom-border); padding-bottom: 0; }
.tom-tab { padding: 10px 18px; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--tom-muted); border-bottom: 3px solid transparent; margin-bottom: -2px; transition: color .2s, border-color .2s; font-family: inherit; }
.tom-tab:hover { color: var(--tom-text); }
.tom-tab.active { color: var(--tom-accent-start); border-bottom-color: var(--tom-accent-start); }
.tom-tab-panel { display: none; }
.tom-tab-panel.active { display: block; }
/* Sticky tabs (used on Build Itinerary) */
.tom-tabs-sticky { position: sticky; top: 70px; z-index: 40; background:#fff; padding-top:8px; margin-left:-8px; margin-right:-8px; padding-left:8px; padding-right:8px; box-shadow: 0 6px 12px -8px rgba(0,0,0,.08); }

/* Day blocks */
.tom-day { padding: 18px 0; border-bottom: 1px solid var(--tom-border); }
.tom-day:last-child { border-bottom: 0; }
.tom-day .day-num { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; background: var(--tom-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 4px; }
.tom-day h4 { margin-bottom: 6px; }
.tom-day-flash { animation: tomFlash 1.4s ease; }
@keyframes tomFlash { 0%,100%{ background:transparent } 20%{ background:rgba(225,29,46,.08) } }

/* Pricing sidebar (v3.3) */
.tom-sidebar-pricing { margin: 12px 0; padding: 12px; background: var(--tom-bg-alt); border-radius: 10px; }

/* Gallery */
.tom-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tom-gallery img { border-radius: 8px; cursor: pointer; transition: transform .2s; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.tom-gallery img:hover { transform: scale(1.03); }

/* Lightbox */
.tom-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; padding: 20px; }
.tom-lightbox.open { display: flex; }
.tom-lightbox img { max-width: 95%; max-height: 90vh; border-radius: 8px; }
.tom-lightbox-close { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 32px; cursor: pointer; background: none; border: 0; }

/* Related tours grid */
.tom-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }

/* Footer */
.tom-footer { background: #1a1a1a; color: #ccc; padding: 40px 0 20px; font-size: 14px; }
.tom-footer a { color: #fff; }
.tom-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; margin-bottom: 30px; }
.tom-footer h4 { color: #fff; font-size: 16px; margin-bottom: 12px; text-transform: none; }
.tom-footer ul { list-style: none; padding: 0; margin: 0; }
.tom-footer li { padding: 4px 0; }
.tom-footer-bottom { border-top: 1px solid #333; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: #999; }

/* Build itinerary */
.tom-builder-list { list-style: none; padding: 0; margin: 0 0 16px; }
.tom-builder-list li { padding: 10px 14px; border: 1px solid var(--tom-border); border-radius: 8px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; background: #fff; font-size: 14px; }
.tom-builder-list button { background: none; border: 0; font-size: 18px; cursor: pointer; color: #dc2626; padding: 0 6px; }
.tom-notice { padding: 12px 16px; border-radius: 8px; font-size: 14px; }
.tom-notice-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.tom-notice-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* 404 */
.tom-404 { text-align: center; padding: 80px 20px; }

/* Tour map */
.tom-tour-map { width: 100%; height: 460px; border-radius: 12px; overflow: hidden; background: #eef3f8; }
.tom-tour-map-tall { height: 600px; }
@media (max-width: 768px) {
  .tom-tour-map, .tom-tour-map-tall { height: 420px; }
}
@media (max-width: 600px) { .tom-tour-map { height: 360px; } }

.leaflet-tooltip.tom-day-tooltip {
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  padding: 4px 8px;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.leaflet-tooltip.tom-day-tooltip::before { display: none; }

/* Itinerary layout */
.tom-itinerary-layout { display: block; }
.tom-itinerary-layout.has-map {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.tom-itinerary-map-col { position: sticky; top: 90px; }
.tom-itinerary-map-col .tom-tour-map { height: 560px; }
@media (max-width: 900px) {
  .tom-itinerary-layout.has-map { grid-template-columns: 1fr; }
  .tom-itinerary-map-col { position: static; }
  .tom-itinerary-map-col .tom-tour-map { height: 380px; }
}

/* Category page sidebar layout */
.tom-cat-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.tom-cat-sidebar { position: sticky; top: 90px; }
@media (max-width: 900px) {
  .tom-cat-layout { grid-template-columns: 1fr; }
  .tom-cat-sidebar { position: static; }
}

/* Sidebar widgets */
.tom-sidebar-widgets { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.tom-widget {
  background: #fff;
  border: 1px solid var(--tom-border);
  border-radius: var(--tom-radius);
  padding: 18px;
  box-shadow: var(--tom-shadow);
}
.tom-widget-title {
  font-family: var(--tom-font-display);
  font-size: 18px;
  margin: 0 0 12px;
  color: var(--tom-text);
  text-transform: none;
}
.tom-quick-contact input,
.tom-quick-contact textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--tom-border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 8px;
  box-sizing: border-box;
  background: #fafafa;
}
.tom-quick-contact textarea { resize: vertical; }
.tom-quick-contact-msg { margin-top: 8px; font-size: 13px; }
.tom-quick-contact-msg.success { color: #16a34a; }
.tom-quick-contact-msg.error { color: #dc2626; }

/* Fullscreen map overlay */
.tom-map-fs {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(15, 23, 42, .92);
  display: flex; align-items: stretch; justify-content: stretch;
  padding: 24px;
}
.tom-map-fs[hidden] { display: none; }
.tom-map-fs-inner {
  flex: 1; background: #fff; border-radius: 12px; overflow: hidden;
  position: relative;
}
.tom-map-fs-inner > div { width: 100% !important; height: 100% !important; }
.tom-map-fs-close {
  position: absolute; top: 12px; right: 16px; z-index: 10000;
  background: #fff; border: 0; border-radius: 999px;
  width: 40px; height: 40px; font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.tom-map-fullscreen { font-size: 13px; padding: 6px 12px; }

/* Included / Not included grid */
.tom-include-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
}
@media (max-width: 700px) { .tom-include-grid { grid-template-columns: 1fr; } }
.tom-include-col {
  border-radius: 12px;
  padding: 18px 20px;
  border: 1px solid var(--tom-border);
}
.tom-include-col h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.tom-include-col ul { list-style: none; padding: 0; margin: 0; }
.tom-include-col li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; border-bottom: 1px dashed rgba(0,0,0,.06); }
.tom-include-col li:last-child { border-bottom: 0; }
.tom-include-yes { background: #f0fdf4; border-color: #bbf7d0; }
.tom-include-yes h3 { color: #15803d; }
.tom-include-yes li::before { content: "✓ "; position: absolute; left: 0; top: 6px; color: #16a34a; font-weight: 700; padding-right: 6px; }
.tom-include-no { background: #fef2f2; border-color: #fecaca; }
.tom-include-no h3 { color: #b91c1c; }
.tom-include-no li::before { content: "✕ "; position: absolute; left: 0; top: 6px; color: #dc2626; font-weight: 700; padding-right: 6px; }

/* Sidebar Included / Not included */
.tom-sidebar-include { margin: 14px 0; padding: 12px; background: #fff; border: 1px solid var(--tom-border); border-radius: 10px; }
.tom-sidebar-include > div + div { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--tom-border); }
.tom-sidebar-include strong { display: block; margin-bottom: 6px; font-size: 13px; }
.tom-sidebar-include ul { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.tom-sidebar-include li { padding: 3px 0 3px 16px; position: relative; line-height: 1.35; }
.tom-sidebar-include-yes strong { color: #15803d; }
.tom-sidebar-include-yes li::before { content: "✓"; color: #15803d; position: absolute; left: 0; font-weight: 700; }
.tom-sidebar-include-no strong { color: #b91c1c; }
.tom-sidebar-include-no li::before { content: "✕"; color: #b91c1c; position: absolute; left: 0; font-weight: 700; }

/* Rich-text day descriptions */
.tom-day-desc { line-height: 1.6; }
.tom-day-desc p { margin: 0 0 8px; }
.tom-day-desc p:last-child { margin-bottom: 0; }
.tom-day-desc a { color: var(--tom-link); text-decoration: underline; }
.tom-day-desc strong { font-weight: 700; }
.tom-day-desc em { font-style: italic; }
.tom-day-desc ul, .tom-day-desc ol { margin: 6px 0 8px 22px; }

/* Rich text itinerary block */
.tom-itinerary-rich{font-size:16px;line-height:1.7;color:var(--tom-text);margin-bottom:18px}
.tom-itinerary-rich p{margin:0 0 12px}
.tom-itinerary-rich ul,.tom-itinerary-rich ol{margin:0 0 12px 22px}
.tom-itinerary-rich a{color:var(--tom-link);text-decoration:underline}
.tom-itinerary-rich strong{font-weight:700}
.tom-itinerary-rich em{font-style:italic}
.tom-itinerary-rich h2,.tom-itinerary-rich h3,.tom-itinerary-rich h4{margin:18px 0 8px;font-weight:700}

/* Untitled day pin — small dot */
.tom-pin.tom-pin-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--tom-accent-start, #e11d2e);
  box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}
.tom-pin.tom-pin-dot::before, .tom-pin.tom-pin-dot::after { display: none; }
.tom-pin.tom-pin-dot:hover { transform: scale(1.3); }

/* ============================================
   v3.8.0 — Tour filters
   ============================================ */
.tom-tour-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  align-items: flex-end;
}
.tom-tour-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}
.tom-tour-filter label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tom-muted);
}
.tom-tour-filter select,
.tom-tour-filter input[type="number"] {
  padding: 8px 12px;
  border: 1px solid var(--tom-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--tom-text);
  cursor: pointer;
}
.tom-tour-filter select:focus,
.tom-tour-filter input:focus {
  outline: none;
  border-color: var(--tom-accent-start);
  box-shadow: 0 0 0 2px rgba(225,29,46,0.15);
}
.tom-tour-filters .tom-btn { align-self: flex-end; padding: 8px 18px; font-size: 13px; }
.tom-card[data-tom-hidden="true"] { display: none !important; }

/* ── Builder: Item Grid ───────────────────────────────── */
.tom-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.tom-item {
  border: 1px solid var(--tom-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s;
}
.tom-item:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.tom-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.tom-item-body {
  padding: 14px 16px 16px;
}
.tom-item-body h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}
.tom-item-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--tom-muted);
  line-height: 1.5;
}
.tom-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Builder: Modern Form ─────────────────────────────── */
.tom-form {
  max-width: 680px;
}
.tom-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 600px) {
  .tom-form-row { grid-template-columns: 1fr; }
}
.tom-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--tom-text);
}
.tom-form input[type="text"],
.tom-form input[type="email"],
.tom-form input[type="tel"],
.tom-form input[type="number"],
.tom-form input:not([type]),
.tom-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--tom-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--tom-text);
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.tom-form input:focus,
.tom-form textarea:focus {
  outline: none;
  border-color: var(--tom-accent-start);
  box-shadow: 0 0 0 3px rgba(225,29,46,.12);
}
.tom-form textarea {
  resize: vertical;
  min-height: 100px;
}
.tom-form > div {
  margin-bottom: 16px;
}
.tom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 20px;
  cursor: pointer;
}
.tom-checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--tom-accent-start);
}

/* ── Builder grid layout ──────────────────────────────── */
.tom-builder-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .tom-builder-grid { grid-template-columns: 1fr; }
}
.tom-summary {
  position: sticky;
  top: 100px;
  border: 1px solid var(--tom-border);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

/* ── Source banner ────────────────────────────────────── */
.tom-source-banner {
  background: var(--tom-sand);
  border-left: 4px solid var(--tom-accent-start);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
  font-size: 14px;
}
.tom-source-hint {
  display: block;
  font-size: 12px;
  color: var(--tom-muted);
  margin-top: 4px;
}

/* --- Section footer (centered CTA) --- */
.tom-section-foot{text-align:center;margin-top:2rem;}

/* --- Trip plan sidebar card --- */
.tom-trip-card .tom-trip-sub{color:var(--tom-muted);margin-top:4px}
.tom-trip-card .tom-trip-microcopy{font-size:12px;color:var(--tom-muted);text-align:center;margin:6px 0 12px}
.tom-trip-card .tom-trip-links{display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap;font-size:13px;margin-bottom:12px}
.tom-trip-card .tom-trip-links a{color:var(--tom-muted);text-decoration:underline;text-underline-offset:2px}
.tom-trip-card .tom-trip-links a:hover{color:var(--tom-primary, #e11d2e)}
.tom-trip-card .tom-trip-reassure{list-style:none;padding:10px 0 0;margin:0;border-top:1px solid var(--tom-border);display:flex;flex-direction:column;gap:4px;font-size:13px;color:#444}

/* --- Toast --- */
#tom-toast-host{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:9999;display:flex;flex-direction:column;gap:10px;pointer-events:none}
.tom-toast{background:#0f172a;color:#fff;border-radius:12px;padding:12px 16px;box-shadow:0 12px 30px rgba(0,0,0,.25);display:flex;align-items:center;gap:14px;flex-wrap:wrap;opacity:0;transform:translateY(10px);transition:opacity .25s,transform .25s;pointer-events:auto;max-width:92vw}
.tom-toast.show{opacity:1;transform:translateY(0)}
.tom-toast-msg{font-weight:600}
.tom-toast-actions{display:flex;gap:10px;align-items:center}
.tom-toast-actions a,.tom-toast-dismiss{color:#fff;background:transparent;border:1px solid rgba(255,255,255,.4);padding:6px 12px;border-radius:999px;font-size:13px;cursor:pointer;text-decoration:none}
.tom-toast-actions a:hover,.tom-toast-dismiss:hover{background:rgba(255,255,255,.12)}

/* === v3.15 Itinerary map modal, mobile bar, persistent added state === */
.tom-add-itin.is-added{background:#16a34a !important;color:#fff !important;cursor:default;opacity:.95}
.tom-add-itin.is-added:hover{background:#16a34a !important}

.tom-itin-map-modal{position:fixed;inset:0;z-index:9998;display:none;align-items:center;justify-content:center;padding:16px}
.tom-itin-map-modal.open{display:flex}
.tom-itin-map-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.6);backdrop-filter:blur(2px)}
.tom-itin-map-dialog{position:relative;background:#fff;border-radius:16px;max-width:560px;width:100%;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.tom-itin-map-close{position:absolute;top:8px;right:10px;background:rgba(255,255,255,.9);border:0;width:34px;height:34px;border-radius:50%;font-size:22px;line-height:1;cursor:pointer;z-index:5}
.tom-itin-map-head{padding:14px 16px 8px;display:flex;flex-direction:column;gap:2px}
.tom-itin-map-head strong{color:#16a34a}
.tom-itin-map-title{color:var(--tom-muted,#64748b);font-size:14px}
.tom-itin-map-canvas{height:340px;width:100%;background:#eef2f7}
.tom-itin-map-actions{display:flex;gap:8px;padding:12px 16px;flex-wrap:wrap}
.tom-itin-map-actions .tom-btn{flex:1;min-width:140px;text-align:center}

.tom-mobile-bar{position:fixed;left:0;right:0;bottom:0;z-index:90;display:none;background:#fff;border-top:1px solid var(--tom-border,#e5e7eb);padding:8px 12px;gap:8px;align-items:center;box-shadow:0 -8px 24px rgba(0,0,0,.08);padding-bottom:calc(8px + env(safe-area-inset-bottom,0))}
.tom-mobile-bar .tom-mb-view{flex:1;display:flex;align-items:center;gap:8px;background:#f1f5f9;border:0;border-radius:10px;padding:10px 12px;font-weight:600;cursor:pointer}
.tom-mobile-bar .tom-mb-count{margin-left:auto;background:var(--tom-gradient,#e11d2e);color:#fff;border-radius:999px;padding:2px 10px;font-size:12px}
.tom-mobile-bar .tom-mb-cta{background:var(--tom-gradient,#e11d2e);color:#fff;border:0;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer}
@media (max-width:820px){
  .tom-mobile-bar.has-items{display:flex}
  body.has-tom-mobile-bar{padding-bottom:72px}
}

.tom-mobile-drawer{position:fixed;inset:0;z-index:97;display:none}
.tom-mobile-drawer.open{display:block}
.tom-mobile-drawer-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.5)}
.tom-mobile-drawer-panel{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:16px 16px 0 0;max-height:75vh;display:flex;flex-direction:column;padding-bottom:env(safe-area-inset-bottom,0)}
.tom-mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border-bottom:1px solid var(--tom-border,#e5e7eb)}
.tom-mobile-drawer-close{background:none;border:0;font-size:26px;line-height:1;cursor:pointer}
.tom-mobile-drawer-list{list-style:none;margin:0;padding:8px 16px;overflow-y:auto;flex:1}
.tom-mobile-drawer-list li{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid #f1f5f9}
.tom-mobile-drawer-list button{background:none;border:0;font-size:20px;cursor:pointer;color:#64748b}
.tom-mobile-drawer-actions{padding:12px 16px;border-top:1px solid var(--tom-border,#e5e7eb)}

/* Mini map (hero + cards) */
.tom-card-img-wrap { position: relative; display: block; }
.tom-card-minimap { position: absolute; right: 10px; bottom: 10px; width: 110px; height: 110px; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,.25); border: 2px solid #fff; background: #eef2f7; pointer-events: none; }
.tom-card-minimap .leaflet-container { background:#dbeafe; }
.tom-hero-minimap { position: absolute; right: 24px; bottom: 24px; width: 180px; height: 180px; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 3px solid #fff; background: #eef2f7; z-index: 3; }
@media (max-width: 700px){ .tom-hero-minimap { width: 110px; height: 110px; right: 12px; bottom: 12px; } }

/* Day trips landing */
.tom-daytrip-region { margin-top: 36px; }
.tom-daytrip-region h2 { margin-bottom: 14px; }
.tom-daytrip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 18px; }
.tom-daytrip-card { background:#fff; border:1px solid var(--tom-border); border-radius: 14px; overflow:hidden; box-shadow: var(--tom-shadow); display:flex; flex-direction:column; }
.tom-daytrip-card img { width:100%; height: 160px; object-fit: cover; }
.tom-daytrip-card .body { padding: 14px; flex:1; display:flex; flex-direction:column; }
.tom-daytrip-card h3 { font-size: 17px; margin: 0 0 6px; }
.tom-daytrip-card p { font-size: 14px; color: var(--tom-muted); flex:1; }
.tom-daytrip-card .tom-btn { margin-top: 10px; align-self: flex-start; }

/* ===== Responsive images everywhere ===== */
img, picture, figure { max-width: 100%; }
img { height: auto; display: block; }
.wp-block-image,
.entry-content figure,
.gallery,
.wp-caption,
.tom-card,
.tom-gallery,
.tom-item,
.tom-daytrip-card { max-width: 100%; }
.tom-detail-hero img, .wp-block-image img, .entry-content img, .tom-card img,
.tom-gallery img, .tom-daytrip-card img, .tom-item img, .wp-caption img, .gallery img {
  max-width: 100%;
  width: 100%;
  height: auto;
}
iframe, video, embed, object { max-width: 100%; }
.tom-card-img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }

/* ===== Floating Quick Contact FAB (v19) ===== */
.tom-fc-fab {
  position: fixed !important; right: 20px; bottom: 20px; z-index: 99999;
  display: inline-flex !important; align-items: center; gap: 10px;
  padding: 14px 20px 14px 18px; border: 0; cursor: pointer;
  background: var(--tom-gradient, linear-gradient(135deg,#e11d2e,#f97316));
  color:#fff !important; font-weight: 700; font-family: inherit; font-size: 14px; letter-spacing:.2px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(225,29,46,.38), 0 2px 6px rgba(0,0,0,.12);
  transition: transform .18s ease, box-shadow .25s ease, filter .2s ease;
  isolation: isolate; overflow: visible;
}
.tom-fc-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 18px 40px rgba(225,29,46,.5); filter: brightness(1.05); }
.tom-fc-fab:active { transform: translateY(0) scale(.98); }
.tom-fc-fab:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 3px; }
.tom-fc-fab .tom-fc-fab-icon { display:inline-flex; align-items:center; justify-content:center; }
.tom-fc-fab .tom-fc-fab-icon svg { display:block; }
.tom-fc-fab-pulse {
  position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:-1;
  box-shadow: 0 0 0 0 rgba(225,29,46,.55);
  animation: tomFcPulse 2.4s ease-out infinite;
}
@keyframes tomFcPulse {
  0%   { box-shadow: 0 0 0 0   rgba(225,29,46,.55); }
  70%  { box-shadow: 0 0 0 18px rgba(225,29,46,0); }
  100% { box-shadow: 0 0 0 0   rgba(225,29,46,0); }
}
@media (prefers-reduced-motion: reduce) { .tom-fc-fab-pulse { animation: none; } }
@media (max-width: 600px) {
  .tom-fc-fab .tom-fc-fab-label { display:none; }
  .tom-fc-fab { padding: 0; border-radius: 50%; width: 56px; height: 56px; justify-content:center; right: 14px; bottom: 14px; }
}
/* Lift FAB above mobile trip-plan bar when present */
body:has(#tom-mobile-bar.has-items) .tom-fc-fab { bottom: 86px; }
@media (max-width: 600px) {
  body:has(#tom-mobile-bar.has-items) .tom-fc-fab { bottom: 78px; }
}
/* Hide any legacy inline quick-contact form left over from older versions/widgets */
.tom-widget .tom-quick-contact,
.tom-footer .tom-quick-contact,
.widget_tom_quick_contact,
.tom-sidebar-widgets .tom-quick-contact { display: none !important; }

.tom-fc-modal { position: fixed; inset:0; z-index: 98; display: none; align-items: center; justify-content: center; padding: 16px; }
.tom-fc-modal.open { display:flex; }
.tom-fc-backdrop { position:absolute; inset:0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); }
.tom-fc-panel { position: relative; background:#fff; border-radius: 16px; width: 100%; max-width: 460px; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.35); max-height: 90vh; overflow:auto; }
.tom-fc-panel h3 { margin: 0 0 4px; font-size: 20px; }
.tom-fc-sub { margin: 0 0 14px; color: var(--tom-muted,#64748b); font-size: 14px; }
.tom-fc-close { position:absolute; top:8px; right:10px; background:none; border:0; font-size: 26px; line-height: 1; cursor:pointer; color: var(--tom-muted,#64748b); }
.tom-fc-label { display:block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--tom-text,#0f172a); }
.tom-fc-label input, .tom-fc-label textarea { display:block; width:100%; margin-top: 4px; padding: 10px 12px; border:1px solid var(--tom-border,#e5e7eb); border-radius: 10px; font: inherit; }
.tom-fc-label textarea { resize: vertical; }
@media (max-width: 700px) { .tom-fc-panel { max-width: 100%; border-radius: 14px; } }
