/* ============================================
   NSG HEALTH - Clean Design System
   Blue, White & Black Theme
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Primary Blue Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Neutrals - Black to White */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --black: #000000;
    --white: #ffffff;

    /* Danger Red (for SOS only) */
    --danger-500: #ef4444;
    --danger-600: #dc2626;

    /* 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 -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-blue: 0 10px 30px -10px rgba(59, 130, 246, 0.4);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font-sans);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.text-display {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.025em;
}

/* Modern Cards */
.card-modern {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-700);
    border: 2px solid var(--primary-200);
}

.btn-secondary:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
}

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

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

/* Modern Form Inputs */
.input-modern {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    outline: none;
}

.input-modern:focus {
    background: var(--white);
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Modern Navigation */
.nav-modern {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--gray-100);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-link {
    position: relative;
    color: var(--gray-600);
    font-weight: 700;
    padding: 0.5rem 0;
    transition: color var(--transition-base);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--primary-600);
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 1.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fab-left {
    left: 1.5rem;
}

.fab-right {
    right: 1.5rem;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.fab-sos {
    background: var(--danger-500);
    color: var(--white);
    animation: pulse-sos 2s infinite;
}

@keyframes pulse-sos {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5), var(--shadow-lg);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(239, 68, 68, 0), var(--shadow-lg);
    }
}

.fab-call {
    background: var(--primary-600);
    color: var(--white);
}

/* Quick Action Cards - Blue Theme */
.quick-action-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    background: var(--primary-600);
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-base);
}

.quick-action-card:hover {
    background: var(--primary-700);
    transform: translateY(-4px);
    box-shadow: var(--shadow-blue);
}

.quick-action-card.alt {
    background: var(--primary-700);
}

.quick-action-card.alt:hover {
    background: var(--primary-800);
}

/* Stat Cards */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 1rem;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

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

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* Portal Cards */
.portal-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
}

.portal-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-300);
}

.portal-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    background: var(--primary-600);
    color: var(--white);
}

/* Pricing Cards */
.pricing-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
    border: 2px solid var(--primary-500);
    box-shadow: var(--shadow-blue);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in { animation: fadeIn 0.6s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info {
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-800);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 200;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}

/* Footer */
.footer-modern {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

.footer-modern a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-modern a:hover {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .section { padding: 3rem 0; }
    .section-title { font-size: 1.875rem; }
    .fab { width: 48px; height: 48px; }
}

/* Typography overrides: keep bold + all caps only in main navigation */
body :not(nav) .font-bold,
body :not(nav) .font-extrabold {
    font-weight: 600;
}

body :not(nav) .uppercase {
    text-transform: capitalize;
}

/* Focus & Selection */
:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

::selection {
    background: var(--primary-200);
    color: var(--primary-900);
}
