/* ============================================================
   effects.css — Bogar Vali Neeku Nilayam
   Attractive card effects for the whole site:
   1. Soft glowing "blink" pulse on icon chips & card borders
   2. Hover lift with shadow + border highlight
   3. Fade/slide-in reveal on scroll (needs effects.js)
   4. Gentle pulse ring on phone CTA buttons
   Include AFTER the page stylesheet:
   <link rel="stylesheet" href="effects.css">
   <script src="effects.js" defer></script>
   ============================================================ */

/* ---------- 1. Glowing pulse on the icon chips ---------- */
/* Amber chips (home + services "How Varma Therapy Works") */
.home .rectangle-8,
.services .rectangle-18 {
  animation: fx-glow-amber 2.6s ease-in-out infinite;
}

/* Green numbered chips (services 4-step cards) */
.services .rectangle-24 {
  animation: fx-glow-green 2.6s ease-in-out infinite;
}

@keyframes fx-glow-amber {
  0%, 100% { box-shadow: 0px 10px 10px #d28c0036; }
  50%      { box-shadow: 0 0 0 6px #d28c001f, 0px 12px 22px #d28c0066; }
}

@keyframes fx-glow-green {
  0%, 100% { box-shadow: 0px 10px 10px #50ad1233; }
  50%      { box-shadow: 0 0 0 6px #50ad121f, 0px 12px 22px #50ad1266; }
}

/* ---------- 2. Card breathing "blink" + hover lift ---------- */
/* effects.js tags every card group with .fx-card and a stagger
   index (--fx-i). The soft border-glow blink runs continuously;
   hovering lifts the card and brightens it. */

.fx-card {
  transition: transform .35s ease, filter .35s ease;
  will-change: transform;
}

/* continuous soft blink on the card surface (its first rectangle) */
.fx-card .fx-surface {
  animation: fx-breathe 3.4s ease-in-out infinite;
  animation-delay: calc(var(--fx-i, 0) * .45s);
  transition: box-shadow .35s ease, border-color .35s ease,
              background-color .35s ease;
}

@keyframes fx-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209, 139, 0, 0); }
  50%      { box-shadow: 0 6px 26px rgba(209, 139, 0, 0.16); }
}

.fx-card:hover {
  transform: translateY(-8px);
  filter: saturate(1.05);
  z-index: 5;
}

.fx-card:hover .fx-surface {
  animation-play-state: paused;
  box-shadow: 0 18px 40px rgba(30, 52, 29, 0.18);
  border-color: #d18b00 !important;
  background-color: #fffdf2;
}

/* Gallery tiles: zoom the photo slightly on hover */
.media-gallery .frame-27 > div {
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.media-gallery .frame-27 > div:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 34px rgba(30, 52, 29, 0.22);
  z-index: 5;
}
.media-gallery .frame-27 img {
  transition: transform .6s ease;
}
.media-gallery .frame-27 > div:hover img {
  transform: scale(1.06);
}

/* ---------- 3. Reveal on scroll ---------- */
.fx-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
  transition-delay: calc(var(--fx-i, 0) * .12s);
}
.fx-reveal.fx-in {
  opacity: 1;
  transform: translateY(0);
}
/* keep hover lift working after reveal */
.fx-reveal.fx-in.fx-card:hover {
  transform: translateY(-8px);
}

/* ---------- 4. Phone CTA pulse ring ---------- */
.fx-cta {
  position: relative;
  animation: fx-cta-ring 2.4s ease-out infinite;
  border-radius: inherit;
}
@keyframes fx-cta-ring {
  0%   { box-shadow: 0 0 0 0 rgba(209, 139, 0, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(209, 139, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(209, 139, 0, 0); }
}
.fx-cta:hover {
  animation-play-state: paused;
}

/* ---------- Accessibility: honour reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-card .fx-surface,
  .home .rectangle-8,
  .services .rectangle-18,
  .services .rectangle-24,
  .fx-cta {
    animation: none !important;
  }
  .fx-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
