/* ===============================================
   CRITICAL MOBILE CAROUSEL FIX - OVERRIDE ALL CONFLICTS
   =============================================== */

/* EMERGENCY MOBILE CAROUSEL OVERRIDE - Must be first to take precedence */
@media screen and (max-width: 768px) {
    /* FORCE: Remove blue background and fix carousel structure */
    #hero-carousel {
        background: none !important;
        background-color: transparent !important;
        background-image: none !important;
        min-height: calc(100vh - 60px) !important;
        height: calc(100vh - 60px) !important;
        margin-top: 60px !important;
        position: relative !important;
        overflow: hidden !important;
        z-index: 1 !important;
    }
     
    /* FORCE: Clean carousel items */
    .carousel-item {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
        background-color: #f8f9fa !important;
        min-height: calc(100vh - 60px) !important;
        height: calc(100vh - 60px) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 0 !important;
        margin: 0 !important;
        position: relative !important;
        overflow: visible !important;
    }
    
    /* REMOVE: All background images and overlays on mobile */
    .carousel-item::before,
    .carousel-item::after,
    .carousel-background,
    .carousel-overlay,
    .carousel-item img {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        background: none !important;
    }
    
    /* FORCE: Show only the container and form */
    .carousel-item .container {
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .carousel-item .row {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0 !important;
    }
    
    /* HIDE: Text content columns on mobile */
    .carousel-item .col-lg-6,
    .carousel-item .col-md-7,
    .carousel-item .hero-content,
    .carousel-item .slide-content {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
    }
    
    /* SHOW: Only form column on mobile */
    .carousel-item .col-lg-5,
    .carousel-item .col-md-5 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* FORCE: Unified appointment form visibility */
    .unified-appointment-form {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 20 !important;
        width: 100% !important;
        max-width: 380px !important;
        min-height: 500px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: 20px !important;
        padding: 25px 20px 30px 20px !important;
        margin: 0 auto !important;
        box-shadow: 
            0 20px 40px rgba(0, 0, 0, 0.15),
            0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        overflow: visible !important;
        animation: mobileFormSlideIn 0.6s ease-out !important;
    }
    
    /* FORCE: Form header visibility */
    .unified-appointment-form .form-header {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
    }
    
    .unified-appointment-form .form-icon {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 55px !important;
        height: 55px !important;
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
        border-radius: 50% !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 15px !important;
        box-shadow: 0 8px 25px rgba(30, 136, 229, 0.3) !important;
    }
    
    .unified-appointment-form .form-icon i {
        color: white !important;
        font-size: 24px !important;
    }
    
    .unified-appointment-form .form-header h3 {
        color: #1565C0 !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    .unified-appointment-form .form-header p {
        color: #666 !important;
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
        font-weight: 500 !important;
    }
    
    /* FORCE: Form structure visibility */
    .unified-appointment-form .appointment-form {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-direction: column !important;
        gap: 16px !important;
        flex-grow: 1 !important;
        position: relative !important;
        z-index: 2 !important;
    }
    
    /* FORCE: Form steps visibility */
    .unified-appointment-form .form-step {
        display: none !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .unified-appointment-form .form-step.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* FORCE: Form controls visibility */
    .unified-appointment-form .form-group {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 16px !important;
        position: relative !important;
    }
    
    .unified-appointment-form .form-label {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-weight: 600 !important;
        color: #333 !important;
        margin-bottom: 6px !important;
        font-size: 0.9rem !important;
    }
    
    .unified-appointment-form .form-control {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        padding: 14px 16px !important;
        border: 2px solid #e0e0e0 !important;
        border-radius: 12px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        background: white !important;
        color: #333 !important;
        min-height: 50px !important;
        transition: all 0.3s ease !important;
        box-sizing: border-box !important;
        outline: none !important;
    }
    
    .unified-appointment-form .form-control:focus {
        border-color: #1E88E5 !important;
        box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15) !important;
        transform: translateY(-1px) !important;
    }
    
    .unified-appointment-form .form-control::placeholder {
        color: #999 !important;
        font-size: 0.9rem !important;
    }
    
    /* FORCE: Button visibility - CRITICAL */
    .unified-appointment-form .btn,
    .unified-appointment-form .btn-primary,
    .unified-appointment-form .btn-success,
    .unified-appointment-form button[type="submit"],
    .unified-appointment-form .next-step-btn,
    .unified-appointment-form .submit-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 100 !important;
        width: 100% !important;
        padding: 16px 24px !important;
        margin-top: 16px !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: white !important;
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
        box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        min-height: 54px !important;
        text-align: center !important;
        line-height: 1.4 !important;
        text-transform: none !important;
        letter-spacing: 0.5px !important;
        flex-shrink: 0 !important;
        order: 999 !important;
        /* Force above everything */
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        clip: none !important;
        clip-path: none !important;
        overflow: visible !important;
        pointer-events: auto !important;
    }
    
    /* Button hover states */
    .unified-appointment-form .btn:hover,
    .unified-appointment-form .btn-primary:hover {
        background: linear-gradient(135deg, #1565C0, #0D47A1) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4) !important;
    }
    
    .unified-appointment-form .btn-success {
        background: linear-gradient(135deg, #28a745, #20c997) !important;
    }
    
    .unified-appointment-form .btn-success:hover {
        background: linear-gradient(135deg, #20c997, #17a2b8) !important;
    }
    
    /* Button icons */
    .unified-appointment-form .btn i {
        font-size: 18px !important;
        flex-shrink: 0 !important;
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Input group styling */
    .unified-appointment-form .input-group {
        display: flex !important;
        width: 100% !important;
    }
    
    .unified-appointment-form .input-group-text {
        background: #f8f9fa !important;
        border: 2px solid #e0e0e0 !important;
        border-right: none !important;
        border-radius: 12px 0 0 12px !important;
        padding: 14px 16px !important;
        font-weight: 600 !important;
        color: #1565C0 !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .unified-appointment-form .input-group .form-control {
        border-left: none !important;
        border-radius: 0 12px 12px 0 !important;
    }
    
    /* Form row styling */
    .unified-appointment-form .form-row {
        display: flex !important;
        gap: 12px !important;
        width: 100% !important;
        flex-direction: column !important; /* Stack on mobile */
    }
    
    .unified-appointment-form .form-row .form-group {
        flex: 1 !important;
        margin-bottom: 16px !important;
    }
    
    /* Select dropdown styling */
    .unified-appointment-form select.form-control {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 16px center !important;
        background-repeat: no-repeat !important;
        background-size: 16px 12px !important;
        padding-right: 50px !important;
        cursor: pointer !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    /* Textarea styling */
    .unified-appointment-form textarea.form-control {
        resize: none !important;
        min-height: 80px !important;
        max-height: 120px !important;
        font-family: inherit !important;
    }
    
    /* Step header styling */
    .unified-appointment-form .step-header {
        display: flex !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .unified-appointment-form .back-btn {
        background: none !important;
        border: none !important;
        color: #1565C0 !important;
        font-size: 18px !important;
        padding: 8px !important;
        margin-right: 10px !important;
        border-radius: 50% !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
        cursor: pointer !important;
    }
    
    .unified-appointment-form .back-btn:hover {
        background: rgba(21, 101, 192, 0.1) !important;
    }
    
    .unified-appointment-form .step-header h4 {
        margin: 0 !important;
        color: #1565C0 !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
    }
    
    /* Form footer */
    .unified-appointment-form .form-footer {
        margin-top: 15px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .unified-appointment-form .security-badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: #666 !important;
        font-size: 0.8rem !important;
        padding: 8px 12px !important;
        background: rgba(40, 167, 69, 0.1) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(40, 167, 69, 0.2) !important;
    }
    
    .unified-appointment-form .security-badge i {
        color: #28a745 !important;
        font-size: 14px !important;
    }
    
    /* Mobile carousel indicators */
    .carousel-indicators {
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 8px 16px !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 6px !important;
        justify-content: center !important;
        width: auto !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 20px !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.6) !important;
        border: none !important;
        opacity: 0.8 !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        text-indent: -9999px !important;
        overflow: hidden !important;
    }
    
    .carousel-indicators [data-bs-target].active {
        background: #FFFFFF !important;
        opacity: 1 !important;
        transform: scale(1.4) !important;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
    }
    
    /* Hide complex indicators on mobile */
    .indicator-label,
    .indicator-progress {
        display: none !important;
    }
    
    /* Hide navigation controls on mobile */
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-controls,
    .carousel-progress,
    .carousel-play-pause {
        display: none !important;
    }
    
    /* Animation for mobile form */
    @keyframes mobileFormSlideIn {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* SMALLER MOBILE DEVICES */
@media screen and (max-width: 480px) {
    .unified-appointment-form {
        max-width: 350px !important;
        padding: 20px 16px 25px 16px !important;
        min-height: 480px !important;
    }
    
    .unified-appointment-form .form-control {
        padding: 12px 14px !important;
        font-size: 15px !important;
        min-height: 46px !important;
    }
    
    .unified-appointment-form .btn {
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
        min-height: 50px !important;
    }
}

/* VERY SMALL MOBILE DEVICES */
@media screen and (max-width: 360px) {
    .unified-appointment-form {
        max-width: 320px !important;
        padding: 18px 14px 22px 14px !important;
        min-height: 460px !important;
    }
    
    .unified-appointment-form .form-control {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }
    
    .unified-appointment-form .btn {
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
        min-height: 48px !important;
    }
}

/* Enhanced Styles for Top Header */

/* Modern CSS Variables for consistent theming */
:root {
  --primary-color: #1E88E5;
  --primary-dark: #1565C0;
  --secondary-color: #4CAF50;
  --accent-color: #FFEB3B;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --dark-color: #2c3e50;
  --light-color: #f8f9fa;
  --white: #ffffff;
  --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
  --border-radius: 15px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
  --header-height: 70px;
  --header-height-scrolled: 60px;
  --mobile-header-height: 60px;
  --mobile-padding: 15px;
  --mobile-gap: 15px;
}

/* Smooth scrolling and better base styles */
html {
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  padding-top: 0 !important;
  padding-bottom: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--dark-color);
  overflow-x: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* FIXED: Enhanced Top Header Styles with proper scroll behavior */
.top-header {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100% !important;
  height: var(--header-height);
  margin: 0 !important;
  padding: 0 15px;
  z-index: 1050;
  
  /* Enhanced background with glass effect */
  background: linear-gradient(90deg, rgba(30, 136, 229, 0.95), rgba(21, 101, 192, 0.95)) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* Enhanced shadow and border */
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  
  /* Smooth transitions for all properties */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Ensure proper stacking */
  overflow: visible;
}

/* FIXED: Header scroll effect with smooth size and opacity changes */
.top-header.scrolled {
  height: var(--header-height-scrolled) !important;
  background: linear-gradient(90deg, rgba(30, 136, 229, 0.98), rgba(21, 101, 192, 0.98)) !important;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* FIXED: Navbar container adjustments for scroll state */
.top-header .container-fluid {
  height: 100%;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.top-header.scrolled .container-fluid {
  height: 100%;
}

/* Enhanced Navigation Brand */
.navbar-brand {
  transition: all var(--transition-medium);
  position: relative;
  font-family: 'Arial', sans-serif;
  font-size: 1.5rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.top-header.scrolled .navbar-brand {
  font-size: 1.3rem;
  transform: scale(0.95);
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: var(--white);
}

.top-header.scrolled .navbar-brand:hover {
  transform: scale(1.02);
}

.navbar-logo {
  width: 40px;
  height: auto;
  transition: all var(--transition-medium);
}

.top-header.scrolled .navbar-logo {
  width: 35px;
}

.brand-text {
  background: linear-gradient(45deg, #fff, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  transition: var(--transition-medium);
}

/* FIXED: Enhanced Navigation Links with scroll state adjustments */
.navbar-nav {
  align-items: center;
  margin: 0;
}

.navbar-nav .nav-link {
  color: var(--white) !important;
  font-size: 1rem;
  font-weight: 500;
  padding: 10px 18px !important;
  border-radius: 25px;
  margin: 0 5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.top-header.scrolled .navbar-nav .nav-link {
  font-size: 0.95rem;
  padding: 8px 16px !important;
}

.navbar-nav .nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

.navbar-nav .nav-link:hover::before {
  left: 100%;
}

.navbar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--accent-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 235, 59, 0.4);
}

.navbar-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  color: var(--accent-color) !important;
  box-shadow: 0 4px 15px rgba(255, 235, 59, 0.3);
}

/* Book Online Highlight with scroll adjustments */
.nav-link.book-highlight {
  background: linear-gradient(135deg, var(--secondary-color), #45a049) !important;
  color: var(--white) !important;
  font-weight: 600;
  animation: pulse-glow 2s infinite;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.top-header.scrolled .nav-link.book-highlight {
  padding: 6px 14px !important;
  font-size: 0.9rem;
}

.nav-link.book-highlight:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40) !important;
  color: var(--white) !important;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
  }
  50% { 
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.7);
  }
}

/* Navigation Icons with scroll state */
.nav-icon {
  font-size: 1.2rem;
  transition: transform var(--transition-medium);
}

.top-header.scrolled .nav-icon {
  font-size: 1.1rem;
}

.nav-link:hover .nav-icon {
  transform: scale(1.3) rotate(10deg);
}

/* Hidden SEO links */
.hidden-seo-link {
  display: none !important;
}

/* FIXED: Enhanced Mobile Toggler with scroll state */
.enhanced-toggler {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.top-header.scrolled .enhanced-toggler {
  width: 40px;
  height: 40px;
  gap: 3px;
}

.enhanced-toggler:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.enhanced-toggler:focus {
  box-shadow: 0 0 0 2px rgba(255, 235, 59, 0.5);
  outline: none;
}

.toggler-line {
  width: 22px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition-medium);
}

.top-header.scrolled .toggler-line {
  width: 20px;
  height: 2.5px;
}

.enhanced-toggler[aria-expanded="true"] .toggler-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.enhanced-toggler[aria-expanded="true"] .toggler-line:nth-child(2) {
  opacity: 0;
}

.enhanced-toggler[aria-expanded="true"] .toggler-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* FIXED: Enhanced Search with scroll adjustments */
.search-form {
  position: relative;
  margin-left: 25px;
  transition: all var(--transition-medium);
}

.top-header.scrolled .search-form {
  margin-left: 20px;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 5px;
  transition: all var(--transition-medium);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.top-header.scrolled .search-container {
  padding: 4px;
}

.search-container:focus-within {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 235, 59, 0.3);
}

.search-input {
  background: transparent;
  border: none;
  color: var(--white);
  padding: 10px 15px;
  border-radius: 25px;
  width: 220px;
  transition: all var(--transition-medium);
  font-size: 0.95rem;
}

.top-header.scrolled .search-input {
  padding: 8px 12px;
  width: 200px;
  font-size: 0.9rem;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.8);
}

.search-input:focus {
  outline: none;
  width: 280px;
  background: rgba(255, 255, 255, 0.1);
}

.top-header.scrolled .search-input:focus {
  width: 260px;
}

.search-btn, .voice-search-btn {
  background: transparent;
  border: none;
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-medium);
  cursor: pointer;
  font-size: 1.1rem;
}

.top-header.scrolled .search-btn,
.top-header.scrolled .voice-search-btn {
  width: 35px;
  height: 35px;
  font-size: 1rem;
}

.search-btn:hover, .voice-search-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.15);
}

.voice-search-btn:hover {
  color: #FF5722;
}

/* Emergency Call Button */
.emergency-call {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.emergency-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  background: linear-gradient(135deg, #FF5722, #E64A19);
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition-medium);
  justify-content: center;
  box-shadow: var(--shadow-medium);
}

.emergency-btn:hover {
  background: linear-gradient(135deg, #E64A19, #D84315);
  color: var(--white);
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.5);
}

/* FIXED: Carousel structure to handle multiple forms properly */
#hero-carousel {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  min-height: 700px;
  max-height: 900px;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  z-index: 1;
  background: #000;
  /* FIXED: Proper spacing from header */
  margin-top: var(--header-height) !important;
  /* Ensure full viewport coverage */
  box-sizing: border-box;
}

/* FIXED: Carousel inner container with proper height inheritance */
.carousel-inner {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  align-items: stretch;
}

/* FIXED: Remove duplicate carousel item styling and ensure proper image visibility */
.carousel-item {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 630px;
  max-height: 830px;
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1E88E5, #1565C0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* COMPLETELY FIXED: Background image with maximum visibility */
.carousel-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  filter: brightness(0.85) contrast(1.05) saturate(1.1);
  transition: transform 0.8s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  /* Force image to load and display */
  max-width: none;
  min-width: 100%;
  min-height: 100%;
}

.carousel-item:hover img {
  transform: scale(1.02);
  filter: brightness(0.9) contrast(1.1) saturate(1.15);
}

/* OPTIMIZED: Overlay with minimal interference */
.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 136, 229, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(30, 136, 229, 0.15) 100%
  );
  z-index: 2;
  opacity: 0.7;
  pointer-events: none;
}

/* ENHANCED: Better image loading and fallbacks */
.carousel-item img[src*=".webp"] {
  /* Specific styling for WebP images */
  image-rendering: auto;
}

/* Loading state for images */
.carousel-item img:not([src]) {
  background: linear-gradient(135deg, #1E88E5, #1565C0);
}

/* Ensure images load properly on different browsers */
@supports (object-fit: cover) {
  .carousel-item img {
    object-fit: cover;
  }
}

@supports not (object-fit: cover) {
  .carousel-item img {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

/* PERFECTLY FIXED: Carousel caption with responsive container */
.carousel-caption {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  max-width: none;
  text-align: left;
  color: var(--white);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

/* FIXED: Container with perfect centering and responsive behavior */
.carousel-caption .container {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ensure proper spacing on all devices */
  box-sizing: border-box;
}

/* FIXED: Row structure with optimal spacing and alignment */
.carousel-caption .row {
  width: 100%;
  height: auto;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 0;
  min-height: 450px;
  /* Ensure content doesn't overflow */
  box-sizing: border-box;
}

/* FIXED: Content column with proper flex properties */
.carousel-caption .col-lg-7 {
  flex: 1 1 58%;
  max-width: 58%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Better content alignment */
  min-height: 400px;
}

/* ENHANCED: Right-side form positioning with stronger emphasis */
.carousel-caption .col-lg-5 {
  flex: 1 1 42%;
  max-width: 42%;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* Changed from center to flex-end for stronger right alignment */
  min-height: 350px;
  /* Ensure form stays on the right */
  margin-left: auto;
}

/* ENHANCED: Slide content with better visual hierarchy */
.slide-content {
  width: 100%;
  max-width: 650px;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(30, 136, 229, 0.88) 30%,
    rgba(0, 0, 0, 0.92) 100%
  );
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 20px;
  padding: 45px 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
    0 25px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  position: relative;
  overflow: hidden;
  animation: slideInFromLeft 0.8s ease-out;
  /* Ensure proper text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ENHANCED: Appointment form with stronger right-side styling */
.carousel-appointment-form {
  width: 100%;
  max-width: 480px;
  min-height: 520px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 20px;
  padding: 35px 30px 40px 30px; /* Added bottom padding */
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  position: relative;
  overflow: visible !important; /* Changed from hidden to visible */
  animation: slideInFromRight 0.8s ease-out 0.2s both;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  margin-right: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* ENHANCED: Form accent to emphasize right-side placement */
.carousel-appointment-form::after {
  content: '';
  position: absolute;
  top: 20px;
  right: -2px;
  width: 4px;
  height: 60px;
  background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
  z-index: 1;
  /* Visual indicator that form is on the right */
  box-shadow: 0 0 10px rgba(30, 136, 229, 0.5);
}

/* FIXED: Form header alignment */
.carousel-appointment-form .form-header {
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  /* Add subtle right-side emphasis */
  border-left: 3px solid var(--primary-color);
  padding-left: 15px;
  margin-left: -15px;
}

.carousel-appointment-form .form-header h4 {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  line-height: 1.3;
}

.carousel-appointment-form .form-header h4 i {
  font-size: 1.6rem;
  color: var(--secondary-color);
  animation: pulse 2s infinite;
}

.carousel-appointment-form .form-header p {
  color: #666;
  font-size: 1rem;
  margin: 0;
  font-weight: 500;
  opacity: 0.9;
}

/* COMPLETELY FIXED: Form structure */
.carousel-appointment-form .appointment-form {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
  flex-grow: 1;
  justify-content: space-between; /* Changed to space-between */
  min-height: 400px; /* Ensure minimum height */
}

/* PERFECTLY ALIGNED: Form rows */
.carousel-appointment-form .form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  width: 100%;
}

/* OPTIMAL: Form controls with consistent sizing */
.carousel-appointment-form .form-control {
  flex: 1;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  background: #f8f9fa;
  color: var(--dark-color);
  min-height: 50px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.06),
    0 1px 3px rgba(0, 0, 0, 0.08);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

.carousel-appointment-form .form-control:focus {
  border-color: var(--primary-color);
  background: var(--white);
  box-shadow: 
    0 0 0 3px rgba(30, 136, 229, 0.15),
    0 3px 10px rgba(0, 0, 0, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.carousel-appointment-form .form-control:hover {
  border-color: var(--primary-color);
  background: var(--white);
}

.carousel-appointment-form .form-control::placeholder {
  color: #999;
  font-size: 0.9rem;
  font-weight: 400;
}

/* FIXED: Full-width form elements */
.carousel-appointment-form .form-control.mb-3 {
  width: 100%;
  margin-bottom: 16px !important;
}

/* ENHANCED: Select dropdown styling */
.carousel-appointment-form select.form-control {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 14px 10px;
  padding-right: 45px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* PERFECT: Submit button alignment */
.carousel-appointment-form .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
  border: none !important;
  border-radius: 12px;
  padding: 16px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white) !important;
  width: 100% !important;
  min-height: 54px;
  margin-top: 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  overflow: visible !important;
  text-transform: none;
  letter-spacing: 0.3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 6px 20px rgba(30, 136, 229, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  flex-shrink: 0;
  box-sizing: border-box;
  /* CRITICAL: Force visibility */
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10;
  /* Prevent any hiding */
  clip: unset !important;
  clip-path: none !important;
  transform: none !important;
}

/* FORCE button text and loading states to be visible */
.carousel-appointment-form .btn-primary .btn-text,
.carousel-appointment-form .btn-primary .btn-loading {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  opacity: 1 !important;
  visibility: visible !important;
}

.carousel-appointment-form .btn-primary .btn-loading.d-none {
  display: none !important;
}

.carousel-appointment-form .btn-primary .btn-text:not(.d-none) {
  display: flex !important;
}

/* Enhanced hover state with forced visibility */
.carousel-appointment-form .btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0d47a1) !important;
  transform: translateY(-2px) !important;
  box-shadow: 
    0 12px 35px rgba(30, 136, 229, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Ensure form container doesn't hide buttons */
.carousel-appointment-form {
  width: 100%;
  max-width: 480px;
  min-height: 520px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 20px;
  padding: 35px 30px 40px 30px; /* Added bottom padding */
  border: 2px solid rgba(255, 255, 255, 0.6);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
  position: relative;
  overflow: visible !important; /* Changed from hidden to visible */
  animation: slideInFromRight 0.8s ease-out 0.2s both;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: auto;
  margin-right: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* Force form structure to show button */
.carousel-appointment-form .appointment-form {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
  flex-grow: 1;
  justify-content: space-between; /* Changed to space-between */
  min-height: 400px; /* Ensure minimum height */
}

/* Ensure button area is always visible */
.carousel-appointment-form .appointment-form > button:last-child {
  margin-top: auto !important;
  position: relative;
  z-index: 20;
  bottom: 0;
}

/* Fix for button icons */
.carousel-appointment-form .btn-primary i {
  font-size: 1.2rem;
  flex-shrink: 0;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Additional mobile fixes */
@media (max-width: 768px) {
  .carousel-appointment-form {
    min-height: 420px;
    padding: 25px 20px 30px 20px; /* Ensure bottom padding */
    overflow: visible !important;
  }

  .carousel-appointment-form .btn-primary {
    padding: 15px 20px !important;
    min-height: 50px !important;
    font-size: 1rem !important;
    margin-top: 12px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (max-width: 576px) {
  .carousel-appointment-form {
    min-height: 400px;
    padding: 20px 16px 25px 16px; /* Ensure bottom padding */
    overflow: visible !important;
  }

  .carousel-appointment-form .btn-primary {
    padding: 14px 18px !important;
    min-height: 48px !important;
    font-size: 0.95rem !important;
    margin-top: 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

/* Additional safety rules to prevent button hiding */
.carousel-appointment-form *:last-child {
  margin-bottom: 0 !important;
}

.carousel-appointment-form button[type="submit"] {
  order: 999; /* Force to bottom */
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
}

/* ENHANCED: Responsive improvements for better form alignment */
@media (max-width: 1400px) {
  .carousel-caption .col-lg-5 {
    justify-content: center; /* Center on smaller large screens */
  }
  
  .carousel-appointment-form {
    margin-left: auto;
    margin-right: auto; /* Center on smaller screens */
    max-width: 450px;
  }
}

@media (max-width: 1200px) {
  .carousel-appointment-form {
    max-width: 420px;
  }
}

@media (max-width: 991.98px) {
  .carousel-caption .col-lg-5 {
    justify-content: center; /* Center on tablet and mobile */
    margin-left: 0;
  }
  
  .carousel-appointment-form {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
  
  /* Remove right-side accent on mobile for cleaner look */
  .carousel-appointment-form::after {
    display: none;
  }
  
  .carousel-appointment-form .form-header {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .carousel-appointment-form {
    min-height: 420px;
    padding: 25px 20px;
  }

  .carousel-appointment-form .form-control {
    padding: 14px 16px;
    min-height: 46px;
    font-size: 0.9rem;
  }

  .carousel-appointment-form .btn-primary {
    padding: 15px 20px;
    min-height: 50px;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .carousel-appointment-form {
    min-height: 400px;
    padding: 20px 16px;
  }

  .carousel-appointment-form .form-header h4 {
    font-size: 1.3rem;
    flex-direction: column;
    gap: 6px;
  }

  .carousel-appointment-form .form-control {
    padding: 12px 14px;
    min-height: 44px;
    font-size: 0.85rem;
  }

  .carousel-appointment-form .btn-primary {
    padding: 14px 18px;
    min-height: 48px;
    font-size: 0.95rem;
  }
}

/* ENHANCED: Carousel UX improvements */

/* Carousel fade transition for smoother experience */
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
}

.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 0;
}

/* Enhanced carousel indicators with labels and progress */
.carousel-indicators {
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0;
  z-index: 100;
  display: flex;
  gap: 15px;
  justify-content: center;
  width: auto;
  position: absolute;
}

.carousel-indicators button {
  width: auto;
  min-width: 100px;
  height: auto;
  border-radius: 25px;
  margin: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
  cursor: pointer;
  padding: 12px 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.carousel-indicators button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  opacity: 1;
  transform: translateY(-3px);
}

.carousel-indicators button.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-color);
  opacity: 1;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4);
}

.indicator-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 0 0 25px 25px;
  transition: width 6s linear;
}

.carousel-indicators button.active .indicator-progress {
  width: 100%;
}

.indicator-label {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
  position: relative;
  z-index: 2;
}

.carousel-indicators button.active .indicator-label {
  color: var(--primary-color);
  text-shadow: none;
}

/* Play/Pause control */
.carousel-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.carousel-play-pause {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: var(--primary-color);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.carousel-play-pause:hover {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3);
}

/* Progress bar at bottom */
.carousel-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 100;
}

.carousel-progress .progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 6s linear;
}

.carousel-item.active ~ .carousel-progress .progress-bar {
  width: 100%;
}

/* Enhanced navigation controls */
.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  opacity: 0.9;
  margin-top: calc(var(--header-height) / -2);
}

.carousel-control-prev {
  left: 30px;
}

.carousel-control-next {
  right: 30px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background: none;
  width: auto;
  height: auto;
  color: var(--primary-color);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 12px 35px rgba(30, 136, 229, 0.4);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
  color: var(--white);
}

/* Improved carousel background structure */
.carousel-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 136, 229, 0.15) 0%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(30, 136, 229, 0.15) 100%
  );
  z-index: 2;
  opacity: 0.8;
  pointer-events: none;
}

/* Enhanced form validation styling */
.form-group {
  position: relative;
  flex: 1;
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.form-control.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

.invalid-feedback {
  display: none;
  width: 100%;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #dc3545;
  font-weight: 500;
}

.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

/* Enhanced button states */
.btn-loading {
  opacity: 0.8;
  pointer-events: none;
}

.btn-text {
  transition: opacity 0.3s ease;
}

/* Slide content animations */
.slide-content {
  animation-fill-mode: both;
}

@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Touch and mobile improvements */
@media (max-width: 768px) {
  .carousel-indicators {
    bottom: 20px;
    gap: 10px;
  }
  
  .carousel-indicators button {
    min-width: 80px;
    padding: 10px 12px;
  }
  
  .indicator-label {
    font-size: 0.75rem;
  }
  
  .carousel-controls {
    top: 15px;
    right: 15px;
  }
  
  .carousel-play-pause {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 50px;
    height: 50px;
  }
  
  .carousel-control-prev {
    left: 20px;
  }
  
  .carousel-control-next {
    right: 20px;
  }
  
  .carousel-control-prev-icon,
  .carousel-control-next-icon {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .carousel-indicators {
    bottom: 15px;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .carousel-indicators button {
    min-width: 70px;
    padding: 8px 10px;
  }
  
  .indicator-label {
    font-size: 0.7rem;
  }
}

/* Enhanced UX and Accessibility Styles */

/* Loading Screen Enhancements */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E88E5, #1565C0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  color: white;
  max-width: 400px;
  padding: 40px;
}

.loading-content h3 {
  margin: 20px 0 10px 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.loading-content p {
  margin: 10px 0 30px 0;
  opacity: 0.9;
  font-size: 1rem;
}

.loading-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loading-progress .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #FFEB3B, #4CAF50);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* User Preferences Panel */
.user-preferences {
  position: fixed;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  z-index: 1040;
  transition: right 0.3s ease;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 15px 0 0 15px;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.user-preferences:hover,
.user-preferences.active {
  right: 0;
}

.preference-toggle {
  width: 45px;
  height: 45px;
  border: none;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  position: relative;
  overflow: hidden;
}

.preference-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(30, 136, 229, 0.4);
}

.preference-toggle.active {
  background: linear-gradient(135deg, var(--secondary-color), #45a049);
  animation: pulse-preference 2s infinite;
}

@keyframes pulse-preference {
  0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  50% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 10000;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  color: white;
}

/* Enhanced Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e1e5e9;
  border-top: none;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
}

.search-suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f8f9fa;
  transition: background-color 0.2s ease;
  font-size: 0.95rem;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus {
  background-color: #f8f9fa;
  color: var(--primary-color);
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

/* Enhanced Emergency Banner */
.emergency-banner {
  background: linear-gradient(90deg, #FF5722, #E64A19);
  color: white;
  padding: 15px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: emergency-pulse 3s infinite;
}

@keyframes emergency-pulse {
  0%, 100% { background: linear-gradient(90deg, #FF5722, #E64A19); }
  50% { background: linear-gradient(90deg, #E64A19, #FF5722); }
}

.emergency-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: emergency-shine 4s infinite;
}

@keyframes emergency-shine {
  0% { left: -100%; }
  100% { left: 100%; }
}

.emergency-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.emergency-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.emergency-text i {
  font-size: 1.3rem;
  animation: ring 2s infinite;
}

@keyframes ring {
  0%, 20%, 50%, 80%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-10deg); }
  30% { transform: rotate(10deg); }
  60% { transform: rotate(-5deg); }
  70% { transform: rotate(5deg); }
}

.emergency-call-btn {
  background: white;
  color: #FF5722;
  padding: 10px 20px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.emergency-call-btn:hover {
  color: #E64A19;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Enhanced Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.3);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, var(--primary-dark), #0d47a1);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 35px rgba(30, 136, 229, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px) scale(1.05);
}

/* Enhanced Feature Cards with Hover Effects */
.feature-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #f8f9fa;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 136, 229, 0.05), transparent);
  transition: left 0.6s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(30, 136, 229, 0.15);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px auto;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--secondary-color), #45a049);
}

.feature-icon i {
  font-size: 2rem;
  color: white;
}

.feature-card h4 {
  color: var(--dark-color);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  z-index: 2;
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  position: relative;
  z-index: 2;
}

.feature-list li {
  padding: 8px 0;
  color: #555;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid #f8f9fa;
  transition: color 0.3s ease;
}

.feature-card:hover .feature-list li {
  color: var(--dark-color);
}

.feature-list li:last-child {
  border-bottom: none;
}

/* Enhanced Treatment Area Cards */
.treatment-area-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #f8f9fa;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.treatment-area-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: 0 20px 40px rgba(30, 136, 229, 0.15);
}

.treatment-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.treatment-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.treatment-area-card:hover .treatment-image img {
  transform: scale(1.05);
}

.treatment-content {
  padding: 30px 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.treatment-content h4 {
  color: var(--dark-color);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.treatment-content p {
  color: #666;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.condition-tags .tag {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.treatment-area-card:hover .condition-tags .tag {
  background: linear-gradient(135deg, var(--secondary-color), #45a049);
  transform: scale(1.05);
}

.treatment-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.treatment-link:hover {
  color: var(--primary-dark);
  transform: translateX(5px);
}

.treatment-link i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.treatment-link:hover i {
  transform: translateX(3px);
}

/* Enhanced Equipment Section */
.equipment-list {
  margin: 30px 0;
}

.equipment-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 30px;
  padding: 25px;
  background: white;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 2px solid #f8f9fa;
  position: relative;
  overflow: hidden;
}

.equipment-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 136, 229, 0.05), transparent);
  transition: left 0.6s ease;
}

.equipment-item:hover::before {
  left: 100%;
}

.equipment-item:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 30px rgba(30, 136, 229, 0.1);
}

.equipment-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.equipment-item:hover .equipment-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, var(--secondary-color), #45a049);
}

.equipment-icon i {
  font-size: 1.5rem;
  color: white;
}

.equipment-info {
  flex-grow: 1;
  position: relative;
  z-index: 2;
}

.equipment-info h5 {
  color: var(--dark-color);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.equipment-info p {
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.equipment-showcase {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  padding: 40px;
  text-align: center;
}

.showcase-image {
  position: relative;
  display: inline-block;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.showcase-image:hover {
  transform: scale(1.02);
}

.showcase-image img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--secondary-color), #45a049);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
  animation: badge-float 3s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.showcase-badge i {
  font-size: 1.1rem;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .loading-spinner {
    animation: none;
    border: 3px solid white;
  }
  
  .emergency-banner::before,
  .emergency-text i,
  .badge-float {
    animation: none;
  }
}

/* High Contrast Mode */
body.high-contrast {
  --primary-color: #000080;
  --primary-dark: #000040;
  --secondary-color: #008000;
  --dark-color: #000000;
  filter: contrast(150%);
}

body.high-contrast .feature-card,
body.high-contrast .treatment-area-card,
body.high-contrast .equipment-item {
  border-width: 3px;
  border-color: #000000;
}

body.high-contrast .btn {
  border-width: 2px !important;
  font-weight: 700 !important;
}

/* Large Font Mode */
body.large-font {
  font-size: 1.1em;
}

body.large-font h1 { font-size: 3rem; }
body.large-font h2 { font-size: 2.5rem; }
body.large-font h3 { font-size: 2rem; }
body.large-font h4 { font-size: 1.6rem; }
body.large-font h5 { font-size: 1.3rem; }

body.large-font .btn {
  padding: 15px 25px;
  font-size: 1.1rem;
}

body.large-font .nav-link {
  font-size: 1.1rem;
}

/* Enhanced Focus Indicators */
*:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus,
.btn:focus,
a:focus {
  outline: 3px solid #FFEB3B;
  outline-offset: 2px;
}

/* Notification Enhancements */
.notification {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.15);
  backdrop-filter: blur(25px);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.notification-success {
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.95), rgba(56, 142, 60, 0.95));
  color: white;
}

.notification-error {
  background: linear-gradient(135deg, rgba(220, 53, 69, 0.95), rgba(183, 28, 28, 0.95));
  color: white;
}

.notification-info {
  background: linear-gradient(135deg, rgba(30, 136, 229, 0.95), rgba(21, 101, 192, 0.95));
  color: white;
}

.notification.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.notification-content i {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.notification-content span {
  flex-grow: 1;
  font-weight: 500;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.4rem;
  padding: 0;
  margin-left: 10px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  transform: scale(1.2);
}

/* Mobile Enhancements */
@media (max-width: 768px) {
  .user-preferences {
    bottom: 20px;
    top: auto;
    right: -55px;
    transform: none;
    flex-direction: row;
    border-radius: 15px 0 0 15px;
    padding: 10px;
  }
  
  .emergency-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .notification {
    top: 80px;
    left: 10px;
    right: 10px;
    max-width: none;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
  
  .scroll-to-top {
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
}

/* MOBILE CAROUSEL UX IMPROVEMENTS */
/* ==================================== */

/* CRITICAL: Mobile carousel height and structure fixes */
@media (max-width: 768px) {
    /* Enhanced carousel height for mobile */
    #hero-carousel {
        margin-top: var(--mobile-header-height) !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: none !important;
        position: relative;
        overflow: hidden;
    }
    
    .carousel-item {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: none !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 20px 0;
        box-sizing: border-box;
    }
    
    /* FIXED: Show mobile forms, hide desktop content */
    .desktop-content-form {
        display: none !important;
        visibility: hidden !important;
    }
    
    .mobile-only-form {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Enhanced mobile appointment container */
    .mobile-appointment-container {
        width: 100%;
        max-width: 420px;
        height: auto;
        min-height: 80vh;
        margin: 0 auto;
        padding: 60px 20px 40px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    
    /* ENHANCED: Mobile form styling with better visibility */
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        width: 100%;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: 24px !important;
        padding: 35px 28px 40px 28px !important;
        box-shadow: 
            0 30px 60px rgba(0, 0, 0, 0.25),
            0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
        position: relative;
        overflow: visible !important;
        animation: slideInUp 0.8s ease-out;
        min-height: auto;
        display: flex;
        flex-direction: column;
    }
    
    /* Form shadow/glow effect for better visibility */
    .mobile-form-primary::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        background: linear-gradient(135deg, #1E88E5, #43A047, #FF9800, #F44336);
        border-radius: 28px;
        z-index: -1;
        opacity: 0.15;
        filter: blur(8px);
    }
    
    .mobile-form-secondary::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        background: linear-gradient(135deg, #43A047, #4CAF50);
        border-radius: 28px;
        z-index: -1;
        opacity: 0.15;
        filter: blur(8px);
    }
    
    .mobile-form-tertiary::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        background: linear-gradient(135deg, #FF9800, #FF5722);
        border-radius: 28px;
        z-index: -1;
        opacity: 0.15;
        filter: blur(8px);
    }
    
    .mobile-form-quaternary::before {
        content: '';
        position: absolute;
        top: -4px;
        left: -4px;
        right: -4px;
        bottom: -4px;
        background: linear-gradient(135deg, #F44336, #E91E63);
        border-radius: 28px;
        z-index: -1;
        opacity: 0.15;
        filter: blur(8px);
    }
    
    /* Enhanced form headers */
    .mobile-form-header {
        text-align: center;
        margin-bottom: 30px;
        position: relative;
        z-index: 2;
    }
    
    .mobile-form-header .form-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 70px;
        border-radius: 50%;
        margin-bottom: 20px;
        font-size: 28px;
        color: white;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        position: relative;
        overflow: hidden;
    }
    
    .mobile-form-primary .form-icon {
        background: linear-gradient(135deg, #1E88E5, #1565C0);
    }
    
    .mobile-form-secondary .form-icon {
        background: linear-gradient(135deg, #43A047, #2E7D32);
    }
    
    .mobile-form-tertiary .form-icon {
        background: linear-gradient(135deg, #FF9800, #F57C00);
    }
    
    .mobile-form-quaternary .form-icon {
        background: linear-gradient(135deg, #F44336, #D32F2F);
    }
    
    .mobile-form-header h3 {
        color: #333 !important;
        font-size: 1.6rem;
        font-weight: 800;
        margin-bottom: 12px;
        line-height: 1.3;
        letter-spacing: -0.02em;
    }
    
    .mobile-form-header p {
        color: #666 !important;
        font-size: 1rem;
        margin-bottom: 0;
        font-weight: 500;
        opacity: 0.9;
        line-height: 1.4;
    }
    
    /* ENHANCED: Mobile form controls with better visibility */
    .mobile-appointment-form {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 18px;
        position: relative;
        z-index: 2;
        flex-grow: 1;
    }
    
    .mobile-form-row {
        display: flex;
        gap: 12px;
        margin-bottom: 0;
        width: 100%;
    }
    
    .mobile-form-control {
        flex: 1;
        padding: 16px 18px;
        border: 2px solid #E8EAF0;
        border-radius: 16px;
        font-size: 1rem;
        font-weight: 500;
        background: #FAFBFC;
        color: #333;
        min-height: 56px;
        width: 100%;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 
            inset 0 1px 3px rgba(0, 0, 0, 0.06),
            0 1px 4px rgba(0, 0, 0, 0.08);
        font-family: inherit;
        line-height: 1.4;
        box-sizing: border-box;
    }
    
    .mobile-form-control:focus {
        outline: none;
        border-color: #1E88E5;
        background: #FFFFFF;
        box-shadow: 
            0 0 0 4px rgba(30, 136, 229, 0.12),
            0 4px 12px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }
    
    .mobile-form-control:hover {
        border-color: #1E88E5;
        background: #FFFFFF;
        transform: translateY(-1px);
    }
    
    .mobile-form-control::placeholder {
        color: #9CA3AF;
        font-size: 0.95rem;
        font-weight: 400;
    }
    
    /* Enhanced select dropdown styling */
    select.mobile-form-control {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 16px center;
        background-repeat: no-repeat;
        background-size: 16px 12px;
        padding-right: 50px;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
    }
    
    /* ENHANCED: Submit buttons with maximum visibility */
    .mobile-submit-btn {
        width: 100% !important;
        padding: 18px 24px !important;
        border: none !important;
        border-radius: 16px !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
        color: white !important;
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
        min-height: 60px !important;
        position: relative !important;
        overflow: hidden !important;
        text-transform: none !important;
        letter-spacing: 0.02em !important;
        /* CRITICAL: Force visibility */
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
    }
    
    .mobile-submit-primary {
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
    }
    
    .mobile-submit-secondary {
        background: linear-gradient(135deg, #43A047, #2E7D32) !important;
    }
    
    .mobile-submit-tertiary {
        background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    }
    
    .mobile-submit-quaternary {
        background: linear-gradient(135deg, #F44336, #D32F2F) !important;
    }
    
    /* Button hover states */
    .mobile-submit-btn:hover {
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25) !important;
    }
    
    .mobile-submit-btn:active {
        transform: translateY(-1px) scale(1.01) !important;
    }
    
    .mobile-submit-btn i {
        font-size: 1.3rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Loading state */
    .mobile-submit-btn.loading {
        opacity: 0.8 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
    }
    
    .mobile-submit-btn.loading::after {
        content: '';
        width: 20px;
        height: 20px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-left: 8px;
    }
    
    /* ENHANCED: Mobile navigation controls */
    .carousel-indicators {
        bottom: 25px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 8px !important;
        justify-content: center !important;
        width: auto !important;
        background: rgba(0, 0, 0, 0.3) !important;
        padding: 12px 20px !important;
        border-radius: 25px !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 12px !important;
        height: 12px !important;
        border-radius: 50% !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border: none !important;
        opacity: 0.7 !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        text-indent: -9999px !important;
        overflow: hidden !important;
    }
    
    .carousel-indicators [data-bs-target].active {
        background: #FFFFFF !important;
        opacity: 1 !important;
        transform: scale(1.4) !important;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
    }
    
    .carousel-indicators [data-bs-target]:hover {
        background: rgba(255, 255, 255, 0.8) !important;
        opacity: 0.9 !important;
        transform: scale(1.2) !important;
    }
    
    /* Hide indicator labels on mobile for cleaner look */
    .indicator-label {
        display: none !important;
    }
    
    .indicator-progress {
        display: none !important;
    }
    
    /* ENHANCED: Mobile carousel controls */
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px !important;
        height: 50px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border: 2px solid rgba(255, 255, 255, 0.8) !important;
        border-radius: 50% !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1000 !important;
        opacity: 0.9 !important;
        margin-top: -60px !important; /* Adjust for mobile header */
    }
    
    .carousel-control-prev {
        left: 20px !important;
    }
    
    .carousel-control-next {
        right: 20px !important;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        background: none !important;
        width: auto !important;
        height: auto !important;
        color: #333 !important;
        font-size: 1.4rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .carousel-control-prev:hover,
    .carousel-control-next:hover {
        background: #1E88E5 !important;
        border-color: #1E88E5 !important;
        opacity: 1 !important;
        transform: translateY(-50%) scale(1.1) !important;
        box-shadow: 0 12px 35px rgba(30, 136, 229, 0.4) !important;
    }
    
    .carousel-control-prev:hover .carousel-control-prev-icon,
    .carousel-control-next:hover .carousel-control-next-icon {
        color: white !important;
    }
    
    /* Enhanced progress bar for mobile */
    .carousel-progress {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 4px !important;
        background: rgba(0, 0, 0, 0.2) !important;
        z-index: 1000 !important;
        overflow: hidden !important;
    }
    
    .carousel-progress .progress-bar {
        height: 100% !important;
        width: 0% !important;
        background: linear-gradient(90deg, #1E88E5, #43A047, #FF9800, #F44336) !important;
        transition: width 6s linear !important;
        box-shadow: 0 0 10px rgba(30, 136, 229, 0.5) !important;
    }
    
    /* Form validation styles for mobile */
    .mobile-form-control:invalid:not(:placeholder-shown) {
        border-color: #F44336 !important;
        background: rgba(244, 67, 54, 0.05) !important;
        box-shadow: 0 0 0 4px rgba(244, 67, 54, 0.1) !important;
    }
    
    .mobile-form-control:valid:not(:placeholder-shown) {
        border-color: #43A047 !important;
        background: rgba(67, 160, 71, 0.05) !important;
        box-shadow: 0 0 0 4px rgba(67, 160, 71, 0.1) !important;
    }
    
    /* Success state for mobile forms */
    .mobile-form-success {
        background: rgba(67, 160, 71, 0.95) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        color: white !important;
        text-align: center !important;
        padding: 50px 30px !important;
        border-radius: 24px !important;
        animation: successPulse 0.8s ease-out !important;
        box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25) !important;
    }
    
    .mobile-form-success .success-icon {
        font-size: 60px !important;
        margin-bottom: 20px !important;
        display: block !important;
        animation: successBounce 0.6s ease-out !important;
    }
    
    .mobile-form-success h3 {
        color: white !important;
        margin-bottom: 15px !important;
        font-size: 1.5rem !important;
        font-weight: 700 !important;
    }
    
    .mobile-form-success p {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}

/* TABLET SPECIFIC IMPROVEMENTS (769px to 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .mobile-appointment-container {
        max-width: 500px;
        padding: 80px 30px 50px 30px;
    }
    
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        padding: 40px 35px 45px 35px !important;
    }
    
    .mobile-form-header h3 {
        font-size: 1.8rem;
    }
    
    .mobile-form-control {
        padding: 18px 20px;
        font-size: 1.05rem;
        min-height: 58px;
    }
    
    .mobile-submit-btn {
        padding: 20px 28px !important;
        font-size: 1.15rem !important;
        min-height: 64px !important;
    }
}

/* SMALL MOBILE DEVICES (480px and below) */
@media (max-width: 480px) {
    .mobile-appointment-container {
        max-width: 360px;
        padding: 40px 15px 30px 15px;
    }
    
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        padding: 30px 22px 35px 22px !important;
        border-radius: 20px !important;
    }
    
    .mobile-form-header .form-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
        margin-bottom: 16px;
    }
    
    .mobile-form-header h3 {
        font-size: 1.4rem;
    }
    
    .mobile-form-header p {
        font-size: 0.9rem;
    }
    
    .mobile-form-control {
        padding: 14px 16px;
        font-size: 0.95rem;
        min-height: 52px;
        border-radius: 14px;
    }
    
    .mobile-submit-btn {
        padding: 16px 22px !important;
        font-size: 1rem !important;
        min-height: 56px !important;
        border-radius: 14px !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px !important;
        height: 45px !important;
    }
    
    .carousel-control-prev {
        left: 15px !important;
    }
    
    .carousel-control-next {
        right: 15px !important;
    }
    
    .carousel-indicators {
        bottom: 20px !important;
        padding: 10px 16px !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px !important;
        height: 10px !important;
    }
}

/* EXTRA SMALL DEVICES (360px and below) */
@media (max-width: 360px) {
    .mobile-appointment-container {
        max-width: 340px;
        padding: 30px 12px 25px 12px;
    }
    
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        padding: 25px 18px 30px 18px !important;
    }
    
    .mobile-form-header h3 {
        font-size: 1.3rem;
    }
    
    .mobile-form-control {
        padding: 12px 14px;
        font-size: 0.9rem;
        min-height: 48px;
    }
    
    .mobile-submit-btn {
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
        min-height: 52px !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px !important;
        height: 45px !important;
    }
    
    .carousel-control-prev {
        left: 15px !important;
    }
    
    .carousel-control-next {
        right: 15px !important;
    }
    
    .carousel-indicators {
        bottom: 20px !important;
        padding: 10px 16px !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px !important;
        height: 10px !important;
    }
}

/* ANIMATIONS FOR MOBILE */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes successPulse {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes successBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ACCESSIBILITY ENHANCEMENTS FOR MOBILE */
@media (max-width: 768px) {
    /* Enhanced focus indicators */
    .mobile-form-control:focus {
        outline: 3px solid #1E88E5 !important;
        outline-offset: 2px !important;
    }
    
    .mobile-submit-btn:focus {
        outline: 3px solid #FFEB3B !important;
        outline-offset: 2px !important;
    }
    
    .carousel-control-prev:focus,
    .carousel-control-next:focus {
        outline: 3px solid #1E88E5 !important;
        outline-offset: 2px !important;
    }
    
    /* Better touch targets */
    .carousel-indicators [data-bs-target] {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 16px !important;
    }
    
    .mobile-submit-btn {
        min-height: 56px !important; /* Minimum touch target size */
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) {
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        animation: none !important;
    }
    
    .mobile-submit-btn:hover {
        transform: none !important;
    }
    
    .carousel-progress .progress-bar {
        transition: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) {
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        background: #FFFFFF !important;
        border: 3px solid #000000 !important;
        color: #000000 !important;
    }
    
    .mobile-form-control {
        background: #FFFFFF !important;
        border: 2px solid #000000 !important;
        color: #000000 !important;
    }
    
    .mobile-submit-btn {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 2px solid #000000 !important;
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        background: rgba(30, 30, 30, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .mobile-form-header h3 {
        color: #FFFFFF !important;
    }
    
    .mobile-form-header p {
        color: #CCCCCC !important;
    }
    
    .mobile-form-control {
        background: rgba(40, 40, 40, 0.9) !important;
        border-color: #555555 !important;
        color: #FFFFFF !important;
    }
    
    .mobile-form-control::placeholder {
        color: #AAAAAA !important;
    }
}

/* PRINT STYLES FOR MOBILE FORMS */
@media print {
    #hero-carousel,
    .mobile-only-form,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none !important;
    }
}

/* EMERGENCY OVERRIDE STYLES */
/* These styles ensure forms are always visible and functional */
.mobile-appointment-form,
.mobile-form-primary,
.mobile-form-secondary,
.mobile-form-tertiary,
.mobile-form-quaternary {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
}

.mobile-submit-btn,
button[type="submit"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure no CSS can hide critical form elements */
.d-none.mobile-submit-btn,
.d-none.mobile-form-control {
    display: flex !important;
}

.hidden.mobile-submit-btn,
.hidden.mobile-form-control {
    visibility: visible !important;
    opacity: 1 !important;
}

/* MOBILE CAROUSEL - COMPLETE UI FIX */
/* ================================== */

/* Reset and clean mobile-only styles */
@media (max-width: 768px) {
    /* CRITICAL: Reset all carousel styling for mobile */
    #hero-carousel {
        margin-top: 60px !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        position: relative !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        padding: 0 !important;
        border: none !important;
    }
    
    /* FORCE: Hide ALL desktop content completely */
    .desktop-content-form,
    .carousel-caption,
    .slide-content,
    .carousel-item .container,
    .carousel-item .row,
    .carousel-item .col-lg-7,
    .carousel-item .col-lg-5:not(.mobile-only-form *) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* FORCE: Show ONLY mobile forms */
    .mobile-only-form {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100vh !important;
        position: relative !important;
        background: none !important;
        padding: 0 !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Clean carousel items for mobile */
    .carousel-item {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        position: relative !important;
        overflow: hidden !important;
        border: none !important;
    }
    
    /* Remove all carousel item backgrounds and overlays */
    .carousel-item::before,
    .carousel-item::after,
    .carousel-item img {
        display: none !important;
    }
    
    /* Mobile appointment container - perfectly centered */
    .mobile-appointment-container {
        width: 100% !important;
        max-width: 380px !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 auto !important;
        padding: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Clean mobile form containers */
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        width: 100% !important;
        max-width: 360px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 20px !important;
        padding: 25px 20px 30px 20px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
        position: relative !important;
        overflow: visible !important;
        animation: mobileSlideIn 0.5s ease-out !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 480px !important;
        max-height: 90vh !important;
    }
    
    /* Remove any pseudo elements that might interfere */
    .mobile-form-primary::before,
    .mobile-form-secondary::before,
    .mobile-form-tertiary::before,
    .mobile-form-quaternary::before,
    .mobile-form-primary::after,
    .mobile-form-secondary::after,
    .mobile-form-tertiary::after,
    .mobile-form-quaternary::after {
        display: none !important;
    }
    
    /* Clean form headers */
    .mobile-form-header {
        text-align: center !important;
        margin-bottom: 20px !important;
        position: relative !important;
        z-index: 2 !important;
        flex-shrink: 0 !important;
    }
    
    .mobile-form-header .form-icon {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        margin-bottom: 12px !important;
        font-size: 20px !important;
        color: white !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    }
    
    .mobile-form-primary .form-icon {
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
    }
    
    .mobile-form-secondary .form-icon {
        background: linear-gradient(135deg, #43A047, #2E7D32) !important;
    }
    
    .mobile-form-tertiary .form-icon {
        background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    }
    
    .mobile-form-quaternary .form-icon {
        background: linear-gradient(135deg, #F44336, #D32F2F) !important;
    }
    
    .mobile-form-header h3 {
        color: #333 !important;
        font-size: 1.3rem !important;
        font-weight: 700 !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }
    
    .mobile-form-header p {
        color: #666 !important;
        font-size: 0.85rem !important;
        margin-bottom: 0 !important;
        font-weight: 500 !important;
        opacity: 0.9 !important;
    }
    
    /* Clean form structure */
    .mobile-appointment-form {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        position: relative !important;
        z-index: 2 !important;
        flex-grow: 1 !important;
    }
    
    .mobile-form-row {
        display: flex !important;
        gap: 8px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    
    /* Clean form controls */
    .mobile-form-control {
        flex: 1 !important;
        padding: 12px 14px !important;
        border: 1px solid #DDD !important;
        border-radius: 10px !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        background: #FAFAFA !important;
        color: #333 !important;
        min-height: 44px !important;
        width: 100% !important;
        transition: all 0.2s ease !important;
        font-family: inherit !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
        outline: none !important;
    }
    
    .mobile-form-control:focus {
        border-color: #1E88E5 !important;
        background: #FFFFFF !important;
        box-shadow: 0 0 0 2px rgba(30, 136, 229, 0.1) !important;
    }
    
    .mobile-form-control::placeholder {
        color: #999 !important;
        font-size: 0.85rem !important;
        font-weight: 400 !important;
    }
    
    /* Select dropdown styling */
    select.mobile-form-control {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 12px center !important;
        background-repeat: no-repeat !important;
        background-size: 12px 8px !important;
        padding-right: 35px !important;
        cursor: pointer !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    /* Textarea styling */
    textarea.mobile-form-control {
        resize: none !important;
        min-height: 60px !important;
        font-family: inherit !important;
    }
    
    /* Clean submit buttons */
    .mobile-submit-btn {
        width: 100% !important;
        padding: 14px 20px !important;
        border: none !important;
        border-radius: 10px !important;
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: white !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        margin-top: 15px !important;
        margin-bottom: 0 !important;
        min-height: 48px !important;
        position: relative !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        /* CRITICAL: Force visibility */
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        flex-shrink: 0 !important;
        order: 9999 !important;
        outline: none !important;
    }
    
    .mobile-submit-primary {
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
    }
    
    .mobile-submit-secondary {
        background: linear-gradient(135deg, #43A047, #2E7D32) !important;
    }
    
    .mobile-submit-tertiary {
        background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    }
    
    .mobile-submit-quaternary {
        background: linear-gradient(135deg, #F44336, #D32F2F) !important;
    }
    
    .mobile-submit-btn:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    }
    
    .mobile-submit-btn:active {
        transform: translateY(0) !important;
    }
    
    .mobile-submit-btn i {
        font-size: 1rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Clean mobile indicators */
    .carousel-indicators {
        bottom: 15px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 6px 12px !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 4px !important;
        justify-content: center !important;
        width: auto !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 15px !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px !important;
        height: 8px !important;
        border-radius: 50% !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.5) !important;
        border: none !important;
        opacity: 0.7 !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        text-indent: -9999px !important;
        overflow: hidden !important;
        outline: none !important;
    }
    
    .carousel-indicators [data-bs-target].active {
        background: #FFFFFF !important;
        opacity: 1 !important;
        transform: scale(1.2) !important;
    }
    
    /* Hide all complex carousel elements */
    .indicator-label,
    .indicator-progress,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-controls,
    .carousel-progress,
    .carousel-play-pause {
        display: none !important;
    }
    
    /* Clean animation */
    @keyframes mobileSlideIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Form validation styling */
    .mobile-form-control:invalid:not(:placeholder-shown) {
        border-color: #F44336 !important;
        background: rgba(244, 67, 54, 0.05) !important;
    }
    
    .mobile-form-control:valid:not(:placeholder-shown) {
        border-color: #43A047 !important;
        background: rgba(67, 160, 71, 0.05) !important;
    }
    
    /* Emergency note styling */
    .emergency-note {
        margin-top: 10px !important;
        padding: 8px !important;
        background: rgba(255, 152, 0, 0.1) !important;
        border-radius: 6px !important;
        text-align: center !important;
        font-size: 0.75rem !important;
        color: #E65100 !important;
        border: 1px solid rgba(255, 152, 0, 0.2) !important;
    }
    
    /* Success state */
    .mobile-form-success {
        background: rgba(67, 160, 71, 0.95) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        color: white !important;
        text-align: center !important;
        padding: 30px 20px !important;
        border-radius: 20px !important;
        animation: successPulse 0.5s ease-out !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
    }
    
    .mobile-form-success .success-icon {
        font-size: 40px !important;
        margin-bottom: 12px !important;
        display: block !important;
    }
    
    .mobile-form-success h3 {
        color: white !important;
        margin-bottom: 8px !important;
        font-size: 1.2rem !important;
    }
    
    .mobile-form-success p {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 0.85rem !important;
    }
    
    /* Loading state */
    .mobile-submit-btn.loading {
        opacity: 0.7 !important;
        cursor: not-allowed !important;
        pointer-events: none !important;
    }
    
    .mobile-submit-btn.loading::after {
        content: '';
        width: 16px;
        height: 16px;
        border: 2px solid transparent;
        border-top: 2px solid white;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-left: 6px;
    }
}

/* Extra small devices (up to 480px) */
@media (max-width: 480px) {
    .mobile-appointment-container {
        max-width: 340px !important;
        padding: 15px !important;
    }
    
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        padding: 20px 16px 25px 16px !important;
        border-radius: 16px !important;
        min-height: 450px !important;
    }
    
    .mobile-form-header h3 {
        font-size: 1.2rem !important;
    }
    
    .mobile-form-control {
        padding: 10px 12px !important;
        font-size: 0.85rem !important;
        min-height: 46px !important;
    }
    
    .mobile-submit-btn {
        padding: 14px 18px !important;
        font-size: 0.95rem !important;
        min-height: 50px !important;
    }
    
    .mobile-form-header .form-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
}

/* Very small devices (up to 360px) */
@media (max-width: 360px) {
    .mobile-appointment-container {
        max-width: 300px !important;
        padding: 12px !important;
    }
    
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        max-width: 280px !important;
        padding: 18px 14px 22px 14px !important;
        min-height: 420px !important;
    }
    
    .mobile-form-header h3 {
        font-size: 1.1rem !important;
    }
    
    .mobile-form-control {
        padding: 9px 10px !important;
        font-size: 0.8rem !important;
        min-height: 38px !important;
    }
    
    .mobile-submit-btn {
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
        min-height: 40px !important;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px !important;
        height: 45px !important;
    }
    
    .carousel-control-prev {
        left: 15px !important;
    }
    
    .carousel-control-next {
        right: 15px !important;
    }
    
    .carousel-indicators {
        bottom: 20px !important;
        padding: 10px 16px !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px !important;
        height: 10px !important;
    }
}

/* Accessibility fixes */
@media (max-width: 768px) {
    .mobile-form-control:focus {
        outline: 2px solid #1E88E5 !important;
        outline-offset: 1px !important;
    }
    
    .mobile-submit-btn:focus {
        outline: 2px solid #FFEB3B !important;
        outline-offset: 1px !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) and (max-width: 768px) {
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        background: #FFFFFF !important;
        border: 2px solid #000000 !important;
        color: #000000 !important;
    }
    
    .mobile-form-control {
        background: #FFFFFF !important;
        border: 2px solid #000000 !important;
        color: #000000 !important;
    }
    
    .mobile-submit-btn {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 2px solid #000000 !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary {
        animation: none !important;
    }
    
    .mobile-submit-btn:hover {
        transform: none !important;
    }
    
    .carousel-progress .progress-bar {
        transition: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Force visibility overrides */
@media (max-width: 768px) {
    .mobile-appointment-form,
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary,
    .mobile-submit-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .mobile-submit-btn,
    button[type="submit"] {
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    .d-none.mobile-submit-btn,
    .d-none.mobile-form-control {
        display: flex !important;
    }
    
    .hidden.mobile-submit-btn,
    .hidden.mobile-form-control {
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes successPulse {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===================================
   UNIFIED RESPONSIVE APPOINTMENT FORM
   =================================== */

.unified-appointment-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.unified-appointment-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1E88E5, #1565C0, #0D47A1);
    border-radius: 20px 20px 0 0;
}

.unified-appointment-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.form-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 25px rgba(30, 136, 229, 0.3);
    animation: pulse 2s infinite;
}

.form-icon i {
    font-size: 1.5rem;
    color: white;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.form-header h3 {
    color: #1565C0;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.form-header p {
    color: #666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.form-step.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.back-btn {
    background: none;
    border: none;
    color: #1565C0;
    font-size: 1.2rem;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.back-btn:hover {
    background: rgba(21, 101, 192, 0.1);
    transform: translateX(-3px);
}

.step-header h4 {
    margin: 0;
    color: #1565C0;
    font-weight: 600;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    box-shadow: none;
}

.form-control:focus {
    border-color: #1E88E5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Input Group */
.input-group {
    position: relative;
    display: flex;
}

.input-group-text {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 12px 0 0 12px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #1565C0;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 12px 12px 0;
}

.input-group:focus-within .input-group-text {
    border-color: #1E88E5;
    background: rgba(30, 136, 229, 0.05);
}

/* Form Row for Side-by-Side Inputs */
.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

/* Select Styling */
select.form-control {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23666' d='m2 0-2 2h4zm0 5 2-2h-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    appearance: none;
}

/* Textarea Styling */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
    max-height: 120px;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #1E88E5, #1565C0);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565C0, #0D47A1);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(30, 136, 229, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.4);
}

.btn i {
    margin-right: 0.5rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.w-100 {
    width: 100% !important;
}

/* Form Footer */
.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 25px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.security-badge i {
    color: #28a745;
}

/* Validation Feedback */
.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Loading State */
.form-loading {
    pointer-events: none;
    opacity: 0.7;
}

.form-loading .btn {
    position: relative;
}

.form-loading .btn::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid rgba(30, 136, 229, 0.3);
    border-top: 2px solid #1E88E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Mobile Devices (576px and down) */
@media (max-width: 575.98px) {
    .unified-appointment-form {
        padding: 1.5rem;
        border-radius: 15px;
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .form-header h3 {
        font-size: 1.3rem;
    }
    
    .form-icon {
        width: 50px;
        height: 50px;
    }
    
    .form-icon i {
        font-size: 1.3rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control {
        padding: 0.7rem 0.9rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 1.25rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.05rem;
    }
    
    .step-header {
        margin-bottom: 1.25rem;
    }
    
    .back-btn {
        width: 35px;
        height: 35px;
        margin-right: 0.75rem;
    }
    
    /* Touch-friendly spacing */
    .form-control, .btn {
        min-height: 48px; /* Accessibility guideline for touch targets */
    }
}

/* Small Tablets (576px to 767.98px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .unified-appointment-form {
        padding: 1.75rem;
        max-width: 500px;
    }
    
    .form-row {
        gap: 0.75rem;
    }
    
    .form-control {
        font-size: 15px;
    }
}

/* Medium Devices (768px to 991.98px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .unified-appointment-form {
        padding: 2rem;
        max-width: 100%;
    }
    
    .form-row {
        gap: 1rem;
    }
    
    /* Carousel context adjustments */
    .carousel-item .unified-appointment-form {
        max-width: 450px;
    }
}

/* Large Devices (992px to 1199.98px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .unified-appointment-form {
        padding: 2rem;
        max-width: 100%;
    }
    
    .carousel-item .unified-appointment-form {
        max-width: 420px;
    }
}

/* Extra Large Devices (1200px and up) */
@media (min-width: 1200px) {
    .unified-appointment-form {
        padding: 2.5rem;
        max-width: 100%;
    }
    
    .carousel-item .unified-appointment-form {
        max-width: 450px;
    }
    
    .form-header h3 {
        font-size: 1.6rem;
    }
    
    .form-icon {
        width: 65px;
        height: 65px;
    }
    
    .form-icon i {
        font-size: 1.6rem;
    }
}

/* ===================================
   CAROUSEL SPECIFIC ADJUSTMENTS
   =================================== */

.carousel-item .unified-appointment-form {
    position: relative;
    z-index: 2;
}

/* Hide form on slides 2, 3, 4 - show only on slide 1 */
.carousel-item:not(.active) .unified-appointment-form {
    display: none;
}

.carousel-item.active .unified-appointment-form {
    display: block;
}

/* ===================================
   ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .unified-appointment-form {
        border: 3px solid #000;
        background: #fff;
    }
    
    .form-control {
        border: 2px solid #000;
    }
    
    .form-control:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px #000;
    }
    
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-success {
        background: #006600;
        border: 2px solid #006600;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .unified-appointment-form,
    .form-step,
    .form-control,
    .btn,
    .form-icon {
        transition: none;
        animation: none;
    }
    
    .unified-appointment-form:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Focus management for keyboard navigation */
.unified-appointment-form:focus-within {
    box-shadow: 0 25px 80px rgba(30, 136, 229, 0.2);
}

.form-control:focus,
.btn:focus {
    outline: 2px solid #1E88E5;
    outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================================
   FORM INTERACTION STATES
   =================================== */

/* Loading overlay for form submission */
.form-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    z-index: 10;
}

.form-overlay.active {
    display: flex;
}

.form-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(30, 136, 229, 0.3);
    border-top: 3px solid #1E88E5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success state */
.form-success {
    text-align: center;
    padding: 2rem;
    color: #28a745;
}

.form-success i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.form-success h4 {
    color: #28a745;
    margin-bottom: 1rem;
}

/* Error state */
.form-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #dc3545;
    font-size: 0.9rem;
}

.form-error i {
    margin-right: 0.5rem;
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* GPU acceleration for smooth animations */
.unified-appointment-form,
.form-control,
.btn {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize rendering for mobile */
@media (max-width: 767.98px) {
    .unified-appointment-form {
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
    }
}

/* ========================================
   MOBILE CAROUSEL - COMPLETE VISIBILITY FIX
   ======================================== */

/* CRITICAL: Mobile carousel base structure */
@media (max-width: 768px) {
    /* FORCE: Reset all carousel styling for mobile */
    #hero-carousel {
        margin-top: var(--mobile-header-height) !important;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        position: relative !important;
        overflow: hidden !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        padding: 0 !important;
        border: none !important;
        box-sizing: border-box !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Clean carousel inner structure */
    .carousel-inner {
        height: 100vh !important;
        width: 100% !important;
        position: relative !important;
        display: flex !important;
        align-items: stretch !important;
    }
    
    /* Perfect mobile carousel items */
    .carousel-item {
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 0 !important;
        margin: 0 !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        position: relative !important;
        overflow: hidden !important;
        border: none !important;
        box-sizing: border-box !important;
    }
    
    /* FORCE: Remove all desktop content completely */
    .carousel-item .carousel-content-wrapper,
    .carousel-item .carousel-background,
    .carousel-item .carousel-overlay,
    .carousel-item .container,
    .carousel-item .row,
    .carousel-item .col-lg-6,
    .carousel-item .col-lg-7,
    .carousel-item .col-md-7,
    .carousel-item .hero-content,
    .carousel-item .slide-content,
    .carousel-item .hero-badge,
    .carousel-item .hero-title,
    .carousel-item .hero-description,
    .carousel-item .hero-features,
    .carousel-item .hero-actions,
    .carousel-item .success-stats {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* FORCE: Remove all background images and overlays */
    .carousel-item::before,
    .carousel-item::after,
    .carousel-item img,
    .carousel-background,
    .carousel-background img,
    .carousel-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* FORCE: Show ONLY the unified appointment form */
    .carousel-item .col-lg-5,
    .carousel-item .col-md-5 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100vh !important;
        max-width: 100% !important;
        flex: none !important;
        position: relative !important;
        background: none !important;
        padding: 20px 15px !important;
        margin: 0 !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        z-index: 10 !important;
    }
    
    /* ENHANCED: Mobile unified form container */
    .unified-appointment-form {
        width: 100% !important;
        max-width: 400px !important;
        min-height: 500px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(25px) !important;
        -webkit-backdrop-filter: blur(25px) !important;
        border: 2px solid rgba(255, 255, 255, 0.5) !important;
        border-radius: 24px !important;
        padding: 30px 25px 35px 25px !important;
        box-shadow: 
            0 30px 80px rgba(0, 0, 0, 0.25),
            0 0 0 1px rgba(255, 255, 255, 0.3) inset !important;
        position: relative !important;
        overflow: visible !important;
        animation: mobileFormSlideIn 0.8s ease-out !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 20 !important;
    }
    
    /* Enhanced form gradient border effect */
    .unified-appointment-form::before {
        content: '' !important;
        position: absolute !important;
        top: -2px !important;
        left: -2px !important;
        right: -2px !important;
        bottom: -2px !important;
        background: linear-gradient(135deg, #1E88E5, #43A047, #FF9800, #F44336) !important;
        border-radius: 26px !important;
        z-index: -1 !important;
        opacity: 0.3 !important;
        filter: blur(4px) !important;
    }
    
    /* Clean form header */
    .unified-appointment-form .form-header {
        text-align: center !important;
        margin-bottom: 25px !important;
        position: relative !important;
        z-index: 2 !important;
        flex-shrink: 0 !important;
    }
    
    .unified-appointment-form .form-icon {
        width: 60px !important;
        height: 60px !important;
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 15px !important;
        box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4) !important;
        animation: pulse 2s infinite !important;
    }
    
    .unified-appointment-form .form-icon i {
        font-size: 24px !important;
        color: white !important;
    }
    
    .unified-appointment-form .form-header h3 {
        color: #1565C0 !important;
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        margin-bottom: 8px !important;
        line-height: 1.3 !important;
    }
    
    .unified-appointment-form .form-header p {
        color: #666 !important;
        font-size: 0.9rem !important;
        margin-bottom: 0 !important;
        font-weight: 500 !important;
        opacity: 0.9 !important;
    }
    
    /* ENHANCED: Mobile form structure */
    .unified-appointment-form .appointment-form {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        position: relative !important;
        z-index: 2 !important;
        flex-grow: 1 !important;
        justify-content: space-between !important;
    }
    
    /* Form steps management */
    .unified-appointment-form .form-step {
        display: none !important;
        flex-direction: column !important;
        gap: 16px !important;
        flex-grow: 1 !important;
    }
    
    .unified-appointment-form .form-step.active {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Step header styling */
    .unified-appointment-form .step-header {
        display: flex !important;
        align-items: center !important;
        margin-bottom: 15px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .unified-appointment-form .back-btn {
        background: none !important;
        border: none !important;
        color: #1565C0 !important;
        font-size: 18px !important;
        padding: 8px !important;
        margin-right: 10px !important;
        border-radius: 50% !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        height: 36px !important;
    }
    
    .unified-appointment-form .back-btn:hover {
        background: rgba(21, 101, 192, 0.1) !important;
        transform: translateX(-2px) !important;
    }
    
    .unified-appointment-form .step-header h4 {
        margin: 0 !important;
        color: #1565C0 !important;
        font-weight: 600 !important;
        font-size: 1.1rem !important;
    }
    
    /* ENHANCED: Mobile form controls */
    .unified-appointment-form .form-group {
        margin-bottom: 16px !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }
    
    .unified-appointment-form .form-label {
        font-weight: 600 !important;
        color: #333 !important;
        margin-bottom: 6px !important;
        display: block !important;
        font-size: 0.9rem !important;
    }
    
    .unified-appointment-form .form-control {
        border: 2px solid #e0e0e0 !important;
        border-radius: 12px !important;
        padding: 14px 16px !important;
        font-size: 16px !important; /* Prevents iOS zoom */
        font-weight: 500 !important;
        background: white !important;
        color: #333 !important;
        width: 100% !important;
        min-height: 50px !important;
        transition: all 0.3s ease !important;
        box-shadow: 
            inset 0 1px 3px rgba(0, 0, 0, 0.06),
            0 1px 3px rgba(0, 0, 0, 0.08) !important;
        font-family: inherit !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    .unified-appointment-form .form-control:focus {
        border-color: #1E88E5 !important;
        background: white !important;
        box-shadow: 
            0 0 0 3px rgba(30, 136, 229, 0.15),
            0 3px 10px rgba(0, 0, 0, 0.1) !important;
        outline: none !important;
        transform: translateY(-1px) !important;
    }
    
    .unified-appointment-form .form-control:hover {
        border-color: #1E88E5 !important;
    }
    
    .unified-appointment-form .form-control::placeholder {
        color: #999 !important;
        font-size: 0.9rem !important;
        font-weight: 400 !important;
    }
    
    /* Input group styling */
    .unified-appointment-form .input-group {
        position: relative !important;
        display: flex !important;
        width: 100% !important;
    }
    
    .unified-appointment-form .input-group-text {
        background: #f8f9fa !important;
        border: 2px solid #e0e0e0 !important;
        border-right: none !important;
        border-radius: 12px 0 0 12px !important;
        padding: 14px 16px !important;
        font-weight: 600 !important;
        color: #1565C0 !important;
        font-size: 16px !important;
        min-height: 50px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .unified-appointment-form .input-group .form-control {
        border-left: none !important;
        border-radius: 0 12px 12px 0 !important;
    }
    
    .unified-appointment-form .input-group:focus-within .input-group-text {
        border-color: #1E88E5 !important;
        background: rgba(30, 136, 229, 0.05) !important;
    }
    
    /* Form row for side-by-side inputs */
    .unified-appointment-form .form-row {
        display: flex !important;
        gap: 12px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    
    .unified-appointment-form .form-row .form-group {
        flex: 1 !important;
        margin-bottom: 16px !important;
    }
    
    /* Select dropdown styling */
    .unified-appointment-form select.form-control {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") !important;
        background-position: right 16px center !important;
        background-repeat: no-repeat !important;
        background-size: 16px 12px !important;
        padding-right: 50px !important;
        cursor: pointer !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
    }
    
    /* Textarea styling */
    .unified-appointment-form textarea.form-control {
        resize: none !important;
        min-height: 80px !important;
        max-height: 120px !important;
        font-family: inherit !important;
    }
    
    /* ENHANCED: Mobile submit buttons with maximum visibility */
    .unified-appointment-form .btn {
        border-radius: 12px !important;
        padding: 16px 24px !important;
        font-weight: 700 !important;
        text-transform: none !important;
        letter-spacing: 0.5px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border: none !important;
        position: relative !important;
        overflow: hidden !important;
        font-size: 1rem !important;
        min-height: 54px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        cursor: pointer !important;
        margin-top: 8px !important;
        /* CRITICAL: Force visibility */
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 15 !important;
        flex-shrink: 0 !important;
        order: 999 !important;
    }
    
    .unified-appointment-form .btn::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
        transition: left 0.5s !important;
    }
    
    .unified-appointment-form .btn:hover::before {
        left: 100% !important;
    }
    
    .unified-appointment-form .btn-primary {
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
        color: white !important;
        box-shadow: 0 6px 20px rgba(30, 136, 229, 0.3) !important;
    }
    
    .unified-appointment-form .btn-primary:hover {
        background: linear-gradient(135deg, #1565C0, #0D47A1) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4) !important;
    }
    
    .unified-appointment-form .btn-success {
        background: linear-gradient(135deg, #28a745, #20c997) !important;
        color: white !important;
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3) !important;
    }
    
    .unified-appointment-form .btn-success:hover {
        background: linear-gradient(135deg, #20c997, #17a2b8) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4) !important;
    }
    
    .unified-appointment-form .btn i {
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }
    
    /* Form footer */
    .unified-appointment-form .form-footer {
        margin-top: 15px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }
    
    .unified-appointment-form .security-badge {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        color: #666 !important;
        font-size: 0.8rem !important;
        padding: 8px 12px !important;
        background: rgba(40, 167, 69, 0.1) !important;
        border-radius: 20px !important;
        border: 1px solid rgba(40, 167, 69, 0.2) !important;
    }
    
    .unified-appointment-form .security-badge i {
        color: #28a745 !important;
        font-size: 14px !important;
    }
    
    /* ENHANCED: Mobile carousel navigation */
    .carousel-indicators {
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 8px 16px !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 6px !important;
        justify-content: center !important;
        width: auto !important;
        background: rgba(0, 0, 0, 0.4) !important;
        border-radius: 20px !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.6) !important;
        border: none !important;
        opacity: 0.8 !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
        text-indent: -9999px !important;
        overflow: hidden !important;
        outline: none !important;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 17px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .carousel-indicators [data-bs-target]::before {
        content: '' !important;
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        background: currentColor !important;
        transition: all 0.3s ease !important;
    }
    
    .carousel-indicators [data-bs-target].active {
        background: #FFFFFF !important;
        opacity: 1 !important;
    }
    
    .carousel-indicators [data-bs-target].active::before {
        transform: scale(1.4) !important;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important;
    }
    
    .carousel-indicators [data-bs-target]:hover {
        background: rgba(255, 255, 255, 0.8) !important;
        opacity: 0.95 !important;
    }
    
    /* Hide complex indicators on mobile */
    .indicator-label,
    .indicator-progress {
        display: none !important;
    }
    
    /* HIDE: Desktop carousel controls on mobile */
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-controls,
    .carousel-progress,
    .carousel-play-pause {
        display: none !important;
    }
    
    /* Form validation styles */
    .unified-appointment-form .form-control.is-invalid {
        border-color: #dc3545 !important;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
    }
    
    .unified-appointment-form .form-control.is-valid {
        border-color: #28a745 !important;
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15) !important;
    }
    
    .unified-appointment-form .invalid-feedback {
        display: block !important;
        color: #dc3545 !important;
        font-size: 0.8rem !important;
        margin-top: 4px !important;
        font-weight: 500 !important;
    }
    
    .unified-appointment-form .valid-feedback {
        display: block !important;
        color: #28a745 !important;
        font-size: 0.8rem !important;
        margin-top: 4px !important;
        font-weight: 500 !important;
    }
    
    /* Loading state visibility */
    .unified-appointment-form.form-loading {
        pointer-events: none !important;
        opacity: 0.8 !important;
    }
    
    .unified-appointment-form.form-loading .btn::after {
        content: '' !important;
        position: absolute !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 16px !important;
        height: 16px !important;
        border: 2px solid transparent !important;
        border-top-color: currentColor !important;
        border-radius: 50% !important;
        animation: spin 1s linear infinite !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Success state */
    .unified-appointment-form .form-success {
        text-align: center !important;
        padding: 2rem !important;
        color: #28a745 !important;
    }
    
    .unified-appointment-form .form-success i {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
        animation: successBounce 0.6s ease-out !important;
    }
    
    .unified-appointment-form .form-success h4 {
        color: #28a745 !important;
        margin-bottom: 1rem !important;
        font-size: 1.3rem !important;
    }
    
    .unified-appointment-form .form-success p {
        color: #666 !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Mobile animations */
    @keyframes mobileFormSlideIn {
        from {
            opacity: 0;
            transform: translateY(30px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    @keyframes successBounce {
        0%, 20%, 50%, 80%, 100% {
            transform: translateY(0);
        }
        40% {
            transform: translateY(-8px);
        }
        60% {
            transform: translateY(-4px);
        }
    }
    
    @keyframes pulse {
        0%, 100% { 
            transform: scale(1); 
            box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4);
        }
        50% { 
            transform: scale(1.05); 
            box-shadow: 0 12px 35px rgba(30, 136, 229, 0.6);
        }
    }
    
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* SMALL MOBILE DEVICES (480px and below) */
@media (max-width: 480px) {
    .unified-appointment-form {
        max-width: 360px !important;
        padding: 25px 20px 30px 20px !important;
        min-height: 480px !important;
    }
    
    .unified-appointment-form .form-icon {
        width: 55px !important;
        height: 55px !important;
    }
    
    .unified-appointment-form .form-icon i {
        font-size: 22px !important;
    }
    
    .unified-appointment-form .form-header h3 {
        font-size: 1.3rem !important;
    }
    
    .unified-appointment-form .form-header p {
        font-size: 0.85rem !important;
    }
    
    .unified-appointment-form .form-control {
        padding: 12px 14px !important;
        font-size: 15px !important;
        min-height: 46px !important;
    }
    
    .unified-appointment-form .btn {
        padding: 14px 20px !important;
        font-size: 0.95rem !important;
        min-height: 50px !important;
    }
    
    .unified-appointment-form .form-row {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    .unified-appointment-form .form-row .form-group {
        margin-bottom: 14px !important;
    }
}

/* EXTRA SMALL DEVICES (360px and below) */
@media (max-width: 360px) {
    .unified-appointment-form {
        max-width: 320px !important;
        padding: 20px 16px 25px 16px !important;
        min-height: 460px !important;
    }
    
    .unified-appointment-form .form-icon {
        width: 50px !important;
        height: 50px !important;
    }
    
    .unified-appointment-form .form-icon i {
        font-size: 20px !important;
    }
    
    .unified-appointment-form .form-header h3 {
        font-size: 1.2rem !important;
    }
    
    .unified-appointment-form .form-header p {
        font-size: 0.8rem !important;
    }
    
    .unified-appointment-form .form-control {
        padding: 10px 12px !important;
        font-size: 14px !important;
        min-height: 44px !important;
    }
    
    .unified-appointment-form .btn {
        padding: 12px 16px !important;
        font-size: 0.9rem !important;
        min-height: 48px !important;
    }
    
    .carousel-indicators {
        bottom: 15px !important;
        padding: 6px 12px !important;
    }
    
    .carousel-indicators [data-bs-target] {
        width: 8px !important;
        height: 8px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        padding: 16px !important;
    }
    
    .carousel-indicators [data-bs-target]::before {
        width: 8px !important;
        height: 8px !important;
    }
}

/* ACCESSIBILITY ENHANCEMENTS FOR MOBILE */
@media (max-width: 768px) {
    /* Enhanced focus indicators */
    .unified-appointment-form .form-control:focus {
        outline: 2px solid #1E88E5 !important;
        outline-offset: 2px !important;
    }
    
    .unified-appointment-form .btn:focus {
        outline: 2px solid #FFEB3B !important;
        outline-offset: 2px !important;
    }
    
    /* Better touch targets */
    .carousel-indicators [data-bs-target] {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .unified-appointment-form .btn {
        min-height: 48px !important; /* Minimum touch target size */
    }
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) and (max-width: 768px) {
    .unified-appointment-form {
        background: #FFFFFF !important;
        border: 3px solid #000000 !important;
        color: #000000 !important;
    }
    
    .unified-appointment-form .form-control {
        background: #FFFFFF !important;
        border: 2px solid #000000 !important;
        color: #000000 !important;
    }
    
    .unified-appointment-form .btn-primary {
        background: #000000 !important;
        color: #FFFFFF !important;
        border: 2px solid #000000 !important;
    }
    
    .unified-appointment-form .btn-success {
        background: #006600 !important;
        color: #FFFFFF !important;
        border: 2px solid #006600 !important;
    }
}

/* REDUCED MOTION SUPPORT */
@media (prefers-reduced-motion: reduce) and (max-width: 768px) {
    .unified-appointment-form,
    .unified-appointment-form .form-icon,
    .unified-appointment-form .btn,
    .unified-appointment-form .form-control {
        animation: none !important;
        transition: none !important;
    }
    
    .unified-appointment-form .btn:hover {
        transform: none !important;
    }
    
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .unified-appointment-form {
        background: rgba(30, 30, 30, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.2) !important;
    }
    
    .unified-appointment-form .form-header h3 {
        color: #4FC3F7 !important;
    }
    
    .unified-appointment-form .form-header p {
        color: #CCCCCC !important;
    }
    
    .unified-appointment-form .form-control {
        background: rgba(40, 40, 40, 0.9) !important;
        border-color: #555555 !important;
        color: #FFFFFF !important;
    }
    
    .unified-appointment-form .form-control::placeholder {
        color: #AAAAAA !important;
    }
    
    .unified-appointment-form .form-label {
        color: #FFFFFF !important;
    }
}

/* EMERGENCY OVERRIDE STYLES */
/* These styles ensure forms are always visible and functional */
@media (max-width: 768px) {
    .unified-appointment-form,
    .unified-appointment-form .appointment-form,
    .unified-appointment-form .form-step,
    .unified-appointment-form .btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative !important;
        z-index: 1 !important;
    }
    
    .unified-appointment-form .btn,
    .unified-appointment-form button[type="submit"] {
        pointer-events: auto !important;
        cursor: pointer !important;
    }
    
    /* Ensure no CSS can hide critical form elements */
    .d-none.unified-appointment-form,
    .d-none .btn {
        display: flex !important;
    }
    
    .hidden.unified-appointment-form,
    .hidden .btn {
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* PRINT STYLES FOR MOBILE */
@media print and (max-width: 768px) {
    #hero-carousel,
    .unified-appointment-form,
    .carousel-indicators {
        display: none !important;
    }
}

/* ===================================
   MOBILE CAROUSEL SWIPE GESTURES
   =================================== */

@media (max-width: 768px) {
    /* Enable touch scrolling for carousel */
    .carousel-inner {
        touch-action: pan-x !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Smooth carousel transitions */
    .carousel-item {
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Prevent text selection during swipe */
    .unified-appointment-form * {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection in form inputs */
    .unified-appointment-form input,
    .unified-appointment-form textarea,
    .unified-appointment-form select {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
}

/* ========================================
   MOBILE CAROUSEL BUTTON VISIBILITY FIXES
   ======================================== */

@media (max-width: 768px) {
    /* CRITICAL: Force all mobile submit buttons to be visible */
    .mobile-submit-btn,
    .mobile-form-primary .mobile-submit-btn,
    .mobile-form-secondary .mobile-submit-btn,
    .mobile-form-tertiary .mobile-submit-btn,
    .mobile-form-quaternary .mobile-submit-btn,
    .unified-appointment-form .btn-primary,
    .unified-appointment-form .btn-success,
    .unified-appointment-form .btn,
    button[type="submit"],
    .appointment-form button,
    .mobile-appointment-form button {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative !important;
        z-index: 999999 !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 14px 20px !important;
        margin-top: 16px !important;
        margin-bottom: 0 !important;
        border: none !important;
        border-radius: 12px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: white !important;
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
        box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3) !important;
        transition: all 0.3s ease !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        text-align: center !important;
        line-height: 1.4 !important;
        letter-spacing: 0.5px !important;
        text-transform: none !important;
        outline: none !important;
        /* Force above everything */
        top: auto !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        clip: none !important;
        clip-path: none !important;
        overflow: visible !important;
        /* Prevent any hiding */
        max-height: none !important;
        height: auto !important;
        flex-shrink: 0 !important;
        order: 9999 !important;
    }
    
    /* Ensure button text is visible */
    .mobile-submit-btn span,
    .mobile-submit-btn i,
    .unified-appointment-form .btn span,
    .unified-appointment-form .btn i,
    button[type="submit"] span,
    button[type="submit"] i {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: white !important;
        font-size: inherit !important;
        line-height: inherit !important;
    }
    
    /* Button hover states */
    .mobile-submit-btn:hover,
    .unified-appointment-form .btn:hover,
    button[type="submit"]:hover {
        background: linear-gradient(135deg, #1565C0, #0D47A1) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4) !important;
    }
    
    /* Button focus states for accessibility */
    .mobile-submit-btn:focus,
    .unified-appointment-form .btn:focus,
    button[type="submit"]:focus {
        outline: 3px solid #FFEB3B !important;
        outline-offset: 2px !important;
        box-shadow: 
            0 6px 20px rgba(30, 136, 229, 0.4),
            0 0 0 3px rgba(255, 235, 59, 0.3) !important;
    }
    
    /* Loading state visibility */
    .mobile-submit-btn.loading,
    .unified-appointment-form .btn.loading,
    button[type="submit"].loading {
        opacity: 0.8 !important;
        cursor: wait !important;
        pointer-events: none !important;
    }
    
    .mobile-submit-btn.loading::after,
    .unified-appointment-form .btn.loading::after,
    button[type="submit"].loading::after {
        content: '' !important;
        position: absolute !important;
        right: 16px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 16px !important;
        height: 16px !important;
        border: 2px solid transparent !important;
        border-top: 2px solid white !important;
        border-radius: 50% !important;
        animation: spin 1s linear infinite !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force form containers to show buttons */
    .mobile-form-primary,
    .mobile-form-secondary,
    .mobile-form-tertiary,
    .mobile-form-quaternary,
    .unified-appointment-form,
    .mobile-appointment-form,
    .appointment-form {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: stretch !important;
        overflow: visible !important;
        min-height: 400px !important;
        padding-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure button area is always accessible */
    .mobile-form-primary > *:last-child,
    .mobile-form-secondary > *:last-child,
    .mobile-form-tertiary > *:last-child,
    .mobile-form-quaternary > *:last-child,
    .unified-appointment-form > *:last-child,
    .mobile-appointment-form > *:last-child,
    .appointment-form > *:last-child {
        margin-top: auto !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 999 !important;
    }
    
    /* Remove any absolute positioning that might hide buttons */
    .mobile-submit-btn,
    .unified-appointment-form .btn,
    button[type="submit"] {
        position: relative !important;
        float: none !important;
        clear: both !important;
    }
    
    /* Force visibility over any conflicting styles */
    .d-none .mobile-submit-btn,
    .d-none .unified-appointment-form .btn,
    .d-none button[type="submit"],
    .hidden .mobile-submit-btn,
    .hidden .unified-appointment-form .btn,
    .hidden button[type="submit"] {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Specific button variations */
    .mobile-submit-primary {
        background: linear-gradient(135deg, #1E88E5, #1565C0) !important;
    }
    
    .mobile-submit-secondary {
        background: linear-gradient(135deg, #43A047, #2E7D32) !important;
    }
    
    .mobile-submit-tertiary {
        background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    }
    
    .mobile-submit-quaternary {
        background: linear-gradient(135deg, #F44336, #D32F2F) !important;
    }
    
    /* Form progress and navigation */
    .mobile-form-progress {
        margin-bottom: 20px !important;
        padding: 10px 0 !important;
        flex-shrink: 0 !important;
    }
    
    .progress-track {
        width: 100% !important;
        height: 4px !important;
        background: rgba(0, 0, 0, 0.1) !important;
        border-radius: 2px !important;
        overflow: hidden !important;
    }
    
    .progress-fill {
        height: 100% !important;
        width: 0% !important;
        background: linear-gradient(90deg, #1E88E5, #43A047) !important;
        border-radius: 2px !important;
        transition: width 0.3s ease !important;
    }
    
    .progress-text {
        display: block !important;
        text-align: center !important;
        font-size: 0.75rem !important;
        color: #666 !important;
        margin-top: 4px !important;
        font-weight: 500 !important;
    }
    
    /* Form switch tabs */
    .mobile-form-switch-container {
        position: absolute !important;
        top: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 20px !important;
        padding: 4px !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    .form-switch-tabs {
        display: flex !important;
        gap: 2px !important;
    }
    
    .form-switch-tab {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.7) !important;
        padding: 8px 12px !important;
        border-radius: 16px !important;
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        cursor: pointer !important;
    }
    
    .form-switch-tab.active {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #1565C0 !important;
        transform: scale(1.05) !important;
    }
    
    .form-switch-tab i {
        font-size: 14px !important;
    }
    
    .form-switch-tab span {
        font-size: 0.6rem !important;
        line-height: 1 !important;
    }
    
    /* Swipe hint */
    .mobile-swipe-hint {
        position: absolute !important;
        bottom: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        background: rgba(0, 0, 0, 0.8) !important;
        color: white !important;
        padding: 8px 16px !important;
        border-radius: 20px !important;
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        transition: opacity 0.3s ease !important;
        pointer-events: none !important;
    }
    
    .swipe-hint-content {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }
    
    .mobile-swipe-hint i {
        font-size: 16px !important;
        animation: pulse 1.5s infinite !important;
    }
    
    /* Form breadcrumbs */
    .mobile-form-breadcrumbs {
        position: absolute !important;
        top: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 1000 !important;
        display: flex !important;
        gap: 4px !important;
        background: rgba(255, 255, 255, 0.9) !important;
        padding: 6px 12px !important;
        border-radius: 20px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    }
    
    .breadcrumb-item {
        font-size: 0.7rem !important;
        font-weight: 600 !important;
        color: #666 !important;
        padding: 4px 8px !important;
        border-radius: 12px !important;
        transition: all 0.2s ease !important;
        white-space: nowrap !important;
    }
    
    .breadcrumb-item.active {
        background: #1E88E5 !important;
        color: white !important;
        transform: scale(1.05) !important;
    }
    
    /* Mobile notifications */
    .mobile-notification {
        position: fixed !important;
        top: 20px !important;
        left: 20px !important;
        right: 20px !important;
        z-index: 99999 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        transform: translateY(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        max-width: 400px !important;
        margin: 0 auto !important;
    }
    
    .mobile-notification.show {
        transform: translateY(0) !important;
    }
    
    .mobile-notification-content {
        display: flex !important;
        align-items: center !important;
        padding: 16px !important;
        gap: 12px !important;
    }
    
    .mobile-notification-content i {
        font-size: 20px !important;
        flex-shrink: 0 !important;
    }
    
    .mobile-notification-content span {
        flex-grow: 1 !important;
        font-weight: 500 !important;
        font-size: 0.9rem !important;
        color: #333 !important;
    }
    
    .mobile-notification-close {
        background: none !important;
        border: none !important;
        color: #666 !important;
        font-size: 18px !important;
        cursor: pointer !important;
        padding: 4px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        transition: background 0.2s ease !important;
    }
    
    .mobile-notification-close:hover {
        background: rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Notification types */
    .mobile-notification-success .mobile-notification-content i {
        color: #4CAF50 !important;
    }
    
    .mobile-notification-error .mobile-notification-content i {
        color: #F44336 !important;
    }
    
    .mobile-notification-warning .mobile-notification-content i {
        color: #FF9800 !important;
    }
    
    .mobile-notification-info .mobile-notification-content i {
        color: #2196F3 !important;
    }
    
    /* Field validation feedback */
    .mobile-field-feedback {
        font-size: 0.75rem !important;
        margin-top: 4px !important;