/*--------------------------------------------------------------
  CHRISTMAS THEME
  Loaded only when CHRISTMAS_ENABLED = true in christmas-config.php
--------------------------------------------------------------*/

/* ── Colour variables ── */
:root {
  --xmas-red:   #c0392b;
  --xmas-gold:  #ffd700;
  --xmas-snow:  #f0f8ff;
  --xmas-dark:  #0a1a0a;
}

/* ── Seasonal top bar ── */
.christmas-bar {
  background: linear-gradient(90deg, #8b0000 0%, #c0392b 50%, #8b0000 100%);
  color: #ffd700;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1100;
}

/* ── Christmas lights along the bottom of the navbar ── */
#header .navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #c0392b  0px, #c0392b  10px,
    transparent 10px, transparent 16px,
    #ffd700  16px, #ffd700  26px,
    transparent 26px, transparent 32px,
    #27ae60  32px, #27ae60  42px,
    transparent 42px, transparent 48px,
    #2980b9  48px, #2980b9  58px,
    transparent 58px, transparent 64px
  );
  pointer-events: none;
  z-index: 10;
  animation: xmas-lights-twinkle 2s ease-in-out infinite alternate;
}

@keyframes xmas-lights-twinkle {
  0%   { opacity: 1; }
  100% { opacity: 0.55; }
}

/* ── Santa hat on navbar brand ── */
#header .navbar-brand .brand-text {
  position: relative;
}
#header .navbar-brand .brand-text::after {
  content: '🎅';
  position: absolute;
  top: -20px;
  left: 0;
  font-size: 1.5rem;
  pointer-events: none;
  z-index: 202;
  animation: xmas-hat-bob 3s ease-in-out infinite;
}

@keyframes xmas-hat-bob {
  0%, 100% { transform: rotate(-5deg) translateY(0);   }
  50%       { transform: rotate(5deg)  translateY(-3px); }
}

/* ── Falling snowflakes ── */
.xmas-flake {
  position: fixed;
  top: -20px;
  pointer-events: none;
  z-index: 9998;
  color: #fff;
  text-shadow: 0 0 4px rgba(200,230,255,0.8);
  animation: xmas-fall linear infinite;
  user-select: none;
}

@keyframes xmas-fall {
  0%   { top: -20px; transform: translateX(0)            rotate(0deg);   opacity: 1;   }
  80%  {              transform: translateX(var(--drift)) rotate(600deg); opacity: 0.9; }
  100% { top: 110vh;  transform: translateX(var(--drift)) rotate(720deg); opacity: 0;   }
}

/* ── Accent colour overrides ── */
.section-label { color: var(--xmas-red); }

.divider,
.accent-bar { background: var(--xmas-red); }

.section-heading span { color: var(--xmas-red); }

.btn-hero-primary,
.strip-btn,
.btn-accent-solid,
.nav-cta {
  background-color: var(--xmas-red) !important;
}

a:hover { color: var(--xmas-red); }

/* ── Announce strip ── */
.announce-strip {
  background: linear-gradient(90deg, #6b0000 0%, #8b0000 100%) !important;
  border-color: var(--xmas-gold) !important;
}

/* ── Welcome banner ── */
.welcome-banner {
  background: linear-gradient(135deg, #0a1a0a 0%, #1a0808 100%) !important;
  border-bottom-color: var(--xmas-red) !important;
}

/* ── Page hero ── */
.page-hero {
  background: linear-gradient(135deg, #0a1a0a 0%, #1a0808 100%);
}

/* ── CTA band ── */
.cta-band {
  background: linear-gradient(135deg, #0a1a0a 0%, #1a0808 100%) !important;
}

/* ── Section corner holly ── */
.split-section::before {
  content: '🎄';
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 2rem;
  pointer-events: none;
  z-index: 5;
  animation: xmas-tree-sway 4s ease-in-out infinite;
  opacity: 0.7;
}
.split-section { position: relative; }

@keyframes xmas-tree-sway {
  0%, 100% { transform: rotate(-5deg); }
  50%       { transform: rotate(5deg);  }
}

/* ── Gift boxes on quick-link cards ── */
.info-card:nth-child(1)::after { content: '🎁'; }
.info-card:nth-child(2)::after { content: '⭐'; }
.info-card:nth-child(3)::after { content: '🦌'; }
.info-card:nth-child(4)::after { content: '🔔'; }

.info-card::after {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 1.2rem;
  pointer-events: none;
  animation: xmas-gift-bounce 2.5s ease-in-out infinite;
}
.info-card { position: relative; }

@keyframes xmas-gift-bounce {
  0%, 100% { transform: translateY(0)   rotate(-5deg); }
  50%       { transform: translateY(-5px) rotate(5deg);  }
}

/* ── Snowflake in footer ── */
.footer-upper::after {
  content: '⛄';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}
.footer-upper { position: relative; }

/* ── Footer tint ── */
.footer-upper { background: #050d05 !important; }

/* ── Bell in footer bottom ── */
.footer-bottom::before {
  content: '🔔 🎶 🎄';
  position: absolute;
  top: -14px;
  right: 40px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
  animation: xmas-bell-ring 2s ease-in-out infinite;
  opacity: 0.6;
}
.footer-bottom { position: relative; }

@keyframes xmas-bell-ring {
  0%, 100% { transform: rotate(-10deg); }
  50%       { transform: rotate(10deg);  }
}

/* ── Glowing star in footer bottom corner ── */
.footer-bottom::after {
  content: '⭐';
  position: absolute;
  bottom: 10px;
  left: 24px;
  font-size: 1.2rem;
  pointer-events: none;
  z-index: 2;
  animation: xmas-star-pulse 2s ease-in-out infinite;
}

@keyframes xmas-star-pulse {
  0%, 100% { transform: scale(1);    opacity: 0.5; }
  50%       { transform: scale(1.3); opacity: 1;   }
}

/* ── Event card festive border ── */
.event-card {
  border-top: 3px solid rgba(192,57,43,0.4) !important;
}

/* ── Hero Christmas scene ── */
.xmas-hero-flash {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  animation: xmas-scene-reveal 18s ease-in-out infinite;
  background:
    /* Stars */
    radial-gradient(1.5px 1.5px at 5%  8%,  rgba(255,255,255,0.95) 0%, transparent 100%),
    radial-gradient(1px   1px   at 18% 5%,  rgba(255,255,255,0.8)  0%, transparent 100%),
    radial-gradient(2px   2px   at 33% 12%, rgba(255,255,255,0.9)  0%, transparent 100%),
    radial-gradient(1px   1px   at 50% 6%,  rgba(255,255,255,0.7)  0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 65% 10%, rgba(255,255,255,0.95) 0%, transparent 100%),
    radial-gradient(1px   1px   at 80% 4%,  rgba(255,255,255,0.8)  0%, transparent 100%),
    radial-gradient(2px   2px   at 92% 9%,  rgba(255,255,255,0.9)  0%, transparent 100%),
    radial-gradient(1px   1px   at 25% 20%, rgba(255,255,255,0.6)  0%, transparent 100%),
    radial-gradient(1px   1px   at 75% 18%, rgba(255,255,255,0.7)  0%, transparent 100%),
    /* Snow on ground */
    radial-gradient(ellipse at 50% 110%, rgba(255,255,255,0.9) 0%, rgba(240,248,255,0.6) 30%, transparent 60%),
    /* Night sky gradient */
    linear-gradient(180deg, #000a00 0%, #001a00 40%, #002200 100%);
}

@keyframes xmas-scene-reveal {
  0%, 65%   { opacity: 0; }
  70%        { opacity: 1; }
  90%        { opacity: 1; }
  95%        { opacity: 0; }
  100%       { opacity: 0; }
}

/* ── Christmas scene text content ── */
.xmas-flash-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  z-index: 1;
}

.xmas-flash-emojis {
  font-size: 2.2rem;
  letter-spacing: 10px;
  margin-bottom: 18px;
  animation: xmas-gift-bounce 2s ease-in-out infinite;
}

.xmas-flash-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 900;
  margin: 0 0 14px;
  line-height: 1.1;
  background: linear-gradient(90deg,
    #c0392b 0%,
    #ffd700 30%,
    #27ae60 55%,
    #ffd700 75%,
    #c0392b 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: xmas-shimmer 3s linear infinite;
  filter: drop-shadow(0 0 20px rgba(255,215,0,0.5));
}

@keyframes xmas-shimmer {
  0%   { background-position: 0%   center; }
  100% { background-position: 200% center; }
}

.xmas-flash-sub {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 500;
  color: #ffd700;
  margin: 0 0 20px;
  line-height: 1.5;
  text-shadow: 0 0 20px rgba(255,215,0,0.7);
}

.xmas-flash-tree {
  font-size: clamp(2.5rem, 6vw, 4rem);
  animation: xmas-tree-sway 3s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(39,174,96,0.7));
}

/* ── CSS Christmas Tree ── */
.xmas-css-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
  filter: drop-shadow(0 0 35px rgba(39,174,96,0.6));
  animation: xmas-tree-sway 7s ease-in-out infinite;
}

.xct-star {
  font-size: 3.2rem;
  line-height: 1;
  position: relative;
  z-index: 5;
  margin-bottom: -12px;
  filter: drop-shadow(0 0 20px rgba(255,215,0,1)) drop-shadow(0 0 8px rgba(255,255,200,0.9));
  animation: xmas-star-pulse 1.5s ease-in-out infinite;
}

/* Three-layer triangles via clip-path so backgrounds render inside the shape */
.xct-l1, .xct-l2, .xct-l3 {
  position: relative;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.xct-l1 {
  width: 190px;
  height: 108px;
  background: linear-gradient(165deg, #2ecc71 0%, #27ae60 100%);
  margin-top: -24px;
  z-index: 4;
}

.xct-l2 {
  width: 268px;
  height: 134px;
  background: linear-gradient(165deg, #27ae60 0%, #219a52 100%);
  margin-top: -30px;
  z-index: 3;
}

.xct-l3 {
  width: 346px;
  height: 162px;
  background: linear-gradient(165deg, #1e8449 0%, #196a3a 100%);
  margin-top: -38px;
  z-index: 2;
}

/* Ornament lights — radial-gradient dots that twinkle */
.xct-l1::after,
.xct-l2::after,
.xct-l3::after {
  content: '';
  position: absolute;
  inset: 0;
}

.xct-l1::after {
  background:
    radial-gradient(circle 7px at 38% 75%, #ff3333 0%, transparent 80%),
    radial-gradient(circle 7px at 62% 82%, #ffd700 0%, transparent 80%),
    radial-gradient(circle 6px at 50% 63%, #44aaff 0%, transparent 80%);
  animation: xmas-lights-a 2.1s ease-in-out infinite alternate;
}

.xct-l2::after {
  background:
    radial-gradient(circle 7px at 24% 70%, #ffd700 0%, transparent 80%),
    radial-gradient(circle 7px at 39% 82%, #ff3333 0%, transparent 80%),
    radial-gradient(circle 7px at 55% 73%, #cc44ff 0%, transparent 80%),
    radial-gradient(circle 7px at 72% 84%, #44aaff 0%, transparent 80%),
    radial-gradient(circle 6px at 48% 61%, #ff9900 0%, transparent 80%);
  animation: xmas-lights-a 2.1s 0.65s ease-in-out infinite alternate;
}

.xct-l3::after {
  background:
    radial-gradient(circle 8px at 17% 72%, #ff3333 0%, transparent 80%),
    radial-gradient(circle 7px at 30% 85%, #ffd700 0%, transparent 80%),
    radial-gradient(circle 8px at 44% 73%, #44aaff 0%, transparent 80%),
    radial-gradient(circle 7px at 58% 84%, #ff9900 0%, transparent 80%),
    radial-gradient(circle 8px at 71% 73%, #cc44ff 0%, transparent 80%),
    radial-gradient(circle 7px at 83% 86%, #ffd700 0%, transparent 80%),
    radial-gradient(circle 6px at 50% 90%, #ff3333 0%, transparent 80%);
  animation: xmas-lights-a 2.1s 1.3s ease-in-out infinite alternate;
}

@keyframes xmas-lights-a {
  0%   { opacity: 1;   filter: brightness(1);   }
  50%  { opacity: 0.5; filter: brightness(1.8); }
  100% { opacity: 0.9; filter: brightness(1.2); }
}

.xct-trunk {
  width: 50px;
  height: 58px;
  background: linear-gradient(180deg, #8b5e3c 0%, #5a3210 100%);
  border-radius: 3px 3px 7px 7px;
  box-shadow: inset -6px 0 12px rgba(0,0,0,0.35), 0 4px 12px rgba(0,0,0,0.35);
  position: relative;
  z-index: 1;
}

/* ── Mobile ── */
@media (max-width: 576px) {
  #header .navbar-brand .brand-text::after { font-size: 1.2rem; top: -16px; }
  .xmas-flake  { font-size: 0.8rem; }
  .split-section::before { font-size: 1.4rem; }
  .xmas-flash-emojis { font-size: 1.5rem; letter-spacing: 6px; }
  .xmas-css-tree { transform: scale(0.75); transform-origin: top center; margin-top: 12px; }
}
