/* ============================================
   CUSTOM CSS - Only what Tailwind cannot do
   ============================================ */

:root {
  --header-bg-top: rgba(255, 249, 237, 0.96);
  --header-bg-bottom: rgba(255, 243, 224, 0.93);
  --header-border: rgba(194, 90, 20, 0.24);
  --header-text: #4A2A1C;
  --header-accent: #C25A14;
  --header-accent-soft: rgba(194, 90, 20, 0.18);
  --header-divider: rgba(74, 42, 28, 0.14);
}

html,
body {
  overflow-x: hidden;
}

/* Home page visual system */
.home-page {
  background:
    radial-gradient(circle at top left, rgba(255, 247, 225, 0.9), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at bottom right, rgba(255, 236, 205, 0.55), rgba(255, 255, 255, 0) 40%),
    #fffdf8;
}
.site-header.home-header {
  background: #fbf5e8;
  box-shadow: 0 8px 24px rgba(74, 29, 31, 0.12);
  border-bottom: none;
}
.header-top-strip {
  border-bottom: 1px solid rgba(92, 44, 27, 0.12);
}
.header-top-inner {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-top-title {
  color: #5c2c1b;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.header-top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header-social a {
  color: #5c2c1b;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.header-social svg {
  width: 18px;
  height: 18px;
}
.header-social a:hover {
  color: #c25a14;
  opacity: 1;
}
.header-lang {
  color: #5c2c1b;
  font-weight: 600;
}
.desktop-main-nav {
  padding: 8px 0 10px;
}
.desktop-nav-shell {
  position: relative;
  min-height: 58px;
  border-radius: 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  background: linear-gradient(90deg, #4e1e22 0%, #6f2c1d 48%, #9a4b10 100%);
  box-shadow: 0 10px 26px rgba(60, 18, 19, 0.28);
}
.desktop-nav-side {
  display: flex;
  align-items: center;
  gap: 12px;
}
.home-desktop-link {
  color: rgba(255, 243, 231, 0.92);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.25s ease;
}
.home-desktop-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #f8b15b;
  transition: width 0.25s ease;
}
.home-desktop-link:hover,
.home-desktop-link.active-link {
  color: #ffd7a4;
}
.home-desktop-link:hover::after,
.home-desktop-link.active-link::after {
  width: 100%;
}
.desktop-logo-link {
  transform: translateY(-14px);
  background: radial-gradient(circle at 50% 0%, #fff, #fff6ea);
  border: 2px solid rgba(252, 194, 119, 0.65);
  box-shadow: 0 10px 18px rgba(49, 16, 16, 0.35);
}
.desktop-logo-link:hover {
  transform: translateY(-15px);
}
.header-cta-btn {
  background: linear-gradient(135deg, #f39a22, #df6f09);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 8px 16px rgba(41, 10, 6, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.header-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(41, 10, 6, 0.28);
}
.mobile-top-mini {
  color: #5c2c1b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(92, 44, 27, 0.12);
}
.mobile-main-nav .site-mobile-top {
  background: linear-gradient(90deg, #4e1e22 0%, #6f2c1d 50%, #9a4b10 100%);
}
.mobile-logo-link {
  border-color: rgba(248, 177, 91, 0.65);
}
.home-mobile-link:hover {
  background-color: rgba(194, 90, 20, 0.14);
}
.home-hero {
  position: relative;
  background: #2f1611;
}
.home-hero .hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(51, 18, 10, 0.22) 8%,
    rgba(28, 9, 8, 0.52) 58%,
    rgba(47, 17, 14, 0.9) 100%
  );
}
.hero-content-shell {
  max-width: 1000px;
  margin-inline: auto;
  text-shadow: 0 3px 20px rgba(41, 16, 16, 0.55);
}
.hero-info-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  background: linear-gradient(90deg, #4e1e22 0%, #61221d 45%, #8f4314 100%);
  color: #ffe1b6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 14px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 10px 14px;
}
.hero-info-strip div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 6px;
  text-align: center;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.hero-info-strip span {
  display: inline-block;
  font-size: 14px;
}
@media (max-width: 1023px) {
  .hero-info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.home-hero .swiper-pagination {
  bottom: 56px !important;
}
@media (max-width: 767px) {
  .home-hero .swiper-pagination {
    bottom: 110px !important;
  }
  .hero-info-strip {
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .hero-info-strip div {
    justify-content: flex-start;
    text-align: left;
  }
  .hero-info-strip span {
    font-size: 12px;
  }
}

/* Header palette */
.site-header {
  background: linear-gradient(180deg, var(--header-bg-top), var(--header-bg-bottom));
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 12px 28px rgba(74, 29, 31, 0.12);
}
.site-logo-link {
  border: 1px solid rgba(194, 90, 20, 0.2);
  border-radius: 999px;
  padding: 4px 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.7));
  box-shadow: 0 6px 14px rgba(74, 29, 31, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.site-logo-link img {
  border-radius: 999px;
  display: block;
}
.site-logo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(74, 29, 31, 0.16);
}
.site-mobile-top {
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}
.site-mobile-menu {
  background: linear-gradient(180deg, #FFFDF6 0%, #FFF5E3 100%);
  border-top: 1px solid var(--header-divider);
  box-shadow: 0 12px 24px rgba(74, 29, 31, 0.14);
}
.site-mobile-link {
  color: var(--header-text);
  border-bottom: 1px solid var(--header-divider);
  transition: color 0.25s ease, background-color 0.25s ease;
}
.site-mobile-link:hover {
  color: var(--header-accent);
  background-color: var(--header-accent-soft);
}
.site-mobile-link.active-link {
  color: var(--header-accent);
  background-color: var(--header-accent-soft);
}
.site-mobile-link:last-child { border-bottom: none; }

/* Hero slide styles */
.hero-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  position: relative;
  will-change: transform;
}
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(45, 15, 17, 0.25) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
  position: absolute;
  inset: 0;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 5px; }
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #E65100, #3E2723);
  border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-track { background: #FFF8E1; }

/* Menu bar for hamburger */
.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--header-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu positioning */
#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 40;
}

/* `sticky` on <header> already creates a positioning context for the absolute mobile menu — no override needed */

/* Swiper 11 pagination — set via CSS variables (Swiper reads these internally) */
.heroSwiper {
  --swiper-pagination-color: #E65100;
  --swiper-pagination-bullet-size: 12px;
  --swiper-pagination-bullet-width: 12px;
  --swiper-pagination-bullet-height: 12px;
  --swiper-pagination-bullet-border-radius: 50%;
  --swiper-pagination-bullet-inactive-color: rgba(255, 255, 255, 0.6);
  --swiper-pagination-bullet-inactive-opacity: 1;
  --swiper-pagination-bullet-horizontal-gap: 6px;
}
.heroSwiper .swiper-pagination {
  position: absolute !important;
  bottom: 20px !important;
  z-index: 10;
  text-align: center;
  width: 100%;
}
.heroSwiper .swiper-pagination-bullet {
  display: inline-block !important;
  width: var(--swiper-pagination-bullet-width, 12px) !important;
  height: var(--swiper-pagination-bullet-height, 12px) !important;
  border-radius: 50% !important;
  background: var(--swiper-pagination-bullet-inactive-color) !important;
  opacity: var(--swiper-pagination-bullet-inactive-opacity) !important;
  margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 6px) !important;
  vertical-align: middle;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}
.heroSwiper .swiper-pagination-bullet-active {
  background: var(--swiper-pagination-color, #D97706) !important;
  transform: scale(1.3);
}

/* Footer layout */
.footer-join-strip {
  background: linear-gradient(90deg, #4a1b1d 0%, #65281f 45%, #8c400f 100%);
  padding: 26px 0;
}
.footer-join-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-join-inner h3 {
  color: #fff5e5;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
}
.footer-join-inner p {
  color: rgba(255, 234, 205, 0.85);
  font-size: 15px;
  margin-top: 4px;
}
.footer-join-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0;
  width: min(560px, 100%);
  border: 2px solid rgba(255, 196, 127, 0.6);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.footer-join-form input {
  border: none;
  padding: 12px 14px;
  color: #4a1f1c;
  font-size: 14px;
  outline: none;
}
.footer-join-form button {
  border: none;
  background: linear-gradient(135deg, #f39a22, #de6d08);
  color: #fff;
  padding: 0 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.footer-join-form button:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
.footer-join-status {
  grid-column: 1 / -1;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffe6bf;
  min-height: 20px;
}
.footer-join-status.is-error {
  color: #ffe2e2;
}

.site-footer {
  background:
    radial-gradient(circle at 18% 14%, rgba(180, 69, 21, 0.22), transparent 42%),
    radial-gradient(circle at 82% 80%, rgba(230, 81, 0, 0.16), transparent 38%),
    #231312;
  color: #f2dfca;
  padding: 34px 0 10px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 215, 176, 0.2);
  padding-bottom: 24px;
}
.footer-brand-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.footer-brand-head img {
  height: 44px;
  width: auto;
}
.footer-brand-head h4 {
  font-size: 26px;
  color: #fff2df;
  font-weight: 700;
}
.footer-brand p {
  font-size: 14px;
  color: rgba(245, 219, 194, 0.86);
  line-height: 1.6;
  max-width: 330px;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.footer-social a {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.footer-social a:hover {
  transform: translateY(-1px);
  background: rgba(243, 154, 34, 0.9);
}
.footer-col h5 {
  color: #fff2df;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-col a,
.footer-col p {
  display: block;
  color: rgba(245, 219, 194, 0.84);
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 2px;
}
.footer-col a:hover {
  color: #ffcf8d;
}
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 6px;
  font-size: 13px;
  color: rgba(245, 219, 194, 0.72);
  text-align: center;
}
.back-to-top {
  position: fixed;
  right: 14px;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  z-index: 70;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f39a22, #de6d08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(40, 14, 7, 0.3);
}
.back-to-top:hover {
  transform: translateY(-1px);
}

/* Section polish */
#schedule .border-t-4,
#cultural .group,
#donation .rounded-2xl,
#gallery .group {
  box-shadow: 0 14px 32px rgba(63, 28, 23, 0.08);
}
#schedule .border-t-4:hover,
#cultural .group:hover,
#gallery .group:hover {
  transform: translateY(-4px);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  box-shadow: 0 22px 38px rgba(63, 28, 23, 0.12);
}
#donation .rounded-2xl {
  border: 1px solid rgba(230, 81, 0, 0.18);
}


/* Amarvel section styling */
.amarvel-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(230, 81, 0, 0.14), transparent 36%),
    radial-gradient(circle at 92% 86%, rgba(74, 29, 31, 0.12), transparent 40%),
    linear-gradient(180deg, #fffaf0 0%, #fff3dd 100%);
}
.amarvel-kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(230, 81, 0, 0.14);
  color: #8b3b13;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.amarvel-title {
  color: #4a1d1f;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
.amarvel-divider {
  width: 110px;
  height: 4px;
  margin-inline: auto;
  border-radius: 999px;
  background: linear-gradient(90deg, #e65100 0%, #8b3a0f 100%);
}
.amarvel-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(230, 81, 0, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 246, 232, 0.96));
  box-shadow: 0 16px 34px rgba(74, 29, 31, 0.12);
  padding: 20px;
}
.amarvel-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #f39a22 0%, #de6d08 100%);
}
.amarvel-list {
  display: grid;
  gap: 6px;
}
.amarvel-list li {
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.amarvel-list li:hover {
  background-color: rgba(230, 81, 0, 0.09);
  border-color: rgba(230, 81, 0, 0.2);
  transform: translateX(2px);
}
.amarvel-note {
  color: #5c2c1b;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(139, 58, 15, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
}

/* Committee page row responsiveness */
.trustee-card,
.executive-item {
  gap: 10px;
}
.trustee-card > div,
.executive-item span:first-child {
  min-width: 0;
}
.trustee-card p,
.executive-item span:first-child {
  overflow-wrap: anywhere;
}
.trustee-card > span,
.executive-item span:last-child {
  flex-shrink: 0;
}

/* Oval frame glow on hover */
.group:hover .oval-frame {
  box-shadow:
    0 0 0 3px rgba(217, 119, 6, 0.7),
    0 0 0 7px rgba(217, 119, 6, 0.18),
    0 20px 50px rgba(74, 29, 31, 0.35);
  transition: box-shadow 0.4s ease;
}

/* Flipbook styles */
.flip-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex: 1;
  min-height: unset;
}
.page {
  background-color: white;
  overflow: hidden;
  display: block;
}
.page img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}
#kankotri-scroll-wrapper {
  position: relative;
  height: 112vh;
}
@media (max-width: 768px) {
  #kankotri-scroll-wrapper {
    height: auto;
  }
  #kankotri-book {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    padding-bottom: 0;
  }
}
#kankotri-book {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
#flip-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(to right, #D97706, #4A1D1F);
  width: 0%;
  transition: width 0.25s ease;
  z-index: 10;
}
#flip-scroll-hint { transition: opacity 0.5s ease; }

@media (max-width: 1100px) {
  .desktop-nav-side {
    gap: 8px;
  }
  .home-desktop-link {
    font-size: 11px;
  }
  .header-cta-btn {
    padding: 7px 10px;
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .footer-join-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .footer-join-inner h3 {
    font-size: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .footer-join-inner {
    gap: 14px;
  }
  .trustees-section h3,
  .executive-section h3,
  .amarvel-title {
    line-height: 1.25;
  }
  .trustee-card,
  .executive-item {
    flex-wrap: wrap;
  }
  .trustee-card > span,
  .executive-item span:last-child {
    font-size: 12px;
    width: 100%;
    text-align: left;
  }
  .executive-section .grid {
    gap: 10px;
  }
  .amarvel-list {
    gap: 8px;
  }
  .amarvel-kicker {
    letter-spacing: 0.14em;
    font-size: 10px;
    padding: 5px 12px;
  }
  .amarvel-card {
    padding: 14px;
    border-radius: 16px;
  }
  .amarvel-list li {
    padding: 6px 8px;
  }
  .amarvel-note {
    font-size: 13px;
    padding: 9px 12px;
  }
  .footer-join-strip {
    padding: 18px 0;
  }
  .footer-join-inner h3 {
    font-size: 20px;
  }
  .footer-join-inner p {
    font-size: 13px;
  }
  .footer-join-form {
    grid-template-columns: 1fr;
  }
  .footer-join-form button {
    padding: 11px 14px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand-head h4 {
    font-size: 22px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    text-align: center;
  }
}

/* Defer rendering of heavy below-fold sections */
#schedule,
#cultural,
#gallery,
#donation,
#contact,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* Schedule day cards shimmer animation */
.border-t-4.border-\[\#D97706\]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(217,119,6,0.5), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  to { left: 100%; }
}
