/* 
 * Care - Main Stylesheet
 * Medical Care Platform - Professional Blue Theme
 */

/* CSS Variables for Consistent Theming */
:root {
    /* Primary Colors - Medical Blue Theme */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-lighter: #dbeafe;
    
    /* Secondary Colors */
    --secondary-color: #64748b;
    --secondary-dark: #475569;
    --secondary-light: #94a3b8;
    
    /* Accent Colors */
    --accent-color: #10b981;
    --accent-dark: #059669;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Neutral Colors */
    --white: #ffffff;
    --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;
    
    /* Typography */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* 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);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--gray-800);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--gray-600);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--gray-600);
    border-color: var(--gray-600);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--gray-700);
    border-color: var(--gray-700);
}

.btn-success {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-success:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}


.hero-image {
    position: relative;
    z-index: 2;
}

.hero-image-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.2));
}

.btn-hero {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
    text-transform: none;
    letter-spacing: 0.025em;
}

.btn-hero-primary {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-hero-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-hero-secondary:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-2px);
}

.search-section {
    background: white;
    padding: 4rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
    margin-top: -2rem;
    border-radius: 2rem 2rem 0 0;
}

.search-container {
    background: var(--gray-50);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.search-input {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.search-btn {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.category-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.category-btn {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.nurses-section {
    padding: 4rem 0;
    background: var(--gray-50);
}

.nurse-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.nurse-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.nurse-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-lighter);
    margin-bottom: 1rem;
}

.nurse-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.nurse-specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.nurse-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stars {
  --p: 0%;
  display: inline-block;
  position: relative;
  font-size: 1.25rem;
  line-height: 1;
}
.stars::before {
  content: "★★★★★";
  letter-spacing: 2px;
  background: linear-gradient(90deg, #fbbf24 var(--p), var(--gray-300) var(--p));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Pills */
.pill { display:inline-block; padding: .25rem .5rem; border-radius: 999px; font-size:.75rem; }
.pill-muted{ background: var(--gray-100); color: var(--gray-600); }
.pill-primary{ background: var(--primary-lighter); color: var(--primary-dark); }
.pill-info{ background: #e0f2fe; color:#0369a1; }
.pill-success{ background: #dcfce7; color:#166534; }
.pill-warning{ background: #fef3c7; color:#92400e; }
.pill-danger{ background: #fee2e2; color:#991b1b; }

/* Chat bubbles */
.bubble { padding:.5rem .75rem; border-radius: var(--border-radius-lg); max-width: 70%; }
.bubble-left{ background: var(--gray-100); color: var(--gray-700); }
.bubble-right{ background: var(--primary-lighter); color: var(--primary-dark); margin-left:auto; }
.nurse-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-color);
}

.features-section {
    padding: 4rem 0;
    background: white;
}

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-lighter);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 0.75rem 0;
    z-index: 1000;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 0.75rem;
    transition: color var(--transition-fast);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-icon {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* Header Styles */
.header-main {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: white;
}

.top-bar {
    font-size: 0.875rem;
}

.top-bar .contact-info a:hover {
    text-decoration: underline;
}

.language-switcher a {
    font-size: 0.875rem;
    font-weight: 500;
}

.language-switcher a.active {
    text-decoration: underline;
}

.navbar {
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-text strong {
    font-size: 1.1rem;
}

.brand-text small {
    font-size: 0.75rem;
    line-height: 1;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/medical-pattern.svg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 3vw + 1rem, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw + 0.75rem, 1.25rem);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 0.9;
}

.hero-cta {
    margin-top: 2rem;
}

.hero-cta .btn {
    margin: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Nurse Cards */
.nurse-card {
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.nurse-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.nurse-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.nurse-info {
    padding: 1.5rem;
}

.nurse-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.nurse-specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.nurse-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rating-stars {
    color: #fbbf24;
}

.nurse-specialty-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.specialty-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.nurse-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.nurse-info-item i {
    width: 20px;
    color: var(--primary-color);
    margin-right: 10px;
}

.nurse-availability {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}

.nurse-availability h6 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.availability-text {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.nurse-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nurse-actions .btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-outline-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-info:hover {
    background: var(--info-color);
    border-color: var(--info-color);
}

/* Responsive adjustments for complete nurses section */
@media (max-width: 768px) {
    .complete-nurses-section .card-img-top-container {
        height: 200px;
    }
    
    .nurse-specialty-tags {
        justify-content: center;
    }
    
    .nurse-actions .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Sidebar */
.sidebar {
    background-color: white;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-nav i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Tables */
.table {
    background-color: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-primary {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}

.alert-success {
    background-color: #d1fae5;
    color: var(--accent-dark);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Footer */
.footer {
    margin-top: auto;
}

.footer-main {
    background-color: var(--gray-800);
}

.footer-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-light) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    background-color: var(--gray-900);
}

.footer-certifications {
    border-top: 1px solid var(--gray-200);
}

.certification-item {
    display: flex;
    align-items: center;
}

/* Back to Top Button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Cookie Consent */
.cookie-consent {
    background-color: var(--gray-900) !important;
    border-top: 3px solid var(--primary-color);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner-border {
    color: var(--primary-color);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .row {
        gap: 1.25rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image {
        margin-top: 1rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius-lg);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .sidebar {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .header-main,
    .footer,
    .sidebar,
    .btn,
    #backToTop,
    .cookie-consent {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --gray-600: #000000;
        --gray-700: #000000;
    }
    
    .card {
        border: 2px solid var(--gray-600);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Notifications (pop-up) */
:root {
  --notify-z: 1060;
  --notify-gap: 12px;
  --notify-radius: 10px;
  --notify-shadow: 0 10px 25px rgba(0,0,0,0.15);
  --notify-font-scale: 1; /* Ajustable para accesibilidad */
  --notify-safe-top: 80px; /* evita superposición con navbar */
  --notify-safe-bottom: 20px;
  --notify-width: min(380px, 92vw);
}

.notify-root {
  position: fixed;
  pointer-events: none; /* evita bloquear la UI */
  z-index: var(--notify-z);
  width: var(--notify-width);
  display: flex;
  flex-direction: column;
  gap: var(--notify-gap);
}

/* Posiciones */
.notify-top-right { top: var(--notify-safe-top); right: 20px; align-items: flex-end; }
.notify-top-left  { top: var(--notify-safe-top); left: 20px;  align-items: flex-start; }
.notify-bottom-right { bottom: var(--notify-safe-bottom); right: 20px; align-items: flex-end; }
.notify-bottom-left  { bottom: var(--notify-safe-bottom); left: 20px;  align-items: flex-start; }

/* Card */
.notify {
  pointer-events: auto; /* permitir interacción */
  background: #1f2937; /* gris oscuro para alto contraste */
  color: #fff;
  border-radius: var(--notify-radius);
  box-shadow: var(--notify-shadow);
  overflow: hidden;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  font-size: calc(14px * var(--notify-font-scale));
}
.notify.show { transform: translateY(0); opacity: 1; }

/* Variantes por prioridad/tipo */
.notify--info { background: #1f2937; }
.notify--success { background: #065f46; }
.notify--warning { background: #92400e; }
.notify--error { background: #7f1d1d; }

.notify__content { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; }
.notify__icon { font-size: 18px; line-height: 1; margin-top: 2px; }
.notify__text { min-width: 200px; }
.notify__title { font-weight: 600; margin: 0 0 4px; }
.notify__message { margin: 0; opacity: 0.95; }

.notify__close { border: none; background: transparent; color: inherit; opacity: 0.85; cursor: pointer; padding: 6px; border-radius: 6px; }
.notify__close:hover, .notify__close:focus { opacity: 1; outline: 2px solid rgba(255,255,255,0.35); outline-offset: 2px; }

/* Barra de progreso */
.notify__progress { height: 3px; background: rgba(255,255,255,0.25); }
.notify__progress > span { display:block; height:100%; background: #fff; width:0%; transition: width linear; }

/* Responsivo */
@media (max-width: 576px) {
  :root { --notify-safe-top: 64px; }
  .notify__content { grid-template-columns: 1fr auto; }
  .notify__icon { display: none; }
}

/* Respeto por usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .notify { transition: none; }
  .notify__progress > span { transition: none; }
}

/* Alto contraste y accesibilidad */
.notify a { color: #fff; text-decoration: underline; }
.notify a:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* Contenedor del historial */
.notify-history {
  position: fixed; right: 20px; bottom: 80px; z-index: calc(var(--notify-z) - 1);
  width: min(520px, 96vw);
}
.notify-history .card { background: #111827; color: #fff; }

/* Global Section Layout Optimization */
section {
  padding-block: clamp(1rem, 2vw, 2.5rem);
}

section .row {
  row-gap: 1.25rem;
}

section h1, section .h1 {
  margin-bottom: 0.75rem;
}

section h2, section .h2 {
  margin-bottom: 0.75rem;
}

section p {
  margin-bottom: 1rem;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    border-color: white;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background-color: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

/* Feature Cards */
.feature-card {
    text-align: center;
    padding: 2rem;
    height: 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Nurse Cards */
.nurse-card {
    transition: all var(--transition-normal);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.nurse-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.nurse-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.nurse-info {
    padding: 1.5rem;
}

.nurse-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.nurse-specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.nurse-rating {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.rating-stars {
    color: #fbbf24;
}

.nurse-specialty-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.specialty-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.nurse-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.nurse-info-item i {
    width: 20px;
    color: var(--primary-color);
    margin-right: 10px;
}

.nurse-availability {
    background: var(--gray-50);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
}

.nurse-availability h6 {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.availability-text {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.nurse-actions .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nurse-actions .btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
}

.btn-outline-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
}

.btn-outline-info:hover {
    background: var(--info-color);
    border-color: var(--info-color);
}

/* Responsive adjustments for complete nurses section */
@media (max-width: 768px) {
    .complete-nurses-section .card-img-top-container {
        height: 200px;
    }
    
    .nurse-specialty-tags {
        justify-content: center;
    }
    
    .nurse-actions .btn {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* Sidebar */
.sidebar {
    background-color: white;
    box-shadow: var(--shadow-sm);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.sidebar-nav a:hover {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-nav i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* Tables */
.table {
    background-color: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-800);
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-primary {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}

.alert-success {
    background-color: #d1fae5;
    color: var(--accent-dark);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Footer */
.footer {
    margin-top: auto;
}

.footer-main {
    background-color: var(--gray-800);
}

.footer-section h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-light) !important;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-bottom {
    background-color: var(--gray-900);
}

.footer-certifications {
    border-top: 1px solid var(--gray-200);
}

.certification-item {
    display: flex;
    align-items: center;
}

/* Back to Top Button */
#backToTop {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
}

#backToTop:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* Cookie Consent */
.cookie-consent {
    background-color: var(--gray-900) !important;
    border-top: 3px solid var(--primary-color);
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner-border {
    color: var(--primary-color);
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .row {
        gap: 1.25rem;
    }

    .hero-content {
        text-align: center;
    }

    .hero-image {
        margin-top: 1rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-subtitle {
        font-size: 1.05rem;
    }
    
    .hero-cta .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius-lg);
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .sidebar {
        margin-bottom: 2rem;
    }
}

/* Print Styles */
@media print {
    .header-main,
    .footer,
    .sidebar,
    .btn,
    #backToTop,
    .cookie-consent {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0000ff;
        --gray-600: #000000;
        --gray-700: #000000;
    }
    
    .card {
        border: 2px solid var(--gray-600);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Notifications (pop-up) */
:root {
  --notify-z: 1060;
  --notify-gap: 12px;
  --notify-radius: 10px;
  --notify-shadow: 0 10px 25px rgba(0,0,0,0.15);
  --notify-font-scale: 1; /* Ajustable para accesibilidad */
  --notify-safe-top: 80px; /* evita superposición con navbar */
  --notify-safe-bottom: 20px;
  --notify-width: min(380px, 92vw);
}

.notify-root {
  position: fixed;
  pointer-events: none; /* evita bloquear la UI */
  z-index: var(--notify-z);
  width: var(--notify-width);
  display: flex;
  flex-direction: column;
  gap: var(--notify-gap);
}

/* Posiciones */
.notify-top-right { top: var(--notify-safe-top); right: 20px; align-items: flex-end; }
.notify-top-left  { top: var(--notify-safe-top); left: 20px;  align-items: flex-start; }
.notify-bottom-right { bottom: var(--notify-safe-bottom); right: 20px; align-items: flex-end; }
.notify-bottom-left  { bottom: var(--notify-safe-bottom); left: 20px;  align-items: flex-start; }

/* Card */
.notify {
  pointer-events: auto; /* permitir interacción */
  background: #1f2937; /* gris oscuro para alto contraste */
  color: #fff;
  border-radius: var(--notify-radius);
  box-shadow: var(--notify-shadow);
  overflow: hidden;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
  font-size: calc(14px * var(--notify-font-scale));
}
.notify.show { transform: translateY(0); opacity: 1; }

/* Variantes por prioridad/tipo */
.notify--info { background: #1f2937; }
.notify--success { background: #065f46; }
.notify--warning { background: #92400e; }
.notify--error { background: #7f1d1d; }

.notify__content { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 12px 14px; }
.notify__icon { font-size: 18px; line-height: 1; margin-top: 2px; }
.notify__text { min-width: 200px; }
.notify__title { font-weight: 600; margin: 0 0 4px; }
.notify__message { margin: 0; opacity: 0.95; }

.notify__close { border: none; background: transparent; color: inherit; opacity: 0.85; cursor: pointer; padding: 6px; border-radius: 6px; }
.notify__close:hover, .notify__close:focus { opacity: 1; outline: 2px solid rgba(255,255,255,0.35); outline-offset: 2px; }

/* Barra de progreso */
.notify__progress { height: 3px; background: rgba(255,255,255,0.25); }
.notify__progress > span { display:block; height:100%; background: #fff; width:0%; transition: width linear; }

/* Responsivo */
@media (max-width: 576px) {
  :root { --notify-safe-top: 64px; }
  .notify__content { grid-template-columns: 1fr auto; }
  .notify__icon { display: none; }
}

/* Respeto por usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  .notify { transition: none; }
  .notify__progress > span { transition: none; }
}

/* Alto contraste y accesibilidad */
.notify a { color: #fff; text-decoration: underline; }
.notify a:focus { outline: 2px solid #fff; outline-offset: 2px; }

/* Contenedor del historial */
.notify-history {
  position: fixed; right: 20px; bottom: 80px; z-index: calc(var(--notify-z) - 1);
  width: min(520px, 96vw);
}
.notify-history .card { background: #111827; color: #fff; }

