/* ============================================================
   Just Blood — Main Stylesheet
   Bootstrap 5 + Custom Theme
   ============================================================ */

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

/* ── CSS Variables ── */
:root {
    --jb-red:        #DC2626;
    --jb-red-dark:   #991B1B;
    --jb-red-darker: #7F1D1D;
    --jb-red-light:  #FEE2E2;
    --jb-red-50:     #FEF2F2;
    --jb-red-100:    #FEE2E2;
    --jb-red-500:    #EF4444;
    --jb-red-600:    #DC2626;
    --jb-red-700:    #B91C1C;
    --jb-red-800:    #991B1B;
    --jb-red-900:    #7F1D1D;

    --jb-text:       #1F2937;
    --jb-text-light: #6B7280;
    --jb-text-muted: #9CA3AF;
    --jb-bg:         #FFFFFF;
    --jb-bg-off:     #F9FAFB;
    --jb-bg-warm:    #FFFBFB;
    --jb-border:     #E5E7EB;

    --jb-success:    #059669;
    --jb-warning:    #D97706;
    --jb-info:       #2563EB;

    --font-heading:  'Plus Jakarta Sans', sans-serif;
    --font-body:     'DM Sans', sans-serif;

    --shadow-sm:     0 1px 2px rgba(0,0,0,0.05);
    --shadow:        0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --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);

    --radius:        0.5rem;
    --radius-lg:     0.75rem;
    --radius-xl:     1rem;
    --radius-full:   9999px;
}

/* ── Base ── */
* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    color: var(--jb-text);
    background: var(--jb-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--jb-red);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--jb-red-dark); }

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

::selection {
    background: var(--jb-red-100);
    color: var(--jb-red-900);
}

/* ── Navbar ── */
.jb-navbar {
    background: var(--jb-bg);
    border-bottom: 1px solid var(--jb-border);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.95);
}

.jb-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--jb-red) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jb-navbar .navbar-brand img {
    height: 36px;
    width: auto;
}

.jb-navbar .nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--jb-text) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-size: 0.95rem;
}

.jb-navbar .nav-link:hover,
.jb-navbar .nav-link.active {
    color: var(--jb-red) !important;
    background: var(--jb-red-50);
}

.jb-navbar .btn-donate {
    background: var(--jb-red);
    color: #fff !important;
    font-weight: 600;
    padding: 0.5rem 1.25rem !important;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    transition: all 0.3s;
    border: none;
}
.jb-navbar .btn-donate:hover {
    background: var(--jb-red-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ── Buttons ── */
.btn-jb {
    background: var(--jb-red);
    color: #fff;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}
.btn-jb:hover {
    background: var(--jb-red-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(220,38,38,0.4);
}
.btn-jb:active { transform: translateY(0); }

.btn-jb-outline {
    background: transparent;
    color: var(--jb-red);
    border: 2px solid var(--jb-red);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-jb-outline:hover {
    background: var(--jb-red);
    color: #fff;
    transform: translateY(-2px);
}

.btn-jb-lg {
    padding: 0.85rem 2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-jb-pill {
    border-radius: var(--radius-full);
}

/* ── Hero Section ── */
.jb-hero {
    background: linear-gradient(135deg, var(--jb-red-900) 0%, var(--jb-red) 50%, #E74C3C 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.jb-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.jb-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--jb-bg), transparent);
    pointer-events: none;
}

.jb-hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.jb-hero h1 span {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0 0.3em;
    border-radius: 0.2em;
}

.jb-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 540px;
    line-height: 1.7;
}

/* Hero search box */
.jb-hero-search {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-top: 2rem;
}

.jb-hero-search .form-select,
.jb-hero-search .form-control {
    border: none;
    background: #fff;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.jb-hero-search .form-select:focus,
.jb-hero-search .form-control:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* ── Stats Strip ── */
.jb-stats {
    background: var(--jb-bg);
    padding: 3rem 0;
    border-bottom: 1px solid var(--jb-border);
}

.jb-stat-item {
    text-align: center;
    padding: 1rem;
}

.jb-stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--jb-red);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.jb-stat-label {
    color: var(--jb-text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ── Section Headers ── */
.jb-section {
    padding: 4.5rem 0;
}

.jb-section-alt {
    background: var(--jb-bg-off);
}

.jb-section-warm {
    background: var(--jb-bg-warm);
}

.jb-section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.jb-section-subtitle {
    text-align: center;
    color: var(--jb-text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
}

/* ── Cards ── */
.jb-card {
    background: var(--jb-bg);
    border: 1px solid var(--jb-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

.jb-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--jb-red-100);
}

.jb-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: var(--jb-red-50);
    color: var(--jb-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.jb-card h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.jb-card p {
    color: var(--jb-text-light);
    font-size: 0.93rem;
    margin-bottom: 0;
}

/* ── Blood Group Badge ── */
.jb-blood-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--jb-red);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.jb-blood-badge-sm {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
}

.jb-blood-badge-lg {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
    border-radius: var(--radius-lg);
}

/* ── Urgency Badges ── */
.jb-urgency {
    display: inline-block;
    padding: 0.2em 0.7em;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jb-urgency-critical {
    background: #FEE2E2;
    color: #DC2626;
    animation: pulse-urgency 2s infinite;
}

.jb-urgency-urgent {
    background: #FEF3C7;
    color: #D97706;
}

.jb-urgency-normal {
    background: #DBEAFE;
    color: #2563EB;
}

.jb-urgency-planned {
    background: #F3F4F6;
    color: #6B7280;
}

@keyframes pulse-urgency {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ── Request Card ── */
.jb-request-card {
    background: var(--jb-bg);
    border: 1px solid var(--jb-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.3s;
    display: flex;
    gap: 1rem;
}

.jb-request-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--jb-red-100);
}

.jb-request-card .request-info h6 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.jb-request-card .request-meta {
    color: var(--jb-text-light);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.jb-request-card .request-meta i {
    color: var(--jb-red);
    margin-right: 0.2rem;
}

/* ── How It Works ── */
.jb-step {
    text-align: center;
    padding: 1.5rem 1rem;
    position: relative;
}

.jb-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--jb-red);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
}

.jb-step h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.jb-step p {
    color: var(--jb-text-light);
    font-size: 0.93rem;
}

/* ── Donor Card ── */
.jb-donor-card {
    background: var(--jb-bg);
    border: 1px solid var(--jb-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.jb-donor-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--jb-red-100);
}

.jb-donor-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--jb-red-100);
    flex-shrink: 0;
}

.jb-donor-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--jb-red-50);
    color: var(--jb-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Form Styles ── */
.jb-form .form-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--jb-text);
    margin-bottom: 0.35rem;
}

.jb-form .form-control,
.jb-form .form-select {
    border: 1.5px solid var(--jb-border);
    border-radius: var(--radius);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.jb-form .form-control:focus,
.jb-form .form-select:focus {
    border-color: var(--jb-red);
    box-shadow: 0 0 0 3px var(--jb-red-100);
}

.jb-form .form-text {
    color: var(--jb-text-muted);
    font-size: 0.82rem;
}

/* ── Auth Pages ── */
.jb-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--jb-bg-off);
}

.jb-auth-card {
    background: var(--jb-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    max-width: 440px;
    width: 100%;
    margin: 2rem auto;
}

.jb-auth-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.25rem;
}

.jb-auth-card .auth-subtitle {
    text-align: center;
    color: var(--jb-text-light);
    margin-bottom: 2rem;
}

/* ── Footer ── */
.jb-footer {
    background: var(--jb-red-900);
    color: rgba(255,255,255,0.8);
    padding: 4rem 0 0;
}

.jb-footer h5 {
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
}

.jb-footer a {
    color: rgba(255,255,255,0.7);
    transition: color 0.2s;
    font-size: 0.93rem;
}
.jb-footer a:hover { color: #fff; }

.jb-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jb-footer-links li {
    margin-bottom: 0.6rem;
}

.jb-footer-links li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.jb-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
}

.jb-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    font-size: 1.1rem;
    transition: all 0.3s;
}
.jb-footer-social a:hover {
    background: var(--jb-red);
    transform: translateY(-2px);
}

/* ── Blog Card ── */
.jb-blog-card {
    border: 1px solid var(--jb-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--jb-bg);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.jb-blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.jb-blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.jb-blog-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.jb-blog-card .card-body h5 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.jb-blog-card .card-body p {
    color: var(--jb-text-light);
    font-size: 0.9rem;
    flex: 1;
}

/* ── App Download CTA ── */
.jb-cta {
    background: linear-gradient(135deg, var(--jb-red-900), var(--jb-red));
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.jb-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 50%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.06), transparent 70%);
}

.jb-cta h2 {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.jb-cta p {
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.jb-cta .btn-store {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s;
    margin: 0 0.5rem;
}
.jb-cta .btn-store:hover {
    background: #fff;
    color: var(--jb-red);
}

/* ── Pagination ── */
.jb-pagination .page-link {
    border: 1px solid var(--jb-border);
    color: var(--jb-text);
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius) !important;
    margin: 0 0.15rem;
    padding: 0.45rem 0.85rem;
}
.jb-pagination .page-item.active .page-link {
    background: var(--jb-red);
    border-color: var(--jb-red);
    color: #fff;
}

/* ── Loading Spinner ── */
.jb-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--jb-red-100);
    border-top-color: var(--jb-red);
    border-radius: 50%;
    animation: jb-spin 0.8s linear infinite;
}
@keyframes jb-spin {
    to { transform: rotate(360deg); }
}

.jb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--jb-text-light);
}

/* ── Empty State ── */
.jb-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--jb-text-light);
}

.jb-empty i {
    font-size: 3rem;
    color: var(--jb-red-100);
    margin-bottom: 1rem;
}

/* ── Toast Notification ── */
.jb-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.jb-toast {
    background: var(--jb-text);
    color: #fff;
    padding: 0.8rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: jb-slideIn 0.3s ease;
    max-width: 360px;
    font-size: 0.9rem;
}

.jb-toast-success { border-left: 4px solid var(--jb-success); }
.jb-toast-error   { border-left: 4px solid var(--jb-red); }

@keyframes jb-slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Page Header (Breadcrumb area) ── */
.jb-page-header {
    background: var(--jb-bg-off);
    border-bottom: 1px solid var(--jb-border);
    padding: 2rem 0;
}

.jb-page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.jb-page-header .breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
}

.jb-page-header .breadcrumb-item a {
    color: var(--jb-text-light);
}

/* ── Blood Group Selector (Chips) ── */
.jb-blood-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.jb-blood-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 0.45rem 0.75rem;
    border: 2px solid var(--jb-border);
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--jb-bg);
    color: var(--jb-text);
}

.jb-blood-chip:hover,
.jb-blood-chip.active {
    border-color: var(--jb-red);
    background: var(--jb-red);
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .jb-hero {
        padding: 3rem 0 2.5rem;
    }
    .jb-hero h1 {
        font-size: 2rem;
    }
    .jb-hero p {
        font-size: 1rem;
    }
    .jb-section {
        padding: 3rem 0;
    }
    .jb-section-title {
        font-size: 1.6rem;
    }
    .jb-stat-number {
        font-size: 1.8rem;
    }
    .jb-auth-card {
        padding: 1.5rem;
        margin: 1rem;
    }
    .jb-request-card {
        flex-direction: column;
    }
    .jb-cta h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .jb-hero h1 {
        font-size: 1.7rem;
    }
    .jb-hero-search {
        padding: 1rem;
    }
    .jb-footer {
        padding: 3rem 0 0;
    }
}

/* ── Animations ── */
.jb-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.jb-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Availability Toggle ── */
.form-check-input:checked {
    background-color: var(--jb-red);
    border-color: var(--jb-red);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem var(--jb-red-100);
    border-color: var(--jb-red);
}

/* ── Share Buttons ── */
.jb-share-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s;
}
.jb-share-btn:hover { transform: scale(1.1); color: #fff; }

/* ── Request Detail Contact Card ── */
.jb-contact-card {
    border-left: 4px solid var(--jb-red);
}

/* ── Profile Sections ── */
.jb-profile-stat {
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--jb-bg-off);
}

.jb-profile-stat .number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--jb-red);
}

/* ── Donation Summary Banner ── */
.jb-donation-banner {
    background: linear-gradient(135deg, var(--jb-red-50), #fff);
    border: 1px solid var(--jb-red-100);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

/* ── Tab Pills Override ── */
.nav-pills .nav-link.active {
    background: var(--jb-red) !important;
    color: #fff !important;
}

.nav-pills .nav-link {
    color: var(--jb-text);
}

/* ── Notification Item Unread ── */
.jb-notif-unread {
    background: var(--jb-red-50);
    border-radius: var(--radius);
}

/* ── Print Styles ── */
@media print {
    .jb-navbar, .jb-footer, .jb-cta, .btn { display: none !important; }
    .jb-card { border: 1px solid #ddd; box-shadow: none; }
}
/**
 * Performance Additions
 * Append to: public/assets/css/style.css
 */

/* ═══ Lazy Loading ═══ */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"][src] {
    opacity: 1;
}

/* ═══ Skeleton Screens ═══ */
.jb-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}
.jb-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}
.jb-skeleton-text:last-child {
    width: 70%;
}
.jb-skeleton-title {
    height: 22px;
    width: 60%;
    margin-bottom: 12px;
}
.jb-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
}
.jb-skeleton-card {
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 0.75rem;
    margin-bottom: 12px;
}
@keyframes skeleton-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ═══ Print Styles ═══ */
@media print {
    .jb-hero, .jb-cta, .jb-stats,
    .btn, .navbar, .jb-footer,
    #pwaBanner, .jb-toast-container { display: none !important; }
    body { font-size: 12pt; color: #000; }
    .jb-card { border: 1px solid #ddd; box-shadow: none; break-inside: avoid; }
    a[href]:after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    .jb-blood-badge { border: 2px solid #DC2626; }
}

/* ═══ Reduced Motion ═══ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .jb-fade-in { opacity: 1 !important; transform: none !important; }
}

/* ═══ Dark Mode Support ═══ */
@media (prefers-color-scheme: dark) {
    :root {
        --jb-bg: #1a1a2e;
        --jb-bg-off: #16213e;
        --jb-text: #e8e8e8;
        --jb-text-secondary: #a0a0a0;
        --jb-border: #2a2a4a;
    }
    /* Only applies if you want auto dark mode — can be toggled by class instead */
}

/* ═══ Focus Visible (Accessibility) ═══ */
:focus-visible {
    outline: 3px solid #DC2626;
    outline-offset: 2px;
}
.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

/* ═══ Skip to Content (Accessibility) ═══ */
.jb-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: #DC2626;
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s;
}
.jb-skip-link:focus {
    top: 0;
}

/* ═══ Toast Improvements ═══ */
.jb-toast-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 9999;
    max-width: 380px;
}
