/* ================================================================
   UAWP — RESOURCE PAGE  ·  Sage · Taupe · Mushroom · Cream
   Palette: #DADDB1 · #B3A492 · #BFB29E · #D6C7AE
   Fraunces + Plus Jakarta Sans
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --sage: #DADDB1;
    --taupe: #B3A492;
    --mushroom: #BFB29E;
    --cream: #D6C7AE;

    --bg: #D8DAB0;
    --bg2: #CCCEA6;
    --bg3: #C5C79E;
    --surface: #EFEEDF;
    --surface2: #E8E7D5;

    --ink: #26190C;
    --text: #2E2214;
    --text2: #685A46;
    --text3: #978470;
    --border: rgba(90, 72, 45, 0.12);
    --border2: rgba(90, 72, 45, 0.22);

    --gold: #7E6030;
    --gold2: #A8804A;
    --gold-glow: rgba(126, 96, 48, 0.22);

    --hosp-card: #EAF0FA;
    --hosp-s1: #1B4E96;
    --hosp-s2: #5B9CF6;
    --hosp-icon-bg: #C6DBFA;
    --hosp-icon-c: #1B4E96;
    --hosp-bdg-bg: #C6DBFA;
    --hosp-bdg-tx: #153C76;
    --hosp-glow: rgba(27, 78, 150, 0.20);

    --ngo-card: #F6EDDC;
    --ngo-s1: #963208;
    --ngo-s2: #E8912A;
    --ngo-icon-bg: #F5D4A4;
    --ngo-icon-c: #963208;
    --ngo-bdg-bg: #F5D4A4;
    --ngo-bdg-tx: #722606;
    --ngo-glow: rgba(150, 50, 8, 0.18);

    --ther-card: #E2F6EC;
    --ther-s1: #0C6640;
    --ther-s2: #28C07A;
    --ther-icon-bg: #B4EDCD;
    --ther-icon-c: #0C6640;
    --ther-bdg-bg: #B4EDCD;
    --ther-bdg-tx: #084D30;
    --ther-glow: rgba(12, 102, 64, 0.18);

    --sch-card: #EDE6FB;
    --sch-s1: #5518C0;
    --sch-s2: #9560F0;
    --sch-icon-bg: #D6C4F8;
    --sch-icon-c: #5518C0;
    --sch-bdg-bg: #D6C4F8;
    --sch-bdg-tx: #410F96;
    --sch-glow: rgba(85, 24, 192, 0.16);

    --gov-card: #FAE6E6;
    --gov-s1: #9B1212;
    --gov-s2: #E04A4A;
    --gov-icon-bg: #F5C6C6;
    --gov-icon-c: #9B1212;
    --gov-bdg-bg: #F5C6C6;
    --gov-bdg-tx: #760E0E;
    --gov-glow: rgba(155, 18, 18, 0.18);

    --sh1: 0 2px 10px rgba(38, 25, 12, 0.08), 0 1px 3px rgba(38, 25, 12, 0.05);
    --sh2: 0 8px 28px rgba(38, 25, 12, 0.12), 0 3px 8px rgba(38, 25, 12, 0.07);
    --sh3: 0 22px 55px rgba(38, 25, 12, 0.18), 0 6px 18px rgba(38, 25, 12, 0.10);

    --ease: cubic-bezier(0.34, 1.22, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── NAVBAR ──────────────────────────────────────────────────── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 64px;
    height: 68px;
    background: rgba(239, 238, 223, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--sh1);
    /* overflow visible so the slide-out drawer is not clipped */
    overflow: visible;
}

.logo {
    font-family: 'Fraunces', serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--ink);
    text-decoration: none;
    position: relative;
    flex-shrink: 0;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
    border-radius: 2px;
}

/* ── NAV LINKS (desktop) ─────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 24px;
    transition: all 0.2s var(--ease-smooth);
    white-space: nowrap;
}

.nav-links a:hover {
    background: var(--mushroom);
    color: var(--ink);
    transform: translateY(-1px);
}

.nav-links a.active {
    background: var(--ink);
    color: #fff;
    box-shadow: 0 4px 14px rgba(38, 25, 12, 0.28);
}

/* ── HAMBURGER BUTTON ─────────────────────────────────────────── */
/* Hidden on desktop, shown on mobile via media query below */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(38, 25, 12, 0.08);
    border: 1.5px solid rgba(38, 25, 12, 0.15);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    z-index: 1200;
}

.hamburger:hover {
    background: rgba(38, 25, 12, 0.14);
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.32s cubic-bezier(0.34, 1.22, 0.64, 1),
        opacity 0.22s ease,
        width 0.28s ease;
    transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE OVERLAY ───────────────────────────────────────────── */
.mob-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 2, 0.45);
    z-index: 1050;
    /* Overlay covers only the LEFT side, not the nav drawer on the right */
    right: min(290px, 84vw);
}

.mob-overlay.is-open {
    display: block;
    animation: ov-in 0.22s ease both;
}

@keyframes ov-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── HERO ────────────────────────────────────────────────────── */
.resource-hero {
    text-align: center;
    padding: 88px 24px 62px;
    position: relative;
    overflow: hidden;
}

.resource-hero::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(179, 164, 146, 0.24), transparent 65%);
    top: -140px;
    left: -80px;
    border-radius: 50%;
    pointer-events: none;
    animation: drift-a 16s ease-in-out infinite alternate;
}

.resource-hero::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(218, 221, 177, 0.22), transparent 65%);
    bottom: -60px;
    right: -40px;
    border-radius: 50%;
    pointer-events: none;
    animation: drift-b 20s ease-in-out infinite alternate;
}

@keyframes drift-a {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(36px, 18px) scale(1.07);
    }
}

@keyframes drift-b {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(-28px, -16px) scale(1.05);
    }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 7px 18px;
    border-radius: 24px;
    margin-bottom: 24px;
    box-shadow: var(--sh1);
    position: relative;
    z-index: 1;
    animation: fade-up 0.7s var(--ease) both;
}

.hero-eyebrow i {
    color: var(--gold);
    font-size: 11px;
}

.resource-hero h1 {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.3rem, 5.2vw, 3.7rem);
    font-weight: 700;
    line-height: 1.09;
    color: var(--ink);
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    position: relative;
    z-index: 1;
    animation: fade-up 0.8s var(--ease) 0.08s both;
}

.resource-hero h1 em {
    font-style: italic;
    color: var(--gold);
    background-image: linear-gradient(90deg, var(--gold), var(--gold2));
    background-repeat: no-repeat;
    background-size: 100% 2.5px;
    background-position: 0 100%;
}

.resource-hero p {
    font-size: 15px;
    color: var(--text2);
    max-width: 470px;
    margin: 0 auto;
    line-height: 1.78;
    font-weight: 400;
    position: relative;
    z-index: 1;
    animation: fade-up 0.8s var(--ease) 0.16s both;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── FILTER SECTION ─────────────────────────────────────────── */
.filter-section {
    background: var(--surface);
    margin: 0 52px 6px;
    border-radius: 20px;
    padding: 24px 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: var(--sh2);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    animation: fade-up 0.7s var(--ease) 0.22s both;
}

.filter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--taupe), var(--mushroom), var(--cream), transparent 80%);
    border-radius: 20px 20px 0 0;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.filter-row label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text3);
    min-width: 72px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1.5px solid var(--border2);
    padding: 10px 18px;
    border-radius: 32px;
    gap: 10px;
    width: 340px;
    transition: all 0.28s var(--ease-smooth);
}

.search-box:focus-within {
    border-color: var(--taupe);
    box-shadow: 0 0 0 3px var(--gold-glow), var(--sh1);
    background: var(--surface);
}

.search-box input {
    border: none;
    outline: none;
    font-size: 13.5px;
    width: 100%;
    background: transparent;
    color: var(--text);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
}

.search-box input::placeholder {
    color: var(--text3);
    font-weight: 400;
}

.search-box i {
    color: var(--text3);
    font-size: 13px;
    transition: color 0.2s;
}

.search-box:focus-within i {
    color: var(--gold);
}

/* ── FILTER PILLS ───────────────────────────────────────────── */
.filter-pills {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

#disabilityFilters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
}

#disabilityFilters::-webkit-scrollbar {
    height: 3px;
}

#disabilityFilters::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 4px;
}

.pill {
    background: var(--bg2);
    border: 1.5px solid var(--border);
    padding: 6px 16px;
    border-radius: 22px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text2);
    transition: all 0.18s var(--ease);
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.pill:hover {
    background: var(--mushroom);
    color: var(--ink);
    transform: translateY(-2px);
    box-shadow: var(--sh1);
    border-color: var(--taupe);
}

.pill:active {
    transform: translateY(0) scale(0.97);
}

.pill.active {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    box-shadow: 0 4px 14px rgba(38, 25, 12, 0.30);
    transform: translateY(-1px);
}

.results-count {
    padding: 16px 58px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text3);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* ── GRID ────────────────────────────────────────────────────── */
.resource-container {
    padding: 12px 52px 100px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── CARDS ───────────────────────────────────────────────────── */
.resource-card {
    border-radius: 28px 8px 28px 8px;
    padding: 0;
    position: relative;
    overflow: hidden;
    border: 1.5px solid var(--border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 2px rgba(38, 25, 12, 0.04),
        0 4px 12px rgba(38, 25, 12, 0.06),
        0 12px 32px rgba(38, 25, 12, 0.07);
    transition:
        transform 0.45s var(--ease),
        box-shadow 0.45s var(--ease-smooth),
        border-color 0.3s,
        border-radius 0.45s var(--ease);
    animation: card-rise 0.65s var(--ease) both;
    isolation: isolate;
}

.resource-card:nth-child(even) {
    border-radius: 8px 28px 8px 28px;
}

.resource-card:nth-child(1) {
    animation-delay: 0.04s;
}

.resource-card:nth-child(2) {
    animation-delay: 0.09s;
}

.resource-card:nth-child(3) {
    animation-delay: 0.14s;
}

.resource-card:nth-child(4) {
    animation-delay: 0.19s;
}

.resource-card:nth-child(5) {
    animation-delay: 0.24s;
}

.resource-card:nth-child(6) {
    animation-delay: 0.29s;
}

.resource-card:nth-child(7) {
    animation-delay: 0.34s;
}

.resource-card:nth-child(8) {
    animation-delay: 0.39s;
}

.resource-card:nth-child(9) {
    animation-delay: 0.44s;
}

.resource-card:nth-child(10) {
    animation-delay: 0.49s;
}

.resource-card:nth-child(11) {
    animation-delay: 0.54s;
}

.resource-card:nth-child(12) {
    animation-delay: 0.59s;
}

@keyframes card-rise {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.93) rotate(-0.5deg);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

.resource-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    bottom: -60px;
    right: -50px;
    opacity: 0.13;
    transition: opacity 0.4s, transform 0.5s var(--ease);
    pointer-events: none;
    z-index: 0;
}

.resource-card:hover::after {
    opacity: 0.22;
    transform: scale(1.18) translate(-8px, -8px);
}

.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.18) 55%, transparent 78%);
    transition: left 0.62s var(--ease-smooth);
    z-index: 5;
    pointer-events: none;
}

.resource-card:hover::before {
    left: 150%;
}

.resource-card:hover {
    transform: translateY(-12px) scale(1.02) rotate(0.3deg);
    border-radius: 32px 6px 32px 6px;
}

.resource-card:nth-child(even):hover {
    border-radius: 6px 32px 6px 32px;
}

.card-strip {
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    transition: width 0.3s var(--ease), top 0.3s var(--ease), bottom 0.3s var(--ease);
    z-index: 2;
    overflow: hidden;
}

.resource-card:hover .card-strip {
    width: 6px;
    top: 10px;
    bottom: 10px;
}

.card-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateY(-100%);
    animation: bar-shimmer 3s ease-in-out infinite;
}

@keyframes bar-shimmer {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    60% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

.resource-card .view-btn {
    background: linear-gradient(135deg, #7E6030, #A8804A);
}

.resource-card .card-icon {
    background: var(--surface2);
    color: var(--ink);
}

.resource-card[data-cat="Hospital"] {
    background: linear-gradient(145deg, #EFEEDF, #E8E7D5, #DADDB1);
    border-color: rgba(90, 72, 45, 0.15);
}

.resource-card[data-cat="Hospital"]:hover {
    box-shadow: 0 10px 30px rgba(38, 25, 12, 0.12), 0 28px 60px rgba(38, 25, 12, 0.16);
}

.resource-card[data-cat="Hospital"] .card-strip {
    background: linear-gradient(180deg, #B3A492, #D6C7AE);
}

.resource-card[data-cat="Hospital"]::after {
    background: radial-gradient(circle, #D6C7AE, #B3A492);
}

.resource-card[data-cat="NGO"] {
    background: linear-gradient(145deg, #F6F3EA, #EFEADF, #D6C7AE);
    border-color: rgba(90, 72, 45, 0.14);
}

.resource-card[data-cat="NGO"]:hover {
    box-shadow: 0 10px 30px rgba(38, 25, 12, 0.12), 0 28px 60px rgba(38, 25, 12, 0.15);
}

.resource-card[data-cat="NGO"] .card-strip {
    background: linear-gradient(180deg, #BFB29E, #D6C7AE);
}

.resource-card[data-cat="NGO"]::after {
    background: radial-gradient(circle, #D6C7AE, #BFB29E);
}

.resource-card[data-cat="Therapy"] {
    background: linear-gradient(145deg, #EEF1E6, #E8E7D5, #DADDB1);
    border-color: rgba(90, 72, 45, 0.14);
}

.resource-card[data-cat="Therapy"]:hover {
    box-shadow: 0 10px 30px rgba(38, 25, 12, 0.12), 0 28px 60px rgba(38, 25, 12, 0.15);
}

.resource-card[data-cat="Therapy"] .card-strip {
    background: linear-gradient(180deg, #DADDB1, #BFB29E);
}

.resource-card[data-cat="Therapy"]::after {
    background: radial-gradient(circle, #DADDB1, #BFB29E);
}

.resource-card[data-cat="School"] {
    background: linear-gradient(145deg, #F3F0E8, #EDE6DB, #BFB29E);
    border-color: rgba(90, 72, 45, 0.14);
}

.resource-card[data-cat="School"]:hover {
    box-shadow: 0 10px 30px rgba(38, 25, 12, 0.12), 0 28px 60px rgba(38, 25, 12, 0.15);
}

.resource-card[data-cat="School"] .card-strip {
    background: linear-gradient(180deg, #B3A492, #BFB29E);
}

.resource-card[data-cat="School"]::after {
    background: radial-gradient(circle, #BFB29E, #B3A492);
}

.resource-card[data-cat="Government"] {
    background: linear-gradient(145deg, #F5F1E8, #EFEADF, #D6C7AE);
    border-color: rgba(90, 72, 45, 0.14);
}

.resource-card[data-cat="Government"]:hover {
    box-shadow: 0 10px 30px rgba(38, 25, 12, 0.12), 0 28px 60px rgba(38, 25, 12, 0.15);
}

.resource-card[data-cat="Government"] .card-strip {
    background: linear-gradient(180deg, #7E6030, #B3A492);
}

.resource-card[data-cat="Government"]::after {
    background: radial-gradient(circle, #B3A492, #7E6030);
}

.card-body {
    padding: 22px 22px 18px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 1;
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.card-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 16px 6px 16px 6px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.4s var(--ease), box-shadow 0.3s, border-radius 0.4s var(--ease);
    position: relative;
}

.resource-card:hover .card-icon {
    transform: scale(1.16) rotate(10deg);
    border-radius: 50%;
}

.card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 5px;
    letter-spacing: 0.6px;
    white-space: nowrap;
    text-transform: uppercase;
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
    position: relative;
}

.resource-card:hover .badge {
    transform: scale(1.06) translateX(-2px);
}

.badge-hospital {
    background: var(--hosp-bdg-bg);
    color: var(--hosp-bdg-tx);
}

.badge-ngo {
    background: var(--ngo-bdg-bg);
    color: var(--ngo-bdg-tx);
}

.badge-therapy {
    background: var(--ther-bdg-bg);
    color: var(--ther-bdg-tx);
}

.badge-school {
    background: var(--sch-bdg-bg);
    color: var(--sch-bdg-tx);
}

.badge-government {
    background: var(--gov-bdg-bg);
    color: var(--gov-bdg-tx);
}

.badge-disability {
    background: #EDE9FE;
    color: #410F96;
}

.badge-country {
    background: var(--cream);
    color: var(--text2);
    border: 1px solid var(--border2);
}

.resource-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 9px;
    line-height: 1.38;
    letter-spacing: -0.3px;
    transition: color 0.18s;
}

.resource-card:hover h3 {
    color: #0E0804;
}

.resource-card p {
    font-size: 12.5px;
    color: var(--text2);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
    font-weight: 400;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px dashed rgba(90, 72, 45, 0.15);
    margin-top: auto;
}

.location-tag {
    font-size: 11px;
    color: var(--text3);
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    transition: color 0.18s;
}

.resource-card:hover .location-tag {
    color: var(--text2);
}

.location-tag i {
    font-size: 10px;
    display: inline-block;
    animation: pin-bob 2.8s ease-in-out infinite;
}

@keyframes pin-bob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.view-btn {
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s, filter 0.22s;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.03em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.view-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-110%) skewX(-15deg);
    transition: transform 0.46s var(--ease-smooth);
    border-radius: 20px;
}

.view-btn:hover {
    transform: translateY(-3px) scale(1.06);
    filter: brightness(1.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.view-btn:hover::after {
    transform: translateX(120%) skewX(-15deg);
}

.view-btn:active {
    transform: translateY(0) scale(0.97);
}

.view-btn i {
    font-size: 11px;
    transition: transform 0.22s var(--ease);
}

.view-btn:hover i {
    transform: translateX(3px);
}

.resource-card[data-cat="Hospital"] .view-btn {
    box-shadow: 0 4px 14px rgba(27, 78, 150, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-card[data-cat="NGO"] .view-btn {
    box-shadow: 0 4px 14px rgba(150, 50, 8, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-card[data-cat="Therapy"] .view-btn {
    box-shadow: 0 4px 14px rgba(12, 102, 64, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-card[data-cat="School"] .view-btn {
    box-shadow: 0 4px 14px rgba(85, 24, 192, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.resource-card[data-cat="Government"] .view-btn {
    box-shadow: 0 4px 14px rgba(155, 18, 18, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 90px 24px;
    color: var(--text3);
}

.no-results i {
    font-size: 44px;
    margin-bottom: 18px;
    display: block;
    opacity: 0.3;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.no-results p {
    font-size: 15px;
    color: var(--text2);
    font-weight: 500;
}

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-bg {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(16, 10, 4, 0.60);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
}

.modal-bg.open {
    display: flex;
    animation: overlay-in 0.25s ease both;
}

@keyframes overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--surface);
    padding: 0;
    border-radius: 28px 8px 28px 8px;
    max-width: 500px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: var(--sh3), 0 0 0 1px var(--border);
    animation: modal-pop 0.42s cubic-bezier(0.34, 1.52, 0.64, 1) both;
    position: relative;
    scroll-behavior: smooth;
}

@keyframes modal-pop {
    from {
        transform: scale(0.72) translateY(28px) rotate(-1deg);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0) rotate(0deg);
        opacity: 1;
    }
}

.modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 8px;
}

.modal-top-strip {
    height: 5px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.modal-top-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: bar-shimmer 2.5s ease-in-out infinite;
}

.modal-inner {
    padding: 28px 30px 26px;
}

.close-btn {
    position: absolute;
    right: 16px;
    top: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    color: var(--text3);
    background: var(--bg2);
    border: 1.5px solid var(--border);
    transition: all 0.22s var(--ease);
    z-index: 10;
    line-height: 1;
}

.close-btn:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 14px rgba(38, 25, 12, 0.28);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 16px 6px 16px 6px;
    flex-shrink: 0;
    box-shadow: var(--sh1);
    animation: icon-in 0.5s var(--ease) 0.15s both;
}

@keyframes icon-in {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-20deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.modal-title h2 {
    font-family: 'Fraunces', serif;
    font-size: 17.5px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.modal-badges {
    display: flex;
    gap: 6px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.modal-body {
    font-size: 13.5px;
    color: var(--text2);
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.modal-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(90, 72, 45, 0.07);
    transition: background 0.15s;
}

.modal-row:last-child {
    border-bottom: none;
}

.modal-row:hover {
    background: rgba(218, 221, 177, 0.16);
    border-radius: 8px;
    padding-left: 6px;
    padding-right: 6px;
}

.lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    color: var(--text3);
    min-width: 76px;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    padding-top: 2px;
    flex-shrink: 0;
}

.lbl i {
    font-size: 10px;
}

.val {
    color: var(--text);
    flex: 1;
    line-height: 1.58;
    font-size: 13.5px;
    font-weight: 500;
}

.val a {
    color: #1B4E96;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s;
    border-bottom: 1px solid transparent;
}

.val a:hover {
    opacity: 0.78;
    border-bottom-color: currentColor;
}

.modal-desc {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--bg);
    border-radius: 14px 4px 14px 4px;
    font-size: 13px;
    color: var(--text2);
    line-height: 1.74;
    border: 1px solid var(--border);
    font-weight: 400;
    position: relative;
}

.modal-desc::before {
    content: '"';
    font-family: 'Fraunces', serif;
    font-size: 52px;
    color: var(--taupe);
    opacity: 0.28;
    position: absolute;
    top: 2px;
    left: 12px;
    line-height: 1;
    pointer-events: none;
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer {
    padding: 24px;
    text-align: center;
    background: var(--ink);
    color: rgba(255, 255, 255, 0.38);
    font-size: 12px;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold2), transparent);
    opacity: 0.38;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .navbar {
        padding: 0 36px;
    }

    .resource-container {
        padding: 10px 36px 70px;
    }

    .filter-section {
        margin: 0 36px;
    }

    .results-count {
        padding: 14px 40px 4px;
    }

    .resource-hero h1 {
        font-size: 2.6rem;
    }
}

/* ── TABLET + MOBILE: show hamburger, hide nav links ──────────── */
@media (max-width: 900px) {

    /* Prevent horizontal overflow so the off-screen drawer is invisible */
    html,
    body {
        overflow-x: hidden;
    }

    /* Show the hamburger button */
    .hamburger {
        display: flex;
    }

    /* Move nav-links off-screen to the right — hidden until opened */
    .nav-links {
        position: fixed;
        top: 0;
        right: -110%;
        width: min(290px, 84vw);
        height: 100dvh;
        background: #26200a;
        flex-direction: column;
        gap: 2px;
        padding: 76px 14px 36px;
        z-index: 1200;
        overflow-y: auto;
        overflow-x: hidden;
        list-style: none;
        border-left: 1px solid rgba(194, 183, 121, 0.12);
        box-shadow: -6px 0 36px rgba(0, 0, 0, 0.40);
        transition: right 0.36s cubic-bezier(0.34, 1.08, 0.64, 1);
        pointer-events: none;
    }

    /* Open state — JS adds this class */
    .nav-links.is-open {
        right: 0;
        pointer-events: auto;
    }

    /* "MENU" label at top of drawer */
    .nav-links::before {
        content: 'MENU';
        display: block;
        font-size: 0.6rem;
        font-weight: 800;
        letter-spacing: 3px;
        color: rgba(194, 183, 121, 0.35);
        padding: 0 12px 14px;
        border-bottom: 1px solid rgba(194, 183, 121, 0.1);
        margin-bottom: 10px;
        flex-shrink: 0;
    }

    /* Each list item full-width */
    .nav-links li {
        width: 100%;
    }

    /* Links inside the drawer */
    .nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 14px;
        border-radius: 9px;
        font-size: 0.92rem;
        font-weight: 600;
        color: rgba(235, 229, 194, 0.8);
        background: transparent;
        box-shadow: none;
        transform: none;
        border: none;
        text-decoration: none;
        letter-spacing: 0.2px;
        transition: background 0.18s, color 0.18s;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a:hover {
        background: rgba(194, 183, 121, 0.1);
        color: #c2b779;
        transform: none;
    }

    .nav-links a.active {
        background: rgba(194, 183, 121, 0.18);
        color: #c2b779;
        box-shadow: none;
        transform: none;
    }

    /* Lock body scroll when menu is open */
    body.nav-locked {
        overflow: hidden;
    }

    /* Filter section mobile fixes */
    .filter-section {
        margin: 0 16px;
        padding: 18px 20px;
    }

    .filter-row {
        flex-wrap: wrap;
    }

    .search-box {
        width: 100%;
    }

    /* Disability pills — force horizontal scroll, no wrap */
    #disabilityFilters {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        max-width: 100%;
    }

    #disabilityFilters::-webkit-scrollbar {
        display: none;
    }

    /* Country pills — wrap on mobile */
    #countryFilters {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    /* Category pills — wrap on mobile */
    #categoryFilters {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    /* Page layout */
    .resource-container {
        padding: 10px 16px 50px;
    }

    .resource-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .resource-hero {
        padding: 52px 20px 40px;
    }

    .resource-hero h1 {
        font-size: 2.1rem;
    }

    .results-count {
        padding: 12px 18px 4px;
    }

    .modal-inner {
        padding: 22px 22px 20px;
    }

    /* Country pills — wrap on mobile */
    #countryFilters {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }

    /* Category pills — wrap on mobile */
    #categoryFilters {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
    }
}

@media (max-width: 480px) {
    .resource-hero h1 {
        font-size: 1.8rem;
        letter-spacing: -0.5px;
    }

    .filter-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-row label {
        min-width: auto;
    }

    .modal-content {
        border-radius: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}