/* Morocco Tourism Travel - enhancements (append-only, mobile-first).
   All classes are prefixed mtt- to avoid collisions with the existing theme. */

html, body { overflow-x: clip; }

/* ---------- Horizontal product carousel ----------
   Architecture: section container > .mtt-viewport (clips) > .mtt-track (moves) > cards.
   Without JS the track itself scrolls (native swipe). With JS, the viewport
   clips and the track is translated within hard bounds, so no foreign
   content can ever appear. */
.mtt-carousel { position: relative; }
.mtt-viewport { position: relative; }
.mtt-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.25rem 1rem;
  margin: 0 -0.25rem;
  -ms-overflow-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(27,67,50,.3) transparent;
  cursor: grab;
}
.mtt-track > * {
  flex: 0 0 80%;
  max-width: 80%;
  scroll-snap-align: start;
}
/* JS bounded mode: viewport clips, track translates, never escapes */
[data-carousel].mtt-js .mtt-viewport { overflow: hidden; }
[data-carousel].mtt-js .mtt-track {
  overflow: visible;
  scroll-snap-type: none;
  scroll-behavior: auto;
  transition: transform .45s cubic-bezier(.22,.61,.21,1);
  will-change: transform;
  touch-action: pan-y;
}
[data-carousel].mtt-js .mtt-track.mtt-dragging { transition: none; cursor: grabbing; }
.mtt-track img { user-select: none; -webkit-user-drag: none; }
@media (min-width: 640px) {
  .mtt-track > * { flex-basis: calc(50% - 0.625rem); max-width: calc(50% - 0.625rem); }
}
@media (min-width: 1024px) {
  .mtt-track.mtt-cols-3 > * { flex-basis: calc(33.333% - 0.85rem); max-width: calc(33.333% - 0.85rem); }
  .mtt-track.mtt-cols-4 > *, .mtt-track.mtt-cols-5 > * { flex-basis: calc(25% - 0.95rem); max-width: calc(25% - 0.95rem); }
}
.mtt-car-nav { display: none; align-items: center; gap: 0.5rem; }
[data-carousel].mtt-js .mtt-car-nav { display: flex; }
.mtt-car-btn {
  width: 2.5rem; height: 2.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px;
  border: 1.5px solid rgba(27,67,50,.2);
  background: #fff; color: #1B4332;
  box-shadow: 0 4px 14px -6px rgba(27,67,50,.25);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}
.mtt-car-btn:hover:not(:disabled) { background: #1B4332; color: #fff; transform: translateY(-1px); }
.mtt-car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.mtt-dark .mtt-car-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); color: #fff; }
.mtt-dark .mtt-car-btn:hover:not(:disabled) { background: #C9A227; border-color: #C9A227; color: #0F2A1F; }

/* ---------- Search ---------- */
.mtt-subsearch-wrap {
  max-width: 1400px; margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}
@media (min-width: 768px) { .mtt-subsearch-wrap { padding-left: 2.5rem; padding-right: 2.5rem; } }
.mtt-result-card img { background: #E9F0EB; }
.mtt-empty {
  border: 1.5px dashed rgba(27,67,50,.3);
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .mtt-track { scroll-behavior: auto; }
  .reveal { transition: none; }
}

/* ---------- Fixed-header clearance (phone + laptop) ----------
   The navbar is fixed (5rem tall). Anchored sections/cards must stop
   below it, and green page heroes get extra top air on every template. */
html { scroll-padding-top: 6.5rem; }
section[id], div[id], article[id], h1[id], h2[id], h3[id], a[id] { scroll-margin-top: 6.5rem; }

/* Laptop header: extra space between Contact and Plan My Trip */
@media (min-width: 1280px) {
  #navbar nav.hidden { margin-right: 2rem; }
}

/* Solid green header zone on key subpages (matches article greens) */
body.mtt-green-head #navbar { background: #0F2A1F; }
body.mtt-green-head #navbar.scrolled { background: #0F2A1F; box-shadow: 0 4px 20px rgba(0,0,0,.25); }
body.mtt-green-head #navbar .nav-ink,
body.mtt-green-head #navbar.scrolled .nav-ink { color: #fff; }
body.mtt-green-head #navbar .nav-logo-sub,
body.mtt-green-head #navbar.scrolled .nav-logo-sub { color: rgba(255,255,255,.7); }
section.relative.pt-36 { padding-top: 6.5rem; }
@media (min-width: 768px) {
  section.relative.pt-36 { padding-top: 7.5rem; }
}
