/* =====================================================================
   Emerald Farm — Events page animated theme
   Linked ONLY on events.html, so generic selectors here stay scoped
   to this page. Brand palette: deep green #1a4a2e + gold #c9a84c.
   Loaded after enhance.css so it wins on ties.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Festive animated hero — shifting green gradient, golden glow,
      floating particles, and a gold flourish above the title.
   --------------------------------------------------------------------- */
.ev-hero {
  position: relative;
  padding: 160px 0 92px;
  background: linear-gradient(120deg,#0b2616 0%,#1a4a2e 38%,#3a8a5c 60%,#1a4a2e 82%,#0b2616 100%);
  background-size: 260% 260%;
  animation: ev-bg 14s ease infinite;
  overflow: hidden;
}
@keyframes ev-bg {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* soft radial golden glow behind the title */
.ev-hero::after {
  content: ''; position: absolute; top: -40%; left: 50%;
  width: 120%; height: 180%; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(201,168,76,.18), transparent 60%);
  pointer-events: none; z-index: 1;
}
.ev-hero .container { position: relative; z-index: 3; }

/* floating particle layer */
.ev-orbs { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.ev-orbs span {
  position: absolute; display: block; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232,213,160,1), rgba(201,168,76,.35));
  box-shadow: 0 0 14px rgba(201,168,76,.7);
  animation: ev-float linear infinite;
}
@keyframes ev-float {
  0%   { transform: translateY(40px) scale(.8);  opacity: 0; }
  12%  { opacity: .95; }
  85%  { opacity: .75; }
  100% { transform: translateY(-190px) scale(1.25); opacity: 0; }
}
.ev-orbs span:nth-child(1){ left:8%;  bottom:6%;  width:16px; height:16px; animation-duration:8s;   animation-delay:0s;   }
.ev-orbs span:nth-child(2){ left:22%; bottom:0;   width:10px; height:10px; animation-duration:6.5s; animation-delay:1.2s; }
.ev-orbs span:nth-child(3){ left:40%; bottom:4%;  width:20px; height:20px; animation-duration:10s;  animation-delay:.5s;  }
.ev-orbs span:nth-child(4){ left:57%; bottom:0;   width:12px; height:12px; animation-duration:7.5s; animation-delay:2s;   }
.ev-orbs span:nth-child(5){ left:72%; bottom:7%;  width:18px; height:18px; animation-duration:9s;   animation-delay:.8s;  }
.ev-orbs span:nth-child(6){ left:88%; bottom:2%;  width:11px; height:11px; animation-duration:7s;   animation-delay:2.6s; }
.ev-orbs span:nth-child(7){ left:50%; bottom:0;   width:9px;  height:9px;  animation-duration:6s;   animation-delay:2.4s; }
.ev-orbs span:nth-child(8){ left:32%; bottom:10%; width:14px; height:14px; animation-duration:8.5s; animation-delay:.2s;  }

/* gold flourish above the heading */
.ev-flourish { display:flex; align-items:center; justify-content:center; gap:14px; margin:8px 0 2px; }
.ev-flourish::before, .ev-flourish::after {
  content:''; height:1px; width:56px;
  background:linear-gradient(90deg,transparent,#c9a84c);
}
.ev-flourish::after { background:linear-gradient(90deg,#c9a84c,transparent); }
.ev-flourish span { color:#c9a84c; font-size:.95rem; letter-spacing:.3em; animation:ev-spin 9s linear infinite; }
@keyframes ev-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
   2. Animated count-up stats band (numbers animate on scroll-in).
   --------------------------------------------------------------------- */
.ev-stats {
  background:#143d24; padding:48px 24px;
  border-top:1px solid rgba(201,168,76,.18);
  border-bottom:1px solid rgba(201,168,76,.18);
}
.ev-stats-inner {
  max-width:1000px; margin:0 auto;
  display:grid; grid-template-columns:repeat(4,1fr); gap:24px; text-align:center;
}
.ev-stat .ev-num,
.ev-stat .ev-suffix {
  font-family:'Cormorant Garamond',serif; color:#c9a84c; line-height:1;
}
.ev-stat .ev-num    { font-size:clamp(2.2rem,4.4vw,3.3rem); display:inline-block; }
.ev-stat .ev-suffix { font-size:1.7rem; }
.ev-stat .ev-lbl {
  margin-top:9px; font-size:.7rem; letter-spacing:.15em; text-transform:uppercase;
  color:rgba(250,248,243,.6);
}
@media (max-width:680px){ .ev-stats-inner{ grid-template-columns:1fr 1fr; gap:34px 16px; } }

/* ---------------------------------------------------------------------
   3. Event-type cards — shine sweep + icon pop + deeper lift.
   --------------------------------------------------------------------- */
.section .card { position:relative; transition:transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
.section .card:hover { transform:translateY(-8px); box-shadow:0 22px 50px rgba(11,38,22,.22); }

/* diagonal shine that sweeps across on hover */
.section .card::after {
  content:''; position:absolute; top:0; left:-80%; width:55%; height:100%;
  background:linear-gradient(120deg,transparent,rgba(255,255,255,.35),transparent);
  transform:skewX(-20deg); transition:left .65s ease; pointer-events:none; z-index:2;
}
.section .card:hover::after { left:135%; }

/* the emoji icon is the first child of .card-body — pop it on hover */
.section .card .card-body > div:first-child {
  display:inline-block; transition:transform .45s cubic-bezier(.2,.7,.2,1);
}
.section .card:hover .card-body > div:first-child {
  transform:translateY(-4px) scale(1.18) rotate(-5deg);
}

/* ---------------------------------------------------------------------
   4. Add-on icons — gentle continuous float + lift/pop on hover.
   --------------------------------------------------------------------- */
.amen-item { transition:transform .3s ease, box-shadow .3s ease; }
.amen-item:hover { transform:translateY(-6px) scale(1.04); }
.amen-item .amen-icon { display:inline-block; animation:ev-bob 4.5s ease-in-out infinite; }
.amen-grid .amen-item:nth-child(2n) .amen-icon { animation-delay:.7s; }
.amen-grid .amen-item:nth-child(3n) .amen-icon { animation-delay:1.3s; }
.amen-grid .amen-item:nth-child(4n) .amen-icon { animation-delay:1.9s; }
@keyframes ev-bob { 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-7px); } }

/* ---------------------------------------------------------------------
   6. Photo event tiles — property image + themed motion on hover.
      Each .ev-card has a data-theme that selects the floating motif.
   --------------------------------------------------------------------- */
.ev-card {
  position: relative; display: block; overflow: hidden; border-radius: 14px;
  min-height: 360px; color: #faf8f3; text-decoration: none;
  box-shadow: 0 10px 30px rgba(11,38,22,.18);
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease;
}
.ev-card:hover { transform: translateY(-8px); box-shadow: 0 26px 56px rgba(11,38,22,.32); }

/* event tiles laid out centered (so an incomplete last row centers) */
.ev-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px; }
.ev-tiles .ev-card { width: calc((100% - 56px) / 3); }
@media (max-width: 900px) { .ev-tiles .ev-card { width: calc((100% - 28px) / 2); } }
@media (max-width: 600px) { .ev-tiles .ev-card { width: 100%; } }

/* media layer (photo OR inline SVG scene) — slow zoom on hover */
.ev-media {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transition: transform 6s ease;
}
.ev-card:not(.ev-flip):hover .ev-media { transform: scale(1.1); }

/* --- flip cards: front = animated scene, back = real photo --- */
.ev-flip { perspective: 1300px; height: 380px; }
.ev-flip .ev-flip-inner {
  position: relative; display: block; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.ev-flip:hover .ev-flip-inner { transform: rotateY(180deg); }
.ev-flip .ev-face {
  position: absolute; inset: 0; display: block;
  border-radius: 14px; overflow: hidden;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background-size: cover; background-position: center;
}
/* back = the full photo, no crop, no text (dark backdrop fills any letterbox) */
.ev-flip { cursor: pointer; }
.ev-flip .ev-back {
  transform: rotateY(180deg);
  background-size: cover; background-position: center; background-color: #0e2a1a;
}
.ev-flip .ev-face .ev-content { height: 100%; min-height: 0; }
.ev-zoom-hint {
  align-self: flex-start; margin-top: 6px;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(201,168,76,.95);
}

/* ---- full-size image lightbox ---- */
.ev-lightbox {
  position: fixed; inset: 0; z-index: 2000; display: none;
  align-items: center; justify-content: center;
  background: rgba(7,20,12,.93); padding: 24px; cursor: zoom-out;
}
.ev-lightbox.open { display: flex; animation: ev-lb-fade .25s ease; }
@keyframes ev-lb-fade { from { opacity: 0; } to { opacity: 1; } }
.ev-lightbox img {
  max-width: 95vw; max-height: 90vh; width: auto; height: auto;
  border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.ev-lb-close {
  position: fixed; top: 16px; right: 26px; z-index: 2001;
  font-size: 2.6rem; line-height: 1; color: #fff;
  background: none; border: none; cursor: pointer;
}
/* front (text tile): description + CTA always visible (hover flips, so no hover-reveal) */
.ev-flip .ev-front .ev-content p { max-height: 260px; opacity: 1; margin: 10px 0 14px; }
.ev-flip .ev-front .ev-cta { opacity: 1; transform: none; }
/* touch / small screens: no hover — show the text tile (front) */
@media (max-width: 900px) {
  .ev-flip { height: auto; min-height: 360px; perspective: none; }
  .ev-flip .ev-flip-inner { transform: none !important; height: auto; }
  .ev-flip .ev-back { display: none; }
  .ev-flip .ev-front {
    position: relative; transform: none; min-height: 360px;
    -webkit-backface-visibility: visible; backface-visibility: visible;
  }
}

/* shared scene animation utilities (used by the per-card SVG scenes) */
.sway    { transform-box: fill-box; transform-origin: top center; animation: ev-sway 4s ease-in-out infinite; }
@keyframes ev-sway   { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.flutter { transform-box: fill-box; transform-origin: center top; animation: ev-flutter 2.6s ease-in-out infinite; }
@keyframes ev-flutter{ 0%,100% { transform: skewX(-5deg); } 50% { transform: skewX(5deg); } }
.flame   { transform-box: fill-box; transform-origin: center bottom; animation: ev-flicker .18s ease-in-out infinite alternate; }
.tw      { animation: ev-twinkle 3s ease-in-out infinite; }
.rise2   { transform-box: fill-box; animation: ev-rise2 4.6s ease-in infinite; }
@keyframes ev-rise2  { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: .8; } 100% { transform: translateY(-130px); opacity: 0; } }
.fall2   { transform-box: fill-box; animation: ev-fall2 5s linear infinite; }
@keyframes ev-fall2  { 0% { transform: translateY(-20px) rotate(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: .8; } 100% { transform: translateY(180px) rotate(220deg); opacity: 0; } }
.ripple  { transform-box: fill-box; animation: ev-ripple 5s ease-in-out infinite; }
@keyframes ev-ripple { 0%,100% { transform: translateX(-10px); } 50% { transform: translateX(10px); } }
.drift   { transform-box: fill-box; animation: ev-drift2 16s linear infinite; }
@keyframes ev-drift2 { from { transform: translateX(-40px); } to { transform: translateX(440px); } }

/* legibility gradient — lighter so the scene/photo reads brighter */
.ev-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(7,28,16,.9) 0%, rgba(7,28,16,.48) 32%, rgba(7,28,16,0) 64%);
  transition: background .45s ease;
}
.ev-card:hover .ev-overlay {
  background: linear-gradient(to top, rgba(7,28,16,.92) 0%, rgba(7,28,16,.5) 40%, rgba(7,28,16,0) 70%);
}

/* text content pinned to the bottom */
.ev-content {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 360px; padding: 26px 24px;
}
.ev-content .card-tag { color: #ffd98a; margin-bottom: 6px; font-size: .78rem; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.ev-content h3 {
  color: #fff; font-family: 'Cormorant Garamond', serif; font-weight: 400;
  font-size: 1.95rem; margin: 0; text-shadow: 0 2px 14px rgba(0,0,0,.8);
}
.ev-content p {
  color: rgba(255,255,255,.96); font-size: 1rem; line-height: 1.65;
  max-height: 0; opacity: 0; margin: 0; overflow: hidden;
  text-shadow: 0 1px 10px rgba(0,0,0,.85);
  transition: max-height .55s ease, opacity .4s ease, margin .4s ease;
}
.ev-card:hover .ev-content p { max-height: 180px; opacity: 1; margin: 10px 0 14px; }
.ev-cta {
  align-self: flex-start; font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: #c9a84c;
  border: 1px solid rgba(201,168,76,.6); border-radius: 4px; padding: 8px 16px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .4s ease .05s, transform .4s ease .05s, background .25s, color .25s;
}
.ev-card:hover .ev-cta { opacity: 1; transform: translateY(0); }
.ev-cta:hover { background: #c9a84c; color: #143d24; }

/* themed floating motifs */
.ev-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.ev-fx i {
  position: absolute; bottom: -36px; font-style: normal; line-height: 1;
  opacity: 0; will-change: transform, opacity;
  animation-iteration-count: infinite; animation-fill-mode: both;
}
.ev-fx i:nth-child(1){ left:9%;  font-size:1.3rem; animation-duration:3s;   animation-delay:0s;  }
.ev-fx i:nth-child(2){ left:25%; font-size:1.8rem; animation-duration:3.6s; animation-delay:.4s; }
.ev-fx i:nth-child(3){ left:43%; font-size:1.2rem; animation-duration:2.8s; animation-delay:.8s; }
.ev-fx i:nth-child(4){ left:60%; font-size:1.9rem; animation-duration:3.8s; animation-delay:.2s; }
.ev-fx i:nth-child(5){ left:76%; font-size:1.3rem; animation-duration:3.2s; animation-delay:.6s; }
.ev-fx i:nth-child(6){ left:89%; font-size:1.6rem; animation-duration:3.4s; animation-delay:1s;  }

/* default: motifs rise (balloons, bubbles, hearts, sparkles, stars) */
.ev-card:hover .ev-fx i { animation-name: ev-pop-rise; animation-timing-function: ease-in; }
@keyframes ev-pop-rise {
  0%   { transform: translateY(0)      scale(.6)  rotate(0);    opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: .9; }
  100% { transform: translateY(-410px) scale(1.05) rotate(8deg); opacity: 0; }
}

/* mehendi: petals fall from the top instead */
.ev-card[data-theme="mehendi"] .ev-fx i { bottom: auto; top: -36px; }
.ev-card[data-theme="mehendi"]:hover .ev-fx i { animation-name: ev-pop-fall; animation-timing-function: linear; }
@keyframes ev-pop-fall {
  0%   { transform: translateY(0)     rotate(0);    opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: .9; }
  100% { transform: translateY(410px) rotate(260deg); opacity: 0; }
}

/* on touch / small screens there is no hover — reveal text + show photo */
@media (max-width: 900px) {
  .ev-content p  { max-height: 200px; opacity: 1; margin: 10px 0 14px; }
  .ev-cta        { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------------
   7. Showcase scene — original animated SVG night-garden celebration.
   --------------------------------------------------------------------- */
.ev-scene-wrap {
  position: relative; width: 100%;
  height: clamp(360px, 50vw, 560px); overflow: hidden;
}
.ev-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ev-scene-text {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px; color: #faf8f3;
}
.ev-scene-text::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 62% 55% at center, rgba(5,15,30,.55), transparent 72%);
}
.ev-scene-text .section-tag { color: #c9a84c; }
.ev-scene-text h2 {
  color: #fff; text-shadow: 0 3px 20px rgba(0,0,0,.55); margin-bottom: 20px;
}
.ev-scene-text .display-italic { color: #ffd98a; text-shadow: 0 3px 20px rgba(0,0,0,.6); }

/* twinkling stars */
.ev-tw { animation: ev-twinkle 3.2s ease-in-out infinite; }
.ev-tw:nth-child(2n)  { animation-delay: .7s; }
.ev-tw:nth-child(3n)  { animation-delay: 1.4s; }
.ev-tw:nth-child(4n)  { animation-delay: 2.1s; }
@keyframes ev-twinkle { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

/* glowing string-light bulbs */
.ev-bulb { animation: ev-glow 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ev-bulb:nth-child(2n) { animation-delay: .5s; }
.ev-bulb:nth-child(3n) { animation-delay: 1s; }
.ev-bulb:nth-child(5n) { animation-delay: 1.6s; }
@keyframes ev-glow { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* flickering bonfire */
.ev-fire { transform-box: fill-box; transform-origin: center bottom;
  animation: ev-flicker .16s ease-in-out infinite alternate; }
@keyframes ev-flicker {
  from { transform: scaleY(.92) scaleX(1.04); }
  to   { transform: scaleY(1.08) scaleX(.96); }
}

/* drifting fireflies */
.ev-fly { animation: ev-firefly 7s ease-in-out infinite; }
.ev-fly:nth-child(2) { animation-delay: 1.4s; }
.ev-fly:nth-child(3) { animation-delay: 2.8s; }
.ev-fly:nth-child(4) { animation-delay: 4.2s; }
.ev-fly:nth-child(5) { animation-delay: .8s; }
@keyframes ev-firefly {
  0%   { transform: translate(0,0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translate(34px,-70px); opacity: 0; }
}

/* Note: animations intentionally play for all visitors regardless of the
   OS "reduce motion" setting (per site owner's preference). */
