/* ==========================================================================
   Top bar (single) + Navbar
   ========================================================================== */

:root {
    --hdr-red: #d91f35;
    --hdr-red-dark: #b01828;
    --hdr-red-light: #fef2f4;
    --hdr-dark: #111827;
    --hdr-text: #111827;
    --hdr-muted: #6b7280;
    --hdr-border: #e5e7eb;
    --hdr-bg: #ffffff;
    --hdr-nav-text: #000000;
    --hdr-nav-text-hover: #e92c2c;
    --hdr-nav-hover-bg: rgba(255, 255, 255, 0.12);
    --hdr-nav-border: rgba(255, 255, 255, 0.18);
    --hdr-nav-active-bg: rgba(255, 255, 255, 0.18);
    --hdr-nav-h: 72px;
    --hdr-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --hdr-bp: 992px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
}

/* ── Single top bar (all screen sizes) ── */
.donors-topbar {
    background: var(--hdr-dark);
    color: rgba(255, 255, 255, 0.92);
    font-family: var(--hdr-font);
    font-size: 0.8125rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.donors-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 40px;
    padding: 0.5rem 0;
}

/* Contact: phone always, email on tablet+ */
.donors-topbar__contact {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex-shrink: 1;
}

.donors-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: inherit;
    white-space: nowrap;
    min-width: 0;
}

.donors-topbar__item i {
    color: var(--hdr-red);
    flex-shrink: 0;
    font-size: 0.75rem;
}

.donors-topbar__item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.donors-topbar__item:hover {
    color: var(--hdr-red);
}

.donors-topbar__email {
    display: none;
}

/* Social icons */
.donors-topbar__social {
    display: none;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.donors-topbar__social a {
    width: 1.875rem;
    height: 1.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    background: #e53935;
    color: #fff;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.donors-topbar__social a[aria-label="Facebook"] { background: #1877f2; }
.donors-topbar__social a[aria-label="Instagram"] { background: #e1306c; }
.donors-topbar__social a[aria-label="Twitter"] { background: #1da1f2; }
.donors-topbar__social a[aria-label="WhatsApp"] { background: #25d366; }
.donors-topbar__social a[aria-label="YouTube"] { background: #ff0000; }

.donors-topbar__social a:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* Auth / member right side */
.donors-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0;
    margin-left: auto;
}

.donors-topbar__auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donors-topbar__auth a {
    color: inherit;
    font-weight: 600;
    white-space: nowrap;
}

.donors-topbar__auth a:hover {
    color: var(--hdr-red);
}

.donors-topbar__auth-sep {
    color: rgba(255, 255, 255, 0.35);
}

.donors-topbar__member {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.donors-topbar__member .welcome {
    color: var(--hdr-red);
    margin: 0;
    font-size: 0.8125rem;
    display: none;
}

.donors-topbar__member .dropdown-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 0.8125rem;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.donors-topbar__member .dropdown-toggle::after {
    display: none;
}

.donors-topbar__member .dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 220px;
}

.donors-topbar__member .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
}

.donors-topbar__member .dropdown-item i {
    width: 1rem;
    color: var(--hdr-muted);
}

.donors-topbar__member .dropdown-item:hover {
    background: var(--hdr-red-light);
    color: var(--hdr-red);
}

/* Tablet: show email */
@media (min-width: 576px) {
    .donors-topbar__email {
        display: inline-flex;
    }
}

/* Laptop+: full 3-zone layout */
@media (min-width: 992px) {
    .donors-topbar__inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 1rem;
        min-height: 42px;
    }

    .donors-topbar__contact {
        justify-self: start;
    }

    .donors-topbar__social {
        display: flex;
        justify-self: center;
    }

    .donors-topbar__right {
        justify-self: end;
        margin-left: 0;
    }

    .donors-topbar__member .welcome {
        display: block;
    }

    .donors-topbar__social a {
        width: 2rem;
        height: 2rem;
        font-size: 0.8125rem;
    }
}

/* ── Navbar ── */
.donors-navbar {
    background: var(--hdr-bg);
    font-family: var(--hdr-font);
    padding: 0;
    min-height: var(--hdr-nav-h);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-header.is-scrolled .donors-navbar {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.donors-navbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.donors-navbar__tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    order: 2;
    flex-shrink: 0;
    position: relative;
    z-index: 1045;
}

.donors-navbar .navbar-brand {
    order: 1;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.donors-navbar .navbar-collapse {
    order: 3;
}

.donors-navbar .navbar-brand img {
    height: 46px;
    width: auto;
}

.donors-navbar .navbar-toggler {
    border: 1px solid var(--hdr-nav-border);
    border-radius: 6px;
    padding: 0.4rem 0.55rem;
}

.donors-navbar .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 31, 53, 0.15);
}

.donors-navbar__toggler-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--hdr-nav-text);
    font-size: 1.125rem;
}

/* Remove list bullets, reset nav */
.donors-navbar .navbar-nav {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.donors-navbar.navbar-light .navbar-nav .nav-link,
.donors-navbar.navbar-dark .navbar-nav .nav-link,
.donors-navbar .navbar-nav .nav-link {
    color: var(--hdr-nav-text);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.donors-navbar.navbar-light .navbar-nav .nav-link:hover,
.donors-navbar.navbar-light .navbar-nav .nav-link:focus,
.donors-navbar.navbar-dark .navbar-nav .nav-link:hover,
.donors-navbar.navbar-dark .navbar-nav .nav-link:focus,
.donors-navbar .navbar-nav .nav-link:hover {
    color: var(--hdr-nav-text-hover);
    background: var(--hdr-nav-hover-bg);
}

.donors-navbar.navbar-light .navbar-nav .active > .nav-link,
.donors-navbar.navbar-dark .navbar-nav .active > .nav-link,
.donors-navbar .nav-item.active .nav-link {
    color: var(--hdr-nav-text);
    font-weight: 600;
    background: var(--hdr-nav-active-bg);
}

.donors-navbar .nav-item.dropdown .dropdown-menu {
    border: 1px solid var(--hdr-nav-border);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 0.4rem 0;
    margin-top: 0.35rem;
    min-width: 12.5rem;
}

.donors-navbar .nav-item.dropdown .dropdown-item {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    padding: 0.55rem 1rem;
}

.donors-navbar .nav-item.dropdown .dropdown-item:hover,
.donors-navbar .nav-item.dropdown .dropdown-item:focus,
.donors-navbar .nav-item.dropdown .dropdown-item.active {
    background: #fef2f4;
    color: var(--hdr-red);
}

/* ── Mobile menu (< 992px) ── */
@media (max-width: 991.98px) {
    .donors-navbar .navbar-brand {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: 0.5rem;
    }

    .donors-navbar__tools {
        flex: 0 0 auto;
    }

    .donors-navbar .navbar-collapse {
        flex-basis: 100%;
        width: 100%;
        max-width: 100%;
        border-top: 1px solid var(--hdr-nav-border);
        padding: 0.5rem 0 1rem;
    }

    .donors-navbar .nav-link {
        padding: 0.7rem 0.25rem;
    }

    .donors-navbar .nav-item.active .nav-link {
        padding-left: 0.5rem;
    }

    .donors-nav-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.5rem;
        border-top: 1px solid var(--hdr-nav-border);
    }

    .donors-nav-actions .donors-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ── Desktop menu (>= 992px): logo | links | button in one row ── */
@media (min-width: 992px) {
    .donors-navbar__inner {
        flex-wrap: nowrap;
    }

    .donors-navbar .navbar-brand img {
        height: 50px;
    }

    .donors-navbar .navbar-collapse {
        display: flex !important;
        order: 2;
        flex-basis: auto;
        flex-grow: 1;
        align-items: center;
        justify-content: flex-end;
    }

    .donors-navbar__tools {
        order: 3;
        margin-left: 0.75rem;
    }

    .donors-navbar .navbar-nav {
        flex-direction: row;
        align-items: center;
        margin-right: 1rem;
    }

    .donors-navbar .nav-link {
        padding: 1.5rem 0.75rem;
        white-space: nowrap;
    }

    .donors-nav-actions {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
}

/* Nav buttons */
.donors-nav-actions .donors-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.donors-nav-actions .donors-btn--primary {
    background: var(--hdr-red);
    color: #fff;
    border-color: var(--hdr-red);
}

.donors-nav-actions .donors-btn--primary:hover {
    background: var(--hdr-red-dark);
    border-color: var(--hdr-red-dark);
    color: #fff;
}

.donors-nav-actions .donors-btn--outline {
    background: transparent;
    color: var(--hdr-nav-text);
    border-color: rgba(255, 255, 255, 0.55);
}

.donors-nav-actions .donors-btn--outline:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.donors-notifications-bell {
    position: relative;
    display: inline-flex;
}

.donors-notifications-bell__toggle {
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    border: none;
    background: #e53935;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

.donors-notifications-bell__toggle.dropdown-toggle::after {
    display: none;
}

.donors-notifications-bell__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--hdr-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.donors-notifications-menu {
    width: min(360px, calc(100vw - 2rem));
    max-height: min(28rem, calc(100dvh - 7rem));
    padding: 0;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    display: none;
    flex-direction: column;
    right: 0;
    left: auto;
    margin-top: 0.5rem;
}

.donors-notifications-menu.show {
    display: flex !important;
}

.donors-notifications-menu__header,
.donors-notifications-menu__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    background: #f8fafc;
}

.donors-notifications-menu__footer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.donors-notifications-menu__items {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.donors-notifications-menu__empty {
    padding: 1rem;
}

@media (max-width: 991.98px) {
    .donors-notifications-menu {
        position: fixed !important;
        top: calc(var(--hdr-nav-h) + 3.5rem) !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto !important;
        max-width: none !important;
        max-height: calc(100dvh - var(--hdr-nav-h) - 5.75rem) !important;
        transform: none !important;
        margin-top: 0 !important;
        z-index: 1080;
    }
}

body.donors-notifications-open {
    overflow: hidden;
}

.donors-notifications-menu__item {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f7;
    color: inherit;
    text-decoration: none;
}

.donors-notifications-menu__item.is-unread {
    background: #fff5f5;
}

.donors-notifications-menu__item strong {
    display: block;
    font-size: 0.92rem;
    margin-bottom: 0.2rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.donors-notifications-menu__item span {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.donors-notifications-list {
    display: grid;
    gap: 1rem;
}

.donors-notification-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.donors-notification-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.donors-notification-card__select {
    display: flex;
    align-items: flex-start;
    margin: 0.15rem 0 0;
    flex-shrink: 0;
}

.donors-notification-card__body {
    flex: 1;
    min-width: 0;
}

.donors-notification-card.is-unread {
    border-color: #fecaca;
    background: #fff7f7;
}

.donors-notification-card h3 {
    font-family: var(--hdr-font);
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}

.donors-notification-card p {
    margin: 0 0 0.35rem;
    color: #475569;
}

@media (max-width: 575.98px) {
    .donors-notification-card {
        flex-direction: column;
        align-items: stretch;
    }

    .donors-notification-card__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
