/* ==========================================================================
   NEUROCENTER.KZ — IMPECCABLE POLISH & INTERACTION STYLES
   ========================================================================== */

/* 1. Smooth Scrolling & Root Defaults */
html {
  scroll-behavior: smooth;
}

/* 2. Interactive Buttons & Hover Physics */
.btn-primary,
.btn-secondary,
.mbr-section-btn .btn {
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(31, 64, 104, 0.12) !important;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
.mbr-section-btn .btn-primary:hover {
  background-color: #162447 !important;
  border-color: #162447 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(31, 64, 104, 0.25) !important;
}

.btn-primary:active,
.mbr-section-btn .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(31, 64, 104, 0.2) !important;
}

/* 3. Doctor Cards & Feature Containers Polish */
.card-wrapper,
.item-wrapper,
.team-card {
  background: #ffffff;
  border-radius: 12px !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
}

.card-wrapper:hover,
.item-wrapper:hover,
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(31, 64, 104, 0.2) !important;
}

/* 4. Image Containers & Ratios */
.image-wrapper img,
.card-box img,
.item-img img {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

/* 5. Navigation Bar & Backdrop Blur */
.navbar-dropdown {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background-color: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
  transition: all 0.25s ease !important;
}

.nav-link {
  color: #1e293b !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

.nav-link:hover {
  color: #1f4068 !important;
}

/* 6. Click-to-Call Phone & WhatsApp Micro-links */
a[href^="tel:"],
a[href*="wa.me"],
a[href*="whatsapp.com"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

a[href^="tel:"]:hover {
  color: #1f4068 !important;
  text-decoration: underline;
}

a[href*="wa.me"]:hover,
a[href*="whatsapp.com"]:hover {
  color: #1ebc59 !important;
  text-decoration: underline;
}

/* 7. Footer Polish */
footer, .cid-footer {
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a, .cid-footer a {
  color: #cbd5e1 !important;
  transition: color 0.2s ease;
}

footer a:hover, .cid-footer a:hover {
  color: #ffffff !important;
  text-decoration: none;
}

/* 8. Accessibility Focus Ring */
*:focus-visible {
  outline: 2px solid #1f4068 !important;
  outline-offset: 3px !important;
}

/* ==========================================================================
   SPINAL GALLERY CAROUSEL (Manual & Auto Slide)
   ========================================================================== */
.spinal-gallery-wrapper {
  background: #0d1527;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

.gallery-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-progress-bar-wrap {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.gallery-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  transition: width 0.1s linear;
}

.spinal-gallery-stage {
  position: relative;
  width: 100%;
  height: 520px;
  background: #020617;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

@media (max-width: 991px) {
  .spinal-gallery-stage {
    height: 420px;
  }
}

@media (max-width: 576px) {
  .spinal-gallery-stage {
    height: 290px;
  }
}

.gallery-slide-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease-in-out, transform 0.45s ease-out;
  transform: scale(0.98);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  pointer-events: none;
  z-index: 1;
}

.gallery-slide-item.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
  z-index: 2;
}

.gallery-slide-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.gallery-nav-btn:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
}

.gallery-btn-prev {
  left: 16px;
}

.gallery-btn-next {
  right: 16px;
}

@media (max-width: 576px) {
  .gallery-nav-btn {
    width: 38px;
    height: 38px;
  }
  .gallery-btn-prev {
    left: 8px;
  }
  .gallery-btn-next {
    right: 8px;
  }
}

.gallery-thumbs-track {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.96);
  overflow-x: auto;
  scroll-behavior: smooth;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.8);
}

.gallery-thumbs-track::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbs-track::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.8);
}

.gallery-thumbs-track::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 4px;
}

.gallery-thumb-item {
  flex: 0 0 74px;
  height: 54px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.45;
  transition: all 0.22s ease;
  background: #1e293b;
  position: relative;
}

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

.gallery-thumb-item:hover {
  opacity: 0.85;
  border-color: rgba(56, 189, 248, 0.5);
}

.gallery-thumb-item.active {
  opacity: 1;
  border-color: #38bdf8;
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

