/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM HERO ANIMATIONS — Water Damage Restoration Phoenix
   Cinematic CGI-style: volumetric light, water effects, emergency atmosphere
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KEYFRAMES ─────────────────────────────────────────────────────────── */

@keyframes waterFlow {
  0%   { transform: translateX(0) scaleY(1); opacity: 0.55; }
  50%  { transform: translateX(-18px) scaleY(1.06); opacity: 0.7; }
  100% { transform: translateX(0) scaleY(1); opacity: 0.55; }
}
@keyframes waterRipple {
  0%   { transform: scale(0.6) translateY(0); opacity: 0.9; }
  60%  { opacity: 0.3; }
  100% { transform: scale(2.8) translateY(-6px); opacity: 0; }
}
@keyframes lightRay1 {
  0%,100% { opacity: 0.06; transform: rotate(-18deg) scaleX(1); }
  50%      { opacity: 0.16; transform: rotate(-16deg) scaleX(1.12); }
}
@keyframes lightRay2 {
  0%,100% { opacity: 0.04; transform: rotate(14deg) scaleX(1); }
  40%     { opacity: 0.12; transform: rotate(16deg) scaleX(1.08); }
}
@keyframes lightRay3 {
  0%,100% { opacity: 0.08; transform: rotate(-5deg) scaleX(1); }
  60%     { opacity: 0.18; transform: rotate(-3deg) scaleX(1.15); }
}
@keyframes scanBeam {
  0%   { top: 0%; opacity: 0.12; }
  48%  { opacity: 0.22; }
  50%  { top: 100%; opacity: 0.12; }
  100% { top: 0%; opacity: 0.12; }
}
@keyframes emergBlue {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,174,239,0); }
  45%     { box-shadow: 0 0 40px 18px rgba(0,174,239,0.28); }
}
@keyframes emergOrange {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,106,0,0); }
  50%     { box-shadow: 0 0 36px 14px rgba(255,106,0,0.24); }
}
@keyframes particleDrop {
  0%   { transform: translateY(-20px) translateX(0px); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(420px) translateX(var(--dx,8px)); opacity: 0; }
}
@keyframes heroBgPan {
  0%   { background-position: center 40%; }
  50%  { background-position: center 48%; }
  100% { background-position: center 40%; }
}
@keyframes heroImgFloat {
  0%,100% { transform: translateY(0px); }
  50%      { transform: translateY(-8px); }
}
@keyframes badgePop {
  0%   { transform: scale(0.7) translateX(-10px); opacity: 0; }
  70%  { transform: scale(1.06); }
  100% { transform: scale(1) translateX(0); opacity: 1; }
}
@keyframes blinkDot {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.2; }
}
@keyframes statCountPulse {
  0%,100% { color: var(--accent); }
  50%     { color: #00e8d0; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes glowPulse {
  0%,100% { opacity: 0.7; }
  50%     { opacity: 1; }
}
@keyframes radarPing {
  0%   { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ── HERO ANIMATED CONTAINER ────────────────────────────────────────────── */

.hero-animated {
  position: relative;
  overflow: hidden;
  animation: heroBgPan 18s ease-in-out infinite;
  background-attachment: fixed !important;
  min-height: 600px;
}

/* ── VOLUMETRIC LIGHT RAYS ──────────────────────────────────────────────── */

.hero-light-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero-light-rays::before,
.hero-light-rays::after,
.hero-light-rays .ray3 {
  content: '';
  position: absolute;
  top: -80px;
  width: 180px;
  height: 160%;
  background: linear-gradient(180deg, rgba(0,174,239,0.18) 0%, transparent 70%);
  transform-origin: top center;
  border-radius: 0 0 50% 50%;
}
.hero-light-rays::before {
  left: 18%;
  animation: lightRay1 7s ease-in-out infinite;
}
.hero-light-rays::after {
  left: 62%;
  animation: lightRay2 9s ease-in-out infinite 1.5s;
  background: linear-gradient(180deg, rgba(255,106,0,0.12) 0%, transparent 60%);
}
.hero-light-rays .ray3 {
  left: 38%;
  animation: lightRay3 11s ease-in-out infinite 3s;
}

/* ── WATER ANIMATION LAYER ──────────────────────────────────────────────── */

.hero-water-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  pointer-events: none;
  z-index: 2;
}
.hero-water-layer::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  height: 100%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,91,150,0.35) 60%, rgba(0,91,150,0.55) 100%);
  animation: waterFlow 5s ease-in-out infinite;
  border-radius: 60% 60% 0 0 / 30% 30% 0 0;
}
.hero-water-layer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 60%;
  background: linear-gradient(180deg, transparent 0%, rgba(0,174,239,0.22) 100%);
  animation: waterFlow 7s ease-in-out infinite reverse 1s;
  border-radius: 50% 50% 0 0;
}

/* ── WATER RIPPLE CIRCLES ────────────────────────────────────────────────── */

.hero-ripple-container {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  height: 60px;
  pointer-events: none;
  z-index: 3;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
}
.hero-ripple {
  width: 40px;
  height: 20px;
  border: 2px solid rgba(0,174,239,0.6);
  border-radius: 50%;
  animation: waterRipple 2.5s ease-out infinite;
}
.hero-ripple:nth-child(2) { animation-delay: 0.7s; width: 50px; }
.hero-ripple:nth-child(3) { animation-delay: 1.4s; width: 35px; }
.hero-ripple:nth-child(4) { animation-delay: 2.1s; }

/* ── SCAN BEAM ──────────────────────────────────────────────────────────── */

.hero-scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,200,179,0.6), rgba(0,200,179,0.9), rgba(0,200,179,0.6), transparent);
  pointer-events: none;
  z-index: 4;
  animation: scanBeam 6s ease-in-out infinite;
}

/* ── WATER PARTICLES ─────────────────────────────────────────────────────── */

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.hero-particle {
  position: absolute;
  top: -20px;
  width: 4px;
  height: 8px;
  background: rgba(0,174,239,0.7);
  border-radius: 50%;
  animation: particleDrop var(--dur, 3s) ease-in infinite var(--delay, 0s);
}
.hero-particle:nth-child(1)  { left:5%;  --dur:3.2s; --delay:0s;    --dx:4px; }
.hero-particle:nth-child(2)  { left:12%; --dur:4.1s; --delay:0.5s;  --dx:-6px; width:3px; height:6px; }
.hero-particle:nth-child(3)  { left:22%; --dur:3.7s; --delay:1.2s;  --dx:8px; }
.hero-particle:nth-child(4)  { left:35%; --dur:5.0s; --delay:0.3s;  --dx:-4px; width:5px; height:10px; opacity:0.6; }
.hero-particle:nth-child(5)  { left:48%; --dur:3.5s; --delay:2.1s;  --dx:6px; }
.hero-particle:nth-child(6)  { left:60%; --dur:4.4s; --delay:0.8s;  --dx:-8px; width:3px; height:7px; }
.hero-particle:nth-child(7)  { left:72%; --dur:3.8s; --delay:1.7s;  --dx:5px; }
.hero-particle:nth-child(8)  { left:85%; --dur:4.7s; --delay:0.1s;  --dx:-5px; width:4px; height:9px; }
.hero-particle:nth-child(9)  { left:92%; --dur:3.3s; --delay:2.8s;  --dx:7px; }
.hero-particle:nth-child(10) { left:28%; --dur:5.2s; --delay:1.5s;  --dx:-3px; opacity:0.5; }
.hero-particle:nth-child(11) { left:55%; --dur:4.0s; --delay:3.5s;  --dx:9px; width:2px; height:5px; }
.hero-particle:nth-child(12) { left:78%; --dur:3.6s; --delay:0.6s;  --dx:-7px; }

/* ── HERO IMAGE SCENE ────────────────────────────────────────────────────── */

.hero-scene-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.hero-scene-wrapper .hero-main-img {
  animation: heroImgFloat 6s ease-in-out infinite;
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,174,239,0.2);
}

/* ── STATUS BADGES ───────────────────────────────────────────────────────── */

.hero-badge {
  position: absolute;
  background: rgba(13,27,42,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,174,239,0.35);
  border-radius: 10px;
  padding: 8px 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.76rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  z-index: 10;
  animation: badgePop 0.6s ease-out forwards;
  opacity: 0;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: blinkDot 1.2s ease-in-out infinite;
}
.hero-badge-live   { top: 14px;  left: -12px; animation-delay: 0.8s; }
.hero-badge-live .dot { background: #ff4444; }
.hero-badge-eta    { top: 58px;  left: -12px; animation-delay: 1.1s; }
.hero-badge-eta .dot { background: var(--accent); }
.hero-badge-cert   { bottom: 60px; right: -12px; animation-delay: 1.4s; border-color: rgba(255,106,0,0.4); }
.hero-badge-cert .dot { background: var(--cta); }
.hero-badge-iicrc  { bottom: 16px; right: -12px; animation-delay: 1.7s; }
.hero-badge-iicrc .dot { background: #22c55e; }

/* Emergency light flashes */
.hero-badge-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  animation: emergBlue 2s ease-in-out infinite;
  pointer-events: none;
}
.hero-badge-cert::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  animation: emergOrange 3s ease-in-out infinite 0.5s;
  pointer-events: none;
}

/* ── RADAR PING ──────────────────────────────────────────────────────────── */

.hero-radar {
  position: absolute;
  bottom: 100px;
  left: -24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 11;
}
.hero-radar::before,
.hero-radar::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid rgba(0,200,179,0.6);
  border-radius: 50%;
  animation: radarPing 2s ease-out infinite;
}
.hero-radar::after { animation-delay: 1s; }
.hero-radar-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,200,179,0.3);
}

/* ── STATS ANIMATION ─────────────────────────────────────────────────────── */

.hero-stats > div {
  animation: statCountPulse 3s ease-in-out infinite;
}
.hero-stats > div:nth-child(2) { animation-delay: 0.75s; }
.hero-stats > div:nth-child(3) { animation-delay: 1.5s; }
.hero-stats > div:nth-child(4) { animation-delay: 2.25s; }

/* ── SHIMMER BUTTON ──────────────────────────────────────────────────────── */

.cta-btn-shimmer {
  background: linear-gradient(90deg,
    var(--cta) 0%,
    #ff8533 40%,
    #ffaa66 50%,
    #ff8533 60%,
    var(--cta) 100%
  );
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* ── GOOGLE MAPS SECTION ─────────────────────────────────────────────────── */

.maps-section {
  padding: 0;
  position: relative;
}
.maps-header {
  background: linear-gradient(135deg, var(--dark), var(--primary));
  color: #fff;
  text-align: center;
  padding: 36px 24px 24px;
}
.maps-header h2 { color: #fff; font-size: 1.6rem; margin-bottom: 8px; }
.maps-header p  { color: #cfe5f1; font-size: 0.92rem; max-width: 560px; margin: 0 auto; }
.maps-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 420px;
}
.maps-iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}
.maps-info {
  background: var(--white);
  padding: 32px 28px;
  border-left: 1px solid #e7eef5;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.maps-info h3 { font-size: 1.1rem; color: var(--dark); margin-bottom: 4px; }
.maps-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.maps-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: rgba(0,91,150,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.maps-info-item p {
  font-size: 0.88rem;
  color: #4a5568;
  margin: 0;
  line-height: 1.55;
}
.maps-info-item strong {
  display: block;
  color: var(--dark);
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.maps-response-badge {
  background: linear-gradient(135deg, rgba(0,200,179,0.1), rgba(0,91,150,0.1));
  border: 1px solid rgba(0,200,179,0.3);
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--accent);
}
.maps-response-badge small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  color: #647889;
  margin-top: 3px;
}
@media(max-width: 860px) {
  .maps-wrapper { grid-template-columns: 1fr; }
  .maps-iframe   { min-height: 300px; }
  .maps-info     { border-left: none; border-top: 1px solid #e7eef5; }
}

/* ── CONTACT PAGE MAP ────────────────────────────────────────────────────── */

.contact-map-full {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(13,27,42,0.1);
}

/* ── THUMBNAIL IMAGE HOVER ZOOM ──────────────────────────────────────────── */

.img-cinematic {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  will-change: transform;
}
.img-cinematic:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 28px 60px rgba(0,0,0,0.28) !important;
}

/* ── HERO CONTENT Z-INDEX FIX ────────────────────────────────────────────── */
.hero-animated .container {
  position: relative;
  z-index: 10;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-badge { display: none; }
  .hero-radar { display: none; }
  .hero-animated { min-height: 500px; }
}
