:root {
    --hp-primary: #0b539e;
    --hp-secondary: #f5da07;
    --hp-dark: #06305c;
    --hp-green: #167a42;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Noto Sans Ethiopic', 'Segoe UI', sans-serif;
    background-color: #f5f6f8;
    margin: 0;
    padding-bottom: 70px;
}

.app-header {
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary));
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.app-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 3px;
}

.app-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.lang-toggle {
    color: #fff;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.app-content {
    padding: 14px;
    max-width: 600px;
    margin: 0 auto;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 50;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.66rem;
    color: #888;
    text-decoration: none;
    gap: 2px;
    padding: 4px 6px;
    flex: 1;
    min-width: 0;
}

.bottom-nav a i { font-size: 1.2rem; }

.bottom-nav a.active {
    color: var(--hp-primary);
    font-weight: 600;
}

.bottom-nav-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    border: 1.5px solid transparent;
    transition: border-color 0.2s ease;
}
.bottom-nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bottom-nav-profile.active .bottom-nav-avatar { border-color: var(--hp-primary); }
body.dark-mode .bottom-nav-profile.active .bottom-nav-avatar { border-color: var(--hp-secondary); }

@media (max-width: 360px) {
    .bottom-nav a { font-size: 0.6rem; padding: 4px 3px; }
    .bottom-nav a i { font-size: 1.1rem; }
}

/* Desktop top nav — hidden on phones/tablets, revealed by the min-width
   media query near the bottom of this file. Mirrors the mobile bottom-nav
   links so nothing is lost, it's just presented as a normal website navbar. */
.desktop-nav { display: none; }

/* New desktop-only site footer element — hidden on phones/tablets by default,
   revealed inside the min-width:992px block in desktop-premium.css. */
.site-footer { display: none; }

/* ================================================
   Desktop / laptop / TV layout (phones are untouched below 992px)
   ================================================ */
@media (min-width: 992px) {
    body { padding-bottom: 0; }

    .app-content {
        max-width: 900px;
        padding: 24px 16px 60px;
    }

    .app-header { padding-left: 24px; padding-right: 24px; }

    .bottom-nav { display: none; }

    .desktop-nav {
        display: block;
        background: #fff;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        position: sticky;
        top: 0;
        z-index: 49;
    }
    .desktop-nav-inner {
        max-width: 900px;
        margin: 0 auto;
        display: flex;
        gap: 8px;
        padding: 0 16px;
    }
    .desktop-nav a {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #666;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        padding: 14px 16px;
        border-bottom: 3px solid transparent;
        transition: color 0.15s ease, border-color 0.15s ease;
    }
    .desktop-nav a i { font-size: 1.05rem; }
    .desktop-nav a:hover { color: var(--hp-primary); }
    .desktop-nav a.active {
        color: var(--hp-primary);
        border-bottom-color: var(--hp-primary);
    }
    .desktop-nav-avatar {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        overflow: hidden;
        display: block;
    }
    .desktop-nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

    body.dark-mode .desktop-nav { background: #131a15; border-bottom-color: #223227; }
    body.dark-mode .desktop-nav a { color: #8fa093; }
    body.dark-mode .desktop-nav a.active,
    body.dark-mode .desktop-nav a:hover { color: var(--hp-secondary); border-bottom-color: var(--hp-secondary); }
}

@media (min-width: 1400px) {
    .app-content { max-width: 1240px; }
    .desktop-nav-inner { max-width: 1240px; }
    .hp-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* ================================================
   Desktop homepage layout: main feed column + sidebar
   ================================================ */
.hp-sidebar { display: none; }

@media (min-width: 992px) {
    .app-content { max-width: 1140px; }
    .desktop-nav-inner { max-width: 1140px; }

    .hp-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 28px;
        align-items: start;
    }
    .hp-main { min-width: 0; }

    .hp-sidebar {
        display: flex;
        flex-direction: column;
        gap: 18px;
        position: sticky;
        top: 76px;
    }

    .sidebar-card {
        background: #fff;
        border-radius: 14px;
        padding: 18px 20px;
        box-shadow: 0 2px 10px rgba(10,30,20,0.06);
    }
    .sidebar-card-title {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--hp-dark);
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
    }
    .sidebar-about-text {
        font-size: 0.85rem;
        color: #667;
        line-height: 1.55;
        margin-bottom: 14px;
    }
    .sidebar-contact-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
    .sidebar-contact-list li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        font-size: 0.85rem;
        color: #556;
    }
    .sidebar-contact-list li i { color: var(--hp-primary); margin-top: 2px; }
    .sidebar-contact-list a { color: #556; text-decoration: none; }
    .sidebar-contact-list a:hover { color: var(--hp-primary); }
    .sidebar-fb-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
        background: #1877f2;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.85rem;
        padding: 10px;
        border-radius: 10px;
        transition: opacity 0.15s ease;
    }
    .sidebar-fb-btn:hover { opacity: 0.88; color: #fff; }

    .sidebar-link-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
    .sidebar-link-list a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 8px;
        border-radius: 8px;
        color: #445;
        text-decoration: none;
        font-size: 0.87rem;
        font-weight: 600;
        transition: background 0.15s ease, color 0.15s ease;
    }
    .sidebar-link-list a i { color: var(--hp-primary); width: 18px; text-align: center; }
    .sidebar-link-list a:hover { background: #f0f5f9; color: var(--hp-primary); }

    .sidebar-leader-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
    .sidebar-leader-list li { display: flex; align-items: center; gap: 10px; }
    .sidebar-leader-list img,
    .sidebar-leader-avatar {
        width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    }
    .sidebar-leader-avatar {
        background: #eef1f4; display: flex; align-items: center; justify-content: center; color: #99a;
    }
    .sidebar-leader-list strong { display: block; font-size: 0.83rem; color: #334; line-height: 1.3; }
    .sidebar-leader-list small { display: block; font-size: 0.74rem; color: #889; }
    .sidebar-see-all {
        display: block;
        text-align: center;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--hp-primary);
        text-decoration: none;
        padding-top: 10px;
        border-top: 1px solid rgba(0,0,0,0.06);
    }
    .sidebar-see-all:hover { text-decoration: underline; }

    body.dark-mode .sidebar-card { background: #16201a; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
    body.dark-mode .sidebar-card-title { color: #f2f4f2; border-bottom-color: #223227; }
    body.dark-mode .sidebar-about-text,
    body.dark-mode .sidebar-contact-list li,
    body.dark-mode .sidebar-contact-list a { color: #b7c2ba; }
    body.dark-mode .sidebar-link-list a { color: #cfd6d1; }
    body.dark-mode .sidebar-link-list a:hover { background: #1c2921; }
    body.dark-mode .sidebar-leader-list strong { color: #e6e8e6; }
    body.dark-mode .sidebar-leader-list small { color: #8fa093; }

    /* General card polish at desktop widths */
    .hp-card, .stat-strip, .event-spotlight, .welcome-hero {
        box-shadow: 0 2px 14px rgba(10,30,20,0.07);
    }
    .hp-card:hover { box-shadow: 0 6px 20px rgba(10,30,20,0.12); transition: box-shadow 0.2s ease; }
    .stat-strip { padding: 20px 0; }
    .section-title { font-size: 1.08rem; margin-top: 28px; }
}

/* Cards */
.hp-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.hp-card img.cover {
    width: 100%;
    height: 190px;
    object-fit: contain;
    background: #eef0f3;
}

.hp-card .body { padding: 12px 14px; }

.hp-card .title {
    font-weight: 700;
    font-size: 0.98rem;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.hp-card .meta {
    font-size: 0.75rem;
    color: #888;
}

.badge-category {
    background: var(--hp-secondary);
    color: var(--hp-dark);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.leader-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 14px;
}

.leader-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 3px solid var(--hp-secondary);
}

.article-cover {
    width: 100%;
    max-height: 280px;
    min-height: 160px;
    object-fit: contain;
    background: #eef0f3;
}

.gallery-photo {
    width: 100%;
    height: 140px;
    object-fit: contain;
    background: #eef0f3;
}

.section-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--hp-dark);
    margin: 18px 0 10px;
    border-right: 4px solid var(--hp-secondary);
    padding-right: 10px;
}

.hero-banner {
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary));
    border-radius: 16px;
    color: #fff;
    padding: 22px 18px;
    margin-bottom: 18px;
    text-align: center;
}

.hero-banner img { width: 70px; margin-bottom: 8px; background: #fff; border-radius: 50%; padding: 6px; }

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.contact-row i {
    font-size: 1.3rem;
    color: var(--hp-primary);
    width: 30px;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* ---- Facebook-style engagement (likes & comments) ---- */
.text-inherit { color: inherit; }

.fb-actions {
    display: flex;
    gap: 6px;
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 4px;
}

.fb-actions-detail {
    margin: 14px 0 4px;
    padding: 10px 0;
}

.fb-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: none;
    border: none;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
}

.fb-action-btn:hover { background: #f2f3f5; color: #333; }

.fb-action-btn.liked { color: var(--hp-primary); }

.fb-action-btn i { font-size: 1rem; }

.comment-list { margin-top: 6px; }

.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ---- Header profile avatar ---- */
.header-avatar-link { display: flex; align-items: center; gap: 6px; }

.header-avatar-img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ---- Profile page (premium redesign) ---- */
@keyframes profileFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.profile-hero {
    position: relative;
    text-align: center;
    padding-bottom: 20px;
    margin: -14px -14px 0;
    overflow: hidden;
}
.profile-hero-banner {
    height: 128px;
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary) 55%, var(--hp-secondary) 150%);
    position: relative;
    overflow: hidden;
}
.profile-hero-banner::before,
.profile-hero-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.profile-hero-banner::before { width: 180px; height: 180px; top: -90px; right: -40px; }
.profile-hero-banner::after { width: 110px; height: 110px; bottom: -70px; left: -20px; background: rgba(244,196,48,0.14); }

.profile-avatar-wrap { display: flex; justify-content: center; margin-top: -56px; position: relative; z-index: 2; animation: profileFadeUp 0.5s ease both; }
.profile-avatar-clickable {
    position: relative;
    display: block;
    width: 112px;
    height: 112px;
    cursor: pointer;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--hp-secondary), var(--hp-primary));
    box-shadow: 0 8px 22px rgba(11,78,162,0.28);
    border: none;
    font: inherit;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease;
}
.profile-avatar-clickable:active { transform: scale(0.96); }
.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    display: block;
}
.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--hp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2.1rem;
    border: 3px solid #fff;
}
.profile-avatar-edit-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--hp-secondary);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.profile-avatar-uploading-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
}
.profile-avatar-uploading-overlay.show { display: flex; }

.profile-name {
    font-weight: 800;
    font-size: 1.22rem;
    margin-top: 14px;
    color: #16233a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    animation: profileFadeUp 0.5s ease 0.05s both;
}
.verified-badge { display: inline-flex; align-items: center; color: #1d9bf0; font-size: 1rem; line-height: 0; }
.verified-badge i { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12)); }

.profile-phone { font-size: 0.85rem; color: #7c8794; margin-top: 2px; animation: profileFadeUp 0.5s ease 0.1s both; }

.profile-chips-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    animation: profileFadeUp 0.5s ease 0.15s both;
}
.profile-joined-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--hp-primary);
    background: rgba(11,83,158,0.08);
    border-radius: 20px;
    padding: 4px 12px;
}
.profile-verified-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1d9bf0;
    background: rgba(29,155,240,0.1);
    border-radius: 20px;
    padding: 4px 12px;
}

/* ---- Avatar action sheet (tap the photo to Change/Remove) ---- */
.avatar-sheet-dialog {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: calc(100% - 1rem);
    max-width: 480px;
    margin: 0 auto;
}
.avatar-sheet-content {
    width: 100%;
    border: none;
    border-radius: 22px 22px 0 0;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 30px rgba(0,0,0,0.2);
}
body.dark-mode .avatar-sheet-content { background: #16201a; color: #e6e8e6; }

.avatar-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #dfe2e6;
    margin: 4px auto 12px;
}
body.dark-mode .avatar-sheet-handle { background: #2c3a31; }

.avatar-sheet-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: #f6f8fb;
    color: #16233a;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 13px 16px;
    border-radius: 14px;
    margin-bottom: 8px;
    text-align: left;
}
.avatar-sheet-btn i { font-size: 1.05rem; color: var(--hp-primary); }
.avatar-sheet-btn-danger { color: #d9364a; }
.avatar-sheet-btn-danger i { color: #d9364a; }
.avatar-sheet-btn-cancel { justify-content: center; background: transparent; color: #99a2ad; margin-bottom: 4px; }
body.dark-mode .avatar-sheet-btn { background: #1d2b22; color: #e6e8e6; }
body.dark-mode .avatar-sheet-btn-cancel { background: transparent; color: #8fa093; }

.avatar-sheet-hint { text-align: center; font-size: 0.72rem; color: #99a2ad; margin-top: 2px; }

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    animation: profileFadeUp 0.5s ease 0.25s both;
}
.profile-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px 6px 12px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(16,30,54,0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.profile-stat-card:active { transform: scale(0.97); }
.profile-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1rem;
    color: #fff;
}
.profile-stat-card:nth-child(1) .profile-stat-icon { background: linear-gradient(135deg, #ff8a5c, #ff5c5c); }
.profile-stat-card:nth-child(2) .profile-stat-icon { background: linear-gradient(135deg, #4facfe, #0b53a0); }
.profile-stat-card:nth-child(3) .profile-stat-icon { background: linear-gradient(135deg, #43e97b, #2a9d5c); }
.profile-stat-card:nth-child(4) .profile-stat-icon { background: linear-gradient(135deg, #f6d365, #d4a017); }
.profile-stat-num { font-weight: 800; font-size: 1.2rem; color: #16233a; margin-top: 8px; }
.profile-stat-label { font-size: 0.63rem; color: #99a2ad; font-weight: 600; margin-top: 2px; letter-spacing: 0.1px; }

.profile-account-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 3px 12px rgba(16,30,54,0.07);
    overflow: hidden;
    animation: profileFadeUp 0.5s ease 0.3s both;
}
.profile-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 0.85rem;
    color: #556070;
    border-bottom: 1px solid #f0f2f5;
}
.profile-account-row:last-child { border-bottom: none; }
.profile-account-row span { display: flex; align-items: center; }
.profile-account-row span i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(11,78,162,0.08);
    color: var(--hp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    margin-right: 8px !important;
}
.profile-account-row strong { color: #16233a; font-weight: 700; }

body.dark-mode .profile-stat-card,
body.dark-mode .profile-account-card { background: #16201a; box-shadow: none; border: 1px solid #223227; }
body.dark-mode .profile-name { color: #f2f4f2; }
body.dark-mode .profile-account-row { border-bottom-color: #223227; color: #9fb0a5; }
body.dark-mode .profile-account-row strong { color: #f2f4f2; }
body.dark-mode .profile-account-row span i { background: rgba(244,196,48,0.12); color: var(--hp-secondary); }
body.dark-mode .profile-stat-num { color: #f2f4f2; }

/* ---- Profile: name row + edit button ---- */
.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    animation: profileFadeUp 0.5s ease 0.05s both;
}
.profile-name-row .profile-name { margin-top: 0; }
.profile-edit-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(11,83,158,0.08);
    color: var(--hp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.15s ease, background 0.15s ease;
}
.profile-edit-btn:active { transform: scale(0.92); }
body.dark-mode .profile-edit-btn { background: rgba(244,196,48,0.12); color: var(--hp-secondary); }

/* ---- Profile: bio ---- */
.profile-bio {
    font-size: 0.85rem;
    color: #556070;
    max-width: 320px;
    margin: 6px auto 0;
    line-height: 1.4;
    animation: profileFadeUp 0.5s ease 0.1s both;
}
.profile-bio-add-btn {
    display: inline-flex;
    align-items: center;
    margin: 8px auto 0;
    border: 1px dashed rgba(11,83,158,0.35);
    background: transparent;
    color: var(--hp-primary);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 5px 14px;
}
body.dark-mode .profile-bio { color: #9fb0a5; }
body.dark-mode .profile-bio-add-btn { color: var(--hp-secondary); border-color: rgba(244,196,48,0.35); }

/* ---- Profile: preview-as-others link ---- */
.profile-preview-link {
    display: inline-flex;
    align-items: center;
    margin-top: 12px;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--hp-primary);
    text-decoration: none;
    animation: profileFadeUp 0.5s ease 0.2s both;
}
body.dark-mode .profile-preview-link { color: var(--hp-secondary); }

/* ---- Profile: privacy hints ---- */
.profile-private-icon { font-size: 0.68rem; color: #99a2ad; margin-left: 4px; }
.profile-phone-locked {
    background: #f6f8fb;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #556070;
}
.profile-phone-locked-hint { font-size: 0.72rem; color: #99a2ad; margin-top: 3px; }
body.dark-mode .profile-phone-locked { background: #1d2b22; color: #cfd8d2; }
body.dark-mode .profile-phone-locked-hint { color: #8fa093; }

/* ---- Edit profile modal ---- */
.edit-profile-modal-content { border-radius: 20px; border: none; }
body.dark-mode .edit-profile-modal-content { background: #16201a; color: #e6e8e6; }
body.dark-mode .edit-profile-modal-content .form-control { background: #1d2b22; color: #e6e8e6; border-color: #2c3a31; }
body.dark-mode .edit-profile-modal-content .btn-close { filter: invert(1); }

/* ---- Static avatar (viewing another member's profile — no edit affordance) ---- */
.profile-avatar-static {
    width: 112px;
    height: 112px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 8px 22px rgba(11,78,162,0.28);
}
img.profile-avatar-static { border: 3px solid #fff; }
.profile-avatar-fallback.profile-avatar-static { font-size: 2.1rem; border: 3px solid #fff; }

/* ---- Links to a member's public profile from comments / reposts ---- */
.comment-author-link { color: inherit; text-decoration: none; }
.comment-author-link:hover { text-decoration: underline; }
.repost-header-avatar-link { display: block; }
.repost-header-name-link { color: inherit; text-decoration: none; }
.repost-header-name-link:hover { text-decoration: underline; }

.comment-bubble {
    background: #f0f2f5;
    border-radius: 14px;
    padding: 8px 12px;
    flex-grow: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 0.82rem;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.comment-delete-btn {
    background: none;
    border: none;
    color: #b0b8c1;
    font-size: 0.78rem;
    padding: 2px 4px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.comment-delete-btn:hover { color: #e53935; }
.comment-delete-btn:disabled { opacity: 0.5; cursor: default; }
body.dark-mode .comment-delete-btn { color: #5f6d64; }
body.dark-mode .comment-delete-btn:hover { color: #ff6b6b; }

.comment-text {
    font-size: 0.88rem;
    color: #333;
    white-space: pre-line;
}

.comment-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 2px;
}

.comment-form-wrap {
    margin-top: 10px;
    margin-bottom: 20px;
}

.btn-primary-hp {
    background: var(--hp-primary);
    color: #fff;
    border: none;
}

.btn-primary-hp:hover { background: var(--hp-dark); color: #fff; }

/* ---- Auth pages (login / register) ---- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary));
    padding: 20px;
    font-family: 'Noto Sans Ethiopic', 'Segoe UI', sans-serif;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 4px;
    border: 2px solid var(--hp-secondary);
}

/* ================================================
   Landing page — welcome hero, stats, spotlight,
   leadership preview, filter pills
   ================================================ */

.welcome-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(150deg, var(--hp-dark) 0%, var(--hp-primary) 65%, #1a7dc4 100%);
    border-radius: 20px;
    color: #fff;
    padding: 30px 20px 26px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(18, 58, 32, 0.25);
}

.welcome-hero-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(242, 183, 5, 0.35), transparent 70%);
    pointer-events: none;
}

/* Large faint background watermark of the office logo — desktop-only feature,
   switched on in desktop-premium.css. Kept out of the layout on phones/tablets. */
.welcome-hero-watermark { display: none; }

.welcome-hero-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 7px;
    border: 3px solid var(--hp-secondary);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.welcome-hero-title {
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.welcome-hero-tag {
    font-size: 0.85rem;
    opacity: 0.92;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

.welcome-hero-about {
    font-size: 0.82rem;
    opacity: 0.85;
    margin: 12px auto 0;
    max-width: 480px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.welcome-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 18px;
    position: relative;
    z-index: 1;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 24px;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.hero-btn-solid {
    background: var(--hp-secondary);
    color: var(--hp-dark);
}

.hero-btn-solid:hover { opacity: 0.92; color: var(--hp-dark); }

.hero-btn-outline {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
}

.hero-btn-outline:hover { background: rgba(255,255,255,0.2); color: #fff; }

.stat-strip {
    display: flex;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 16px;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 14px 6px;
    border-right: 1px solid #eef0f3;
}

.stat-item:last-child { border-right: none; }

.stat-item i {
    font-size: 1.05rem;
    color: var(--hp-primary);
}

.stat-num {
    font-weight: 800;
    font-size: 1.15rem;
    color: #1a1a1a;
    line-height: 1.3;
}

.stat-label {
    font-size: 0.68rem;
    color: #888;
    font-weight: 600;
}

.event-spotlight {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #f0d896;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: inherit;
}

.event-spotlight-date {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--hp-secondary);
    color: var(--hp-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.es-day { font-weight: 800; font-size: 1.1rem; line-height: 1; }
.es-mon { font-size: 0.65rem; font-weight: 700; letter-spacing: 0.5px; }

.event-spotlight-body { flex-grow: 1; min-width: 0; }

.es-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hp-primary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.es-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.es-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.es-arrow {
    color: #ccc;
    font-size: 1rem;
    flex-shrink: 0;
}

.section-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hp-primary);
    text-decoration: none;
    border: none;
    padding: 0;
}

.leader-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 6px;
    scrollbar-width: none;
}

.leader-scroll::-webkit-scrollbar { display: none; }

.leader-mini {
    flex-shrink: 0;
    width: 92px;
    background: #fff;
    border-radius: 14px;
    padding: 12px 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    color: inherit;
}

.leader-mini-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 6px;
    border: 2px solid var(--hp-secondary);
}

.leader-mini-name {
    font-weight: 700;
    font-size: 0.72rem;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-mini-pos {
    font-size: 0.62rem;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 14px;
    scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e2e5e9;
    color: #555;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
}

.filter-pill.active {
    background: var(--hp-primary);
    border-color: var(--hp-primary);
    color: #fff;
}

/* ================================================
   Dark mode
   ================================================ */
body.dark-mode {
    background-color: #0f1512;
    color: #e6e8e6;
}
body.dark-mode .app-header { background: linear-gradient(135deg, #0a1f12, #163a24); }
body.dark-mode .hp-card,
body.dark-mode .stat-strip,
body.dark-mode .event-spotlight,
body.dark-mode .leader-mini,
body.dark-mode .filter-pill,
body.dark-mode .comment-form-wrap,
body.dark-mode .search-bar-wrap { background: #16201a; color: #e6e8e6; border-color: #223227; }
body.dark-mode .fb-post .title,
body.dark-mode .es-title,
body.dark-mode .stat-num,
body.dark-mode .leader-mini-name { color: #f2f4f2; }
body.dark-mode .meta,
body.dark-mode .stat-label,
body.dark-mode .es-meta,
body.dark-mode .leader-mini-pos,
body.dark-mode .comment-time { color: #8fa093; }
body.dark-mode .filter-pill { border-color: #2a3b30; color: #cfd6d1; }
body.dark-mode .filter-pill.active { background: var(--hp-primary); border-color: var(--hp-primary); color: #fff; }
body.dark-mode .bottom-nav { background: #131a15; box-shadow: 0 -2px 10px rgba(0,0,0,0.4); }
body.dark-mode .bottom-nav a { color: #7c8a80; }
body.dark-mode .bottom-nav a.active { color: var(--hp-secondary); }
body.dark-mode .comment-bubble { background: #1f2b23; color: #e6e8e6; }
body.dark-mode .search-bar-wrap input { background: transparent; color: #e6e8e6; }
body.dark-mode .empty-state { color: #8fa093; }
body.dark-mode .lang-toggle { background: rgba(255,255,255,0.12); }
body.dark-mode .load-more-btn { background: #16201a; color: #cfd6d1; border-color: #2a3b30; }

.theme-toggle-btn {
    border: none;
    cursor: pointer;
}

/* ================================================
   Toast notifications
   ================================================ */
.toast-container {
    position: fixed;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 420px;
    align-items: center;
    pointer-events: none;
}

.hp-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #26332b;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: 100%;
}

.hp-toast.show { opacity: 1; transform: translateY(0); }
.hp-toast-success { background: #1e5631; }
.hp-toast-error { background: #a8322d; }
.hp-toast-info { background: #26332b; }

/* ================================================
   Back to top
   ================================================ */
.back-to-top-btn {
    position: fixed;
    bottom: calc(78px + env(safe-area-inset-bottom));
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--hp-primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 60;
}

.back-to-top-btn.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ================================================
   Scroll reveal
   ================================================ */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ================================================
   Search bar
   ================================================ */
.search-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e2e5e9;
    border-radius: 24px;
    padding: 9px 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-bar-wrap i { color: #999; font-size: 0.95rem; }

.search-bar-wrap input {
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 16px;
    background: transparent;
}

.search-clear-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 0.9rem;
    padding: 0;
    display: none;
}
.search-clear-btn.show { display: block; }

/* ================================================
   Trending badge
   ================================================ */
.badge-trending {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(120deg, #ff6a3d, #ff9f1c);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 6px;
}

/* ================================================
   Repost button on cards
   ================================================ */
.fb-action-btn.repost-btn { margin-left: auto; }
.fb-action-btn.repost-btn.reposted { color: #17a34a; }

.repost-locked { position: relative; opacity: 0.5; cursor: not-allowed; }
.repost-locked:hover { background: transparent; color: inherit; }
.repost-lock-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.55rem !important;
    color: #99a2ad;
    background: #fff;
    border-radius: 50%;
    padding: 1px;
    box-shadow: 0 0 0 1px #fff;
}
body.dark-mode .repost-lock-badge { background: #16201a; color: #7c8a80; box-shadow: 0 0 0 1px #16201a; }
.ev-mini-stat.repost-locked { opacity: 0.45; }

/* ================================================
   Read More link inside a news card
   ================================================ */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hp-primary);
}

/* ================================================
   Load more
   ================================================ */
.load-more-btn {
    display: block;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e5e9;
    color: #555;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 11px;
    border-radius: 12px;
    margin: 6px 0 16px;
    cursor: pointer;
}

.load-more-btn:disabled { opacity: 0.6; }

.skeleton-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.3s infinite;
    margin-bottom: 8px;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.h-120 { height: 120px; border-radius: 10px; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================
   Countdown (event spotlight)
   ================================================ */
.es-countdown {
    display: inline-flex;
    gap: 6px;
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hp-primary);
}

/* ================================================
   Lightbox (news gallery)
   ================================================ */
.gallery-photo { cursor: zoom-in; }

.hp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.hp-lightbox.open { display: flex; }

.hp-lightbox img {
    max-width: 92%;
    max-height: 78%;
    border-radius: 8px;
    object-fit: contain;
}

.hp-lightbox-close,
.hp-lightbox-prev,
.hp-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.hp-lightbox-close { top: 18px; right: 18px; }
.hp-lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.hp-lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.hp-lightbox-counter {
    color: #ddd;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* ================================================
   Repost card (Facebook-style "reposted a post from ...")
   ================================================ */
.repost-card { padding: 12px 14px 14px; }

.repost-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.repost-header-avatar {
    position: relative;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    overflow: hidden;
}

.repost-header-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.repost-icon-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #17a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    box-shadow: 0 0 0 2px #fff;
}
body.dark-mode .repost-icon-badge { box-shadow: 0 0 0 2px #16201a; }

.repost-header-text { flex: 1; min-width: 0; }

.repost-header-line {
    font-size: 0.88rem;
    line-height: 1.35;
    color: #1a1a1a;
}
body.dark-mode .repost-header-line { color: #f2f4f2; }

.repost-header-time {
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}
body.dark-mode .repost-header-time { color: #8fa093; }

.repost-undo-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.repost-undo-btn:hover { background: #f2f3f5; color: #d92d20; }
body.dark-mode .repost-undo-btn:hover { background: #223227; }

.repost-embed {
    display: block;
    border: 1px solid #e2e5e9;
    border-radius: 12px;
    overflow: hidden;
    color: inherit;
}
body.dark-mode .repost-embed { border-color: #223227; }

.repost-embed-source {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 6px;
}

.repost-embed-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef0f3;
    flex-shrink: 0;
}

.repost-embed-page {
    font-weight: 700;
    font-size: 0.86rem;
    color: #1a1a1a;
}
body.dark-mode .repost-embed-page { color: #f2f4f2; }
.repost-embed-page .verified-badge { font-size: 0.78rem; margin-left: 4px; }

.repost-embed-date {
    font-size: 0.72rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}
body.dark-mode .repost-embed-date { color: #8fa093; }

.repost-embed-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1a1a1a;
    padding: 2px 12px 0;
}
body.dark-mode .repost-embed-title { color: #f2f4f2; }

.repost-embed-text-preview {
    font-size: 0.82rem;
    color: #555;
    padding: 4px 12px 8px;
    line-height: 1.4;
}
body.dark-mode .repost-embed-text-preview { color: #cfd6d1; }

.repost-embed-image {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    background: #eef0f3;
    display: block;
}

.repost-embed-stats {
    display: flex;
    gap: 14px;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    font-size: 0.76rem;
    color: #666;
}
body.dark-mode .repost-embed-stats { border-color: #223227; color: #9fb0a5; }
.repost-embed-stats span { display: flex; align-items: center; gap: 4px; }

/* "N reposts" clickable line under the action bar */
.repost-count-line { margin-top: -2px; }
.view-reposters-link {
    font-size: 0.76rem;
    color: #888;
    text-decoration: none;
}
.view-reposters-link:hover { text-decoration: underline; color: var(--hp-primary); }
body.dark-mode .view-reposters-link { color: #8fa093; }

/* Reposted-by modal */
.reposters-modal-content { border-radius: 16px; }
body.dark-mode .reposters-modal-content { background: #16201a; color: #e6e8e6; }
body.dark-mode .reposters-modal-content .modal-header { border-color: #223227; }
body.dark-mode .reposters-modal-content .btn-close { filter: invert(1); }

.reposter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f1f3;
}
body.dark-mode .reposter-row { border-color: #223227; }
.reposter-row:last-child { border-bottom: none; }

.reposter-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    overflow: hidden;
}
.reposter-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.reposter-name { font-weight: 600; font-size: 0.88rem; color: #1a1a1a; }
body.dark-mode .reposter-name { color: #f2f4f2; }
.reposter-time { font-size: 0.74rem; color: #888; }
body.dark-mode .reposter-time { color: #8fa093; }

/* ================================================
   Facebook-style page header on original post cards
   (office logo + name + verified badge + EC date + globe)
   ================================================ */
.fb-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 6px;
}

.fb-post-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef0f3;
    flex-shrink: 0;
}

.fb-post-header-info { flex: 1; min-width: 0; }

.fb-post-header-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1a1a1a;
    line-height: 1.3;
}
.fb-post-header-name .verified-badge { margin-left: 4px; }
body.dark-mode .fb-post-header-name { color: #f2f4f2; }

.fb-post-header-meta {
    font-size: 0.74rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 1px;
}
body.dark-mode .fb-post-header-meta { color: #8fa093; }

.fb-post-header-cat { flex-shrink: 0; }

/* Facebook-style "Hamle 19, 2018 · 3 hours ago" separator + relative time */
.fb-post-header-meta .meta-dot,
.repost-header-time .meta-dot,
.repost-embed-date .meta-dot {
    opacity: 0.6;
}
.fb-post-header-meta .time-ago,
.repost-header-time .time-ago,
.repost-embed-date .time-ago {
    white-space: nowrap;
}
.repost-header-time,
.repost-embed-date {
    flex-wrap: wrap;
}

.fb-post-text { padding: 2px 14px 10px; }

.fb-post-text .title {
    font-weight: 700;
    font-size: 0.98rem;
    color: #1a1a1a;
    margin-bottom: 4px;
}
body.dark-mode .fb-post-text .title { color: #f2f4f2; }

.fb-post-text-preview {
    font-size: 0.85rem;
    color: #444;
    line-height: 1.45;
    margin-bottom: 6px;
    white-space: pre-line;
}
body.dark-mode .fb-post-text-preview { color: #cfd6d1; }

/* Reuse the existing badge-trending pill inline in the header meta line */
.fb-post-header-meta .badge-trending { padding: 1px 8px; }

/* ================================================
   Branch Leadership page (government-professional redesign)
   ================================================ */
.leadership-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, var(--hp-dark) 0%, var(--hp-primary) 70%, #0f6bb8 100%);
    border-radius: 20px;
    color: #fff;
    padding: 28px 20px 24px;
    margin-bottom: 18px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(6, 48, 92, 0.28);
}

.leadership-hero-glow {
    position: absolute;
    top: -70px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245, 218, 7, 0.28), transparent 70%);
    pointer-events: none;
}
.leadership-hero::after {
    content: '';
    position: absolute;
    bottom: -60px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
    pointer-events: none;
}

.leadership-hero-seal {
    width: 62px;
    height: 62px;
    object-fit: contain;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    border: 3px solid var(--hp-secondary);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2), 0 0 0 6px rgba(244,196,48,0.16);
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
}

.leadership-hero-eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(245, 218, 7, 0.5);
    color: var(--hp-secondary);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.leadership-hero-title {
    position: relative;
    z-index: 1;
    font-weight: 800;
    font-size: 1.3rem;
    line-height: 1.3;
}

.leadership-hero-sub {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 4px;
}

.leadership-hero-stat {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 14px;
}

/* ---- Featured / top leader spotlight ---- */
.leader-spotlight {
    position: relative;
    background: #fff;
    border-radius: 22px;
    padding: 0 18px 24px;
    text-align: center;
    box-shadow: 0 10px 26px rgba(6, 48, 92, 0.14);
    border: 1px solid rgba(11, 83, 158, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    animation: leaderFadeUp 0.55s ease both;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.leader-spotlight:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(6, 48, 92, 0.2); }
.leader-spotlight.is-morphing-source { opacity: 0.45; transform: scale(0.97); }
body.dark-mode .leader-spotlight { background: #16201a; border-color: #223227; }

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

.leader-spotlight-banner {
    height: 76px;
    margin: 0 -18px;
    background: linear-gradient(135deg, var(--hp-dark), var(--hp-primary) 60%, var(--hp-secondary) 160%);
    position: relative;
    overflow: hidden;
}
.leader-spotlight-watermark {
    position: absolute;
    right: -8px;
    top: -10px;
    font-size: 5.5rem;
    color: rgba(255,255,255,0.09);
}

.leader-spotlight-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hp-secondary), #f2b705);
    color: var(--hp-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

.leader-spotlight-photo {
    width: 116px;
    height: 116px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    margin: -58px auto 0;
    display: block;
    position: relative;
    z-index: 1;
    border: 4px solid #fff;
    box-shadow: 0 6px 18px rgba(6, 48, 92, 0.25), 0 0 0 4px rgba(244,196,48,0.35);
}
body.dark-mode .leader-spotlight-photo { border-color: #16201a; box-shadow: 0 6px 18px rgba(0,0,0,0.4), 0 0 0 4px rgba(244,196,48,0.3); }

.leader-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef0f3;
    color: #aab2bd;
    font-size: 2.2rem;
}
body.dark-mode .leader-photo-placeholder { background: #1d2b22; color: #5d7267; }

.leader-spotlight-body { margin-top: 12px; }

.leader-spotlight-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--hp-dark);
}
body.dark-mode .leader-spotlight-name { color: #f2f4f2; }

.leader-spotlight-position {
    display: inline-block;
    margin-top: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-dark));
    padding: 5px 16px;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(11,78,162,0.25);
}

.leader-spotlight-bio {
    position: relative;
    font-size: 0.87rem;
    color: #555;
    line-height: 1.6;
    margin: 16px auto 0;
    max-width: 460px;
    font-style: italic;
}
.leader-spotlight-bio i.bi-quote { color: var(--hp-secondary); font-size: 1.3rem; font-style: normal; margin-right: 4px; vertical-align: -4px; }
body.dark-mode .leader-spotlight-bio { color: #cfd6d1; }

.leader-tap-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--hp-primary);
    background: rgba(11,83,158,0.08);
    padding: 6px 14px;
    border-radius: 20px;
}
body.dark-mode .leader-tap-hint { color: #6fb2ee; background: rgba(111,178,238,0.12); }

/* ---- Leadership team grid ---- */
.leader-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 380px) {
    .leader-grid { grid-template-columns: 1fr; }
}

.leader-card-pro {
    position: relative;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(6, 48, 92, 0.09);
    text-align: center;
    padding-bottom: 14px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    cursor: pointer;
}
.leader-card-pro:hover,
.leader-card-pro:active {
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 14px 26px rgba(6, 48, 92, 0.18);
}
.leader-card-pro.is-morphing-source { opacity: 0.45; transform: scale(0.97); }
body.dark-mode .leader-card-pro { background: #16201a; box-shadow: none; border: 1px solid #223227; }
body.dark-mode .leader-card-pro:hover { box-shadow: 0 10px 22px rgba(0,0,0,0.4); }

.leader-card-pro-expand-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    color: var(--hp-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
body.dark-mode .leader-card-pro-expand-icon { background: rgba(22,32,26,0.85); color: #6fb2ee; }

.leader-card-pro-banner {
    height: 44px;
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-dark) 70%, var(--hp-secondary) 180%);
    position: relative;
}

.leader-card-pro-photo {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    display: block;
    margin: -39px auto 0;
    position: relative;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}
body.dark-mode .leader-card-pro-photo { border-color: #16201a; }
.leader-card-pro-photo.leader-photo-placeholder { font-size: 1.4rem; }

.leader-card-pro-body { padding: 8px 14px 0; }

.leader-card-pro-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--hp-dark);
    line-height: 1.3;
}
body.dark-mode .leader-card-pro-name { color: #f2f4f2; }

.leader-card-pro-position {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--hp-primary);
    background: rgba(11,78,162,0.08);
    padding: 2px 10px;
    border-radius: 12px;
    margin-top: 5px;
}
body.dark-mode .leader-card-pro-position { color: #6fb2ee; background: rgba(111,178,238,0.12); }

.leader-card-pro-bio {
    font-size: 0.76rem;
    color: #666;
    line-height: 1.45;
    margin: 8px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.dark-mode .leader-card-pro-bio { color: #b9c4bd; }

/* ================================================
   Leader full-profile modal (shared-element / FLIP)
   ================================================ */
html.leader-modal-lock,
html.leader-modal-lock body { overflow: hidden; height: 100%; }

.leader-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 16, 32, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.leader-modal-overlay.active { opacity: 1; pointer-events: auto; }

.leader-modal-card {
    position: relative;
    width: min(92vw, 440px);
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(4, 16, 32, 0.45);
    will-change: transform, opacity;
    opacity: 0;
    transform: scale(0.86) translateY(28px);
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.leader-modal-overlay.active .leader-modal-card {
    opacity: 1;
    transform: scale(1) translateY(0);
}
body.dark-mode .leader-modal-card {
    background: rgba(20, 28, 23, 0.9);
    border-color: rgba(255,255,255,0.08);
}

.leader-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #16233a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
body.dark-mode .leader-modal-close { background: rgba(22,32,26,0.9); color: #e6e8e6; }

.leader-modal-header {
    position: relative;
    cursor: pointer;
    padding-bottom: 62px;
}
.leader-modal-banner {
    height: 128px;
    background: linear-gradient(120deg, var(--hp-dark) 0%, var(--hp-primary) 45%, var(--hp-green) 75%, var(--hp-secondary) 130%);
}
.leader-modal-photo,
.leader-modal-photo-fallback {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 128px;
    height: 128px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 26px rgba(6, 48, 92, 0.35);
    object-fit: cover;
    object-position: center 20%;
}
.leader-modal-photo-fallback {
    background: var(--hp-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 700;
}
body.dark-mode .leader-modal-photo,
body.dark-mode .leader-modal-photo-fallback { border-color: rgba(22,32,26,0.9); }

.leader-modal-body { padding: 16px 24px 26px; text-align: center; }

.leader-modal-name { font-weight: 800; font-size: 1.28rem; color: var(--hp-dark); }
body.dark-mode .leader-modal-name { color: #f2f4f2; }

.leader-modal-position {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--hp-primary), var(--hp-dark));
    padding: 6px 18px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(11,78,162,0.3);
}

.leader-modal-contact-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.leader-modal-contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--hp-primary);
    background: rgba(11,83,158,0.08);
    padding: 7px 14px;
    border-radius: 20px;
    text-decoration: none !important;
}
body.dark-mode .leader-modal-contact-chip { color: #6fb2ee; background: rgba(111,178,238,0.12); }

.leader-modal-bio-label {
    margin-top: 22px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--hp-secondary);
}
.leader-modal-bio-label i { margin-right: 4px; }

.leader-modal-bio {
    margin-top: 8px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.75;
    color: #444;
    white-space: pre-line;
}
body.dark-mode .leader-modal-bio { color: #cfd6d1; }

/* ================================================
   Global safety resets (prevent horizontal overflow)
   ================================================ */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; }
.app-content { overflow-x: hidden; }
