/* ==========================================
   RTDHAI - Telemedicine Custom CSS Stylesheet
   Design System & Premium UI Polish
   ========================================== */

:root {
    --primary-color: #4F6BD6;
    --primary-hover: #3b5bc2;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #60a5fa;
    --success-color: #10b981;
    
    --card-shadow: 0 10px 30px rgba(79, 107, 214, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(79, 107, 214, 0.08);
}

/* Base Adjustments */
body {
    font-family: 'Inter', sans-serif !important;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif !important;
}

/* Micro-Animations & Glows */
@keyframes pulseGlow {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-indicator {
    width: 12px;
    height: 12px;
    background-color: var(--success-color);
    border-radius: 50%;
    display: inline-block;
    animation: pulseGlow 2s infinite;
}

.animate-pulse {
    animation: pulseGlow 2s infinite;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(79, 107, 214, 0.12);
    border-color: rgba(79, 107, 214, 0.2);
}

/* Vital Signs Widgets (Patient & Doctor Dashboard) */
.vital-card {
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    color: white;
}
.vital-card.temp { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.vital-card.bp { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.vital-card.pulse { background: linear-gradient(135deg, #059669, #34d399); }
.vital-card.spo2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

.vital-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.vital-value {
    font-size: 32px;
    font-weight: 800;
    margin: 10px 0 5px;
    font-family: 'Outfit', sans-serif;
}
.vital-desc {
    font-size: 12px;
    opacity: 0.85;
}

/* Virtual Consultation Video Simulator */
.video-consultation-container {
    position: relative;
    background-color: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.remote-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.local-stream {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 25%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    overflow: hidden;
    background-color: #1e293b;
    z-index: 5;
}
.video-overlay-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.video-consultation-container:hover .video-overlay-controls {
    opacity: 1;
}
.btn-control {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: transform 0.2s ease;
}
.btn-control.hangup { background-color: var(--danger-color); }
.btn-control.audio { background-color: rgba(255, 255, 255, 0.2); }
.btn-control.video { background-color: rgba(255, 255, 255, 0.2); }
.btn-control:hover { transform: scale(1.1); }

/* Vitals Monitor Graph Line (ECG Simulator) */
@keyframes ecgScan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.ecg-monitor {
    background-color: #020617;
    border: 1px solid #1e293b;
    border-radius: 8px;
    height: 80px;
    position: relative;
    overflow: hidden;
}
.ecg-grid {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: linear-gradient(rgba(16, 185, 129, 0.07) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(16, 185, 129, 0.07) 1px, transparent 1px);
    background-size: 10px 10px;
}
.ecg-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    stroke: var(--success-color);
    stroke-width: 2;
    fill: none;
}
.ecg-scanner {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, #020617 80%);
    animation: ecgScan 3s linear infinite;
}

/* Chat bubble styling for symptom checker */
.chat-window {
    height: 350px;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    background-color: #f8fafc;
    margin-bottom: 15px;
}
.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.chat-message.bot {
    background-color: white;
    color: var(--dark);
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    border: 1px solid rgba(15,118,110,0.05);
}
.chat-message.user {
    background-color: var(--primary-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* Dashboard Navigation Layout (Sidebar) */
.dashboard-sidebar {
    background: white;
    border-right: 1px solid var(--glass-border);
    min-height: calc(100vh - 120px);
    padding: 30px 15px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}
.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(79, 107, 214, 0.06);
    color: var(--primary-color);
}
.sidebar-link.active {
    font-weight: 700;
}

/* Paystack Payment Simulator Styling */
.paystack-modal-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2d3748;
}
.paystack-header {
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 15px;
    margin-bottom: 15px;
    text-align: center;
}
.paystack-lock {
    background-color: #e6fffa;
    color: #319795;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.paystack-button {
    background-color: #3bb75e;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    padding: 14px;
    width: 100%;
    font-size: 16px;
    transition: background 0.2s;
}
.paystack-button:hover {
    background-color: #2f964a;
}

/* Swiper.js & Testimonials Polishing */
.swiper {
    width: 100%;
    height: 100%;
    padding: 30px 10px 60px !important;
}
.swiper-slide {
    height: auto;
}
.swiper-pagination-bullet-active {
    background: var(--primary-color) !important;
}

/* Tailwind-inspired styling helpers */
.shadow-soft-sm { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05); }
.shadow-soft-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05); }
.shadow-soft-lg { box-shadow: 0 10px 15px -3px rgba(79, 107, 214, 0.08), 0 4px 6px -4px rgba(79, 107, 214, 0.08); }
.shadow-soft-xl { box-shadow: 0 20px 25px -5px rgba(79, 107, 214, 0.12), 0 8px 10px -6px rgba(79, 107, 214, 0.12); }
.shadow-soft-2xl { box-shadow: 0 25px 50px -12px rgba(79, 107, 214, 0.18); }

.bg-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.bg-glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transition-all-300 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover scales */
.hover-scale-102:hover {
    transform: scale(1.02);
}
.hover-translate-y-1:hover {
    transform: translateY(-4px);
}

/* How It Works Timeline */
.timeline-steps {
    display: flex;
    flex-wrap: wrap;
    position: relative;
}
.timeline-step {
    flex: 1;
    min-width: 220px;
    text-align: center;
    position: relative;
    padding: 0 15px;
    margin-bottom: 30px;
}
.timeline-step .icon-box {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: var(--primary-color);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}
.timeline-step:hover .icon-box {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(79, 107, 214, 0.2);
}
.timeline-step .step-number {
    position: absolute;
    top: -5px;
    right: calc(50% - 35px);
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 3;
}
/* Horizontal line connecting steps */
.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 35px;
    left: calc(50% + 35px);
    width: calc(100% - 70px);
    height: 2px;
    background: radial-gradient(circle, var(--primary-color) 0%, rgba(79, 107, 214, 0.1) 100%);
    z-index: 1;
}

@media (max-width: 991px) {
    .timeline-steps {
        flex-direction: column;
    }
    .timeline-step {
        text-align: left;
        padding-left: 90px;
        padding-right: 0;
    }
    .timeline-step .icon-box {
        position: absolute;
        left: 0;
        top: 0;
        margin: 0;
    }
    .timeline-step .step-number {
        left: 50px;
    }
    .timeline-step:not(:last-child)::after {
        top: 70px;
        left: 35px;
        width: 2px;
        height: calc(100% - 50px);
    }
}

/* Partners Logo Grid styling */
.partner-logo-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.partner-logo-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--card-shadow);
    transform: translateY(-2px);
}

/* Mobile Phone App Showcase Mockup */
.phone-mockup-frame {
    border: 12px solid #0f172a;
    border-radius: 36px;
    background: #020617;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    aspect-ratio: 9/19;
    max-width: 290px;
    margin: 0 auto;
    position: relative;
}
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 18px;
    background: #0f172a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}
.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    overflow-y: auto;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    padding: 25px 12px 12px;
    font-size: 12px;
}

/* Article Card Visuals */
.article-card {
    border-radius: 16px;
    overflow: hidden;
    background: white;
    border: 1px solid rgba(79, 107, 214, 0.08);
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(79, 107, 214, 0.1);
    border-color: rgba(79, 107, 214, 0.15);
}
.article-img-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}
.article-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.article-card:hover .article-img-wrapper img {
    transform: scale(1.05);
}

/* Newsletter Input focus styling */
.newsletter-form .form-control:focus {
    box-shadow: 0 0 0 4px rgba(79, 107, 214, 0.15);
    border-color: var(--primary-color) !important;
}
