/*
  Theme: "Beach Dusk Blue" — chosen direction from the Brain/ mockup review.
  Single source of truth for color, type and the site's dark, glassy, "breathing"
  visual language. Bootstrap 5 (CDN) supplies components; this file overrides its
  variables and adds the handful of reusable site-specific classes used across pages.
*/

:root {
  /* Background gradient (dusk sky -> ocean) */
  --bg-top: oklch(0.16 0.035 255);
  --bg-mid: oklch(0.12 0.03 250);
  --bg-bottom: oklch(0.09 0.025 245);

  /* Light section background — warm ivory, used by .section-light for the alternating
     dark/light section rhythm on the homepage (see below). */
  --section-light-bg: oklch(0.97 0.012 75);

  /* Primary accent gradient (buttons, links, highlights) — warm sunset amber to burnt orange */
  --accent-1: oklch(0.78 0.15 65);
  --accent-2: oklch(0.6 0.19 35);
  --accent-gradient: linear-gradient(120deg, var(--accent-1), var(--accent-2));

  /* Text */
  --text-primary: oklch(0.97 0.005 90);
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-muted-2: rgba(255, 255, 255, 0.55);

  /* Glass surfaces */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-bg-strong: rgba(255, 255, 255, 0.07);
  --glass-border: rgba(255, 255, 255, 0.1);

  /* Navbar surface — deliberately its own token, not --glass-bg. The navbar is fixed
     and its backdrop-filter blur picks up whatever section is scrolled underneath; a
     near-transparent glass tint let light sections wash it out to near-white, hiding
     the white nav text. This stays a solid dark blue (same hue as --bg-mid) at all
     times, in every section, light or dark. */
  --navbar-bg: oklch(0.12 0.03 250 / 0.9);

  /* Star rating (review cards) — warm gold, deliberately outside the blue accent family so
     it reads as a rating badge rather than another link/accent element. */
  --star-gold: oklch(0.83 0.16 88);

  /* WhatsApp brand green — used only for the floating chat button, kept as its own token
     rather than the site accent so it stays instantly recognizable as WhatsApp. */
  --whatsapp-green: #25d366;

  /* Type — single font family across the whole app (Manrope) */
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-display: var(--font-body);

  /* Bootstrap variable overrides */
  --bs-body-bg: var(--bg-mid);
  --bs-body-color: var(--text-primary);
  --bs-body-font-family: var(--font-body);
  --bs-primary: #e28a3f; /* fallback solid for utilities that can't use a gradient */
  --bs-link-color: var(--accent-1);
  --bs-link-hover-color: var(--accent-2);
  --bs-border-color: var(--glass-border);
}

/* ---------- Section theme variants ----------
   Homepage sections alternate dark/light for visual rhythm. Dark is the default
   (inherits :root — no class needed). Add .section-light to flip a section: it
   overrides the same text/glass tokens components already consume via var(), so
   card-glass, text-muted-1/2, text-accent, icon strokes etc. all adapt automatically
   without per-component overrides. The navbar, hero and footer always stay dark. */
.section-light {
  background: var(--section-light-bg);
  color: var(--text-primary);

  --text-primary: oklch(0.24 0.02 55);
  --text-muted: rgba(31, 23, 14, 0.72);
  --text-muted-2: rgba(31, 23, 14, 0.55);

  --glass-bg: rgba(31, 23, 14, 0.035);
  --glass-bg-strong: rgba(31, 23, 14, 0.06);
  --glass-border: rgba(31, 23, 14, 0.12);

  --accent-1: oklch(0.6 0.17 45);
  --accent-2: oklch(0.48 0.19 30);
}

/* Every light section — hand-drawn beach pattern (turtles/waves/palms) tiled behind
   the content, washed with a translucent layer of the section's own ivory background
   so it reads as a subtle texture rather than competing with the cards. */
.section-light {
  background-image: linear-gradient(rgba(250, 244, 236, 0.82), rgba(250, 244, 236, 0.82)), url('../images/strokes-pattern.jpg');
  background-repeat: repeat;
  background-size: auto, 480px auto;
}

/* Every dark section except the hero — same tiled-texture technique as .section-light above,
   but with a wildlife/safari line-art tile washed in the site's own dark navy so it reads as
   subtle texture, not noise, against the cards. Confirmed on #transfer first, now applied to
   every other dark section (Gallery, Contact). */
.section-dark-pattern {
  background-image: linear-gradient(rgba(4, 8, 16, 0.85), rgba(4, 8, 16, 0.85)), url('../images/dark-back.png');
  background-repeat: repeat;
  background-size: auto, 480px auto;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

section[id] {
  scroll-margin-top: 90px;
}

.nav-link.active {
  color: var(--accent-1) !important;
}

body {
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  min-height: 100vh;
}

a {
  text-decoration: none;
}

::selection {
  background: var(--accent-1);
  color: #2b1408;
}

/* ---------- Typography helpers ---------- */

.font-display {
  font-family: var(--font-display);
}

.font-headline {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 1px;
}

.text-accent {
  color: var(--accent-1);
}

.text-muted-1 {
  color: var(--text-muted);
}

/* Multi-line descriptions: one line per row (see lines_html() in includes/functions.php) */
.desc-line {
  padding: 0.2rem 0;
}
.desc-gap {
  height: 0.6rem;
}

.text-muted-2 {
  color: var(--text-muted-2);
}

/* ---------- Buttons ---------- */

.btn-gradient {
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  box-shadow: 0 0 34px oklch(0.72 0.17 55 / 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-gradient:hover,
.btn-gradient:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 44px oklch(0.72 0.17 55 / 0.5);
}

.btn-outline-glass {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-outline-glass:hover,
.btn-outline-glass:focus {
  color: var(--text-primary);
  border-color: var(--accent-1);
  background: rgba(255, 255, 255, 0.04);
}

/* Let the brand text truncate before the language toggle / hamburger are
   ever squeezed off-screen on narrow phones. Forcing nowrap on the top bar itself is
   what actually keeps EN/RU + the hamburger on the same row as the brand — without it
   the row wraps to a second line (taller navbar) before the ellipsis rule below ever
   gets a chance to kick in. */
.navbar-glass > .container-xxl {
  flex-wrap: nowrap;
}

/* Below the desktop breakpoint the opened menu (.navbar-collapse, flex-basis 100%) must drop onto
   its own row under the brand/toggles. With nowrap it got squeezed into the same row instead, so
   the bar broke when the hamburger was tapped. Allow wrapping here, and give the brand a zero
   flex-basis so it shrinks/truncates to fit beside EN/RU + the hamburger rather than forcing
   them onto a second line — the top bar still stays one row, only the menu wraps below. */
@media (max-width: 991.98px) {
  .navbar-glass > .container-xxl {
    flex-wrap: wrap;
  }

  .navbar-brand {
    flex: 1 1 0;
  }
}

.navbar-brand {
  min-width: 0;
}

.navbar-brand .lh-1 {
  min-width: 0;
}

.navbar-brand .lh-1 > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Language toggle ---------- */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn:hover:not(.active) {
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
}

@media (max-width: 400px) {
  .lang-btn {
    padding: 0.35rem 0.55rem;
  }
}

/* Shrink the brand mark on phones so it + EN/RU + the hamburger comfortably share one
   row instead of relying purely on text-ellipsis truncation to avoid wrapping. */
@media (max-width: 575.98px) {
  /* The navbar's own container-xxl padding (1.5rem each side at the default px-4) eats
     into the same row EN/RU and the hamburger need — trimming it here (scoped to the
     navbar only, not every other container-xxl on the page) is what actually lets the
     brand text render close to full width instead of getting ellipsis-truncated. */
  .navbar-glass > .container-xxl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .navbar-brand {
    gap: 0.375rem !important;
  }

  .navbar-brand img {
    width: 32px;
    height: 32px;
  }

  .navbar-brand .lh-1 > span:first-child {
    font-size: 0.9rem;
  }

  .navbar-brand .lh-1 > span:last-child {
    font-size: 0.5rem;
  }
}

/* ---------- Glass surfaces ---------- */

.navbar-glass {
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.card-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
}

/* Photo cards (tour plans, transfer, sri lanka, gallery, reviews) go edge-to-edge —
   no rounded corners — for a flatter, more modern grid than the glass panels elsewhere. */
.card-glass.overflow-hidden {
  border-radius: 0;
}

/* ---------- Floating WhatsApp button ---------- */

.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1040;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--whatsapp-green);
  color: var(--text-primary);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
  color: var(--text-primary);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* ---------- Card image sizing ----------
   Fixed aspect ratio instead of a fixed pixel height, so cards scale cleanly
   with column width across breakpoints instead of over-cropping on wide
   columns or looking oversized on narrow ones. */

.card-img-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

/* ---------- Carousel controls ----------
   Bootstrap's default prev/next icons are a small, mostly-transparent white chevron with no
   backdrop — easy to lose against a busy photo. Give them a glass button treatment (matching
   .btn-outline-glass) so they read clearly on every carousel (place/album/review/tour-plan). */

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2.75rem;
  height: 2.75rem;
  background-color: var(--glass-bg-strong);
  background-size: 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  border-color: var(--accent-1);
  background-color: rgba(255, 255, 255, 0.14);
}

.carousel-control-prev,
.carousel-control-next {
  opacity: 1;
}

/* ---------- Review cards ---------- */

.review-card {
  aspect-ratio: 3 / 4;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-1);
}

.review-card-overlay {
  background: linear-gradient(180deg, transparent 0%, rgba(4, 8, 16, 0.55) 30%, rgba(4, 8, 16, 0.88) 60%, rgba(4, 8, 16, 0.97) 100%);
  /* Inherited by every text node inside (subject, excerpt, date) so light text stays
     readable over a bright photo (blue sky/white sand) even where the gradient itself
     hasn't gone fully dark yet — the star rating already relied on this same trick. */
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Force solid white (not the semi-transparent .text-muted-1/.text-accent used elsewhere)
   for every text node in the review card caption — max contrast against the photo. */
.review-card-overlay,
.review-card-overlay .text-muted-1,
.review-card-overlay .text-accent {
  color: #fff;
}

.review-stars {
  color: var(--star-gold);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pill-tag {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Hero background decoration ("breathing" beach dusk scene) ---------- */

.hero-scene {
  position: relative;
  overflow: hidden;
}

.hero-scene .moon-glow {
  position: absolute;
  top: -60px;
  right: 8%;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, oklch(0.85 0.08 65) 0%, oklch(0.72 0.16 50) 45%, transparent 50%);
  filter: blur(50px);
  animation: moonBreathe 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-scene .wave-layer {
  position: absolute;
  left: -80px;
  width: calc(100% + 160px);
  pointer-events: none;
}

.hero-scene .wave-back {
  bottom: -6px;
  animation: waveDriftB 12s ease-in-out infinite alternate;
}

.hero-scene .wave-front {
  bottom: -10px;
  animation: waveDriftA 9s ease-in-out infinite alternate;
}

.hero-scene .palm-accent {
  position: absolute;
  left: -40px;
  bottom: -20px;
  width: 220px;
  height: 260px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-scene .scene-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.22) 0%, rgba(5, 8, 16, 0.4) 65%, rgba(4, 7, 14, 0.58) 100%);
  pointer-events: none;
}

/* Real photo hero background (used by #about) with a dark overlay for text contrast,
   heavier on the text side per a standard modern hero pattern. */
.hero-photo {
  background-image: url('../images/back-fields.jpg');
  background-size: cover;
  background-position: center;
}

.hero-photo .scene-overlay {
  background:
    linear-gradient(180deg, transparent 0%, transparent 78%, var(--bg-top) 100%),
    linear-gradient(100deg, rgba(4, 8, 16, 0.65) 0%, rgba(4, 8, 16, 0.48) 40%, rgba(4, 8, 16, 0.24) 75%, rgba(4, 8, 16, 0.4) 100%),
    linear-gradient(180deg, rgba(4, 8, 16, 0.1) 0%, rgba(4, 8, 16, 0.4) 100%);
}

.hero-scene .hero-content {
  position: relative;
  z-index: 1;
}

/* Big, bold cutout portrait — the "modern portfolio hero" treatment: an
   oversized background-removed photo grounded at the bottom of its column,
   with a soft color-glow backdrop standing in for a studio background. */
.hero-portrait-wrap {
  max-width: 480px;
  min-height: 460px;
  /* On narrow columns the img (width:100%; height:auto) renders shorter than this
     min-height, and a plain block would leave that leftover space below it — flex +
     justify-content:flex-end pins the image to the bottom instead, matching the
     "grounded at the bottom" cutout look this component is meant to have. */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-portrait {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  max-height: 640px;
  margin: 0 auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 26px 40px rgba(0, 0, 0, 0.5));
}

@media (min-width: 992px) {
  .hero-portrait-wrap {
    max-width: 560px;
  }

  .hero-portrait {
    max-height: 720px;
  }
}

/* Big, bold, high-contrast display name — the "portfolio hero" treatment:
   an oversized primary line with tight tracking, and a gradient-clipped
   accent line underneath for a modern, confident brand mark. */
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.75rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.hero-title-sub {
  display: block;
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-top: 0.15em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.glow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-1);
  display: inline-block;
  animation: glow 2.4s ease-in-out infinite alternate;
}

@keyframes moonBreathe {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.1); opacity: 0.75; }
}

@keyframes waveDriftA {
  0% { transform: translateX(0); }
  100% { transform: translateX(40px); }
}

@keyframes waveDriftB {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40px); }
}

@keyframes glow {
  0% { opacity: 0.35; }
  100% { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scene .moon-glow,
  .hero-scene .wave-back,
  .hero-scene .wave-front,
  .glow-dot {
    animation: none;
  }
}

/* ---------- Admin "beach vibe" loader ----------
   Full-screen overlay shown while an admin upload/save form is processing, so there's clear
   feedback during the round-trip (especially file uploads) instead of a click that seems to do
   nothing. Reuses the site's own sunset-over-water visual language (accent gradient "sun" +
   drifting wave bars) rather than a generic spinner, so it feels native to the brand. */
.admin-loader {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(9, 14, 24, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  padding: 1.5rem;
}

.admin-loader-scene {
  position: relative;
  width: 120px;
  height: 84px;
}

.admin-loader-sun {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 30px 6px rgba(226, 138, 63, 0.45);
  animation: adminSunPulse 1.6s ease-in-out infinite alternate;
}

.admin-loader-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  overflow: hidden;
}

.admin-loader-waves span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
}

.admin-loader-waves span:nth-child(1) { animation: adminWaveDrift 1.8s ease-in-out infinite; }
.admin-loader-waves span:nth-child(2) { animation: adminWaveDrift 1.8s ease-in-out infinite reverse; animation-delay: 0.2s; opacity: 0.7; }
.admin-loader-waves span:nth-child(3) { animation: adminWaveDrift 1.8s ease-in-out infinite; animation-delay: 0.4s; opacity: 0.45; }

.admin-loader-text {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
}

.admin-loader-subtext {
  margin: 0;
  padding: 0 1rem;
}

.admin-loader-progress {
  width: min(260px, 70vw);
  height: 8px;
  background: var(--glass-bg);
}

.admin-loader-progress .progress-bar {
  background: var(--accent-gradient);
  transition: width 0.2s linear;
}

@keyframes adminSunPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

@keyframes adminWaveDrift {
  0% { transform: translateX(-16px); }
  50% { transform: translateX(16px); }
  100% { transform: translateX(-16px); }
}

@media (prefers-reduced-motion: reduce) {
  .admin-loader-sun,
  .admin-loader-waves span {
    animation: none;
  }
}

/* ---------- Page loader (shown until images/fonts finish loading) ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-bottom) 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* One orange band sweeps left → right over dim text, then the text rests grey before the next
   sweep. Seamless: the 200%-wide tile is grey at both ends and the animation moves exactly one tile. */
.page-loader__title {
  font-size: clamp(1.4rem, 7vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.2) 0%,
    rgba(255, 255, 255, 0.2) 30%,
    var(--accent-1) 42%,
    var(--accent-2) 50%,
    var(--accent-1) 58%,
    rgba(255, 255, 255, 0.2) 70%,
    rgba(255, 255, 255, 0.2) 100%) 200% 0 / 200% 100% repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: page-loader-shine 2.6s linear infinite;
}
.page-loader__sub {
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-primary);
  opacity: 0.7;
}
@keyframes page-loader-shine {
  from { background-position: 200% 0; }
  to   { background-position: 0 0; }
}
body.is-loading { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .page-loader__title { animation-duration: 5s; }
  .page-loader { transition: none; }
}

/* ---------- Photo/video carousel "cinematic fade" (includes/fade-carousel.php) ---------- */
.fc-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--bg-mid);
}
.fc-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 6s ease-out;
}
.fc-slide.on {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.fc-slide img,
.fc-slide iframe {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 0;
}
/* Whole photo, never cropped (any shape); the empty space around it is filled by a blurred,
   darkened copy of the same photo (.fc-blur) instead of plain bars. */
.fc-slide img.fc-photo {
  position: relative;
  object-fit: contain;
}
.fc-slide img.fc-blur {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  filter: blur(28px) brightness(0.5) saturate(1.2);
}
.fc-novideo {
  height: 100%;
  display: grid;
  place-items: center;
}
.fc-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(5, 8, 15, 0.82));
  pointer-events: none;
}
.fc-cap {
  position: absolute;
  left: 22px;
  right: 110px;
  bottom: 18px;
  font-weight: 800;
  font-size: clamp(1rem, 2.6vw, 1.4rem);
  color: #fff;
  pointer-events: none;
}
.fc-count {
  position: absolute;
  right: 20px;
  bottom: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
  pointer-events: none;
}
.fc-stage.is-video .fc-shade,
.fc-stage.is-video .fc-cap,
.fc-stage.is-video .fc-count {
  display: none;
}
.fc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 22, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
}
.fc-arrow:hover {
  background: rgba(8, 12, 22, 0.85);
  border-color: var(--accent-1);
}
.fc-prev { left: 14px; }
.fc-next { right: 14px; }
.fc-stage:focus-visible,
.fc-arrow:focus-visible,
.fc-thumb:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
}
.fc-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.fc-thumb {
  position: relative;
  flex: 0 0 calc((100% - 2rem) / 5);
  min-width: 64px;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--glass-bg-strong);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.2s;
}
.fc-thumb:hover,
.fc-thumb.on {
  opacity: 1;
}
.fc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fc-thumb__video {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 1.8rem;
}
.fc-thumb i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 0;
  background: var(--accent-gradient);
}
.fc-thumb.on i {
  animation: fc-fill var(--fc-dur, 5s) linear forwards;
}
.fc.paused .fc-thumb.on i {
  animation-play-state: paused;
}
@keyframes fc-fill {
  to { width: 100%; }
}
@media (max-width: 640px) {
  .fc-cap { left: 14px; right: 14px; bottom: 40px; }
  .fc-count { right: 14px; bottom: 12px; }
}
/* Phones: taller 4:5 stage (portrait photos ~2x bigger; landscape ones still whole, blur above/
   below), edge-to-edge past the page's px-4 gutter, smaller arrows. Swipe is in the JS. */
@media (max-width: 576px) {
  .fc-stage {
    aspect-ratio: 4 / 5;
    margin-inline: -1.5rem;
    border-radius: 0;
    border-inline: 0;
  }
  .fc-arrow { width: 36px; height: 36px; font-size: 1.2rem; }
  .fc-prev { left: 8px; }
  .fc-next { right: 8px; }
}
.fc-stage { touch-action: pan-y pinch-zoom; }
.fc-slide img.fc-photo { cursor: zoom-in; }

/* Full-screen photo viewer opened by tapping a carousel photo (built by the fade-carousel JS).
   Above the navbar (1040), below the page loader (3000). */
.fc-lb {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  background: rgb(3, 5, 10);
}
.fc-lb[hidden] { display: none; }
.fc-lb__img {
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
  touch-action: pinch-zoom;
  user-select: none;
}
.fc-lb__count {
  position: absolute;
  top: 18px;
  left: 20px;
  font-weight: 700;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  pointer-events: none;
}
.fc-lb__btn {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 12, 22, 0.6);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.fc-lb__btn:hover { border-color: var(--accent-1); }
.fc-lb__btn:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 3px; }
.fc-lb__close { top: 12px; right: 12px; font-size: 1.1rem; }
.fc-lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.fc-lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.fc-lb.single .fc-lb__prev,
.fc-lb.single .fc-lb__next { display: none; }
/* Phones swipe instead, so the side arrows move to the bottom, out of the photo's way. */
@media (max-width: 576px) {
  .fc-lb__prev,
  .fc-lb__next { top: auto; bottom: 18px; transform: none; }
  .fc-lb__prev { left: calc(50% - 56px); }
  .fc-lb__next { right: calc(50% - 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .fc-slide { transition: none; transform: none; }
  .fc-thumb.on i { animation: none; width: 100%; }
}

/* Description panel on the carousel pages — frosted lighter glass (see description_html() in
   includes/functions.php). Points (icon/bullet lines) align in a fixed icon column. Compact
   line spacing, no dividers — long lists were too tall to scroll on mobile. */
.desc-panel {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  color: var(--text-primary);
}
@media (min-width: 576px) {
  .desc-panel {
    padding: 1.1rem 1.6rem;
  }
}
.desc-panel .desc-line {
  padding: 0.12rem 0;
}
.desc-panel .desc-head {
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.4rem 0 0.2rem;
}
.desc-panel .desc-point {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.12rem 0;
}
.desc-panel .desc-note {
  padding: 0 0 0.15rem 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.desc-panel .desc-gap {
  height: 0.5rem;
}
.desc-panel .desc-icon {
  flex: none;
  width: 1.5rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.5;
}
.desc-panel .desc-icon--dot {
  color: var(--accent-1);
  font-size: 1.3rem;
}
.desc-panel .desc-icon--dot {
  font-size: 0;
  line-height: 0;
  align-self: center;
}
.desc-panel .desc-icon--dot::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-1);
}

/* ---------- Clickable photo cards (home page) ----------
   `.card-hover` marks every photo card that opens something (tour plan, transfer, Sri Lanka place,
   gallery album, review) so visitors can tell it's clickable: the photo zooms slowly, the card lifts
   with an amber edge + glow, and a round arrow badge slides into the top-right corner. Touch screens
   have no hover, so the badge is simply always visible there. */
.card-hover {
  position: relative;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-hover img {
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card-hover::after {
  content: '';
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 16L16 8M9 8h7v7'/%3E%3C/svg%3E") center / 55% no-repeat,
    var(--accent-gradient);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-6px, 6px) scale(0.85);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.card-hover:hover,
a:focus-visible .card-hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  box-shadow: 0 18px 38px -16px rgba(0, 0, 0, 0.75), 0 0 0 1px var(--accent-1), 0 0 28px -8px var(--accent-1);
}
.card-hover:hover img,
a:focus-visible .card-hover img {
  transform: scale(1.08);
}
.card-hover:hover::after,
a:focus-visible .card-hover::after {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .card-hover::after {
    opacity: 0.92;
    transform: none;
    width: 2rem;
    height: 2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-hover,
  .card-hover img,
  .card-hover::after { transition: none; }
  .card-hover:hover { transform: none; }
  .card-hover:hover img { transform: none; }
}
