/* ===================================================
   Sanctuaries Page — sanctuaries.css
   Depends on styles.css being loaded first.
   =================================================== */

/* ---------------------------------------------------
   PAGE HERO
   Shared pattern with programs, our-elephants, etc.
   --------------------------------------------------- */
.page-hero {
  padding-top: var(--nav-height);
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
}

.page-hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px 56px;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--color-text-light);
  transition: color var(--transition);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.page-hero-inner h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--color-text);
  margin-bottom: 12px;
}

.page-hero-inner .lead {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 580px;
  line-height: 1.7;
}

/* ---------------------------------------------------
   SANCTUARIES SECTION
   --------------------------------------------------- */
.sanctuaries-section {
  padding: 80px 0 100px;
  background: var(--color-bg);
}

/* ---------------------------------------------------
   SANCTUARY CARD — the big two-column layout
   --------------------------------------------------- */
.sanctuary-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 0;
  background: #1a1f12;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 56px;

  /* Floating shadow — two layers: a tight shadow and a soft far shadow */
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.18),
    0 24px 64px rgba(0, 0, 0, 0.22);

  /* Subtle continuous float animation */
  animation: sanctuary-float 5s ease-in-out infinite;

  /* Smooth transition for hover lift */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Each card gets a slightly different animation phase so they don't all move in sync */
.sanctuary-card:nth-child(2) { animation-delay: -1.6s; }
.sanctuary-card:nth-child(3) { animation-delay: -3.2s; }

.sanctuary-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.22),
    0 40px 80px rgba(0, 0, 0, 0.28);
  animation-play-state: paused;
}

@keyframes sanctuary-float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

/* ── Left column: gallery ── */
.sanctuary-gallery {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-self: stretch;   /* stretch to full card height */
}

.sanctuary-gallery-main {
  position: relative;
  flex: 1;               /* grow to fill space above thumbs */
  min-height: 0;
}

.sanctuary-gallery-main img {
  width: 100%;
  height: 100%;          /* fill the flex container */
  min-height: 280px;     /* floor so it never collapses */
  object-fit: cover;
  object-position: center;
  display: block;
}

.sanctuary-gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-style: italic;
}

/* Three thumbnails below the main image */
.sanctuary-gallery-thumbs {
  display: flex;
  gap: 2px;
  height: 110px;
}

.sanctuary-gallery-thumbs .thumb {
  flex: 1;
  overflow: hidden;
}

.sanctuary-gallery-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.sanctuary-gallery-thumbs .thumb:hover img {
  transform: scale(1.06);
}

/* Map thumbnail — live iframe embed */
.sanctuary-gallery-thumbs .thumb--map {
  position: relative;
  overflow: hidden;
}

.sanctuary-gallery-thumbs .thumb--map iframe {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* clicks handled by overlay anchor */
  filter: saturate(0.85);
  transition: filter 0.3s ease;
}

/* Invisible overlay that captures the click and opens Google Maps */
.map-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  display: block;
}

.sanctuary-gallery-thumbs .thumb--map:hover iframe {
  filter: saturate(1.1);
}

/* Pin icon label on hover */
.sanctuary-gallery-thumbs .thumb--map::after {
  content: '📍 Open in Maps';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
  pointer-events: none;
}

.sanctuary-gallery-thumbs .thumb--map:hover::after {
  opacity: 1;
}

/* ── Right column: content ── */
.sanctuary-content {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

.sanctuary-name {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  color: var(--color-accent);        /* Greenish-teal matching screenshot */
  margin: 0;
  line-height: 1.2;
}

.sanctuary-tagline {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-accent);
  margin: -12px 0 0;
  opacity: 0.9;
}

.sanctuary-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
  margin: 0;
}

/* ── Hours badge ── */
.sanctuary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sanctuary-hours {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(138, 154, 58, 0.2);
  border: 1px solid rgba(138, 154, 58, 0.4);
  color: var(--color-accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
}

.sanctuary-hours svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent);
  flex-shrink: 0;
}

/* ── Program tags ── */
.sanctuary-programs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sanctuary-program-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.sanctuary-program-tag:hover {
  background: rgba(138, 154, 58, 0.2);
  border-color: rgba(138, 154, 58, 0.5);
  color: var(--color-accent);
}

.sanctuary-program-tag svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Book button ── */
.sanctuary-book-btn {
  align-self: flex-start;
  margin-top: 4px;
}

/* ---------------------------------------------------
   DROPDOWN — Section headings (from styles.css patch)
   Included here in case styles.css hasn't been updated yet
   --------------------------------------------------- */
.nav-dropdown .dropdown-heading {
  display: block;
  padding: 10px 20px 4px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  cursor: default;
  pointer-events: none;
}

.nav-dropdown .dropdown-heading + .dropdown-heading,
.nav-dropdown li + .dropdown-heading {
  margin-top: 8px;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.nav-item.has-dropdown--left .nav-dropdown {
  left: 0;
  transform: translateX(0) translateY(-8px);
}

.nav-item.has-dropdown--left:hover .nav-dropdown {
  transform: translateX(0) translateY(0);
}

.mobile-nav .submenu-heading {
  display: block;
  padding: 10px 0 4px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-light);
  border-bottom: none;
  cursor: default;
  pointer-events: none;
}

/* ---------------------------------------------------
   WHATSAPP BUTTON
   --------------------------------------------------- */
.wa-wrapper {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9000;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 12px;
}

.wa-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}

.wa-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

.wa-button img {
  width: 38px;
  height: 38px;
}

.wa-message {
  background: #fff;
  color: #333;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

/* ---------------------------------------------------
   RESPONSIVE
   --------------------------------------------------- */
@media (max-width: 1024px) {
  .sanctuary-content {
    padding: 32px 32px;
    gap: 16px;
  }

  .sanctuary-gallery-main img {
    min-height: 260px;
  }
}

@media (max-width: 768px) {
  .sanctuary-card {
    grid-template-columns: 1fr;
  }

  .sanctuary-gallery-main img {
    min-height: 220px;
  }

  .sanctuary-gallery-thumbs {
    height: 90px;
  }

  .sanctuary-content {
    padding: 28px 24px;
  }

  .sanctuary-name {
    font-size: 1.4rem;
  }

  .sanctuaries-section {
    padding: 56px 0 72px;
  }

  .page-hero-inner {
    padding: 48px 24px 40px;
  }
}

@media (max-width: 480px) {
  .sanctuary-gallery-thumbs {
    height: 72px;
  }

  .sanctuary-programs {
    gap: 6px;
  }

  .sanctuary-program-tag {
    font-size: 0.72rem;
    padding: 5px 10px;
  }

  .wa-wrapper { bottom: 18px; right: 18px; }
}