/* enhance.css — UI polish layer for the whole Malar Tours site.
   Load AFTER style.css. Uses only the site's own tokens (--ink, --blue, --azure, --gold…)
   and inherits Plus Jakarta Sans — no new fonts, no new colours. */

::selection { background: var(--gold); color: var(--ink); }
/* Visible, branded page scrollbar (webkit styles only apply when scrollbar-width/color are NOT set) */
html { overflow-y: scroll; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--sky); border-left: 1px solid var(--line); }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--azure), var(--blue)); border-radius: 999px; border: 3px solid var(--sky); min-height: 48px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
@-moz-document url-prefix() { html { scrollbar-width: auto; scrollbar-color: var(--blue) var(--sky); } }

/* ---------- Header ---------- */
.site-header { transition: box-shadow .3s var(--ease); }
.site-header.is-stuck { box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(11, 35, 80, .14); }
.site-header .logo-mark { transition: transform .3s var(--ease); }
.site-header.is-stuck .logo-mark { transform: scale(.92); }

/* ---------- Buttons: soft shine sweep on the gold CTA ---------- */
.btn { position: relative; }
.btn-primary { overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg);
  transition: left .7s var(--ease);
  pointer-events: none;
}
.btn-primary:hover::after { left: 140%; }

/* ---------- Hero ---------- */
.hero.mt-parallax .hero-slides { top: -10%; bottom: -10%; will-change: transform; }
.hero-highlights li .icon {
  width: 30px; height: 30px; padding: 6px;
  border-radius: 50%;
  background: rgba(245, 166, 35, .16);
}
.hb-card { animation: mtFloatIn .9s var(--ease) both .2s; }
@keyframes mtFloatIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.package-card .package-dest {
  align-self: flex-start;
  background: var(--azure-soft);
  color: var(--blue);
  padding: .2rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .78rem;
}
.value-card { transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s ease; }
.value-card:hover { background: linear-gradient(180deg, var(--paper) 0%, var(--gold-soft) 100%); }
.reason-card, .taxi-service-card, .step-card {
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.reason-card:hover, .taxi-service-card:hover, .step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

/* filter animation for the home packages chips */
.mt-pop { animation: mtPop .45s var(--ease) both; }
@keyframes mtPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.package-filter { margin-bottom: 1.5rem; }

/* ---------- Testimonials: avatar + author row ---------- */
.t-author { display: flex; align-items: center; gap: .75rem; margin-top: auto; }
.t-author .testimonial-name { margin-top: 0; }
.t-avatar {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--ink));
  color: var(--gold); font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 0 0 3px var(--gold-soft);
}

/* ---------- CTA band: slow drifting glow ---------- */
.cta-band::before { animation: mtDrift 14s ease-in-out infinite alternate; }
@keyframes mtDrift { to { transform: translate(-60px, 40px) scale(1.18); } }

/* ---------- Footer links ---------- */
.footer-col a { display: inline-block; transition: color .2s ease, transform .2s var(--ease); }
.footer-col a:hover { transform: translateX(4px); }

/* ---------- FAQ (about page) ---------- */
.faq-item { transition: border-color .2s ease, box-shadow .25s var(--ease); }
.faq-item[open] { box-shadow: var(--shadow-lift); }

/* ---------- Lightbox arrows (home + gallery page) ---------- */
.gallery-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff; font-size: 1.7rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0 0 4px;
  transition: background .2s ease, transform .2s var(--ease);
}
.gallery-lightbox-nav:hover { background: var(--gold); color: var(--ink); transform: translateY(-50%) scale(1.08); }
.gallery-lightbox-prev { left: var(--sp-3); }
.gallery-lightbox-next { right: var(--sp-3); }
@media (max-width: 640px) {
  .gallery-lightbox-nav { width: 40px; height: 40px; top: auto; bottom: 4.5rem; transform: none; }
  .gallery-lightbox-nav:hover { transform: scale(1.08); }
}

/* ---------- Reading progress + back to top ---------- */
.mt-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1200;
  background: linear-gradient(90deg, var(--gold), var(--azure));
  pointer-events: none;
}
.mt-top {
  position: fixed; z-index: 90;
  right: calc(1.2rem + 5px);
  bottom: calc(1.6rem + 56px + .9rem);          /* sits just above the call button */
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(11, 35, 80, .35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s var(--ease), background .2s ease, color .2s ease;
}
.mt-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.mt-top:hover { background: var(--gold); color: var(--ink); }
.mt-top svg { width: 22px; height: 22px; }
@media (max-width: 980px) {
  .mt-top {
    right: calc(.8rem + 3px);
    bottom: calc(56px + env(safe-area-inset-bottom) + .9rem + 52px + .7rem);
  }
}

/* ===================== About page extras ===================== */
.stat-strip > div { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.stat-icon, .reason-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px; margin-bottom: .6rem;
  background: var(--azure-soft); color: var(--blue);
  transition: background .3s ease, color .3s ease, transform .35s var(--ease);
}
.stat-icon svg, .reason-icon svg { width: 24px; height: 24px; }
.stat-strip > div:hover .stat-icon,
.reason-card:hover .reason-icon { background: var(--gold); color: var(--ink); transform: rotate(-6deg) scale(1.06); }
.reason-card { display: flex; flex-direction: column; align-items: flex-start; }
.reason-card .reason-icon { margin-bottom: .8rem; }

.about-places span { transition: background .2s ease, color .2s ease, transform .25s var(--ease); }
.about-places span:hover { background: var(--blue); color: #fff; transform: translateY(-2px); }

.step-list li::before { transition: transform .3s var(--ease), background .3s ease; }
.step-list li:hover::before { transform: scale(1.1) rotate(-4deg); background: var(--gold-deep); color: #fff; }

.about-split .split img { transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.about-split .split img:hover { transform: scale(1.02); box-shadow: 0 30px 60px rgba(11, 35, 80, .2); }

.checklist li svg { background: var(--azure-soft); border-radius: 50%; padding: 3px; width: 1.4em; height: 1.4em; margin-top: .15rem; }

.faq-item summary:hover { color: var(--blue); }


/* ===================== Round 2: stronger animations ===================== */

/* image reveal: the earlier hover transition was hiding the opacity fade */
.js-reveal .about-split .split img.reveal { transition: opacity .9s ease, transform 1s var(--ease); }

/* directional slide-ins */
.js-reveal .reveal.from-left  { transform: translateX(-56px); }
.js-reveal .reveal.from-right { transform: translateX(56px); }
.js-reveal .reveal.from-left.in-view,
.js-reveal .reveal.from-right.in-view { transform: none; }
.js-reveal .split img.reveal { clip-path: inset(0 0 0 0 round 18px); }
@media (max-width: 860px) {
  .js-reveal .reveal.from-left, .js-reveal .reveal.from-right { transform: translateY(24px); }
}

/* word-by-word headlines */
.mt-words .w {
  display: inline-block;
  opacity: 0; transform: translateY(.55em) rotate(2deg);
  transition: opacity .6s ease, transform .7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.mt-words.is-seen .w { opacity: 1; transform: none; }

/* gold rule under section headings draws itself */
.js-reveal .section-head.reveal h2::after { width: 0; }
.js-reveal .section-head.is-seen h2::after { width: 44px; transition: width .8s var(--ease) .35s; }
.js-reveal .section-head.center.is-seen h2::after { width: 44px; }

/* hero entrance on load */
.page-hero .hero-inner { position: relative; z-index: 1; }
.page-hero .hero-inner > .kicker,
.page-hero .hero-inner > .hero-sub { animation: mtRise .8s var(--ease) both; }
.page-hero .hero-inner > .kicker { animation-delay: .05s; }
.page-hero .hero-inner > .hero-sub { animation-delay: .55s; }
@keyframes mtRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.page-hero .hero-inner > .kicker::before { animation: mtGrow .9s var(--ease) .2s both; }
@keyframes mtGrow { from { width: 0; } to { width: 18px; } }

/* floating gold orbs */
.mt-orb {
  position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(245, 166, 35, .55), rgba(245, 166, 35, 0) 70%);
  filter: blur(2px);
  animation: mtFloat 9s ease-in-out infinite alternate;
}
.mt-orb-1 { width: 220px; height: 220px; right: 8%;  top: -50px;  }
.mt-orb-2 { width: 120px; height: 120px; right: 26%; bottom: -30px; animation-duration: 11s; animation-delay: -3s; opacity: .8; }
.mt-orb-3 { width: 70px;  height: 70px;  right: 4%;  bottom: 22%; animation-duration: 7s;  animation-delay: -5s; opacity: .9; }
@keyframes mtFloat { from { transform: translate(0, 0) scale(1); } to { transform: translate(-26px, 22px) scale(1.12); } }

/* stat strip: icons pop in one after another */
.js-reveal .stat-strip.reveal .stat-icon { transform: scale(0) rotate(-30deg); }
.stat-strip.is-seen .stat-icon { animation: mtPopIcon .7s var(--ease) both; }
.stat-strip.is-seen > div:nth-child(2) .stat-icon { animation-delay: .15s; }
.stat-strip.is-seen > div:nth-child(3) .stat-icon { animation-delay: .3s; }
@keyframes mtPopIcon { 0% { transform: scale(0) rotate(-30deg); } 70% { transform: scale(1.15) rotate(6deg); } 100% { transform: none; } }

/* steps: connector line draws downward, number badge bounces in */
.step-list li:not(:last-child)::after { transform-origin: top; transition: transform .9s var(--ease) .25s; }
.js-reveal .step-list li.reveal:not(:last-child)::after { transform: scaleY(0); }
.step-list li.is-seen::before { animation: mtPopIcon .7s var(--ease) both; }

/* place chips pop */
.js-reveal .about-places span.reveal { transform: scale(.7); }
.js-reveal .about-places span.reveal.in-view { transform: none; }

/* checklist ticks draw in */
.checklist li.is-seen svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: mtTick .6s ease .25s forwards; }
@keyframes mtTick { to { stroke-dashoffset: 0; } }

/* card tilt needs a stable base */
.reason-card, .value-card, .taxi-service-card { transform-style: preserve-3d; will-change: transform; }

/* FAQ open animation */
.faq-item[open] > p { animation: mtFaq .45s var(--ease) both; }
@keyframes mtFaq { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.faq-item summary::after { transition: transform .35s var(--ease), background .2s ease; }
.faq-item[open] summary::after { transform: rotate(180deg); }

/* CTA band: moving gradient + pulsing primary button */
.cta-band { background-size: 200% 200%; animation: mtGradient 12s ease infinite alternate; }
@keyframes mtGradient { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.cta-band .btn-primary { animation: mtPulse 2.6s ease-out infinite; }
@keyframes mtPulse { 0% { box-shadow: 0 0 0 0 rgba(245, 166, 35, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(245, 166, 35, 0); } }

@media (prefers-reduced-motion: reduce) {
  .mt-orb, .cta-band, .cta-band .btn-primary { animation: none !important; }
  .mt-words .w { opacity: 1; transform: none; transition: none; }
}


/* ===================== Round 3: page-specific ===================== */

/* tour packages */
.tour-count { margin: -.75rem 0 1.25rem; font-size: .92rem; color: var(--slate-soft); text-align: left; max-width: none; }
.tour-count strong { color: var(--blue); font-size: 1.05rem; }
.tour-filter { transition: box-shadow .3s ease, border-color .3s ease; }
.tour-filter:focus-within { border-color: var(--azure); box-shadow: var(--shadow-lift); }
.package-actions .btn-whatsapp { box-shadow: 0 4px 14px rgba(18, 161, 80, .25); }

/* destinations list */
.destination-list-card .destination-list-body h3 { transition: color .25s ease; }
.destination-list-card:hover .destination-list-body h3 { color: var(--blue); }
.destination-list-card { overflow: hidden; }

/* gallery: hover zoom badge + lightbox counter */
.gallery-item::after {
  content: ""; position: absolute; top: .8rem; right: .8rem; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(245, 166, 35, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230B2350' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M11 5v12M5 11h12'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .35s var(--ease); pointer-events: none;
}
.gallery-item:hover::after, .gallery-item:focus-visible::after { opacity: 1; transform: none; }
.gallery-lightbox-count {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  padding: .35rem .9rem; border-radius: 999px; font-size: .85rem; font-weight: 700;
  color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
}
.gallery-lightbox-count:empty { display: none; }

/* contact + booking forms */
.form-field label { transition: color .2s ease; }
.form-field:focus-within label { color: var(--blue); }
.form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: var(--azure); }
.form-field textarea { resize: vertical; min-height: 88px; max-height: 260px; transition: height .15s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.notes-count { align-self: flex-end; font-size: .76rem; color: var(--slate-soft); margin-top: -.2rem; }
.form-actions .btn-primary { overflow: hidden; }
.form-success.visible { animation: mtRise .6s var(--ease) both; }
.form-field.invalid input, .form-field.invalid select, .form-field.invalid textarea { animation: mtShake .35s ease; }
@keyframes mtShake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.contact-info-item { transition: transform .3s var(--ease); }
.contact-info-item:hover { transform: translateX(4px); }
.contact-info-item:hover .icon-wrap { background: var(--gold); color: var(--ink); }
.contact-info-item .icon-wrap { transition: background .25s ease, color .25s ease; }
.whatsapp-cta-card .btn-primary { animation: none; }
.map-wrap { transition: box-shadow .4s var(--ease); }
.map-wrap:hover { box-shadow: var(--shadow-lift); }
@media (prefers-reduced-motion: reduce) { .form-field.invalid input, .form-field.invalid select { animation: none; } }


/* ===================== Round 4: FAQ + image split (about page) ===================== */
/* Default  .faq-split          -> FAQ left,  image right
   Reverse  .faq-split.reverse  -> image left, FAQ right */
.faq-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.faq-split .faq-content .section-head { margin-bottom: 1.25rem; text-align: left; }
.faq-split .faq-media img {
  display: block; width: 100%; height: auto; object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.faq-split .faq-media img:hover { transform: scale(1.02); box-shadow: 0 30px 60px rgba(11, 35, 80, .2); }
.faq-split.reverse .faq-media { order: -1; }

@media (max-width: 860px) {
  .faq-split { grid-template-columns: 1fr; gap: 1.5rem; }
  .faq-split.reverse .faq-media { order: 0; }
}