/* ============================================
   PAGE-SPECIFIC STYLES
   ============================================ */

/* Blog Detail Page Styles */
.prose ul {
    list-style-type: disc !important;
    padding-left: 1.5rem !important;
    margin: 1rem 0 !important;
}

.prose ol {
    list-style-type: decimal !important;
    padding-left: 1.5rem !important;
    margin: 1rem 0 !important;
}

.prose li {
    margin: 0.5rem 0 !important;
}

/* Share Container Styles */
.share-container {
    position: relative;
    display: inline-block;
}

.share-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 0.5rem;
    width: 11rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    z-index: 1000;
}

.share-menu.hidden {
    display: none;
}

.share-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    transition: background-color 0.2s;
}

.share-link:hover {
    background-color: #f3f4f6;
}

.share-link:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.share-link:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Patient Stories Share Button */
.voice-recording {
    margin-top: -7px !important;
    margin-left: -25px !important;
}

/* Toast Notification Styles */
.toast-notification {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background-color: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    transition: all 0.3s;
    opacity: 1;
}

.toast-notification.fade-out {
    opacity: 0;
    transition: opacity 0.3s;
}


/* ============================================
   CONTACT PAGE STYLES
   ============================================ */

.form-input {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
    background-color: white;
}

.form-input::placeholder {
    color: #9ca3af;
}

.submit-btn {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(20, 184, 166, 0.2);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(20, 184, 166, 0.3);
}

.contact-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.section-title {
    background: linear-gradient(135deg, #14b8a6 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   DONATION PAGE STYLES
   ============================================ */

.donation-bg {
    background-color: #f5f5f5;
    background-repeat: repeat;
    background-size: auto;
    position: relative;
}

.donation-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 1;
}

.donation-bg > * {
    position: relative;
    z-index: 2;
}

/* ============================================
   HEADER STYLES
   ============================================ */

body {
    padding-top: 0;
}

/* Fixed header that stays visible while scrolling */
header,
.sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    width: 100% !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important; /* Safari support */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* Enhanced header on scroll */
header.header-scrolled,
.sticky-header.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Fallback for browsers that don't support backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    header,
    .sticky-header {
        background-color: rgba(255, 255, 255, 0.98) !important;
    }
}

/* Main content padding to account for fixed header */
main {
    padding-top: 0;
    margin-top: 0;
}

/* Utility class for first sections that need header spacing */
.header-offset {
    padding-top: 120px; /* Mobile header height + extra spacing */
}

@media (min-width: 768px) {
    .header-offset {
        padding-top: 140px; /* Desktop header height + extra spacing */
    }
}

/* Remove any conflicting margins from first elements */
main > *:first-child {
    margin-top: 0;
}

/* Ensure navigation bar stays visible */
nav {
    position: relative !important;
    z-index: 40 !important;
}

/* Ensure header works without JavaScript (offline) */
.sticky-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
}

/* Force header to stay on top even without JS */
@media (max-width: 767px) {
    .sticky-header {
        min-height: 88px;
    }
}

@media (min-width: 768px) {
    .sticky-header {
        min-height: 104px;
    }
}


/* ============================================
   FOOTER STYLES
   ============================================ */

.medical-pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.medical-divider {
    background: linear-gradient(90deg, transparent 0%, #06b6d4 20%, #0ea5e9 50%, #06b6d4 80%, transparent 100%);
    height: 1px;
}

.accent-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

/* ============================================
   OFFLINE STICKY HEADER SUPPORT
   ============================================ */

/* Ensure header is always visible even without JavaScript */
.no-js header,
.no-js .sticky-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Progressive enhancement - start with basic sticky, enhance with JS */
.sticky-header {
    will-change: transform, background-color, box-shadow;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Ensure content doesn't jump when header becomes sticky */
body {
    scroll-padding-top: 104px; /* Account for header height */
}

@media (max-width: 767px) {
    body {
        scroll-padding-top: 88px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    header,
    .sticky-header {
        background-color: white !important;
        border-bottom: 2px solid black !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    header,
    .sticky-header {
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles - hide header when printing */
@media print {
    header,
    .sticky-header {
        display: none !important;
    }
    
    main {
        padding-top: 0 !important;
    }
}