/* Advice for Patient Section - Full custom section injected after hero */
@keyframes adviceFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes advicePulseGlow {
  0%, 100% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15); }
  50% { box-shadow: 0 4px 30px rgba(59, 130, 246, 0.3); }
}

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

.advice-section {
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 50%, #f0fdf4 100%);
  position: relative;
  overflow: hidden;
}

.advice-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 1;
}

.advice-section > * {
  position: relative;
  z-index: 2;
}

.advice-container {
  max-width: 72rem;
  margin: 0 auto;
}

.advice-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.advice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e40af;
  margin-bottom: 0.75rem;
}

.advice-heading {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.advice-subheading {
  color: #475569;
  font-size: 0.95rem;
  max-width: 36rem;
  margin: 0 auto;
  line-height: 1.6;
}

.advice-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .advice-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .advice-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .advice-section {
    padding: 5rem 1.5rem;
  }
  .advice-heading {
    font-size: 2rem;
  }
}

.advice-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
  animation: adviceFadeUp 0.6s ease forwards;
  opacity: 0;
}

.advice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(255, 255, 255, 0.98);
}

.advice-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

.advice-card-title {
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  margin-bottom: 0.4rem;
}

.advice-card-desc {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
}

/* Emergency CTA bar */
.advice-cta-bar {
  background: linear-gradient(135deg, #1e40af, #0f766e);
  border-radius: 1rem;
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: advicePulseGlow 3s ease-in-out infinite;
}

@media (min-width: 640px) {
  .advice-cta-bar {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.advice-cta-text h4 {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.advice-cta-text p {
  color: #bae6fd;
  font-size: 0.875rem;
}

.advice-cta-button {
  background: #ffffff;
  color: #1e40af;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.advice-cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

/* ─── Video Library Section ─────────────────────────────────────────────── */

.advice-video-section {
  margin-top: 2.5rem;
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  padding-top: 2.5rem;
}

.advice-video-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.advice-video-heading {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.advice-video-sub {
  color: #475569;
  font-size: 0.875rem;
}

/* Main player */
.advice-video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 1.25rem;
}

.advice-video-player-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Playlist grid */
.advice-video-playlist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .advice-video-playlist {
    grid-template-columns: repeat(4, 1fr);
  }
}

.advice-video-item {
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid transparent;
  border-radius: 0.875rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.advice-video-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.advice-video-item.active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 8px 25px rgba(59, 130, 246, 0.15);
}

.advice-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1e293b;
  overflow: hidden;
}

.advice-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.advice-video-thumb .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.3s ease;
}

.advice-video-item:hover .play-overlay {
  background: rgba(0, 0, 0, 0.35);
}

.advice-video-thumb .play-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.advice-video-item:hover .play-icon {
  transform: scale(1.1);
}

.advice-video-thumb .play-icon svg {
  width: 1rem;
  height: 1rem;
  fill: #1e40af;
  margin-left: 2px;
}

.advice-video-meta {
  padding: 0.6rem 0.75rem 0.75rem;
}

.advice-video-meta .vid-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.advice-video-meta .vid-duration {
  font-size: 0.75rem;
  color: #64748b;
}

/* Active video indicator */
.advice-video-item.active .vid-title {
  color: #1e40af;
}

.advice-video-item.active .play-overlay {
  background: rgba(59, 130, 246, 0.2);
}

.advice-video-item.active .play-icon {
  background: #3b82f6;
}

.advice-video-item.active .play-icon svg {
  fill: #ffffff;
}
