html {
    overflow-y: scroll;
    scrollbar-gutter: stable; /* Reserves space for the scrollbar so the layout never shifts */
}

:root {
    --glass-surface: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --primary-blue: #4A6C9B;
    --primary-accent: #6f8ec3;
    --deep-blue: #1E3057;
    --spring-bounce: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --smooth-flow: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: #f0f4f8;
    background-image: radial-gradient(at 0% 0%, hsla(210,80%,85%,1) 0, transparent 50%),
                      radial-gradient(at 100% 0%, hsla(230,80%,90%,1) 0, transparent 50%),
                      radial-gradient(at 50% 100%, hsla(200,80%,92%,1) 0, transparent 60%);
    background-size: 180% 180%;
    min-height: 100vh;
    animation: auroraDrift 15s ease-in-out infinite alternate;
    overflow-x: hidden;
}

@keyframes auroraDrift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 50% 100%; }
}

.hidden { display: none !important; }

.main-container {
    padding-top: 140px; width: 100%; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    padding-bottom: 100px; perspective: 1500px;
}

.page-section, .cards-container {
    display: flex; flex-direction: column; align-items: center; width: 100%; gap: 40px;
}

/* =========================================
   UTILITY: GLASS CARDS
   ========================================= */
.glass-card, .navbar {
    background: var(--glass-surface);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 40px;
}

.glass-card {
    width: 90%; max-width: 900px; padding: 60px;
    text-align: center; position: relative; overflow: hidden;
    box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.5), inset 0px 20px 40px rgba(31, 38, 135, 0), 0 20px 40px -10px rgba(31, 38, 135, 0.1);
    transition: box-shadow 0.8s ease, border-color 0.8s ease;
    opacity: 0; animation: revealCard 0.4s var(--spring-bounce) forwards 0.1s;
}

.glass-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(1000px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.25) 0%, rgba(74, 108, 155, 0.02) 40%, transparent 80%);
    opacity: 0; transition: opacity 0.8s ease; z-index: 1; pointer-events: none;
}

.glass-card.is-active {
    box-shadow: inset 2px 2px 4px rgba(255, 255, 255, 0.8), inset 0px 20px 40px rgba(31, 38, 135, 0.05), 0 20px 40px -10px rgba(31, 38, 135, 0.25);
    border-color: rgba(255, 255, 255, 0.8);
}
.glass-card.is-active::before { opacity: 1; }

@keyframes revealCard {
    from { opacity: 0; top: 15px; filter: blur(4px); }
    to { opacity: 1; top: 0; filter: blur(0); }
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    min-width: 550px; height: 70px; position: fixed; top: 30px; left: 50%;
    transform: translateX(-50%); box-shadow: 0 20px 40px -10px rgba(31, 38, 135, 0.1), 0 1px 2px rgba(255, 255, 255, 0.5) inset;
    transition: box-shadow 0.4s ease; z-index: 5000;
    display: flex; justify-content: center; align-items: center; gap: 8px; padding: 6px; border-radius: 100px;
    animation: navDrop 0.5s var(--spring-bounce) forwards;
}

.navbar:hover { box-shadow: 0 10px 25px rgba(31, 38, 135, 0.08), 0 1px 2px rgba(255, 255, 255, 0.5) inset; }
@keyframes navDrop { from { top: 10px; opacity: 0; } to { top: 30px; opacity: 1; } }

.nav-btn {
    padding: 12px 24px; border-radius: 50px; font-size: 15px; font-weight: 600; color: var(--deep-blue);
    text-decoration: none; transition: all 0.15s var(--smooth-flow);
}
.nav-btn:hover, .nav-btn.active { background: white; box-shadow: 0 4px 12px rgba(0,0,0,0.05); color: var(--primary-blue); }
.logo-image-navbar { width: 90px; margin-right: 15px; }

/* =========================================
   TYPOGRAPHY
   ========================================= */
.section-heading {
    font-size: 72px; font-weight: 800; letter-spacing: -2px; line-height: 1.1;
    background: linear-gradient(135deg, #1E3057 20%, #4A6C9B 100%); margin-bottom: 50px;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-align: center;
    opacity: 0; animation: revealText 0.4s var(--smooth-flow) forwards 0.1s;
}

.card-heading { font-size: 36px; color: var(--deep-blue); margin-bottom: 40px; font-weight: 800; opacity: 0; animation: revealText 0.4s forwards 0.15s; }
.card-text { font-size: 21px; color: #4a5a6a; line-height: 1.6; max-width: 80ch; margin: 0 auto 30px auto; opacity: 0; animation: revealText 0.4s forwards 0.2s; }
@keyframes revealText { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; text-align: left; }
.form-row { display: flex; flex-direction: column; width: 100%; }
.full-width { grid-column: 1 / -1; text-align: center; }
.form-row label { font-size: 14px; font-weight: 700; color: var(--deep-blue); margin-bottom: 8px; text-transform: uppercase; }
.input { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(0,0,0,0.06); background: rgba(255,255,255,0.9); font-size: 16px; width: 100%; outline: none; transition: 0.2s ease; }
.input:focus { border-color: var(--primary-blue); transform: scale(1.02); box-shadow: 0 15px 30px rgba(74, 108, 155, 0.15); }

/* =========================================
   BUTTONS (Primary & Selection)
   ========================================= */
.btn-primary {
    background: linear-gradient(135deg, #4A6C9B, #7aa3d9); color: white; font-size: 19px; font-weight: 700;
    padding: 18px 50px; border-radius: 100px; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(74, 108, 155, 0.3); transition: all 0.3s var(--spring-bounce); margin-top: 20px;
}
.btn-primary:hover { transform: translateY(-5px) scale(1.05); background: linear-gradient(135deg, #5678a9, #8bb1e3); animation: softPulse 2s infinite; }
.btn-primary:active { transform: scale(0.95); }
@keyframes softPulse { 0% { box-shadow: 0 0 0 0 rgba(74, 108, 155, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(74, 108, 155, 0); } 100% { box-shadow: 0 0 0 0 transparent; } }

.btn-select {
    background: white; border: 2px solid transparent; border-radius: 20px; padding: 18px 25px;
    font-size: 18px; font-weight: 600; color: var(--deep-blue); width: 100%; display: flex;
    justify-content: space-between; align-items: center; cursor: pointer; transition: 0.2s var(--spring-bounce);
}
.btn-select:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(74, 108, 155, 0.15); }
.check-icon { width: 24px; opacity: 0.8; }
.btn-select.other-btn .input { flex: 1; height: auto; padding: 10px; margin: 0 15px; border-radius: 8px; font-size: 14px;}

/* =========================================
   DONATION CONTROLS
   ========================================= */
.qty-wrapper { position: absolute; bottom: 30px; right: 30px; display: flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, 0.4); padding: 5px 10px; border-radius: 50px; }
.btn-qty { background: #e5f6ff; border: 1px solid rgba(255,255,255,0.8); border-radius: 50%; width: 44px; height: 44px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: 0.2s var(--spring-bounce); }
.btn-qty:hover { transform: scale(1.1); }
.btn-qty img { width: 20px; opacity: 0.7; }
.qty-display { font-size: 24px; font-weight: 800; color: var(--deep-blue); min-width: 30px; margin: 0 5px; }

.donated-item { background: #fff; padding: 18px 30px; border-radius: 20px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; font-weight: 500; color: var(--deep-blue); }
.btn-remove { background: #fff5f5; border: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; transition: 0.2s; display: flex; justify-content: center; align-items: center; }
.btn-remove:hover { background: #ffcccc; transform: rotate(90deg) scale(1.1); }
.btn-remove img { width: 16px; opacity: 0.6; }

/* LAYOUT GRIDS */
.supplies-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; width: 100%; margin-top: 15px; }
@media (max-width: 760px) {
    .form-grid, .supplies-grid { grid-template-columns: 1fr; }
    .glass-card { padding: 30px; }
    .qty-wrapper { position: relative; bottom: auto; right: auto; justify-content: center; margin-top: 20px; }
}/* --- SEARCH BAR --- */
.search-input {
    margin-bottom: 20px;
    width: 100%;
    font-size: 18px;
    padding: 16px 25px;
    border-radius: 50px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

/* --- CATEGORY HEADINGS --- */
.category-heading {
    text-align: left;
    font-size: 20px;
    color: var(--primary-blue);
    margin: 30px 0 15px 5px;
    font-weight: 700;
    border-bottom: 2px solid rgba(74, 108, 155, 0.1);
    padding-bottom: 8px;
}

.horizontal-border {
    border-right: 2px solid rgba(74, 108, 155, 0.1);
}

#small-font-medics {
    font-size: 21px;
    color: #1E3057;
    margin-bottom: 1.6%;
}

/* --- SELECTED STATE VISUALS --- */
/* This overrides the default button look when the JS adds the .selected class */
.btn-select.selected,
.other-container.selected {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 8px 20px rgba(74, 108, 155, 0.3);
    border-color: transparent;
}

/* --- REFINED OTHER CONTAINER --- */
.other-container {
    cursor: text; /* Suggests typing rather than clicking */
    padding: 10px 20px;
}
.other-label {
    font-weight: 600;
    margin-right: 15px;
    color: inherit;
}
.other-container .input {
    flex: 1;
    height: 45px;
    margin-right: 15px;
    background: rgba(255,255,255,0.9);
}

/* --- COMPACT DONATE GRID --- */
.donate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 15px;
}

.donate-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 12px 20px;
    border-radius: 16px;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.2s var(--spring-bounce);
}

.donate-item:hover {
    box-shadow: 0 6px 15px rgba(74, 108, 155, 0.1);
}

.donate-item.active {
    border-color: var(--primary-blue);
    background: rgba(74, 108, 155, 0.05);
}

.item-name {
    font-weight: 600;
    color: var(--deep-blue);
    font-size: 16px;
}

/* --- INLINE QUANTITY STEPPER --- */
.compact-qty {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f4f8;
    padding: 4px 6px;
    border-radius: 20px;
}

.btn-minus, .btn-plus {
    border: none;
    background: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    color: var(--deep-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: 0.15s ease;
}

.btn-minus:hover, .btn-plus:hover {
    background: var(--primary-blue);
    color: white;
}

.btn-minus:active, .btn-plus:active {
    transform: scale(0.9);
}

.compact-qty .qty-display {
    font-weight: 800;
    font-size: 16px;
    color: var(--deep-blue);
    min-width: 20px;
    text-align: center;
}

.other-donate-item {
    width: 100%;
}

.compact-input {
    flex: 1;
    height: auto;
    padding: 8px 15px;
    margin-right: 15px;
    font-size: 14px;
}

/* Responsive Grid adjustment */
@media (max-width: 760px) {
    .donate-grid { grid-template-columns: 1fr; }
    .other-donate-item { flex-direction: column; gap: 15px; align-items: stretch; }
    .compact-input { margin-right: 0; }
    .compact-qty { justify-content: space-between; padding: 8px 12px; }
}

/* --- STAFF LOGIN BUTTON --- */
.staff-login-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    opacity: 0.6;
    transition: all 0.3s ease;
    z-index: 1000;
}
.staff-login-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 108, 155, 0.15);
}

/* --- DASHBOARD DROPDOWNS --- */
.db-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.db-dropdown {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

/* 1. Summary styling & Arrow preparation */
.db-summary {
    position: relative; /* Necessary for the absolute positioned arrow */
    padding: 20px;
    cursor: pointer;
    font-size: 18px;
    color: var(--deep-blue);
    list-style: none;
    transition: background 0.2s ease;
}
.db-summary::-webkit-details-marker {
    display: none;
}

/* 2. The Sleek CSS Arrow */
.db-summary::after {
    content: '';
    position: absolute;
    right: 25px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--deep-blue);
    border-bottom: 2px solid var(--deep-blue);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.35s var(--spring-bounce);
    opacity: 0.7;
}

/* Arrow rotates when dropdown is open */
.db-dropdown[open] .db-summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.db-summary:hover {
    background: rgba(74, 108, 155, 0.03);
}
.db-dropdown[open] .db-summary {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(74, 108, 155, 0.05);
}

/* 3. Smooth Transition Content Container */
.db-details {
    max-height: 0;
    opacity: 0;
    padding: 0 20px;
    background: #fafcff;
    font-size: 16px;
    color: #4a5a6a;
    line-height: 1.6;
    overflow: hidden;
    /* This matches the 350ms delay in the JavaScript */
    transition: max-height 0.35s ease-in-out, opacity 0.3s ease-in-out, padding 0.35s ease-in-out;
}
.db-details p {
    margin-bottom: 8px;
}
.db-items {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    color: var(--primary-blue);
}

/* --- ABOUT US COLUMNS & BORDERS --- */
.horizontal-flex {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch; /* <--- Change this from flex-start to stretch */
    gap: 30px;
    width: 100%;
}

.about-column {
    flex: 1; /* Ensures all three columns take up equal space */
}

.about-column .card-text {
    width: 100% !important;
    font-size: 15px;
    margin: 0 auto;
}

.about-subheading {
    font-size: 30px;
    margin-bottom: 20px;
    color: var(--deep-blue);
}

/* --- THE CENTERED BORDER SOLUTION --- */
.horizontal-border {
    position: relative;
    border-right: none; /* Remove the standard uneven border */
}

/* Draw a custom line exactly in the middle of the 30px gap */
.horizontal-border::after {
    content: '';
    position: absolute;
    top: 0;
    right: -16px; /* 15px (half the gap) + 1px (half the line width) */
    height: 100%;
    width: 2px;
    background-color: rgba(74, 108, 155, 0.1);
}

/* --- MOBILE RESPONSIVE FIXES --- */
@media (max-width: 760px) {
    .horizontal-flex {
        flex-direction: column;
        gap: 40px; /* Vertical gap between stacked columns */
    }

    /* Change the vertical separating line to a horizontal line for mobile */
    .horizontal-border::after {
        top: auto;
        bottom: -20px; /* Pushes line into the middle of the 40px vertical gap */
        right: 0;
        left: 0;
        width: 100%;
        height: 2px;
    }
}

.team-member-heading {
    margin-bottom: 10px;
}