/* ========================================================
   U Dental Clinic Surat Thani - Custom Stylesheet
   Luxury Warm Champagne Gold & Sand Aesthetic
   ======================================================== */

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: auto;
  position: relative;
}

@layer utilities {
  .text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
  .text-shadow-md {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #fbf9f5;
}

::-webkit-scrollbar-thumb {
  background: #c5b18c;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9d8355;
}

/* Glassmorphism Styles matching Champagne Gold Theme */
.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 220, 203, 0.85);
}

.glass-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(244, 239, 230, 0.9);
}

.glass-card-dark {
  background: rgba(30, 27, 24, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(197, 177, 140, 0.25);
}

/* Hero Background Gradient & Mesh */
.hero-gradient-bg {
  background: radial-gradient(circle at 12% 18%, rgba(197, 177, 140, 0.22) 0%, transparent 48%),
              radial-gradient(circle at 88% 82%, rgba(180, 156, 113, 0.18) 0%, transparent 45%),
              linear-gradient(135deg, #fdfcfb 0%, #f7f3eb 50%, #f2ebdf 100%);
}

.clinic-pattern-bg {
  background-image: radial-gradient(#d8c7a5 0.75px, transparent 0.75px);
  background-size: 24px 24px;
}

/* Before & After Interactive Slider */
.ba-slider-container {
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  border-radius: 1.5rem;
  box-shadow: 0 20px 25px -5px rgba(50, 39, 24, 0.12), 0 8px 10px -6px rgba(50, 39, 24, 0.08);
}

.ba-slider-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-before-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  overflow: hidden;
  will-change: width;
}

.ba-before-image {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #ffffff;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 20;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: #b49c71;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(180, 156, 113, 0.6), 0 0 0 4px rgba(255, 255, 255, 0.95);
  cursor: ew-resize;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.ba-handle:hover {
  background: #826a43;
  transform: translate(-50%, -50%) scale(1.08);
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseGlowGold {
  0%, 100% {
    box-shadow: 0 0 15px rgba(197, 177, 140, 0.4);
  }
  50% {
    box-shadow: 0 0 28px rgba(180, 156, 113, 0.85);
  }
}

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

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlowGold 2.5s infinite;
}

.shimmer-badge {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Floating Action Button (FAB) */
.floating-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

/* Active Service Tab indicator */
.service-tab-btn.active {
  background-color: #b49c71;
  color: #ffffff;
  border-color: #b49c71;
  box-shadow: 0 10px 15px -3px rgba(180, 156, 113, 0.35);
}

/* Accordion Smooth Transitions */
.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-content {
  max-height: 500px;
  transition: max-height 0.45s ease-in-out;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast-msg {
  pointer-events: auto;
  min-width: 300px;
  max-width: 420px;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(120%);
    opacity: 0;
  }
}

.toast-msg.dismissing {
  animation: slideOutRight 0.25s forwards;
}

/* Form Styles */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #b49c71;
  box-shadow: 0 0 0 3px rgba(197, 177, 140, 0.25);
}

/* Doctor Card Image Hover */
.doc-card:hover .doc-img {
  transform: scale(1.05);
}

.doc-img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: cover;
  object-position: center top !important;
}
