/* MediCare Plus - Professional Hospital Theme */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #20c997;
    --accent: #0dcaf0;
    --dark: #1a1d21;
    --light-bg: #f8fafc;
    --text: #212529;
    --text-muted: #495057;
    --border: #dee2e6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Source Sans 3', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Ensure high contrast text everywhere */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
}

p, li, label, .form-label, .form-control, .form-select, td, th, .card-text {
    color: var(--text);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Navbar */
.navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
    background: rgba(13, 110, 253, 0.08);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(10, 37, 80, 0.92) 0%, rgba(13, 110, 253, 0.75) 55%, rgba(13, 110, 253, 0.45) 100%);
}

.hero-content {
    z-index: 1;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.min-vh-60 {
    min-height: 60vh;
}

.hero-section h1 {
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.hero-section .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    max-width: 540px;
}

.hero-section .btn-light {
    color: var(--primary);
    font-weight: 600;
}

.home-gallery-card {
    transition: transform 0.25s, box-shadow 0.25s;
}

.home-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12) !important;
}

/* Section styling */
.section-title {
    position: relative;
    margin-bottom: 2.5rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin-top: 0.75rem;
    border-radius: 2px;
}

.section-title.text-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Cards */
.feature-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
    background: #fff;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.feature-card .icon-box {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.doctor-card img {
    height: 220px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.dept-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.25s;
    background: #fff;
    height: 100%;
}

.dept-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.12);
}

.dept-card .dept-icon {
    font-size: 2.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Stats */
.stat-box {
    text-align: center;
    padding: 1.5rem;
}

.stat-box .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-box .stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.65rem 1rem;
    color: var(--text);
    background: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.6rem 1.4rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Patient search result */
.record-card {
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.record-header {
    background: linear-gradient(90deg, #0d6efd, #0a58ca);
    color: #fff;
    padding: 1.25rem 1.5rem;
}

.record-header h4 {
    color: #fff;
    margin: 0;
}

.record-body {
    padding: 1.5rem;
    background: #fff;
}

.record-body .info-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.record-body .info-value {
    color: var(--dark);
    margin-bottom: 1rem;
}

/* Alerts - high contrast */
.alert {
    border-radius: 10px;
    border: none;
}

.alert-success {
    background: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background: #f8d7da;
    color: #842029;
}

.alert-info {
    background: #cff4fc;
    color: #055160;
}

.alert-warning {
    background: #fff3cd;
    color: #664d03;
}

/* Footer */
.footer a:hover {
    color: #fff !important;
}

/* Admin specific */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: #1a1d21;
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(13, 110, 253, 0.3);
    color: #fff !important;
}

.admin-content {
    background: var(--light-bg);
    min-height: calc(100vh - 56px);
}

.table {
    color: var(--text);
}

.table thead th {
    background: #f1f5f9;
    color: var(--dark);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
}

.badge-status {
    font-weight: 500;
    padding: 0.35em 0.7em;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.9rem;
    }
    .hero-section {
        min-height: 400px;
    }
    .stat-box .stat-number {
        font-size: 2rem;
    }
}

/* Accessibility focus */
a:focus-visible,
button:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
