/* ── Department Detail — Page-Specific Styles ── */

/* Hero banner for each department */
.dept-hero {
  position: relative;
  overflow: hidden;
  padding: 50px 0 50px;
  min-height: 300px;
  display: flex;
  align-items: center;
  border-bottom: 5px solid transparent;
  border-image: linear-gradient(to right, #ef4444, #f59e0b) 1;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0);
  transition: box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.5s ease;
  cursor: default;
}



@media (min-width: 768px) {
  .dept-hero {
    padding: 80px 0 70px;
    min-height: 420px;
  }
}

@media (min-width: 1200px) {
  .dept-hero {
    padding: 90px 0 80px;
    min-height: 450px;
  }
}

/* Heartbeat animation for background */
.dept-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(13, 26, 24, 0.85) 0%, rgba(26, 46, 43, 0.75) 50%, rgba(4, 16, 49, 0.2) 100%), var(--hero-bg) no-repeat center center / 100% auto;
  z-index: 1;
  pointer-events: none;
  transform-origin: 75% 50%;
  animation: gentle-heartbeat 3s infinite ease-in-out;
  transition: transform 0.5s ease, filter 0.6s ease;
}

@media (min-width: 768px) {
  .dept-hero::after {
    background: linear-gradient(120deg, rgba(13, 26, 24, 0.85) 0%, rgba(26, 46, 43, 0.75) 50%, rgba(4, 16, 49, 0.2) 100%), var(--hero-bg) no-repeat center center / cover;
  }
}

/* ── RED HOVER EFFECTS — Heart / Cardiology Theme ── */

/* On hover: dramatic red glow, stronger heartbeat, red vignette */
.dept-hero:hover::after {
  animation: active-heartbeat 1.5s infinite ease-in-out;
  filter: brightness(1.08) saturate(1.15);
}

.dept-hero:hover {
  box-shadow:
    inset 0 -20px 50px rgba(220, 38, 38, 0.35),
    inset 0 0 80px rgba(239, 68, 68, 0.12),
    0 0 40px rgba(239, 68, 68, 0.20),
    0 0 80px rgba(220, 38, 38, 0.10);
  border-image: linear-gradient(to right, #dc2626, #ef4444, #f97316) 1;
}

/* Pulsating red glow ring on hover */
.dept-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -8%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.06) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  transition: all 0.6s ease;
}

.dept-hero:hover::before {
  background: radial-gradient(circle, rgba(239, 68, 68, 0.18) 0%, rgba(220, 38, 38, 0.06) 50%, transparent 70%);
  transform: scale(1.3);
  animation: redPulseGlow 2s infinite ease-in-out;
}

@media (min-width: 768px) {
  .dept-hero::before {
    width: 550px;
    height: 550px;
  }
}

@keyframes redPulseGlow {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1.2);
  }

  50% {
    opacity: 1;
    transform: scale(1.4);
  }
}

@keyframes gentle-heartbeat {

  0%,
  100% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.025);
  }

  28% {
    transform: scale(1.01);
  }

  42% {
    transform: scale(1.035);
  }

  70% {
    transform: scale(1);
  }
}

@keyframes active-heartbeat {

  0%,
  100% {
    transform: scale(1.02);
  }

  14% {
    transform: scale(1.06);
  }

  28% {
    transform: scale(1.035);
  }

  42% {
    transform: scale(1.08);
  }

  70% {
    transform: scale(1.02);
  }
}

/* ── Hero Icon — Red glow on hover ── */
.dept-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: rgba(239, 68, 68, 0.15);
  border: 2px solid rgba(239, 68, 68, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fca5a5;
  margin-bottom: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 3;
}

.dept-hero-icon:hover {
  background: rgba(239, 68, 68, 0.30);
  border-color: rgba(239, 68, 68, 0.7);
  color: #fee2e2;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.40),
    0 0 40px rgba(239, 68, 68, 0.15);
  transform: scale(1.1);
  animation: iconHeartPulse 0.8s ease-in-out infinite;
}

@keyframes iconHeartPulse {

  0%,
  100% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(1.18);
  }
}

@media (min-width: 768px) {
  .dept-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    font-size: 2rem;
    margin-bottom: 1.4rem;
  }
}

/* ── Title — Red text-shadow on hover ── */
.dept-hero h1 {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: .4rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: text-shadow 0.5s ease, color 0.5s ease;
  position: relative;
  z-index: 3;
}

.dept-hero:hover h1 {
  text-shadow: 0 2px 15px rgba(239, 68, 68, 0.5),
    0 4px 30px rgba(220, 38, 38, 0.25),
    0 0 60px rgba(239, 68, 68, 0.10);
}

/* ── Tagline — Subtle red tint on hover ── */
.dept-hero .tagline {
  color: rgba(255, 255, 255, .85);
  font-size: 0.95rem;
  max-width: 580px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  margin-bottom: 1rem;
  transition: color 0.5s ease, text-shadow 0.5s ease;
  position: relative;
  z-index: 3;
}

.dept-hero:hover .tagline {
  color: rgba(255, 230, 230, 0.95);
  text-shadow: 0 1px 8px rgba(239, 68, 68, 0.2);
}

@media (min-width: 768px) {
  .dept-hero .tagline {
    font-size: 1rem;
  }
}

/* ── Badge Row ── */
.dept-hero .badge-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  position: relative;
  z-index: 3;
}

/* ── Stat Pills — Red hover with glow & scale ── */
.dept-hero .stat-pill {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #fff;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* Red shimmer sweep on hover */
.dept-hero .stat-pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.25), transparent);
  transition: left 0.6s ease;
  z-index: 0;
}

.dept-hero .stat-pill:hover::before {
  left: 100%;
}

.dept-hero .stat-pill:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.6);
  color: #fee2e2;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.30),
    0 0 15px rgba(239, 68, 68, 0.15);
}

.dept-hero .stat-pill:active {
  transform: translateY(-1px) scale(1.02);
}

/* Staggered hover animation when hero is hovered */
.dept-hero:hover .stat-pill:nth-child(1) {
  transition-delay: 0s;
}

.dept-hero:hover .stat-pill:nth-child(2) {
  transition-delay: 0.05s;
}

.dept-hero:hover .stat-pill:nth-child(3) {
  transition-delay: 0.1s;
}

.dept-hero:hover .stat-pill:nth-child(4) {
  transition-delay: 0.15s;
}

@media (min-width: 768px) {
  .dept-hero .stat-pill {
    padding: 6px 18px;
    font-size: 0.8rem;
    gap: 7px;
  }
}

.dept-hero .stat-pill i {
  color: #f87171;
  transition: color 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}

.dept-hero .stat-pill:hover i {
  color: #fecaca;
  transform: scale(1.2);
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.6));
}

/* ── Breadcrumb — Red active link glow on hover ── */
.dept-hero:hover .breadcrumb-item.active {
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* Sticky sidebar */
.dept-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow-lg);
  border: 1px solid var(--gray-300);
  overflow: hidden;
  position: sticky;
  top: 90px;
}

.dept-sidebar-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 22px 24px;
  color: #fff;
}

.dept-sidebar-header h5 {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
}

.dept-sidebar-body {
  padding: 20px 24px;
}

.dept-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: .86rem;
  font-weight: 600;
  color: var(--dark-alt);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
  text-decoration: none;
}

.dept-nav-link:last-child {
  border-bottom: none;
}

.dept-nav-link i {
  color: var(--primary);
  width: 16px;
  font-size: .85rem;
}

.dept-nav-link:hover {
  color: var(--primary);
  padding-left: 4px;
}

.dept-appt-box {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-top: 20px;
  color: #fff;
}

.dept-appt-box h6 {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  margin-bottom: 6px;
}

.dept-appt-box p {
  font-size: .8rem;
  color: rgba(255, 255, 255, .8);
  margin-bottom: 14px;
}

/* Section headers within page */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .section-divider {
    gap: 14px;
    margin-bottom: 28px;
  }
}

.section-divider .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .section-divider .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.2rem;
  }
}

.section-divider h3 {
  font-size: clamp(1.2rem, 3vw, 1.35rem);
  color: var(--dark);
  margin: 0;
}

/* Condition tags with motion effects */
.condition-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 50px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark-alt);
  transition: var(--transition);
  margin-bottom: 8px;
  margin-right: 4px;
  animation: slideInFromLeft 0.6s ease-out forwards;
  opacity: 0;
}

@media (min-width: 768px) {
  .condition-tag {
    gap: 7px;
    padding: 7px 16px;
    font-size: 0.82rem;
    margin-bottom: 10px;
  }
}

.condition-tag:nth-child(1) {
  animation-delay: 0.1s;
}

.condition-tag:nth-child(2) {
  animation-delay: 0.2s;
}

.condition-tag:nth-child(3) {
  animation-delay: 0.3s;
}

.condition-tag:nth-child(4) {
  animation-delay: 0.4s;
}

.condition-tag:nth-child(5) {
  animation-delay: 0.5s;
}

.condition-tag:nth-child(6) {
  animation-delay: 0.6s;
}

.condition-tag:nth-child(7) {
  animation-delay: 0.7s;
}

.condition-tag:nth-child(8) {
  animation-delay: 0.8s;
}

.condition-tag:nth-child(9) {
  animation-delay: 0.9s;
}

.condition-tag:nth-child(10) {
  animation-delay: 1s;
}

.condition-tag:nth-child(11) {
  animation-delay: 1.1s;
}

.condition-tag:nth-child(12) {
  animation-delay: 1.2s;
}

.condition-tag:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.05);
}

.condition-tag i {
  color: var(--primary);
  font-size: .75rem;
}

@media (max-width: 768px) {
  .condition-tag {
    animation: slideInFromRight 0.6s ease-out forwards;
  }
}

/* Procedure cards with motion effects */
.procedure-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--gray-300);
  transition: var(--transition);
  height: 100%;
  animation: slideInFromBottom 0.7s ease-out forwards;
  opacity: 0;
}

.row>.col-12:nth-child(1) .procedure-card,
.row>.col-md-6:nth-child(1) .procedure-card {
  animation-delay: 0.1s;
}

.row>.col-12:nth-child(2) .procedure-card,
.row>.col-md-6:nth-child(2) .procedure-card {
  animation-delay: 0.2s;
}

.row>.col-12:nth-child(3) .procedure-card,
.row>.col-md-6:nth-child(3) .procedure-card {
  animation-delay: 0.3s;
}

.row>.col-12:nth-child(4) .procedure-card,
.row>.col-md-6:nth-child(4) .procedure-card {
  animation-delay: 0.4s;
}

.row>.col-12:nth-child(5) .procedure-card,
.row>.col-md-6:nth-child(5) .procedure-card {
  animation-delay: 0.5s;
}

.row>.col-12:nth-child(6) .procedure-card,
.row>.col-md-6:nth-child(6) .procedure-card {
  animation-delay: 0.6s;
}

.procedure-card:hover {
  border-color: var(--primary);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 25px rgba(13, 110, 253, 0.2);
}

@media (max-width: 768px) {
  .procedure-card {
    animation: slideInFromLeft 0.7s ease-out forwards;
  }
}

.procedure-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: var(--primary);
  flex-shrink: 0;
}

.procedure-card h6 {
  font-size: .88rem;
  color: var(--dark);
  margin-bottom: 3px;
}

.procedure-card p {
  font-size: .79rem;
  color: var(--gray-500);
  margin: 0;
}

/* Doctor mini cards */
.doctor-mini-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--gray-300);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 380px;
}

.doctor-mini-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-shadow-lg);
}

.doctor-mini-img {
  aspect-ratio: 1/1;
  overflow: hidden;
}

.doctor-mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: zoomInImage 1.2s ease-out forwards;
}

.doctor-mini-card:hover .doctor-mini-img img {
  transform: scale(1.12);
}

.doctor-mini-body {
  padding: 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.doctor-mini-body h5 {
  font-size: .95rem;
  color: var(--dark);
  margin-bottom: 3px;
}

.doctor-mini-body .spec {
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
}

.doctor-mini-body .qual {
  color: var(--gray-500);
  font-size: .76rem;
  margin-top: 4px;
}

.doctor-mini-body .avail {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #dcfce7;
  color: #166534;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  margin-top: 8px;
  align-self: flex-start;
}

.doctor-mini-body .avail i {
  font-size: .65rem;
}

.doctor-mini-footer {
  border-top: 1px solid var(--gray-200);
  padding: 12px 16px;
  display: flex;
  gap: 8px;
}

.btn-book-sm {
  flex: 1;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 7px 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

@media (min-width: 768px) {
  .btn-book-sm {
    font-size: 0.78rem;
  }
}

.btn-book-sm:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-profile-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  transition: var(--transition);
  text-decoration: none;
}

.btn-profile-sm:hover {
  background: var(--primary);
  color: #fff;
}

/* Technology / equipment list with motion effects */
.equip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  font-size: .86rem;
  font-weight: 500;
  color: var(--dark-alt);
  margin-bottom: 10px;
  transition: var(--transition);
  animation: slideInFromLeft 0.6s ease-out forwards;
  opacity: 0;
}

.col-12:nth-child(1) .equip-item:nth-child(1),
.col-md-6:nth-child(1) .equip-item:nth-child(1) {
  animation-delay: 0.1s;
}

.col-12:nth-child(1) .equip-item:nth-child(2),
.col-md-6:nth-child(1) .equip-item:nth-child(2) {
  animation-delay: 0.2s;
}

.col-12:nth-child(1) .equip-item:nth-child(3),
.col-md-6:nth-child(1) .equip-item:nth-child(3) {
  animation-delay: 0.3s;
}

.col-12:nth-child(1) .equip-item:nth-child(4),
.col-md-6:nth-child(1) .equip-item:nth-child(4) {
  animation-delay: 0.4s;
}

.col-12:nth-child(2) .equip-item:nth-child(1),
.col-md-6:nth-child(2) .equip-item:nth-child(1) {
  animation-delay: 0.5s;
}

.col-12:nth-child(2) .equip-item:nth-child(2),
.col-md-6:nth-child(2) .equip-item:nth-child(2) {
  animation-delay: 0.6s;
}

.col-12:nth-child(2) .equip-item:nth-child(3),
.col-md-6:nth-child(2) .equip-item:nth-child(3) {
  animation-delay: 0.7s;
}

.col-12:nth-child(2) .equip-item:nth-child(4),
.col-md-6:nth-child(2) .equip-item:nth-child(4) {
  animation-delay: 0.8s;
}

.equip-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateX(8px);
}

.equip-item i {
  color: var(--primary);
  font-size: .9rem;
  width: 16px;
}

@media (max-width: 768px) {
  .equip-item {
    animation: slideInFromRight 0.6s ease-out forwards;
  }

  .equip-item:hover {
    transform: translateX(-8px);
  }
}

/* Department switcher tabs */
.other-dept-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  text-decoration: none;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
  margin-bottom: 10px;
}

.other-dept-card:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.other-dept-card .mini-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: var(--transition);
}

.other-dept-card:hover .mini-icon {
  background: var(--primary);
  color: #fff;
}

.other-dept-card span {
  font-size: .84rem;
  font-weight: 600;
  color: var(--dark-alt);
  transition: var(--transition);
}

.other-dept-card:hover span {
  color: var(--primary);
}

/* ──────────────────────────────────────────────────────────── */
/* Motion Effect Keyframes for Bullet Points & Blocks */
/* ──────────────────────────────────────────────────────────── */

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomInImage {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Mobile responsiveness for animations */
@media (max-width: 768px) {
  @keyframes slideInFromLeft {
    from {
      opacity: 0;
      transform: translateX(-60px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideInFromRight {
    from {
      opacity: 0;
      transform: translateX(60px);
    }

    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
}

/* Main content responsive spacing */
@media (max-width: 576px) {
  .mb-5 {
    margin-bottom: 2rem !important;
  }

  .mb-4 {
    margin-bottom: 1.5rem !important;
  }

  #sectionAbout,
  #sectionConditions,
  #sectionProcedures,
  #sectionDoctors,
  #sectionEquip {
    scroll-margin-top: 80px;
  }
}

@media (max-width: 768px) {

  /* Reduce padding on procedure cards for mobile */
  .procedure-card {
    padding: 16px 18px;
  }

  .procedure-icon {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .procedure-card h6 {
    font-size: 0.82rem;
  }

  .procedure-card p {
    font-size: 0.76rem;
  }

  /* Improve equipment item spacing */
  .equip-item {
    font-size: 0.82rem;
    padding: 12px 14px;
  }

  .equip-item i {
    font-size: 0.85rem;
  }
}