/* ==========================================================================
   SPATIAL 3D & ULTRA-MODERN INTERACTIVE DESIGN SYSTEM
   Anakku Group — Anti-Boring, Anti-AI Slop, High-Energy Spatial Experience
   ========================================================================== */

/* --- 1. Ambient Dynamic Lighting & Deep Layering --- */
body {
  position: relative;
  background-color: #f8faf7 !important;
  background-image:
    radial-gradient(circle at 10% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 90% 25%, rgba(249, 115, 22, 0.07) 0%, transparent 30%),
    radial-gradient(circle at 50% 65%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 20% 90%, rgba(245, 158, 11, 0.07) 0%, transparent 35%) !important;
  background-attachment: fixed !important;
}

/* Glassmorphism & High-Elevation Tokens */
:root {
  --glass-bg: rgba(255, 255, 255, 0.84);
  --glass-bg-hover: rgba(255, 255, 255, 0.96);
  --glass-border: rgba(255, 255, 255, 0.92);
  --glass-border-subtle: rgba(20, 60, 40, 0.08);
  --spatial-shadow-sm: 0 4px 15px -2px rgba(15, 45, 30, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --spatial-shadow-md: 0 12px 32px -4px rgba(15, 45, 30, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.03);
  --spatial-shadow-lg: 0 24px 54px -8px rgba(15, 45, 30, 0.12), 0 8px 20px -4px rgba(0, 0, 0, 0.04);
  --spatial-shadow-hover: 0 30px 65px -10px rgba(15, 45, 30, 0.18), 0 12px 28px -5px rgba(0, 0, 0, 0.06);
  --glow-emerald: 0 0 25px rgba(16, 185, 129, 0.25);
  --glow-coral: 0 0 25px rgba(249, 115, 22, 0.25);
  --glow-blue: 0 0 25px rgba(59, 130, 246, 0.25);
  --glow-purple: 0 0 25px rgba(139, 92, 246, 0.25);
  --glow-gold: 0 0 25px rgba(245, 158, 11, 0.25);
}

/* Smooth Spring Physics on Interactive Elements */
.service-tile, .card, .media-duo-card, .btn, .icon-button, .professional-card, .book-3d-wrap {
  transition: transform 0.35s cubic-bezier(0.16, 1.25, 0.38, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s ease,
              background-color 0.25s ease;
}

/* --- 2. Service Navigator: 3D Spatial Bento Action Tiles --- */
.service-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  perspective: 1200px;
}

.service-tile {
  position: relative;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid var(--glass-border) !important;
  border-radius: 20px !important;
  padding: 22px 18px !important;
  box-shadow: var(--spatial-shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  overflow: hidden;
  transform-style: preserve-3d;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 125px !important;
  cursor: pointer;
}

/* Subtle glowing accent indicator on top edge */
.service-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: currentColor;
  opacity: 0.85;
  transition: left 0.3s ease, right 0.3s ease, opacity 0.3s ease;
}

.service-tile:hover::before {
  left: 8%;
  right: 8%;
  opacity: 1;
}

/* Dynamic Specular Sheen on Hover */
.service-tile::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  transform: rotate(35deg) translateY(-100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.service-tile:hover::after {
  transform: rotate(35deg) translateY(100%);
}

.service-tile:hover {
  transform: translateY(-8px) scale(1.02) !important;
  background: var(--glass-bg-hover) !important;
  box-shadow: var(--spatial-shadow-hover) !important;
}

.service-tile.green { color: #059669; }
.service-tile.green:hover { box-shadow: var(--spatial-shadow-hover), var(--glow-emerald) !important; }

.service-tile.coral { color: #ea580c; }
.service-tile.coral:hover { box-shadow: var(--spatial-shadow-hover), var(--glow-coral) !important; }

.service-tile.blue { color: #2563eb; }
.service-tile.blue:hover { box-shadow: var(--spatial-shadow-hover), var(--glow-blue) !important; }

.service-tile.purple { color: #7c3aed; }
.service-tile.purple:hover { box-shadow: var(--spatial-shadow-hover), var(--glow-purple) !important; }

.service-tile.gold { color: #d97706; }
.service-tile.gold:hover { box-shadow: var(--spatial-shadow-hover), var(--glow-gold) !important; }

.service-tile .service-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08) !important;
  color: #ffffff !important;
  transition: transform 0.35s cubic-bezier(0.16, 1.4, 0.3, 1) !important;
}

.service-tile:hover .service-icon {
  transform: scale(1.14) rotate(4deg) !important;
}

.service-tile.green .service-icon { background: linear-gradient(135deg, #10b981, #059669) !important; }
.service-tile.coral .service-icon { background: linear-gradient(135deg, #f97316, #dc2626) !important; }
.service-tile.blue .service-icon  { background: linear-gradient(135deg, #3b82f6, #0284c7) !important; }
.service-tile.purple .service-icon{ background: linear-gradient(135deg, #8b5cf6, #6366f1) !important; }
.service-tile.gold .service-icon  { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }

.service-tile strong {
  font-size: 15px !important;
  font-weight: 750 !important;
  color: #133324 !important;
  margin-top: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.service-tile strong::after {
  content: "→";
  font-size: 14px;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.25s ease;
  color: currentColor;
}

.service-tile:hover strong::after {
  opacity: 1;
  transform: translateX(0);
}

.service-tile small {
  font-size: 11.5px !important;
  color: #556c60 !important;
  font-weight: 500 !important;
  margin-top: 3px !important;
}

/* --- 3. 3D Floating Book Mockups for Toko Anakku --- */
.product-card {
  position: relative;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--glass-border) !important;
  border-radius: 20px !important;
  overflow: visible !important; /* allow 3d elements to float */
  box-shadow: var(--spatial-shadow-md) !important;
  padding: 0 !important;
}

.product-card:hover {
  transform: translateY(-8px) !important;
  box-shadow: var(--spatial-shadow-hover) !important;
}

/* 3D Book Stage Container */
.book-3d-wrap {
  position: relative;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  padding: 15px;
  background: linear-gradient(145deg, #f3f6f1, #e6eee3);
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.book-3d-wrap::after {
  content: "";
  position: absolute;
  bottom: 12px;
  width: 65%;
  height: 14px;
  border-radius: 50%;
  background: rgba(18, 48, 32, 0.22);
  filter: blur(8px);
  transform: scaleY(0.5);
  transition: all 0.35s ease;
}

.product-card:hover .book-3d-wrap::after {
  width: 75%;
  height: 18px;
  background: rgba(18, 48, 32, 0.32);
  filter: blur(12px);
  transform: scaleY(0.6) translateY(4px);
}

/* The 3D Book Cover */
.book-3d-cover {
  position: relative;
  width: 145px;
  height: 195px;
  border-radius: 4px 10px 10px 4px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(6deg) translateZ(10px);
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.25),
              -2px 0 4px rgba(0, 0, 0, 0.15) inset;
  transition: transform 0.4s cubic-bezier(0.16, 1.25, 0.38, 1);
}

.product-card:hover .book-3d-cover {
  transform: rotateY(-8deg) rotateX(2deg) translateY(-10px) translateZ(25px);
}

/* 3D Book Spine */
.book-3d-cover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 8px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, rgba(255,255,255,0.2) 50%, rgba(0,0,0,0.15) 100%);
  pointer-events: none;
}

/* Realistic Page Block Behind Cover */
.book-3d-pages {
  position: absolute;
  right: -5px;
  top: 4px;
  bottom: 4px;
  width: 10px;
  background: repeating-linear-gradient(
    90deg,
    #ffffff,
    #ffffff 1px,
    #dedede 2px
  );
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.18);
  transform: translateZ(-2px);
}

.book-3d-cover.green {
  background: linear-gradient(135deg, #065f46 0%, #047857 60%, #10b981 100%);
  color: #ffffff;
}
.book-3d-cover.blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #3b82f6 100%);
  color: #ffffff;
}
.book-3d-cover.purple {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 60%, #8b5cf6 100%);
  color: #ffffff;
}
.book-3d-cover.gold {
  background: linear-gradient(135deg, #78350f 0%, #b45309 60%, #f59e0b 100%);
  color: #ffffff;
}

.book-3d-cover .book-brand {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.book-3d-cover strong {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.book-3d-cover small {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.25;
}

/* Curated Doctor Badge Ribbon */
.curated-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(19, 51, 36, 0.92);
  color: #86efac;
  font-size: 10px;
  font-weight: 750;
  padding: 4px 9px;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Product Card Content & Pricing */
.product-card .card-body {
  padding: 20px !important;
  background: transparent !important;
}

.product-card .price {
  display: inline-flex !important;
  align-items: center !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  padding: 4px 12px !important;
  border-radius: 9999px !important;
  border: 1px solid #a7f3d0 !important;
}

.product-bottom .icon-button {
  width: 38px !important;
  height: 38px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}

.product-bottom .icon-button:hover {
  transform: scale(1.12) !important;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45) !important;
}

/* --- 4. Podcast Player: Live Audio Equalizer Wave --- */
.podcast-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
  padding: 0 4px;
}

.podcast-equalizer span {
  display: block;
  width: 3.5px;
  border-radius: 2px;
  background: #ef4444;
  animation: eqDance 1.2s ease-in-out infinite alternate;
}

.podcast-equalizer span:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.podcast-equalizer span:nth-child(2) { height: 75%; animation-delay: 0.3s; }
.podcast-equalizer span:nth-child(3) { height: 100%; animation-delay: 0.15s; }
.podcast-equalizer span:nth-child(4) { height: 55%; animation-delay: 0.45s; }
.podcast-equalizer span:nth-child(5) { height: 85%; animation-delay: 0.25s; }
.podcast-equalizer span:nth-child(6) { height: 35%; animation-delay: 0.5s; }

@keyframes eqDance {
  0% { height: 25%; }
  50% { height: 95%; }
  100% { height: 40%; }
}

.live-stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- 5. Media Duo Bento Modern Cards --- */
.media-duo-card {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid var(--glass-border) !important;
  border-radius: 24px !important;
  box-shadow: var(--spatial-shadow-md) !important;
  padding: 32px !important;
}

.media-duo-card:hover {
  box-shadow: var(--spatial-shadow-hover) !important;
}

.media-video-frame {
  border-radius: 18px !important;
  box-shadow: var(--spatial-shadow-lg) !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- 6. Clinic Specialist Cards: Empathetic & Doctor-Active Pulse --- */
.professional-card {
  position: relative;
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid var(--glass-border) !important;
  border-radius: 22px !important;
  padding: 26px !important;
  box-shadow: var(--spatial-shadow-md) !important;
  overflow: hidden;
}

.professional-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: var(--spatial-shadow-hover) !important;
}

.professional-avatar {
  position: relative;
  box-shadow: 0 6px 16px rgba(15, 45, 30, 0.15) !important;
  border: 3px solid #ffffff !important;
}

.doctor-online-pulse {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- 7. APS Health Cockpit Interactive Enhancements --- */
.aps-glance {
  background: linear-gradient(135deg, #0e3023 0%, #174f38 60%, #1f684a 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow: var(--spatial-shadow-lg), 0 0 35px rgba(16, 185, 129, 0.15) !important;
  border-radius: 24px !important;
}

.aps-feature {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1.5px solid var(--glass-border) !important;
  border-radius: 20px !important;
  box-shadow: var(--spatial-shadow-sm) !important;
}

.aps-feature:hover {
  transform: translateY(-7px) !important;
  box-shadow: var(--spatial-shadow-hover), var(--glow-emerald) !important;
  background: #ffffff !important;
}

/* --- 8. Responsive Adjustments for Mobile & Tablets --- */
@media (max-width: 900px) {
  .service-nav {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
}

@media (max-width: 600px) {
  .service-nav {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .service-tile:last-child {
    grid-column: 1 / -1;
  }
  .book-3d-wrap {
    height: 190px;
  }
  .book-3d-cover {
    width: 120px;
    height: 165px;
  }
}
