/* ===========================
   Miếu Quan Âm Tân Phú 125
   125新富觀音廟
   Spiritual temple website
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Lacquer red & gold - warm temple palette */
  --color-primary: #962428;
  --color-primary-dark: #6E181C;
  --color-primary-light: #B83A40;
  --color-accent: #C8962E;
  --color-accent-light: #DDAD3C;
  --color-accent-glow: rgba(200, 150, 46, 0.25);
  --color-bg: #FFFDF7;
  --color-bg-alt: #FBF5EA;
  --color-text: #3A2518;
  --color-text-light: #6B5744;
  --color-border: #E8D5B8;
  --color-white: #FFFEF9;
  --color-shadow: rgba(58, 37, 24, 0.07);
  --color-shadow-warm: rgba(200, 150, 46, 0.15);

  --font-heading: 'Noto Serif TC', Georgia, 'Times New Roman', serif;
  --font-body: 'Noto Serif', Georgia, 'Times New Roman', serif;
  --max-width: 900px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(200, 150, 46, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(150, 36, 40, 0.03) 0%, transparent 40%);
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--color-accent);
}

ul, ol {
  padding-left: 1.5em;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* --- Header --- */
.site-header {
  background: rgba(90, 22, 26, 0.95);
  color: var(--color-white);
  padding: var(--space-sm) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(200, 150, 46, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.site-logo {
  color: var(--color-white);
  text-decoration: none;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  transition: color 0.3s ease;
}

.site-logo:hover,
.site-logo:focus {
  color: var(--color-accent);
}

.logo-vi {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-zh {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--color-accent);
}

/* --- Header right (lang switch + menu toggle, mobile only) --- */
.header-right {
  display: none;
  align-items: center;
  gap: var(--space-xs);
}

.lang-switch-mobile {
  display: none;
}

/* --- Mobile menu toggle --- */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-white);
  transition: transform 0.2s;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -7px;
}

.menu-icon::after {
  top: 7px;
}

/* --- Navigation --- */
.nav-list {
  list-style: none;
  display: flex;
  gap: var(--space-xs);
  padding: 0;
  margin: 0;
  align-items: center;
}

.nav-link {
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--color-accent);
  background-color: rgba(255,255,255,0.1);
}

.lang-switch {
  color: var(--color-white);
  text-decoration: none;
  border: 1px solid var(--color-accent);
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 0.9rem;
  font-family: var(--font-heading);
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.lang-switch:hover,
.lang-switch:focus {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
}

/* --- Fade-in on scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.fade-in-children > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-children.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-children.visible > *:nth-child(2) { transition-delay: 0.15s; }
.fade-in-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.fade-in-children.visible > *:nth-child(4) { transition-delay: 0.45s; }

.fade-in-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-children > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  background-color: var(--color-primary-dark);
  color: var(--color-white);
  text-align: center;
  padding: var(--space-xl) var(--space-sm);
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 5%, var(--color-accent) 50%, transparent 95%);
  z-index: 2;
}

/* Hero image carousel */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(110, 24, 28, 0.87) 0%,
    rgba(150, 36, 40, 0.62) 40%,
    rgba(58, 37, 24, 0.84) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.04em;
}

.hero-title-vi,
.hero-title-vi-alt {
  display: block;
}

.hero-title-address {
  display: block;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-border);
  margin-top: 0.3rem;
  letter-spacing: 0.02em;
}

.hero-title-zh {
  display: block;
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-top: var(--space-sm);
  text-shadow: 0 2px 15px rgba(200, 150, 46, 0.4);
}

.hero-title-address-alt {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-accent);
  opacity: 0.7;
  margin-top: 0.2rem;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-border);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
  letter-spacing: 0.02em;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: var(--color-primary-dark);
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 15px rgba(200, 150, 46, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover,
.hero-cta:focus {
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(200, 150, 46, 0.5);
}

/* Hero carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(0, 0, 0, 0.3);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.carousel-arrow:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.carousel-prev {
  left: var(--space-sm);
}

.carousel-next {
  right: var(--space-sm);
}

/* Hero carousel dots */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-md);
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}

.carousel-dot.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.carousel-dot.active:hover {
  background: var(--color-accent-light);
}

/* --- Section divider --- */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: var(--space-md) 0;
  position: relative;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.section-divider-icon {
  width: 36px;
  height: 36px;
  opacity: 0.5;
  flex-shrink: 0;
}

/* --- Sections --- */
.section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
}

.section-alt {
  background: radial-gradient(ellipse at 50% 50%, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

/* Dragon stroke decorations on wide screens */
.section::before,
.section::after,
.map-section::before,
.map-section::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background-repeat: repeat-y;
  background-size: 60px 400px;
}

.section::before,
.map-section::before {
  left: calc(50% - 580px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='400' viewBox='0 0 60 400'%3E%3Cline x1='4' y1='0' x2='4' y2='400' stroke='%23C8962E' stroke-width='1' opacity='0.18'/%3E%3Cline x1='56' y1='0' x2='56' y2='400' stroke='%23C8962E' stroke-width='1' opacity='0.18'/%3E%3Cpath d='M30 0 C30 20, 45 30, 45 50 S20 80, 20 100 S50 130, 50 150 S15 180, 15 200 S48 230, 48 250 S12 280, 12 300 S45 330, 45 350 S30 380, 30 400' fill='none' stroke='%23C8962E' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M30 0 C30 25, 50 35, 50 55 S15 85, 15 105 S55 135, 55 155 S10 185, 10 205 S52 235, 52 255 S8 285, 8 305 S50 335, 50 355 S30 385, 30 400' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.2'/%3E%3Ccircle cx='45' cy='50' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='20' cy='100' r='2.5' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='50' cy='150' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='15' cy='200' r='3' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.2'/%3E%3Ccircle cx='48' cy='250' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='12' cy='300' r='2.5' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='45' cy='350' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Cpath d='M42 45 Q48 48, 48 54' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M17 95 Q13 98, 13 104' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M47 145 Q53 148, 53 154' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M12 195 Q8 198, 8 204' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M45 245 Q51 248, 51 254' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M9 295 Q5 298, 5 304' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3C/svg%3E");
}

.section::after,
.map-section::after {
  right: calc(50% - 580px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='400' viewBox='0 0 60 400'%3E%3Cline x1='4' y1='0' x2='4' y2='400' stroke='%23C8962E' stroke-width='1' opacity='0.18'/%3E%3Cline x1='56' y1='0' x2='56' y2='400' stroke='%23C8962E' stroke-width='1' opacity='0.18'/%3E%3Cpath d='M30 0 C30 20, 15 30, 15 50 S40 80, 40 100 S10 130, 10 150 S45 180, 45 200 S12 230, 12 250 S48 280, 48 300 S15 330, 15 350 S30 380, 30 400' fill='none' stroke='%23C8962E' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M30 0 C30 25, 10 35, 10 55 S45 85, 45 105 S5 135, 5 155 S50 185, 50 205 S8 235, 8 255 S52 285, 52 305 S10 335, 10 355 S30 385, 30 400' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.2'/%3E%3Ccircle cx='15' cy='50' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='40' cy='100' r='2.5' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='10' cy='150' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='45' cy='200' r='3' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.2'/%3E%3Ccircle cx='12' cy='250' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='48' cy='300' r='2.5' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Ccircle cx='15' cy='350' r='2' fill='none' stroke='%23C8962E' stroke-width='0.5' opacity='0.25'/%3E%3Cpath d='M18 45 Q12 48, 12 54' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M43 95 Q47 98, 47 104' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M13 145 Q7 148, 7 154' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M48 195 Q52 198, 52 204' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M15 245 Q9 248, 9 254' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3Cpath d='M51 295 Q55 298, 55 304' fill='none' stroke='%23C8962E' stroke-width='0.4' opacity='0.2'/%3E%3C/svg%3E");
}

@media (min-width: 1100px) {
  .section::before,
  .section::after,
  .map-section::before,
  .map-section::after {
    opacity: 1;
  }
}

/* Ornamental section title */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.04em;
  position: relative;
  padding-bottom: 1.2rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  box-shadow: 0 0 10px var(--color-accent-glow);
}

.section-text {
  max-width: 700px;
  margin: 0 auto var(--space-md);
  text-align: center;
  color: var(--color-text-light);
  font-size: 1.05rem;
  line-height: 1.85;
}

.welcome-photo {
  max-width: 900px;
  margin: 0 auto var(--space-md);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(58, 37, 24, 0.18);
}

.welcome-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 420px;
}

.section-address {
  text-align: center;
  margin-top: var(--space-sm);
  color: var(--color-text-light);
}

/* --- Announcement --- */
.announcement {
  max-width: 700px;
  margin: var(--space-lg) auto 0;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(135deg, rgba(150, 36, 40, 0.06), rgba(200, 150, 46, 0.08));
  border: 1px solid var(--color-accent);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  text-align: center;
}

.announcement-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.announcement-text {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.announcement-text strong {
  color: var(--color-primary);
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: var(--color-white);
  text-decoration: none;
  font-family: var(--font-heading);
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 10px var(--color-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover,
.btn:focus {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(150, 36, 40, 0.3);
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: var(--color-accent);
  text-decoration: none;
  font-family: var(--font-heading);
  padding: 12px 28px;
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow: 0 4px 16px var(--color-accent-glow);
}

/* --- Card grid --- */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: 8px;
  padding: var(--space-md);
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--color-shadow-warm);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.card-text {
  color: var(--color-text-light);
  font-size: 1rem;
  line-height: 1.7;
}

a.card-link {
  text-decoration: none;
  display: block;
  color: inherit;
}

a.card-link:hover .card-title {
  color: var(--color-accent);
}

/* --- Hours grid --- */
.hours-grid {
  max-width: 400px;
  margin: 0 auto;
}

.hours-item {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

.hours-days {
  font-weight: 700;
  color: var(--color-text-light);
}

.hours-time {
  color: var(--color-primary);
  font-weight: 700;
}

/* --- Contact list --- */
.contact-list {
  max-width: 500px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  gap: var(--space-sm);
}

.contact-role {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-primary);
  white-space: nowrap;
}

.contact-detail {
  text-align: right;
}

.contact-detail a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.05rem;
}

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

.contact-note {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

@media (max-width: 480px) {
  .contact-item {
    flex-direction: column;
    gap: 2px;
  }

  .contact-detail {
    text-align: left;
  }
}

/* --- Contact page layout --- */
.contact-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.contact-temple-name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.contact-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.contact-meta-divider {
  color: var(--color-border);
}

.contact-map-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.contact-map-left .map-wrapper {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  min-height: 350px;
  height: 100%;
}

.contact-map-left .map-wrapper iframe {
  min-height: 350px;
  height: 100%;
  display: block;
}

.contact-map-right {
  display: flex;
  flex-direction: column;
}

.contact-directions-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.contact-map-right .directions-select-wrapper {
  text-align: left;
  margin-bottom: var(--space-sm);
}

.contact-map-right .directions-content {
  margin: 0;
  max-width: none;
}

.contact-map-right .directions-content p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-text-light);
}

.contact-map-right .btn {
  align-self: flex-start;
  margin-top: auto;
  padding-top: var(--space-sm);
}

@media (min-width: 768px) {
  .contact-map-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Map --- */
.map-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 0;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, var(--color-bg-alt) 0%, var(--color-bg) 100%);
}

.map-section .container {
  max-width: 1100px;
}

.map-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.map-wrapper {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--color-accent);
  box-shadow: 0 4px 20px var(--color-shadow);
}

.map-wrapper iframe {
  display: block;
  width: 100%;
  height: 400px;
}

.map-split-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}

.map-info-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-primary);
  line-height: 1.3;
}

.map-info-address {
  color: var(--color-text-light);
  line-height: 1.6;
}

.map-info-hours {
  color: var(--color-text-light);
  line-height: 1.6;
}

.map-info-hours p {
  margin: 2px 0;
}

.map-info-phone {
  color: var(--color-text-light);
}

/* Gold CTA in map panel */
.map-split-right .btn {
  align-self: flex-start;
  margin-top: var(--space-xs);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
  color: var(--color-primary-dark);
  box-shadow: 0 3px 12px var(--color-accent-glow);
}

.map-split-right .btn:hover,
.map-split-right .btn:focus {
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
  color: var(--color-primary-dark);
  box-shadow: 0 5px 20px rgba(200, 150, 46, 0.4);
}

/* --- Gallery grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.gallery-item {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--color-shadow-warm);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  text-align: center;
  padding: var(--space-xs);
  font-size: 0.9rem;
  color: var(--color-text-light);
  background: var(--color-white);
}

.gallery-page-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-item img {
    height: 220px;
  }

  .gallery-page-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Gallery page: filter tabs --- */
.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-lg);
}

.gallery-filter-btn {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  padding: 8px 20px;
  border: 2px solid var(--color-accent);
  border-radius: 30px;
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-filter-btn:hover {
  background: var(--color-accent-glow);
}

.gallery-filter-btn.active {
  background: var(--color-accent);
  color: var(--color-primary-dark);
  box-shadow: 0 2px 10px var(--color-accent-glow);
}

/* --- Gallery page: masonry grid --- */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 180px;
  gap: 10px;
}

.masonry-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 10px var(--color-shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease, opacity 0.4s ease;
}

.masonry-item.hidden {
  display: none;
}

.masonry-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.masonry-item:hover img {
  transform: scale(1.06);
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-caption {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.6);
}

/* Size variants */
.masonry-wide {
  grid-column: span 2;
}

.masonry-tall {
  grid-row: span 2;
}

@media (min-width: 600px) {
  .masonry-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 12px;
  }
}

@media (min-width: 900px) {
  .masonry-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
  }

  .masonry-caption {
    font-size: 0.9rem;
  }
}

/* --- Gallery page: lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: var(--space-md);
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: var(--color-white);
  margin-top: var(--space-sm);
  font-size: 1rem;
  text-align: center;
  max-width: 600px;
  opacity: 0.85;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s ease, background 0.3s ease;
  z-index: 1001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-filters {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 1001;
}

.lightbox-filter-btn {
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lightbox-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* --- Homepage showcase grid (asymmetric masonry) --- */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 200px;
  gap: 10px;
  margin-top: var(--space-sm);
}

.showcase-item {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 12px var(--color-shadow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.showcase-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(58, 37, 24, 0.25) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.showcase-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px var(--color-shadow-warm);
  z-index: 1;
}

.showcase-item:hover::after {
  opacity: 1;
}

.showcase-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-wide {
  grid-column: span 2;
}

@media (min-width: 600px) {
  .showcase-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
  }

  .showcase-wide {
    grid-column: span 2;
  }
}

@media (min-width: 900px) {
  .showcase-grid {
    grid-auto-rows: 260px;
    gap: 14px;
  }
}

/* --- Directions panel --- */
.directions-panel {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.directions-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.directions-select-wrapper {
  text-align: center;
  margin-bottom: var(--space-md);
}

.directions-select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 36px 10px 14px;
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  background-color: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23C8962E' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 240px;
}

.directions-select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.directions-content {
  display: none;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-text-light);
  line-height: 1.8;
}

.directions-content.active {
  display: block;
}

.directions-content p {
  margin-bottom: var(--space-xs);
}

.directions-hint {
  font-size: 0.9rem;
  margin-top: var(--space-xs);
  color: var(--color-text-light);
  opacity: 0.8;
}

.directions-hint a {
  color: var(--color-accent);
  font-weight: 700;
}

/* --- Page content --- */
.page-content {
  padding: var(--space-xl) 0;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 1.2rem;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  box-shadow: 0 0 8px var(--color-accent-glow);
}

/* Page inline images */
.page-image {
  margin: var(--space-md) 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow: 0 2px 12px var(--color-shadow);
}

.page-image img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.page-image-caption {
  text-align: center;
  padding: var(--space-xs);
  font-size: 0.85rem;
  color: var(--color-text-light);
  background: var(--color-bg-alt);
  font-style: italic;
}

.page-image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.page-image-grid .page-image {
  margin: 0;
}

.page-image-grid .page-image img {
  height: 200px;
}

@media (min-width: 600px) {
  .page-image img {
    height: 360px;
  }

  .page-image-grid .page-image img {
    height: 240px;
  }
}

.page-body h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-xs);
}

.page-body p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.page-body ul,
.page-body ol {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.page-body li {
  margin-bottom: var(--space-xs);
}

/* --- Post --- */
.post-content {
  padding: var(--space-xl) 0;
}

.post-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.post-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.post-date {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.post-body {
  margin-bottom: var(--space-xl);
}

.post-body h2 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: var(--space-xs);
}

.post-body h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-primary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.post-body h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--color-primary-light);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.post-body p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.post-body ul,
.post-body ol {
  margin-bottom: var(--space-sm);
  color: var(--color-text-light);
}

.post-body li {
  margin-bottom: var(--space-xs);
}

.post-body strong {
  color: var(--color-primary);
}

.post-nav {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
}

/* --- Footer --- */
.site-footer {
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: var(--space-lg) 0 0;
  border-top: 3px solid var(--color-accent);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
}

.footer-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.footer-name-zh {
  color: var(--color-accent);
  font-size: 0.95rem;
}

.footer-desc {
  color: var(--color-border);
  font-size: 0.95rem;
}

.footer-contact p,
.footer-hours p {
  margin-bottom: var(--space-xs);
  font-size: 0.95rem;
}

.footer-hours ul {
  list-style: none;
  padding: 0;
  font-size: 0.9rem;
  color: var(--color-border);
}

.footer-hours li {
  margin-bottom: 2px;
}

.site-footer a {
  color: var(--color-accent);
}

.site-footer a:hover {
  color: var(--color-accent-light);
}

.footer-bottom {
  border-top: 1px solid rgba(200, 150, 46, 0.3);
  padding: var(--space-sm) 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-border);
}

/* --- Responsive --- */
@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .map-split {
    grid-template-columns: 5fr 3fr;
  }

  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-title-vi,
  .hero-title-vi-alt {
    white-space: nowrap;
  }

  .hero-title-zh {
    font-size: 2rem;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: var(--space-lg) var(--space-sm);
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-title-zh {
    font-size: 1.15rem;
  }

  .hero-title-address {
    font-size: 0.9rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
  }

  .section {
    padding: var(--space-lg) 0;
  }

  .section-title {
    font-size: 1.35rem;
    margin-bottom: var(--space-md);
    padding-bottom: 0.8rem;
  }

  .section-text {
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
  }

  .welcome-photo {
    margin-bottom: var(--space-sm);
  }

  .welcome-photo img {
    max-height: 220px;
  }

  .card {
    padding: var(--space-sm);
  }

  .card-title {
    font-size: 1rem;
  }

  .card-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .showcase-grid {
    grid-auto-rows: 140px;
    gap: 6px;
  }

  .section-divider {
    padding: var(--space-sm) 0;
  }
}

@media (max-height: 700px) {
  .hero {
    padding: var(--space-md) var(--space-sm);
  }

  .section {
    min-height: auto;
    padding: var(--space-lg) 0;
  }

  .map-section {
    min-height: auto;
  }
}

@media (max-width: 700px) {
  .header-right {
    display: flex;
  }

  .lang-switch-mobile {
    display: inline-block;
  }

  .nav-lang-desktop {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .site-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    padding-top: var(--space-xs);
  }

  .nav-link {
    display: block;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
}

@media (min-width: 701px) {
  .header-right {
    display: none;
  }

  .menu-toggle {
    display: none;
  }
}

/* --- Print --- */
@media print {
  .site-header,
  .site-footer,
  .menu-toggle,
  .map-section,
  .hero-cta {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
}
