/* Haven OBGYN Custom Styles */

/* Color Variables - Warm palette for medical practice */
:root {
    --primary-color: #8B4C8B; /* Warm purple */
    --primary-light: #A66BA6;
    --primary-dark: #6B3A6B;
    --secondary-color: #D4A574; /* Warm gold */
    --accent-color: #E8C5A0; /* Light cream */
    --neutral-warm: #F5F2F0; /* Warm white */
    --text-dark: #2C2C2C;
    --text-muted: #6C757D;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --info-color: #17A2B8;
    
    /* Fluid Typography Scale */
    --font-size-xs: clamp(0.75rem, 0.5vw + 0.65rem, 0.875rem);
    --font-size-sm: clamp(0.875rem, 0.75vw + 0.75rem, 1rem);
    --font-size-base: clamp(1rem, 1vw + 0.85rem, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.25vw + 0.95rem, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.5vw + 1.05rem, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 2vw + 1.25rem, 2rem);
    --font-size-3xl: clamp(1.875rem, 2.5vw + 1.5rem, 2.5rem);
    --font-size-4xl: clamp(2.25rem, 3vw + 1.75rem, 3rem);
    --font-size-5xl: clamp(2.75rem, 4vw + 2rem, 4rem);
    
    /* Spacing Scale */
    --spacing-xs: clamp(0.25rem, 0.5vw + 0.125rem, 0.5rem);
    --spacing-sm: clamp(0.5rem, 1vw + 0.25rem, 0.75rem);
    --spacing-md: clamp(0.75rem, 1.5vw + 0.5rem, 1.25rem);
    --spacing-lg: clamp(1rem, 2vw + 0.75rem, 1.75rem);
    --spacing-xl: clamp(1.5rem, 3vw + 1rem, 2.5rem);
    --spacing-2xl: clamp(2rem, 4vw + 1.5rem, 3.5rem);
    --spacing-3xl: clamp(2.5rem, 5vw + 2rem, 4.5rem);
    
    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Design System Tokens */
    /* Borders */
    --border-width-thin: 1px;
    --border-width-medium: 2px;
    --border-width-thick: 3px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-color-light: rgba(0, 0, 0, 0.125);
    --border-color-medium: rgba(0, 0, 0, 0.2);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-focus: 0 0 0 3px rgba(139, 76, 139, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Fluid Typography Classes */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

/* Standardized Font Weights */
.fw-normal { font-weight: var(--font-weight-normal); }
.fw-medium { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold { font-weight: var(--font-weight-bold); }

/* Apply Fluid Typography to Bootstrap Classes */
body { 
    font-size: var(--font-size-base); 
    line-height: 1.6; 
    font-weight: var(--font-weight-normal);
}

.display-1 { font-size: var(--font-size-5xl); font-weight: var(--font-weight-bold); }
.display-2 { font-size: var(--font-size-4xl); font-weight: var(--font-weight-bold); }
.display-3 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); }
.display-4 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
.display-5 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }

h1, .h1 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-bold); }
h2, .h2 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-semibold); }
h3, .h3 { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
h4, .h4 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
h5, .h5 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
h6, .h6 { font-size: var(--font-size-sm); font-weight: var(--font-weight-medium); }

.lead { font-size: var(--font-size-lg); font-weight: var(--font-weight-normal); }
.small { font-size: var(--font-size-sm); }

/* Consistent spacing using fluid scale */
.py-fluid-sm { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-fluid-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-fluid-lg { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
.py-fluid-xl { padding-top: var(--spacing-xl); padding-bottom: var(--spacing-xl); }
.py-fluid-2xl { padding-top: var(--spacing-2xl); padding-bottom: var(--spacing-2xl); }

.my-fluid-sm { margin-top: var(--spacing-sm); margin-bottom: var(--spacing-sm); }
.my-fluid-md { margin-top: var(--spacing-md); margin-bottom: var(--spacing-md); }
.my-fluid-lg { margin-top: var(--spacing-lg); margin-bottom: var(--spacing-lg); }
.my-fluid-xl { margin-top: var(--spacing-xl); margin-bottom: var(--spacing-xl); }

/* Enhanced Button System */
.btn {
    border-radius: var(--border-radius-md);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border-width: var(--border-width-thin);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-primary:focus {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
    color: white;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary:focus {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}

/* Button sizes with consistent styling */
.btn-sm {
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.btn-lg {
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    box-shadow: var(--shadow-md);
}

/* Standardized Cards and Containers */
.card {
    border: var(--border-width-thin) solid var(--border-color-light);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-body {
    padding: var(--spacing-lg);
}

/* Enhanced Form Controls */
.form-control, .form-select {
    border: var(--border-width-thin) solid var(--border-color-light);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    font-size: var(--font-size-base);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-focus);
}

/* Standardized Alerts */
.alert {
    border-radius: var(--border-radius-md);
    border: var(--border-width-thin) solid transparent;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

/* Insurance Cards Enhancement */
.insurance-mini-card {
    border: var(--border-width-thin) solid var(--border-color-light);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.insurance-mini-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    transform: translateY(-1px);
}

/* Navbar Enhancement */
.navbar {
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

/* Service sections styling */
.service-section {
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-base);
}

.service-item {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-base);
}

.service-item:hover {
    background-color: var(--neutral-warm);
    transform: translateY(-1px);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Smooth scrolling and anchor offset */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Launch Banner Styles */
.launch-banner {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.launch-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
}

.launch-banner a:hover {
    text-decoration: none !important;
    opacity: 0.8;
}



/* Logo styling */
.logo-img {
    transition: transform 0.3s ease;
    filter: brightness(1.1) contrast(1.1);
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Clickable section hover effects */
.clickable-section {
    transition: all 0.3s ease;
    cursor: pointer;
}

.clickable-section:hover {
    transform: translateY(-2px);
    background-color: rgba(139, 76, 139, 0.05) !important;
    border-radius: 15px;
}

/* Insurance mini-cards */
.insurance-mini-badge {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.insurance-mini-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insurance-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Insurance page styling */
.insurance-badge {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.insurance-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.insurance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.info-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Google Maps styling */
.google-map {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 450px;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.google-map iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border-radius: 1rem;
}

@media (max-width: 768px) {
    .google-map {
        height: 300px;
    }
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
}

.display-4, .display-5 {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Navigation */
.navbar-brand {
    font-family: 'Playfair Display', Georgia, serif;
}

.navbar-brand h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--neutral-warm);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--neutral-warm) 0%, #ffffff 100%);
    min-height: 75vh;
    padding: 2rem 0;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-placeholder {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    transition: transform 0.3s ease;
}

.hero-placeholder:hover {
    transform: scale(1.02);
}

/* Cards and Components */
.feature-card, .service-card, .provider-card, .contact-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(139, 76, 139, 0.1);
}

.feature-card:hover, .service-card:hover, .provider-card:hover, .contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(139, 76, 139, 0.15);
}

.service-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--neutral-warm) 100%);
}

.provider-card {
    background: #ffffff;
    border-radius: 1rem;
}

/* Service sections */
.service-section {
    scroll-margin-top: 100px; /* Account for fixed navbar */
}

.service-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.expertise-item {
    background: linear-gradient(135deg, #ffffff 0%, var(--neutral-warm) 100%);
    transition: all 0.3s ease;
}

.expertise-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.25rem 0.5rem rgba(139, 76, 139, 0.15);
}

/* Forms */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: border-color 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 76, 139, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.alert-info {
    background-color: rgba(139, 76, 139, 0.1);
    color: var(--primary-color);
}

/* Contact Information */
.contact-info a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: var(--secondary-color);
}

/* Backgrounds */
.bg-light {
    background-color: var(--neutral-warm) !important;
}

/* Services Navigation */
.services-nav {
    z-index: 1020;
}

.services-nav .btn {
    margin: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Provider Images */
.provider-image {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: transform 0.3s ease;
}

.provider-image:hover {
    transform: scale(1.05);
}

/* Map placeholder */
.map-placeholder {
    background: linear-gradient(135deg, var(--neutral-warm) 0%, var(--accent-color) 100%);
    transition: transform 0.3s ease;
}

.map-placeholder:hover {
    transform: scale(1.01);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

footer h5 {
    color: var(--secondary-color);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--secondary-color) !important;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding: 1rem 0;
        min-height: 60vh;
    }
    
    .min-vh-75 {
        min-height: 60vh;
    }
    
    .display-4 {
        line-height: 1.2;
    }
    
    .display-5 {
        line-height: 1.3;
    }
    
    .hero-placeholder {
        height: 250px !important;
    }
    
    .provider-image {
        width: 150px !important;
        height: 150px !important;
    }
    
    /* Enhanced Services Navigation */
    .services-nav {
        justify-content: flex-start !important;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .services-nav .btn {
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px; /* Minimum tap target */
        min-width: 44px;
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    /* Ensure minimum tap target sizes - WCAG compliance */
    .btn, .nav-link, .navbar-nav .nav-link {
        min-height: 44px !important;
        min-width: 44px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-sm {
        min-height: 44px !important;
        min-width: 44px !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Services navigation buttons */
    .services-nav .btn-sm {
        min-height: 44px !important;
        padding: 0.75rem 1rem !important;
        margin: 0.25rem !important;
    }
    
    /* Enhanced navbar button for mobile */
    .navbar .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .navbar-toggler {
        min-height: 44px;
        min-width: 44px;
        padding: 0.25rem 0.5rem;
    }
    
    /* Banner close button */
    .btn-close {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem;
    }
    
    /* Insurance cards mobile optimization */
    .insurance-mini-card {
        min-height: 48px !important;
        padding: 0.5rem !important;
        touch-action: manipulation;
    }
    
    /* Form elements minimum size */
    .form-control, .form-select {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
    }
    
    /* Enhanced spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Carousel controls */
    .carousel-control-prev, .carousel-control-next {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(0,0,0,0.5);
        border: none;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Modal close buttons */
    .modal .btn-close {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Pause video autoplay for users who prefer reduced motion */
    .hero-video {
        animation-play-state: paused !important;
    }
    
    /* Remove hover transforms */
    .btn:hover, .card:hover, .feature-card:hover, .service-card:hover {
        transform: none !important;
    }
    
    /* Disable carousel auto-advance */
    .carousel {
        animation: none !important;
    }
}

/* Enhanced Focus states for accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(139, 76, 139, 0.25);
}

.btn-close:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(139, 76, 139, 0.25);
}

.btn-primary:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(139, 76, 139, 0.5);
}

.navbar-toggler:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(139, 76, 139, 0.25);
}

/* Skip link focus */
.visually-hidden-focusable:focus {
    position: absolute !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    white-space: nowrap;
    padding: 0.5rem 1rem;
    font-weight: bold;
    text-decoration: none;
}

/* Performance Optimizations */
/* Font Loading with Fallbacks */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    font-weight: 300 700;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700') format('woff2');
}

@font-face {
    font-family: 'Playfair Display';
    font-display: swap;
    font-weight: 400 600;
    src: url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600') format('woff2');
}

/* Image Performance */
img {
    height: auto;
    max-width: 100%;
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Reduce layout shifts */
.hero-video-wrapper {
    aspect-ratio: 16/9;
    background-color: var(--neutral-warm);
}

.hero-placeholder {
    aspect-ratio: 16/9;
    background-color: var(--neutral-warm);
}

/* Optimize animations for performance */
@media (prefers-reduced-motion: no-preference) {
    .btn, .card, .insurance-mini-card {
        will-change: transform;
    }
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-warm);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading states */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
}

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

/* Print styles */
@media print {
    .navbar, .btn, footer {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .bg-light, .bg-primary {
        background: #fff !important;
    }
}
