@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('navbar.css');
@import url('fluid.css');
@import url('home-sections.css');

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

*,
*::before,
*::after {
    box-sizing: border-box;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

@keyframes float {
    0% { transform: rotate(45deg) translateY(0px); }
    50% { transform: rotate(45deg) translateY(-20px); }
    100% { transform: rotate(45deg) translateY(0px); }
}


:root {
    /* Brand palette */
    --primary-color: #B3263A;
    --primary-hover: #972132;
    --primary-light: #FCECEF;

    --secondary-color: #3C4043;

    --text-primary: #202124;
    --text-secondary: #5F6368;

    --success-color: #188038;
    --warning-color: #EA8600;
    --info-color: #1A73E8;

    --background-light: #FCECEF;
    --background-section: #FFF5F7;
    --background-white: #FFFFFF;
    --background-muted: rgba(var(--primary-rgb), 0.04);

    --border-color: #F0DDE1;

    /* Derived tokens */
    --primary-rgb: 179, 38, 58;
    --primary-gradient: linear-gradient(135deg, #B3263A 0%, #D43B52 50%, #972132 100%);
    --primary-soft: rgba(var(--primary-rgb), 0.08);
    --primary-glow: rgba(var(--primary-rgb), 0.25);

    /* Legacy aliases */
    --text-color: var(--text-primary);
    --light-text: var(--text-secondary);
    --white: var(--background-white);
    --primary-dark: var(--primary-hover);

    /* Fluid layout */
    --navbar-height: 72px;
    --container-max: 1200px;
    --section-gap: clamp(3rem, 8vw, 6rem);
    --page-padding: clamp(1rem, 4vw, 5%);

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    --border-radius: var(--radius-md);
    --border-radius-sm: var(--radius-sm);
    --border-radius-lg: var(--radius-lg);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(32, 33, 36, 0.04);
    --shadow-sm: 0 2px 8px rgba(32, 33, 36, 0.06);
    --shadow-md: 0 8px 24px rgba(32, 33, 36, 0.08);
    --shadow-lg: 0 16px 48px rgba(32, 33, 36, 0.1);
    --shadow-card: 0 1px 3px rgba(32, 33, 36, 0.06), 0 4px 16px rgba(32, 33, 36, 0.04);
    --shadow-primary: 0 4px 20px var(--primary-glow);

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition: 0.35s var(--ease-out);
    --transition-slow: 0.6s var(--ease-out);
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    color: var(--text-primary);
    line-height: 1.65;
    background-color: var(--background-white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: no-preference) {
    body {
        animation: pageEnter 0.7s var(--ease-out) both;
    }
}

@keyframes pageEnter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

::selection {
    background: var(--primary-light);
    color: var(--primary-hover);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-section);
}

::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.25);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.4);
}

/* Navigation → see navbar.css */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.925rem;
    font-family: inherit;
    cursor: pointer;
    transition:
        transform 0.4s var(--ease-spring),
        box-shadow 0.4s var(--ease-out),
        background 0.35s var(--ease-out),
        color 0.35s var(--ease-out),
        border-color 0.35s var(--ease-out);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
    color: var(--background-white);
}

.btn-outline {
    background: var(--background-white);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-ghost {
    background: transparent;
    color: var(--primary-color);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--primary-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    padding: calc(var(--navbar-height) + 3rem) var(--page-padding) 4rem;
    min-height: 100vh;
    background: var(--background-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 90% 20%, var(--primary-soft) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 10% 80%, rgba(26, 115, 232, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 580px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem 0.4rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    animation: fadeSlideUp 0.8s var(--ease-out) both;
}

.hero-badge i {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
}

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

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    margin-bottom: 1.25rem;
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    animation: fadeSlideUp 0.8s var(--ease-out) 0.1s both;
}

.hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 480px;
    line-height: 1.75;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.2s both;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    animation: fadeSlideUp 0.8s var(--ease-out) 0.3s both;
}

.hero-stats {
    display: flex;
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    animation: fadeSlideUp 0.8s var(--ease-out) 0.45s both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.hero-stat strong {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.03em;
    line-height: 1;
}

.hero-stat span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-graphic {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
    z-index: 1;
    animation: fadeSlideUp 1s var(--ease-out) 0.2s both;
}

.hero-visual {
    position: relative;
    width: min(380px, 90%);
    aspect-ratio: 1;
    transition: transform 0.1s linear;
    will-change: transform;
}

.hero-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed var(--border-color);
    animation: spinSlow 30s linear infinite;
}

.hero-ring:nth-child(2) {
    inset: 12%;
    border-style: solid;
    border-color: var(--primary-light);
    animation-direction: reverse;
    animation-duration: 20s;
}

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

.hero-drop {
    position: absolute;
    inset: 22%;
    background: var(--primary-gradient);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 60px var(--primary-glow);
    animation: floatDrop 5s var(--ease-smooth) infinite;
}

@keyframes floatDrop {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-12px); }
}

.blood-type {
    transform: rotate(45deg);
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    color: white;
    letter-spacing: -0.03em;
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.red-oval {
    display: none;
}

/* Donation Process, Why Donate, Facts & Eligibility → see home-sections.css */

/* Footer Styles */
.site-footer {
    background: linear-gradient(180deg, var(--primary-hover) 0%, #6b1522 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 4rem 0 0;
    font-size: 0.95rem;
    line-height: 1.65;
    margin-top: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p {
    color: #b3b3b3;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul a {
    color: #b3b3b3;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-col ul a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: #b3b3b3;
}

.contact-info i {
    margin-right: 1rem;
    color: var(--primary-color);
    margin-top: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: #b3b3b3;
    font-size: 0.9rem;
}

.footer-credit {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.footer-credit:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #b3b3b3;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .footer-row {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        margin-top: 1rem;
    }
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: calc(var(--navbar-height) + 2rem);
        min-height: auto;
    }
    
    .hero-content {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-graphic {
        margin-top: 1rem;
        min-height: 280px;
    }

    .hero-stats {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 900px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .blood-type {
        width: 150px;
        height: 150px;
        font-size: 3.5rem;
    }
}

a{
    text-decoration: none;
}

/* ======================
   Find Donor (interactive)
   ====================== */
main .section-content {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    padding-top: calc(var(--navbar-height) + 2.5rem);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    margin: 0 5% 2rem;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

main .section-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #D43B52, var(--primary-color));
    background-size: 200% 100%;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Form Section Styling */
#filters-heading {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #D43B52);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#donor-filter-form {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--background-white) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

#donor-filter-form fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.location-panel {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.location-panel[data-state="ready"] {
    border-color: rgba(var(--primary-rgb), 0.35);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.04), #fff);
}

.location-panel[data-state="error"] {
    border-color: #f5c2c7;
    background: #fff5f5;
}

.location-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.location-heading {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-status {
    margin: 0 0 1rem;
    color: #4b5563;
    font-size: 0.95rem;
}

.location-note {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.location-radius-group {
    max-width: 220px;
}

.location-radius-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    font-size: 1rem;
}

#donor-results-table .distance-col {
    white-space: nowrap;
    font-weight: 600;
    color: var(--primary-color);
}

#donor-filter-form legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: inline-block;
}

#donor-filter-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

#donor-filter-form .form-group {
    position: relative;
}

#donor-filter-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#donor-filter-form select,
#donor-filter-form input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

#donor-filter-form select:hover,
#donor-filter-form input[type="text"]:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

#donor-filter-form select:focus,
#donor-filter-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-2px);
}

#donor-filter-form select:focus + label,
#donor-filter-form input[type="text"]:focus + label {
    color: var(--primary-color);
}

#donor-filter-form .form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

#donor-filter-form .btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

#donor-filter-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #D43B52);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

#donor-filter-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

#donor-filter-form .btn-primary:active {
    transform: translateY(-1px);
}

#donor-filter-form .btn:not(.btn-primary) {
    background: var(--background-white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

#donor-filter-form .btn:not(.btn-primary):hover {
    background: var(--primary-light);
    border-color: rgba(var(--primary-rgb), 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#donor-filter-form .btn i {
    margin-right: 0.5rem;
}

/* Results Section Styling */
#results-heading {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}

#results-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #D43B52);
    border-radius: 2px;
}

#results-status {
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Results table interactivity */
#donor-results-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 2px 0;
}

#donor-results-table tbody tr:hover {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}

#donor-results-table tbody tr:active {
    transform: translateY(0);
}

/* Sticky table header for better UX when scrolling */
#donor-results-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 1rem 1.1rem;
}

/* Utility: visually hidden for statuses */
.visually-hidden {
    position: absolute !important;
    height: 1px; width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

@media (max-width: 992px) {
    #donor-filter-form .form-grid {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }
}

@media (max-width: 600px) {
    main .section-content {
        margin: 0 1rem 1.5rem;
        padding: 1.35rem;
        padding-top: calc(var(--navbar-height) + 1.35rem);
    }
    #donor-filter-form .form-grid {
        grid-template-columns: 1fr;
    }
    #donor-filter-form .form-actions {
        flex-wrap: wrap;
    }
}

/* Results table styling (Find Donor) */
.table-container {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    border: 2px solid rgba(var(--primary-rgb), 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--background-white) 0%, var(--primary-light) 100%);
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #D43B52, var(--primary-color));
    border-radius: 16px 16px 0 0;
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: var(--background-section);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.25);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.4);
}

#donor-results-table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 100%;
    min-width: 600px;
}

#donor-results-table thead th {
    background: linear-gradient(135deg, var(--primary-color), #D43B52);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

#donor-results-table th, #donor-results-table td {
    vertical-align: middle;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

#donor-results-table tbody tr:nth-child(even) {
    background: var(--background-muted);
}

#donor-results-table tbody tr:nth-child(odd) {
    background: var(--background-white);
}

/* Loading animation */
@keyframes pulse-loading {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-row {
    animation: pulse-loading 1.5s ease-in-out infinite;
}

/* Contact links styling */
#donor-results-table td a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0.25rem;
}

#donor-results-table td a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.contact-buttons .btn i {
    font-size: 0.8em;
}

.contact-buttons .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
}

.contact-buttons .btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.contact-buttons .btn-outline-info {
    color: #17a2b8;
    border: 1px solid #17a2b8;
}

.contact-buttons .btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
}

.contact-buttons .btn-success {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.contact-buttons .btn-danger {
    background-color: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* Responsive improvements */
@media (max-width: 768px) {
    main .section-content {
        margin: 6rem 2% 2rem;
        padding: 1.5rem;
    }
    
    #donor-filter-form {
        padding: 1.5rem;
    }
    
    #donor-filter-form .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #donor-filter-form .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    #donor-filter-form .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .table-container {
        max-height: 400px;
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    #donor-results-table {
        min-width: 500px;
    }
    
    #donor-results-table th, #donor-results-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Highlight blood type (2nd column) as a pill */
#donor-results-table td:nth-child(2) {
    text-align: center;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #D43B52);
    color: white;
    border-radius: 20px;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    display: inline-block;
    min-width: 60px;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

/* Empty state styling */
#donor-results-table tbody tr td[colspan] {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--light-text);
    font-style: italic;
    background: var(--primary-light);
    border-radius: 12px;
    margin: 1rem;
}

/* Success state for results */
.results-found {
    border-left: 4px solid var(--success-color);
    background: rgba(40, 167, 69, 0.1);
}

/* No results state */
.no-results {
    border-left: 4px solid var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
}

/* Style contact link/button (5th column) */
#donor-results-table td:nth-child(5) a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    background: var(--primary-color);
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

#donor-results-table td:nth-child(5) a:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

#donor-results-table td:nth-child(5) a i {
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .table-container {
        max-height: 400px;
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    #donor-results-table {
        min-width: 500px;
    }
    
    #donor-results-table th, #donor-results-table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    #donor-results-table td:nth-child(2) {
        width: auto;
    }
}

/* ======================
   Global Form Controls
   ====================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-control,
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--background-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* ======================
   Scroll Reveal Animations
   ====================== */

/* reveal-on-scroll & btn-ripple → see fluid.css */

/* ======================
   Shared Page Layout
   ====================== */
.page-shell {
    padding-top: calc(var(--navbar-height) + 2rem);
    padding-bottom: 3rem;
    min-height: 100vh;
}

.content-card {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(var(--primary-rgb), 0.06);
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.page-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--light-text);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

/* Enhanced tables (global) */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.data-table thead th {
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem;
    text-align: left;
}

.data-table tbody td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f3f5;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

/* Badge utilities */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}