/* Custom CSS for Puskesmas Modern Frontend */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-color: #0d9488;       /* Medis Teal */
  --primary-hover: #0f766e;
  --primary-light: #e6f7f6;
  --secondary-color: #14b8a6;
  --accent-color: #f97316;        /* Orange Darurat */
  --accent-hover: #ea580c;
  --bg-light: #f8fafc;            /* Slate 50 */
  --text-dark: #0f172a;           /* Slate 900 */
  --text-muted: #475569;          /* Slate 600 */
  --white: #ffffff;
  --danger-color: #ef4444;        /* Red 500 */
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --hover-shadow: 0 20px 40px -10px rgba(13, 148, 136, 0.12), 0 8px 16px -4px rgba(13, 148, 136, 0.06);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  position: relative;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
  line-height: 1.7;
}

.text-teal {
  color: var(--primary-color) !important;
}

.bg-teal-light {
  background-color: var(--primary-light) !important;
}

/* Top Header Styling */
.top-header {
  background-color: var(--white);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  font-size: 0.85rem;
  padding: 12px 0;
}

.top-header .navbar-brand-custom {
  font-size: 1.5rem;
  margin: 0;
}

.top-header-info {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: nowrap;
  height: 100%;
}

.top-header-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.top-header-item i {
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-header-divider {
  width: 1px;
  height: 18px;
  background-color: #e2e8f0;
  align-self: center;
}

.top-header .btn-accent {
  white-space: nowrap;
  padding: 6px 16px;
  font-size: 0.8rem;
  border-radius: 6px;
}

/* Navbar Custom Styling */
.navbar-custom {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: var(--transition-smooth);
  padding: 15px 0;
  z-index: 1050;
}

.navbar-custom.navbar-scrolled {
  padding: 8px 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.navbar-brand-custom {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--primary-color) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand-custom i {
  font-size: 1.8rem;
  animation: pulse-slow 2s infinite ease-in-out;
}

.nav-link-custom {
  font-weight: 600;
  color: var(--text-muted) !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.nav-link-custom:hover, 
.nav-link-custom.active {
  color: var(--primary-color) !important;
  background-color: var(--primary-light);
}

/* Dropdown Custom Styling */
.navbar-custom .dropdown-menu {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.8);
  padding: 8px;
  animation: dropdown-fade-in 0.2s ease-out forwards;
}

.navbar-custom .dropdown-item {
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.navbar-custom .dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.navbar-custom .dropdown-item.active {
  background-color: var(--primary-color);
  color: var(--white);
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Buttons */
.btn-teal {
  background-color: var(--primary-color);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 24px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-teal:hover {
  background-color: var(--primary-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(13, 148, 136, 0.4);
}

.btn-outline-teal {
  background-color: transparent;
  color: var(--primary-color);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 24px;
  border: 1.5px solid var(--primary-color);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-teal:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  padding: 10px 24px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.4);
}

/* Card Hover Elevation Effect */
.hover-card {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  background-color: var(--white);
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  overflow: hidden;
}

.hover-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(13, 148, 136, 0.15);
}

/* Hero Section */
.hero-section {
  padding: 160px 0 100px 0;
  background: linear-gradient(135deg, rgba(230, 247, 246, 0.8) 0%, rgba(255, 255, 255, 1) 100%);
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 6px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* Hero Carousel Styling */
#heroCarousel {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 40px -15px rgba(13, 148, 136, 0.2);
  border: 5px solid var(--white);
  background-color: var(--white);
  transition: var(--transition-smooth);
}

#heroCarousel:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(13, 148, 136, 0.3);
}

#heroCarousel .carousel-indicators {
  bottom: 15px;
  margin-bottom: 0;
}

#heroCarousel .carousel-indicators [data-bs-target] {
  background-color: var(--primary-color);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 6px;
  opacity: 0.4;
  border: none;
  transition: var(--transition-smooth);
}

#heroCarousel .carousel-indicators .active {
  opacity: 1;
  background-color: var(--primary-hover);
  transform: scale(1.2);
  width: 24px;
  border-radius: 5px;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  background-color: rgba(13, 148, 136, 0.8) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: 45% 45%;
  transition: var(--transition-smooth);
}

#heroCarousel .carousel-control-prev-icon:hover,
#heroCarousel .carousel-control-next-icon:hover {
  background-color: var(--primary-hover) !important;
  transform: scale(1.1);
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 12%;
  opacity: 0;
  transition: var(--transition-smooth);
}

#heroCarousel:hover .carousel-control-prev,
#heroCarousel:hover .carousel-control-next {
  opacity: 1;
}

/* Quick Action / Feature Section */
.quick-action-card {
  border-radius: 16px;
  padding: 30px 24px;
  height: 100%;
  color: var(--white);
  transition: var(--transition-smooth);
}

.quick-action-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.bg-grad-teal {
  background: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
}

.bg-grad-blue {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.bg-grad-orange {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

/* Statistics Counter */
.stat-counter-card {
  padding: 24px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--card-shadow);
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 5px;
}

/* Emergency Banner */
.emergency-banner {
  background-color: #fef2f2;
  border-left: 5px solid var(--danger-color);
  padding: 15px 25px;
  border-radius: 0 12px 12px 0;
  margin-bottom: 30px;
}

/* Doctor Card */
.doctor-card {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  background-color: var(--white);
}

.doctor-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.doctor-img-container {
  height: 280px;
  overflow: hidden;
  background-color: #f1f5f9;
  position: relative;
}

.doctor-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.doctor-card:hover .doctor-img-container img {
  transform: scale(1.05);
}

.doctor-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background-color: var(--primary-color);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Layanan Page Specific */
.service-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 20px;
  transition: var(--transition-smooth);
}

.hover-card:hover .service-icon-box {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Ticket Design */
.ticket-wrapper {
  max-width: 420px;
  margin: 30px auto;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  border: 1px dashed rgba(13, 148, 136, 0.2);
  position: relative;
  overflow: hidden;
}

.ticket-wrapper::before, .ticket-wrapper::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-light);
  top: 50%;
  z-index: 10;
}

.ticket-wrapper::before {
  left: -12px;
  box-shadow: inset -5px 0 5px -5px rgba(0,0,0,0.1);
}

.ticket-wrapper::after {
  right: -12px;
  box-shadow: inset 5px 0 5px -5px rgba(0,0,0,0.1);
}

.ticket-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white);
  padding: 30px 24px;
  text-align: center;
  border-bottom: 2px dashed #f1f5f9;
}

.ticket-body {
  padding: 30px 24px;
  background-color: var(--white);
}

.ticket-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary-color);
  text-align: center;
  margin: 15px 0;
  letter-spacing: -2px;
}

.ticket-details {
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.ticket-details .row {
  margin-bottom: 10px;
}

.ticket-footer {
  background-color: #fafafa;
  padding: 20px;
  text-align: center;
  border-top: 1px dashed #e2e8f0;
}

/* Map Placeholder */
.map-container {
  height: 450px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

/* Animations */
@keyframes pulse-slow {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Styling */
.footer-custom {
  background-color: #0f172a;
  color: #94a3b8;
  padding: 80px 0 30px 0;
  font-size: 0.95rem;
}

.footer-custom h5 {
  color: var(--white);
  margin-bottom: 25px;
}

.footer-link {
  color: #94a3b8;
  text-decoration: none;
  transition: var(--transition-smooth);
  display: inline-block;
  margin-bottom: 12px;
}

.footer-link:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.footer-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: var(--transition-smooth);
}

.footer-social-icon:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 50px;
  padding-top: 30px;
  font-size: 0.85rem;
}

/* Floating Emergency Button */
.floating-emergency {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background-color: var(--danger-color);
  color: var(--white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(239, 68, 68, 0.4);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.floating-emergency:hover {
  background-color: #dc2626;
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 10px 35px rgba(239, 68, 68, 0.5);
  color: var(--white);
}

.floating-emergency i {
  font-size: 1.8rem;
}

/* Custom Alert styling for simulation */
.alert-teal {
  background-color: var(--primary-light);
  border-color: rgba(13, 148, 136, 0.2);
  color: var(--primary-hover);
}

/* Nav Search Bar Custom Styling */
.nav-search-input {
  border-radius: 30px 0 0 30px !important;
  border: 1px solid rgba(13, 148, 136, 0.2) !important;
  padding-left: 16px;
  font-size: 0.9rem;
  width: 180px;
  transition: var(--transition-smooth);
}

.nav-search-input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(13, 148, 136, 0.15) !important;
  width: 240px; /* Expand on focus on desktop */
}

@media (max-width: 991.98px) {
  .nav-search-input, .nav-search-input:focus {
    width: 100%; /* Full width on mobile */
  }
  #navSearchForm {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 10px;
  }
}

.nav-search-btn {
  border-radius: 0 30px 30px 0 !important;
  border: 1.5px solid var(--primary-color) !important;
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.nav-search-btn:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

.nav-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  width: 320px;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  margin-top: 10px;
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
  padding: 8px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: dropdown-fade-in 0.2s ease-out forwards;
}

@media (max-width: 991.98px) {
  .nav-search-dropdown {
    width: 100%;
    left: 0;
    position: absolute;
    top: 100%;
    margin-top: 5px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
  }
}

.search-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-hover);
  text-transform: uppercase;
  padding: 6px 16px;
  letter-spacing: 0.05em;
  background-color: var(--primary-light);
  margin-top: 6px;
  margin-bottom: 4px;
}

.search-group-title:first-of-type {
  margin-top: 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  color: var(--text-dark) !important;
  text-decoration: none;
  transition: var(--transition-smooth);
}

.search-result-item:hover {
  background-color: rgba(13, 148, 136, 0.05);
  color: var(--primary-color) !important;
  padding-left: 20px; /* Micro animation shift */
}

.search-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.search-result-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--primary-light);
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
}

.search-result-name {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Gallery Section Styling */
.gallery-section {
  position: relative;
}

.gallery-filter-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-filter {
  background-color: var(--white);
  color: var(--text-dark);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 30px;
  padding: 8px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.btn-filter:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: rgba(13, 148, 136, 0.2);
}

.btn-filter.active {
  background-color: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px -3px rgba(13, 148, 136, 0.4);
}

.gallery-card {
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  background-color: var(--white);
  height: 100%;
}

.gallery-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--hover-shadow);
}

.gallery-media-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.gallery-media-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-media-wrapper img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 5;
  background-color: rgba(13, 148, 136, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-badge.video-badge {
  background-color: rgba(249, 115, 22, 0.85); /* Orange for video */
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 2;
}

.gallery-card:hover .video-overlay {
  background: rgba(15, 23, 42, 0.5);
}

.play-btn-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
  transition: var(--transition-smooth);
  animation: play-pulse 2s infinite;
}

.play-btn-circle i {
  margin-left: 4px; /* Centering triangle play icon */
}

.gallery-card:hover .play-btn-circle {
  transform: scale(1.15);
  background-color: var(--white);
  color: var(--accent-hover);
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.5);
}

.video-duration {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 5;
}

.gallery-card-body {
  padding: 20px;
}

.gallery-card-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}

.gallery-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.gallery-card:hover .gallery-card-title {
  color: var(--primary-color);
}

.gallery-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pulse Animation for Play Button */
@keyframes play-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

/* Lightbox Modal custom stylings */
.lightbox-img {
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
}

.video-container-16-9 {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.video-container-16-9 iframe,
.video-container-16-9 video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Infographics Custom Styling */
.img-container-infographic {
  height: 340px;
  background-color: var(--primary-light);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-img-top-custom {
  object-fit: cover;
  object-position: top;
  width: 100%;
  height: 100%;
  transition: var(--transition-smooth);
}

.hover-card:hover .card-img-top-custom {
  transform: scale(1.05);
}

.overlay-infographic {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 2;
  backdrop-filter: blur(2px);
}

.hover-card:hover .overlay-infographic {
  opacity: 1;
}

.btn-icon-round {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition-smooth);
  border: none;
}

.btn-icon-round:hover {
  transform: scale(1.1);
  background-color: var(--primary-color) !important;
  color: var(--white) !important;
}

@media (max-width: 767.98px) {
  .img-container-infographic {
    height: 280px;
  }
}

/* Polyclinic Multi-card Slider */
.poly-slider-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 15px 0 35px 0; /* Add padding so hover shadows don't get clipped */
}

.poly-slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  padding: 10px 4px; /* Tiny horizontal padding for card shadows */
}

.poly-slider-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.poly-slider-item {
  flex: 0 0 calc((100% - 48px) / 3); /* 3 cards on desktop */
  scroll-snap-align: start;
  transition: var(--transition-smooth);
}

@media (max-width: 991.98px) {
  .poly-slider-item {
    flex: 0 0 calc((100% - 24px) / 2); /* 2 cards on tablet */
  }
}

@media (max-width: 575.98px) {
  .poly-slider-item {
    flex: 0 0 85%; /* 1 card + peek of next card on mobile */
  }
  .poly-slider-track {
    gap: 16px;
  }
}

/* Custom Pagination Styling */
.pagination {
  gap: 4px;
}
.pagination .page-item .page-link {
  color: var(--primary-color);
  border-radius: 8px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  margin: 0 2px;
  transition: var(--transition-smooth);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pagination .page-item .page-link:hover {
  background-color: var(--primary-light);
  color: var(--primary-hover);
  border-color: var(--primary-color);
}
.pagination .page-item.active .page-link,
.pagination .page-item.active .page-link:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  box-shadow: 0 4px 10px -2px rgba(13, 148, 136, 0.4);
}
.pagination .page-item.disabled .page-link {
  color: var(--text-muted);
  background-color: var(--bg-light);
  border-color: rgba(226, 232, 240, 0.8);
}

/* === SCROLL ANIMATIONS === */
@media (prefers-reduced-motion: no-preference) {

  /* Base state */
  .anim-ready {
    opacity: 0;
    will-change: transform, opacity;
  }

  /* Keyframes */
  @keyframes fadeUp       { from { opacity:0; transform: translateY(30px) } to { opacity:1; transform: translateY(0) } }
  @keyframes fadeLeft     { from { opacity:0; transform: translateX(-40px) } to { opacity:1; transform: translateX(0) } }
  @keyframes fadeRight    { from { opacity:0; transform: translateX(40px) } to { opacity:1; transform: translateX(0) } }
  @keyframes popIn        { from { opacity:0; transform: scale(0.85) } to { opacity:1; transform: scale(1) } }
  @keyframes zoomFade     { from { opacity:0; transform: scale(1.04) } to { opacity:1; transform: scale(1) } }
  @keyframes dropIn       { from { opacity:0; transform: translateY(-30px) } to { opacity:1; transform: translateY(0) } }
  @keyframes flipUp       { from { opacity:0; transform: perspective(600px) rotateX(20deg) translateY(20px) } to { opacity:1; transform: perspective(600px) rotateX(0) translateY(0) } }
  @keyframes shake        { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-10deg)} 40%{transform:rotate(10deg)} 60%{transform:rotate(-6deg)} 80%{transform:rotate(6deg)} }

  /* Classes */
  .anim-fade-up.is-visible    { animation: fadeUp    0.6s ease both }
  .anim-fade-left.is-visible  { animation: fadeLeft  0.6s ease both }
  .anim-fade-right.is-visible { animation: fadeRight 0.6s ease both }
  .anim-pop-in.is-visible     { animation: popIn     0.5s cubic-bezier(0.34,1.56,0.64,1) both }
  .anim-zoom-fade.is-visible  { animation: zoomFade  0.7s ease both }
  .anim-drop-in.is-visible    { animation: dropIn    0.5s ease both }
  .anim-flip-up.is-visible    { animation: flipUp    0.65s ease both }

  /* Shake loop */
  .icon-shake { animation: shake 1.5s ease-in-out infinite; display: inline-block; }

  /* Stagger delays */
  .anim-ready { animation-delay: var(--anim-delay, 0ms) !important; }
}

@media (prefers-reduced-motion: reduce) {
  .anim-ready { opacity: 1 !important; }
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary-color, #0d9488);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  z-index: 1050;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  bottom: 30px;
}
.back-to-top:hover {
  background-color: var(--secondary-color, #14b8a6);
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(20, 184, 166, 0.4);
  color: #fff;
}
.back-to-top i {
  font-size: 1.2rem;
  font-weight: bold;
}

