/* Default Colors */
:root {
  --bg-main: #FFFDF6;
  /* Kem dịu */
  --bg-card: #FFFFFF;
  /* Trắng */
  --text-main: #2D1F36;
  /* Tím mận đậm */
  --text-sub: #64748B;
  /* Xám ghi */
  --border-color: #FFFDF6;
  /* Hồng nhạt #FFD6E8*/
  --accent-glow: #FFB7D5;
}

/* Dark Mode Colors */
.dark {
  --bg-main: #140E1B;
  /* Tím mận đêm */
  --bg-card: #21172B;
  /* Tím mận tối cho Card */
  --border-color: #140E1B;
  /* Tím sẫm viền #3B2A4A*/
  --text-main: #F6E8F7;
  /* Trắng hồng nhẹ */
  --text-sub: #C0A9D2;
  /* Tím lavender nhạt */
  --accent-glow: rgba(255, 183, 213, 0.2);
}

@font-face {
  font-family: 'Eufuria';
  src: url('https://res.cloudinary.com/eufuria/raw/upload/v1791549919/mq0qdgcnbpa4wbonqxuy.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'Itim', cursive;
  background-color: var(--bg-main);

  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.fix-t {
  display: inline-block;
  margin-left: 0.15em;
  margin-right: 0.15em;
}

h1,
h2,
h3,
.font-bubble,
.specialh1,
.specialh2,
.specialh3 {
  font-family: 'Eufuria', cursive !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-synthesis: none !important;
}

.specialh1 {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.specialh2 {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.speiclah3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

/* Floating Sparkles Animation */
@keyframes floatSparkle {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
    opacity: 0.8;
  }

  50% {
    transform: translateY(-12px) rotate(18deg) scale(1.15);
    opacity: 1;
  }
}

.sparkle-float {
  animation: floatSparkle 3s ease-in-out infinite;
}

.sparkle-delay-1 {
  animation-delay: 1s;
}

.sparkle-delay-2 {
  animation-delay: 2s;
}

/* Mascot Effect */
.member-card .mascot-pop {
  opacity: 0;
  transform: translateY(15px) scale(0.85);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.member-card:hover .mascot-pop {
  opacity: 1;
  transform: translateY(-8px) scale(1);
}

#mascot-widget {
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition: filter 0.3s ease;
}

#mascot-widget.is-dragging {
  cursor: grabbing !important;
  transform: scale(1.08);
  filter: drop-shadow(0 15px 20px rgba(255, 183, 213, 0.6));
}

#mascot-widget:hover #mascot-inner,
#mascot-widget.menu-open #mascot-inner {
  filter: drop-shadow(0 8px 18px rgba(255, 183, 213, 0.75));
}

.mascot-radial-menu {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 20;
}

/* Hover mascot */
.mascot-radial-bridge {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 320px;
  height: 320px;
  margin-top: -160px;
  margin-left: -160px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

#mascot-widget:hover .mascot-radial-bridge,
#mascot-widget.menu-open .mascot-radial-bridge {
  pointer-events: auto;
}

/* Contact Buttons */
.radial-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  margin-left: -24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  border: 3px solid #FFFFFF;
  text-decoration: none;
  cursor: pointer;
  z-index: 15;
  transform: translate(0, 0) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.25s ease,
    box-shadow 0.25s ease;
  transition-delay: 0s;
}

#mascot-widget:hover .radial-btn,
#mascot-widget.menu-open .radial-btn {
  transform: translate(var(--tx, -60px), var(--ty, -60px)) scale(1);
  opacity: 1;
  pointer-events: auto;
  transition-delay: var(--delay, 0s);
}

.radial-btn:hover {
  transform: translate(var(--tx, -60px), var(--ty, -60px)) scale(1.18) !important;
  z-index: 30 !important;
  transition-delay: 0s !important;
}

/* Button Gradients */
.radial-btn-fb {
  background: linear-gradient(135deg, #1877F2 0%, #0D5AC7 100%);
  box-shadow: 0 6px 16px rgba(24, 119, 242, 0.45);
}

.radial-btn-fb:hover {
  box-shadow: 0 10px 24px rgba(24, 119, 242, 0.6), 0 0 12px rgba(24, 119, 242, 0.4);
}

.radial-btn-ig {
  background: linear-gradient(135deg, #833AB4 0%, #FD1D1D 50%, #FCB045 100%);
  box-shadow: 0 6px 16px rgba(253, 29, 29, 0.45);
}

.radial-btn-ig:hover {
  box-shadow: 0 10px 24px rgba(253, 29, 29, 0.6), 0 0 12px rgba(253, 29, 29, 0.4);
}

.radial-btn-mail {
  background: linear-gradient(135deg, #FF6584 0%, #FF85A2 100%);
  box-shadow: 0 6px 16px rgba(255, 101, 132, 0.45);
}

.radial-btn-mail:hover {
  box-shadow: 0 10px 24px rgba(255, 101, 132, 0.6), 0 0 12px rgba(255, 101, 132, 0.4);
}

.radial-btn-phone {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45);
}

.radial-btn-phone:hover {
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.6), 0 0 12px rgba(16, 185, 129, 0.4);
}

.radial-tooltip {
  position: absolute;
  top: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  font-family: 'Itim', cursive;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3);
  border: 1.5px solid var(--border-color);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
}

/* Tracking mascot */
#mascot-widget.dir-x-left .radial-tooltip,
#mascot-widget:not(.dir-x-right) .radial-tooltip {
  right: calc(100% + 12px);
  left: auto;
  transform: translateY(-50%) translateX(8px) scale(0.9);
}

#mascot-widget.dir-x-left .radial-btn:hover .radial-tooltip,
#mascot-widget:not(.dir-x-right) .radial-btn:hover .radial-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

#mascot-widget.dir-x-left .radial-tooltip::after,
#mascot-widget:not(.dir-x-right) .radial-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--bg-card);
}

#mascot-widget.dir-x-right .radial-tooltip {
  left: calc(100% + 12px);
  right: auto;
  transform: translateY(-50%) translateX(-8px) scale(0.9);
}

#mascot-widget.dir-x-right .radial-btn:hover .radial-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

#mascot-widget.dir-x-right .radial-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-right: 6px solid var(--bg-card);
}

.mascot-toast {
  position: absolute;
  left: 50%;
  opacity: 0;
  pointer-events: none;
  background: var(--bg-card);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: 'Itim', cursive;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
}

#mascot-widget.dir-y-top .mascot-toast,
#mascot-widget:not(.dir-y-bottom) .mascot-toast {
  top: -85px;
  bottom: auto;
  transform: translateX(-50%) translateY(10px) scale(0.9);
}

#mascot-widget.dir-y-bottom .mascot-toast {
  bottom: -85px;
  top: auto;
  transform: translateX(-50%) translateY(-10px) scale(0.9);
}

.mascot-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1) !important;
}

#mascot-widget.is-dragging .mascot-radial-menu,
#mascot-widget.is-dragging .radial-btn {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.5) !important;
}

@keyframes mascotWiggleBounce {

  0%,
  100% {
    transform: translateY(0) scale(1) rotate(0deg);
  }

  20% {
    transform: translateY(-16px) scale(1.1) rotate(-6deg);
  }

  40% {
    transform: translateY(-8px) scale(1.05) rotate(6deg);
  }

  60% {
    transform: translateY(-14px) scale(1.08) rotate(-3deg);
  }

  80% {
    transform: translateY(-4px) scale(1.02) rotate(2deg);
  }
}

.mascot-attention {
  animation: mascotWiggleBounce 1s ease-in-out;
}

/* Dark Toggle Thumb */
#theme-toggle-thumb {
  transform: translateX(0) scale(1);
}

.dark #theme-toggle-thumb {
  transform: translateX(2rem) scale(1);
}

#theme-toggle:hover #theme-toggle-thumb {
  transform: translateX(0) scale(1.05);
}

.dark #theme-toggle:hover #theme-toggle-thumb {
  transform: translateX(2rem) scale(1.05);
}

#theme-toggle:active #theme-toggle-thumb {
  transform: translateX(0) scale(0.9);
}

.dark #theme-toggle:active #theme-toggle-thumb {
  transform: translateX(2rem) scale(0.9);
}

/* Mobile menu */
#mobile-menu {
  display: none;
}

#mobile-menu.is-open {
  display: flex;
}

/* Từ 1280px trở lên đã có menu ngang -> luôn ẩn menu mobile
   (selector #id thắng class xl:hidden của Tailwind nên phải khai báo ở đây) */
@media (min-width: 1280px) {
  #mobile-menu,
  #mobile-menu.is-open {
    display: none;
  }
}

/* Tối ưu Flat Layer Carousel */
.events-carousel-wrapper {
  position: relative;
  /* Tràn full width viewport — không bị clip bởi padding của section cha */
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  height: clamp(450px, 70vh, 620px);
  overflow: hidden;
  /* Thêm padding bottom cho dots */
  padding-bottom: 2.5rem;
}

#events-container {
  position: absolute;
  inset: 0;
}

#events-container .event-card-item {
  position: absolute !important;
  /* Dùng top/left 50% + xPercent:-50 (GSAP) để center đúng tuyệt đối */
  top: 50%;
  left: 50%;
  width: min(82vw, 800px);
  height: clamp(380px, 65vh, 480px);
  margin-top: 0;
  margin-left: 0;
  border-radius: 1.5rem;
  /* Mặc định ẩn: JS (render) chỉ bật các thẻ nằm trong vùng nhìn thấy */
  visibility: hidden;
  opacity: 0;
  will-change: transform, opacity;
  /* Tắt transition trên transform để JS kiểm soát hoàn toàn */
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  /* Offset trung tâm bằng translateY(-50%) vì GSAP dùng xPercent:-50 */
  transform: translateX(-50%) translateY(-50%);
}

#events-container .event-card-item.is-active {
  box-shadow: 0 20px 45px rgba(255, 183, 213, 0.4), 0 0 0 2px rgba(255, 183, 213, 0.6);
}

/* Style cho Dots Indicator */
.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}


.event-dot.is-active {
  width: 24px;
  background-color: #FFB7D5;
  box-shadow: 0 0 10px rgba(255, 183, 213, 0.8);
}

/* ─── About Section: Mobile Sticky Title ─────────────────────────────────── */
/* Trên mobile: GSAP pin sẽ thêm position fixed → cần background để */
/* content phía dưới không nhìn xuyên qua title khi scroll */
@media (max-width: 767px) {
  .about-title-col {
    position: relative;
    z-index: 10;
    background-color: var(--bg-main);
    /* Khoảng cách dưới title trước khi content card bắt đầu */
    padding-bottom: 1.5rem;
    transition: background-color 0.3s ease;
  }
}
/* ─────────────────────────────────────────────────────────────────────────── */

/* ─── Events: Mobile / Tablet LIST MODE ─────────────────────────────────── */
/* LƯU Ý QUAN TRỌNG: carousel dùng selector "#events-container .event-card-item"
   kèm "position: absolute !important". Selector có ID thắng mọi selector class
   dù cùng !important, nên list-mode PHẢI có #events-container để ghi đè được.
   (Trước đây thiếu ID -> thẻ vẫn absolute, chồng lên nhau, container cao 0.) */

.events-carousel-wrapper.is-list-mode {
  width: 100%;
  max-width: 100%;
  left: auto;
  transform: none;               /* bỏ kỹ thuật căn giữa 100vw của carousel */
  height: auto !important;
  overflow: visible !important;
  padding-bottom: 2rem;
}

.events-carousel-wrapper.is-list-mode #events-container {
  position: relative !important;
  inset: auto !important;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 1rem 1rem;
}

.events-carousel-wrapper.is-list-mode #events-container .event-card-item {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 100%/3 !important;
  margin: 0 auto !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  will-change: auto;
  transition: box-shadow 0.25s ease, transform 0.25s ease !important;
}

.events-carousel-wrapper.is-list-mode #events-container .event-card-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 20px 45px rgba(255, 183, 213, 0.35),
              0 0 0 2px rgba(255, 183, 213, 0.5) !important;
}

/* List mode không cần lớp làm tối, dots, hay thẻ nhân bản */
.events-carousel-wrapper.is-list-mode .event-dim,
.events-carousel-wrapper.is-list-mode .event-card-item[data-clone],
.events-carousel-wrapper.is-list-mode #events-dots-container {
  display: none !important;
}
/* ─────────────────────────────────────────────────────────────────────────── */