/* ============================================
   GLOBAL STYLES - Healthcare Platform
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Colors */
    --primary: #2A6CF6;
    --primary-dark: #1E56D0;
    --primary-light: #5A8FF8;
    --primary-rgb: 42, 108, 246;

    /* Secondary Colors */
    --secondary: #16B8A6;
    --secondary-dark: #0F9A8A;
    --secondary-light: #3DD4C4;
    --secondary-rgb: 22, 184, 166;

    /* Neutrals */
    --bg: #F7FAFC;
    --bg-alt: #EDF2F7;
    --white: #FFFFFF;
    --dark: #1A202C;
    --dark-alt: #2D3748;
    --text: #4A5568;
    --text-light: #718096;
    --text-lighter: #A0AEC0;
    --border: #E2E8F0;

    /* Accents */
    --accent-purple: #7C3AED;
    --accent-pink: #EC4899;
    --accent-orange: #F97316;
    --accent-red: #EF4444;
    --accent-green: #10B981;
    --accent-cyan: #06B6D4;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2A6CF6 0%, #16B8A6 100%);
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #2A6CF6 100%);
    --gradient-card: linear-gradient(135deg, rgba(42, 108, 246, 0.05) 0%, rgba(22, 184, 166, 0.05) 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.6) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 25px 50px rgba(0,0,0,0.15);
    --shadow-primary: 0 10px 30px rgba(42, 108, 246, 0.25);
    --shadow-secondary: 0 10px 30px rgba(22, 184, 166, 0.25);

    /* Border Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-secondary);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--dark);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

p {
    color: var(--text);
    line-height: 1.8;
    font-size: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul { list-style: none; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.container-lg {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Section */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: linear-gradient(135deg, rgba(42,108,246,0.1) 0%, rgba(22,184,166,0.1) 100%);
    border: 1px solid rgba(42,108,246,0.15);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 18px;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
}

.section-badge i {
    font-size: 0.75rem;
}

.section-header h2 {
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 0.3px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    opacity: 1;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(42, 108, 246, 0.35);
    color: var(--white);
}

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

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

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

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-dark);
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 18px 40px;
    font-size: 1.05rem;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loader-content p {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: 100px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(42,108,246,0.15) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(22,184,166,0.1) 0%, transparent 60%);
    animation: heroGlow 10s ease-in-out infinite alternate-reverse;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    font-family: var(--font-primary);
}

.hero-badge i {
    color: var(--secondary-light);
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
}

.hero-text h1 span {
    background: linear-gradient(135deg, #5EEAD4 0%, #38BDF8 50%, #818CF8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--secondary-light);
    font-weight: 600;
    font-family: var(--font-primary);
    margin-bottom: 18px;
}

.hero-text p {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    margin-bottom: 32px;
    max-width: 520px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-primary);
    display: block;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

/* Hero Visual / Illustration */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-illustration {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.hero-card-main {
    width: 100%;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    z-index: 2;
}

.hero-card-main .card-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.card-icon-circle {
    width: 52px;
    height: 52px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--white);
    flex-shrink: 0;
}

.card-header-row h3 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
}

.card-header-row p {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin: 0;
}

.hero-modules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-module {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    transition: var(--transition);
}

.hero-module:hover {
    background: rgba(255,255,255,0.12);
    transform: translateX(4px);
}

.hero-module i {
    color: var(--secondary-light);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.hero-module span {
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    font-weight: 500;
}

/* Floating Elements */
.floating-card {
    position: absolute;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
    animation: float 6s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.2rem;
}

.floating-card span {
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
}

.floating-card-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0s;
}

.floating-card-2 {
    bottom: 15%;
    left: -30px;
    animation-delay: 2s;
}

.floating-card-3 {
    top: 50%;
    right: -40px;
    animation-delay: 4s;
}

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

/* Services Section */
.services-section {
    background: var(--bg);
    position: relative;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

/* Stats Section */
.stats-section {
    background: var(--gradient-hero);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font-primary);
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-weight: 500;
}

/* Features Section (on service pages) */
.features-section {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-slow);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-icon.blue {
    background: rgba(42, 108, 246, 0.1);
    color: var(--primary);
}

.feature-icon.green {
    background: rgba(22, 184, 166, 0.1);
    color: var(--secondary);
}

.feature-icon.purple {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-purple);
}

.feature-icon.pink {
    background: rgba(236, 72, 153, 0.1);
    color: var(--accent-pink);
}

.feature-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: var(--accent-orange);
}

.feature-icon.cyan {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* Page Hero (for service pages) */
.page-hero {
    position: relative;
    padding: 160px 0 100px;
    background: var(--gradient-hero);
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(42,108,246,0.12) 0%, transparent 70%);
}

.page-hero .hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 750px;
    margin: 0 auto;
}

.page-hero-content .hero-badge {
    margin-bottom: 20px;
}

.page-hero-content h1 {
    color: var(--white);
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin-bottom: 18px;
    font-weight: 800;
}

.page-hero-content p {
    color: rgba(255,255,255,0.75);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-primary);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 650px;
    margin: 0 auto;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 18px;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.cta-content p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-text p {
        margin: 0 auto 32px;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .hero-visual {
        display: none;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 70px 0;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .page-hero {
        padding: 140px 0 80px;
    }
    .cta-section {
        padding: 70px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
