.elementor-14227 .elementor-element.elementor-element-e171d1b{--display:flex;--min-height:500px;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--justify-content:center;--overlay-opacity:0.2;--margin-top:0px;--margin-bottom:0px;--margin-left:0px;--margin-right:0px;--z-index:0;}.elementor-14227 .elementor-element.elementor-element-e171d1b:not(.elementor-motion-effects-element-type-background), .elementor-14227 .elementor-element.elementor-element-e171d1b > .elementor-motion-effects-container > .elementor-motion-effects-layer{background-image:url("https://www.habitatfoundation.org.my/wp-content/uploads/2025/07/G-hero-bg-01b.png");background-position:center center;background-repeat:no-repeat;background-size:cover;}.elementor-14227 .elementor-element.elementor-element-e171d1b::before, .elementor-14227 .elementor-element.elementor-element-e171d1b > .elementor-background-video-container::before, .elementor-14227 .elementor-element.elementor-element-e171d1b > .e-con-inner > .elementor-background-video-container::before, .elementor-14227 .elementor-element.elementor-element-e171d1b > .elementor-background-slideshow::before, .elementor-14227 .elementor-element.elementor-element-e171d1b > .e-con-inner > .elementor-background-slideshow::before, .elementor-14227 .elementor-element.elementor-element-e171d1b > .elementor-motion-effects-container > .elementor-motion-effects-layer::before{background-color:var( --e-global-color-text );--background-overlay:'';}.elementor-widget-image .widget-image-caption{color:var( --e-global-color-text );font-family:var( --e-global-typography-text-font-family ), Sans-serif;font-weight:var( --e-global-typography-text-font-weight );}.elementor-14227 .elementor-element.elementor-element-607a717 img{width:100vw;max-width:100vw;}.elementor-14227 .elementor-element.elementor-element-85d78d1{--display:flex;--padding-top:0px;--padding-bottom:50px;--padding-left:0px;--padding-right:0px;}.elementor-widget-heading .elementor-heading-title{font-family:var( --e-global-typography-primary-font-family ), Sans-serif;font-weight:var( --e-global-typography-primary-font-weight );color:var( --e-global-color-primary );}.elementor-14227 .elementor-element.elementor-element-6dbf3c1{text-align:start;}.elementor-14227 .elementor-element.elementor-element-6dbf3c1 .elementor-heading-title{font-family:"Montserrat", Sans-serif;font-size:62px;font-weight:700;text-shadow:0px 0px 10px rgba(0,0,0,0.3);color:var( --e-global-color-secondary );}.elementor-14227 .elementor-element.elementor-element-ab3aa1a{--display:flex;--flex-direction:column;--container-widget-width:100%;--container-widget-height:initial;--container-widget-flex-grow:0;--container-widget-align-self:initial;--flex-wrap-mobile:wrap;--gap:40px 40px;--row-gap:40px;--column-gap:40px;--padding-top:40px;--padding-bottom:50px;--padding-left:0px;--padding-right:0px;}.elementor-14227 .elementor-element.elementor-element-2ff0daa{--display:flex;}.elementor-14227 .elementor-element.elementor-element-fb1da5a > .elementor-widget-container{margin:0px 0px 0px 0px;}.elementor-14227 .elementor-element.elementor-element-fb1da5a{text-align:center;}.elementor-14227 .elementor-element.elementor-element-fb1da5a .elementor-heading-title{font-family:"Montserrat", Sans-serif;font-size:32px;font-weight:700;line-height:1.25;}.elementor-14227 .elementor-element.elementor-element-c5c2d98{text-align:center;}.elementor-14227 .elementor-element.elementor-element-c5c2d98 .elementor-heading-title{font-family:"Montserrat", Sans-serif;font-size:20px;font-weight:500;line-height:1.3;color:var( --e-global-color-primary );}.elementor-14227 .elementor-element.elementor-element-190e606{--display:flex;--gap:40px 40px;--row-gap:40px;--column-gap:40px;}.elementor-14227 .elementor-element.elementor-element-d99013c{--display:flex;--gap:40px 40px;--row-gap:40px;--column-gap:40px;}@media(min-width:768px){.elementor-14227 .elementor-element.elementor-element-190e606{--content-width:1280px;}.elementor-14227 .elementor-element.elementor-element-d99013c{--content-width:1280px;}}@media(min-width:1025px){.elementor-14227 .elementor-element.elementor-element-e171d1b:not(.elementor-motion-effects-element-type-background), .elementor-14227 .elementor-element.elementor-element-e171d1b > .elementor-motion-effects-container > .elementor-motion-effects-layer{background-attachment:fixed;}}/* Start custom CSS */div[data-elementor-type="wp-page"] {
    padding-top: 80px !important;
}

/*HERO*/
#divider-hero {
    position: absolute;
    bottom: 0;
}

/*CREST*/
#the-crest {
    background: #FBFBE3;
    background: linear-gradient(180deg, rgba(251, 251, 227, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

.crest {
    --crest-ink: #0b3a4f;
    --crest-bg: #fefee9;
    --crest-radius: 24px;
    margin: 0 auto;
    color: var(--crest-ink);
    font-family: inherit;
    position: relative;
}

/* One accent colour per category */
.crest [data-category="conservation"]   { --accent: #d9503f; }
.crest [data-category="research"]       { --accent: #1f4e5f; }
.crest [data-category="education"]      { --accent: #a8662b; }
.crest [data-category="sustainability"] { --accent: #3f8a5a; }
.crest [data-category="tourism"]        { --accent: #7fa62f; }

.crest__tabs {
    display: flex;
    flex-direction: row;
    gap: 16px;
    margin: 0 0 56px;
    padding: 12px 0 20px;
    white-space: normal;
}

.crest__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 20px 12px 18px;
    background: none !important;
    border: 2px solid transparent;
    border-radius: var(--crest-radius);
    box-shadow: 0 2px 8px rgba(11, 58, 79, .18);
    color: var(--crest-ink);
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
    max-width: calc(20% - 16px);
    width: calc(20% - 16px);
}
.crest__tab:hover { box-shadow: 0 6px 16px rgba(11, 58, 79, .22); }
.crest__tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.crest__tab[aria-selected="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent),
                0 6px 16px rgba(11, 58, 79, .22);
}

.crest__tab-img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.crest__tab-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--accent);
}
.crest__tab-desc {
    font-size: 14px;
    line-height: 1.35;
    color: #001D19;
}
.crest__tab-name,
.crest__tab-desc {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* ---------- Panels ---------- */
.crest__panel[hidden] { display: none; }

.crest__panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.crest__panel-title {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Montserrat';
    color: #07324A;
    margin: 0 0 16px;
}

.crest__panel-text p {
    font-size: 15px;
    font-family: 'Montserrat';
    line-height: 1.5;
    color: #001D19;
    margin: 0 0 16px;
}

/* ---------- Stats / image cards (right column) ---------- */
.crest__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(150px, 1fr);
    gap: 16px;
    min-height: 320px;
}

.crest__stat {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px;
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    background: #e9e5f2;               /* fallback if image fails */
    font-family: 'Montserrat';
}

.crest__stat-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* Darken the photo only on cards that have a counter, so text stays readable */
.crest__stat:has(.crest__stat-num)::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(7, 50, 74, .55);   /* adjust opacity to taste */
}

.crest__stat-num {
    font-size: clamp(28px, 3.2vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
}

.crest__stat-label {
    font-size: 15px;
    line-height: 1.35;
    color: #fff;
}

/* ---------- Layout by number of cards (automatic) ---------- */

/* 1 card */
.crest__stats:has(> :only-child) {
    grid-template-columns: 1fr;
}

/* 2 cards: stacked, and give the text column more room */
.crest__stats:has(> :nth-child(2):last-child) {
    grid-template-columns: 1fr;
}
.crest__panel:has(.crest__stats > :nth-child(2):last-child) {
    grid-template-columns: 1.7fr 1fr;
}

/* 3 cards: one tall card left, two stacked right */
.crest__stats:has(> :nth-child(3):last-child) {
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: 1fr 1fr;
}
.crest__stats:has(> :nth-child(3):last-child) > :first-child {
    grid-row: 1 / span 2;
}

/* 4 cards: default 2x2 grid, nothing extra needed */

/* Fade only the panel being shown, and only when motion is OK */
@keyframes crest-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
    .crest__panel:not([hidden]) { animation: crest-fade .25s ease; }
}

/*Projects*/
#thf-projects {
    padding-top: 50px;
}

.thf-projects {
    --thf-ink: #0b3a4f;
    --thf-line: #dfe3d6;
    --thf-accent: #1f4e5f;
    margin: 0 auto;
    color: var(--thf-ink);
    font-family: 'Montserrat';
}

.thf-projects__title {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Montserrat';
    color: #07324A;
    margin: 0 0 12px;
}

.thf-projects__sub {
    font-size: 16px;
    font-family: 'Montserrat';
    line-height: 1.5;
    color: #001D19;
}

button.thf-btn {
    --thf-bg: #001D19;
    --thf-fg: #fff;
    --thf-bg-h: #07324A;
    --thf-fg-h: #E0C759;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 16px;
    background: var(--thf-bg);
    color: var(--thf-fg);
    border: 1px solid var(--thf-bg);
    border-radius: 50px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}
button.thf-btn:hover, button.thf-btn:focus { background: var(--thf-bg-h); color: var(--thf-fg-h); border-color: var(--thf-bg-h); }
button.thf-btn:focus-visible { outline: 3px solid var(--thf-accent); outline-offset: 2px; }
button.thf-btn--ghost { --thf-bg: transparent; --thf-fg: var(--thf-ink); --thf-bg-h: rgba(11,58,79,.08); --thf-fg-h: var(--thf-ink); border-color: transparent; font-weight: 500; padding: 8px 10px; }
button.thf-btn--ghost:hover, button.thf-btn--ghost:focus { border-color: transparent; }
button.thf-btn[disabled] { opacity: .35; cursor: default; pointer-events: none; }

/* ---------- Toolbar ---------- */
.thf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 40px;
    margin-bottom: 20px;
}

.toolbar-col {
    flex: 1;
}

.thf-count {
    font-size: 14px;
    color: #001D19;
    margin: 0;
    text-align: center;
}

.toolbar-col:has(.thf-sort) {
    text-align: right;
}
.thf-sort {
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.thf-sort span {
    min-width: 60px;
}

.thf-projects select, .thf-drawer select {
    padding: 8px 8px 8px 12px;
    border: 1px solid #07324A;
    border-radius: 50px;
    background-color: #fff;
    color: #001D19;
    font: inherit;
    font-size: 16px;
    min-width: 0;
}
.thf-projects select:focus-visible { outline: 3px solid var(--thf-accent); outline-offset: 2px; }

/* ---------- Grid + cards ---------- */
.thf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    transition: opacity .15s;
}
.thf-grid[aria-busy="true"] {
    opacity: .45;
    pointer-events: none;
}

.thf-card {
    background: #fff;
    border: 1px solid var(--thf-line);
    border-radius: 8px;
    overflow: hidden;
}

.thf-card__link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}
.thf-card__link:focus-visible {
    outline: 3px solid var(--thf-accent);
    outline-offset: -3px;
}

.thf-card__media {
    position: relative;
    aspect-ratio: 16 / 11;
    background: #e9e5f2;
}
.thf-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thf-card__badge {
    position: absolute;
    top: 8px; left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff;
    font-size: .7rem;
    font-weight: 600;
}

.thf-card__body {
    padding: 14px 14px 16px;
}

.thf-card__title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thf-card__loc {
    font-size: 14px;
    line-height: 1.25;
    color: #001D19;
    margin: 0 0 4px;
}
.thf-card__leader {
    font-size: 14px;
    line-height: 1.25;
    color: #001D19;
    margin: 0;
}

.thf-empty {
    grid-column: 1 / -1;
    padding: 48px 16px;
    text-align: center;
}
.thf-empty p {
    margin: 0 0 12px;
}

/* ---------- Pagination ---------- */
.thf-pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 6px 14px;
    margin-top: 32px;
    width: 100%;
}

/* Projects per page - right */
.thf-pager__per {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

/* Pagination - centre */
.thf-pager .pagination {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.thf-pager__per, .thf-pager__page {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.thf-pager__page {
    margin: 0 1.5rem;
}

.thf-pager__per span {
    min-width: 130px;
}

.thf-pager input[type="number"] {
    font-size: 14px;
    width: 65px;
    padding: 8px 8px;
    border: 1px solid var(--thf-ink);
    border-radius: 20px;
    background: #fff;
    color: var(--thf-ink);
    text-align: center;
    -moz-appearance: textfield;
}

.thf-pager input[type="number"]::-webkit-outer-spin-button,
.thf-pager input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.thf-pager input:focus-visible {
    outline: 3px solid var(--thf-accent);
    outline-offset: 2px;
}

/* ---------- Bottom search ---------- */
.thf-search-block {
    margin-top: 72px;
    text-align: center;
}

.thf-search-block p {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px;
}
.thf-search {
    display: flex;
    align-items: center;
    max-width: 360px;
    margin: 0 auto;
    padding: 6px 8px 6px 18px;
    background: transparent;
    border: 1px solid var(--thf-ink);
    border-radius: 999px;
}

.thf-search:focus-within {
    outline: 3px solid var(--thf-accent);
    outline-offset: 2px;
}

.thf-search input[type="search"] {
    font-size: 14px;
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    color: var(--thf-ink);
    outline: none;
    box-shadow: none;
}
button.thf-search__go {
    --thf-bg: transparent;
    --thf-fg: var(--thf-ink);
    --thf-bg-h: rgba(11,58,79,.1);
    --thf-fg-h: var(--thf-ink);
    border-color: transparent;
    padding: 8px;
    border-radius: 50%;
}
button.thf-search__go svg {
    width: 18px;
    height: 18px;
}

/* ---------- Filter drawer (moved to <body> by the script) ---------- */
.thf-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(11,58,79,.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility 0s .25s;
}
.thf-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.thf-drawer {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 99991;
    width: min(340px, 90vw);
    padding: 20px;
    overflow-y: auto;
    background: #fff;
    color: #0b3a4f;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s .25s;
    font-family: inherit;
}
.thf-drawer.is-open {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
}

.thf-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.thf-drawer__head h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.thf-selected {
    padding-bottom: 14px;
    border-bottom: 1px solid #dfe3d6;
}

.thf-selected__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: .9rem;
}

.thf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 28px;
}

button.thf-chip {
    --thf-bg: #262626;
    --thf-fg: #fff;
    --thf-bg-h: #000;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 500;
}

.thf-group {
    margin: 0;
    padding: 5px 0 14px;
    border: 0;
    border-bottom: 1px solid #dfe3d6;
    min-width: 0;
}

.thf-group legend {
    padding: 15px 0 0;
    margin-bottom: 0;
    font-size: .95rem;
    font-weight: 600;
}

.thf-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: .85rem;
    cursor: pointer;
}

.thf-opt input {
    width: 18px;
    height: 18px;
    accent-color: #5b3f9e;
    flex: none;
}
.thf-opt small { opacity: .55; }
.thf-none {
    margin: 0;
    font-size: .85rem;
    opacity: .6;
}

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
    #hero .hero-wrap > .e-con-inner {
        max-width: 85%;
    }
    #the-crest .heading-wrap > .e-con-inner, #the-crest .crest-wrap > .e-con-inner, #the-crest .intro-wrap > .e-con-inner {
        max-width: 90%;
    }
    .thf-projects__title {
        font-size: 34px;
    }
    .crest__panel-title {
        font-size: 32px;
    }
    .thf-search-block p {
        font-size: 22px;
    }
    .thf-projects__sub, .thf-projects select, .thf-drawer select {
        font-size: 15px;
    }
    button.thf-btn {
        font-size: 14px;
    }
    #hero {
        min-height: 450px;
    }
    .thf-search {
        padding: 4px 8px 4px 18px;
    }
}

@media (max-width: 1180px) {
    .crest__panel {
        grid-template-columns: 1.1fr .9fr;
    }
}

@media (max-width: 1080px) {
    div[data-elementor-type="wp-page"] {
        padding-top: 50px !important;
    }
    #the-crest .crest-wrap > .e-con-inner {
        max-width: 95%;
    }
    #hero .hero-wrap > .e-con-inner {
        max-width: 90%;
    }
    .thf-projects__title {
        font-size: 32px;
    }
    .crest__panel-title {
        font-size: 28px;
    }
    .crest__panel-text p, .crest__stat-label {
        font-size: 14px;
    }
    #hero {
        min-height: 400px;
    }
    #the-crest {
        padding-bottom: 0;
    }
    .thf-pager {
        display: flex;
        flex-direction: column;
    }
    .thf-pager__per {
        width: fit-content;
        margin-left: auto;
    }
}

@media (max-width: 1024px) {
    .thf-card__title {
        font-size: 15px;
    }
    .crest__tab-desc, .thf-card__loc, .thf-card__leader {
        font-size: 13px;
    }
    .crest__tabs {
        margin: 0 0 30px;
    }
}

@media (max-width: 980px) {
    #hero {
        min-height: 365px;
    }
    .crest__panel {
        display: flex;
        flex-direction: column;
    }
    
}

@media (max-width: 900px) {
    #the-crest .heading-wrap > .e-con-inner, #the-crest .crest-wrap > .e-con-inner, #the-crest .intro-wrap > .e-con-inner {
        max-width: 85%;
    }
    .crest__tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    .crest__tab {
        max-width: calc(33.33% - 16px);
        width: calc(33.33% - 16px);
    }
    .crest__panel,
    .crest__panel:has(.crest__stats > :nth-child(2):last-child) {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .crest__stats:has(> :nth-child(2):last-child) {
        grid-template-columns: 1fr 1fr;
    }
    .crest__stats {
        min-height: 420px;
        width: 100%;
    }
    .thf-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
}

@media (max-width: 800px) {
    .thf-search-block p {
        font-size: 20px;
    }
    #the-crest .heading-wrap > .e-con-inner, #the-crest .crest-wrap > .e-con-inner, #the-crest .intro-wrap > .e-con-inner {
        max-width: 90%;
    }
    #hero {
        min-height: 350px;
    }
}

@media (max-width: 769px) {
    .crest__panel-title {
        font-size: 26px;
    }
    /*.crest__tabs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-left: 4px;
        padding-right: 4px;
    }
    .crest__tab {
        flex: 0 0 150px;
        width: 150px;
        max-width: none;
        scroll-snap-align: center;
    }*/
    .crest__stats {
        min-height: 380px;
    }
    .toolbar-col {
        flex: auto;
    }
    .thf-toolbar .toolbar-col:nth-child(1) {
        order: -1;
    }
    .thf-toolbar .toolbar-col:nth-child(3) {
        order: 0;
    }
    .thf-toolbar .toolbar-col:nth-child(2) {
        width: 100%;
        order: 1;
    }
}

@media (max-width: 680px) {
    .thf-projects__title {
        font-size: 30px;
    }
    .thf-search-block p {
        font-size: 18px;
    }
    .crest__tab-name {
        font-size: 15px;
    }
    .thf-projects__sub, .thf-projects select, .thf-drawer select {
        font-size: 14px;
    }
    .thf-count {
        font-size: 13px;
    }
}

@media (max-width: 580px) {
    .crest__panel-title {
        font-size: 24px;
    }
    .thf-card__title {
        font-size: 14px;
    }
    .crest__panel-text p, .crest__stat-label {
        font-size: 13px;
    }
    .crest__tab-desc, .thf-card__loc, .thf-card__leader {
        font-size: 12px;
    }
    .crest__tab-desc, .thf-card__loc, .thf-card__leader {
        font-size: 11px;
    }
    .crest__tab {
        max-width: calc(50% - 16px);
        width: calc(50% - 16px);
    }
    .crest__stats {
        min-height: 300px;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .thf-projects__title {
        font-size: 28px;
    }
    .crest__panel-title {
        font-size: 22px;
    }
    .thf-search-block p {
        font-size: 16px;
    }
    .crest__tab-name, .thf-sort {
        font-size: 14px;
    }
    .thf-pager__per, .thf-pager__page, .thf-pager input[type="number"] {
        font-size: 13px;
    }
    button.thf-btn, .thf-search input[type="search"] {
        font-size: 12px;
    }
    .crest__tab-desc {
        font-size: 10px;
    }
    #hero {
        min-height: 280px;
    }
    #hero .hero-wrap {
        padding-bottom: 65px;
    }
    /* CREST stat cards: one column on small phones */
    .crest__stats,
    .crest__stats:has(> :nth-child(2):last-child),
    .crest__stats:has(> :nth-child(3):last-child) {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        min-height: 0;
    }
    .crest__stats:has(> :nth-child(3):last-child) > :first-child {
        grid-row: auto;
    }
    .thf-count {
        margin-top: 1rem;
    }
    .thf-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .thf-card__media {
        aspect-ratio: 16 / 9;
    }
    .thf-pager__per {
        margin-right: auto;
    }
    .thf-pager .pagination {
        width: 100%;
        flex-wrap: wrap;
    }
    .thf-pager__page {
        margin: 0 1.5rem;
        width: 100%;
        justify-content: center;
        order: 99;
    }
    .thf-pager input[type="number"] {
        width: 55px;
        padding: 5px 8px;
    }
    .thf-search-block p {
        line-height: 1.25;
    }
    .thf-search {
        padding: 2px 8px 2px 18px;
        width: 85%;
    }
}/* End custom CSS */
/* Start Custom Fonts CSS */@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: normal;
	font-display: auto;
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.eot');
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.eot?#iefix') format('embedded-opentype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.woff2') format('woff2'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.woff') format('woff'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.ttf') format('truetype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Regular.svg#Montserrat') format('svg');
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 500;
	font-display: auto;
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.eot');
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.eot?#iefix') format('embedded-opentype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.woff2') format('woff2'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.woff') format('woff'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.ttf') format('truetype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Medium.svg#Montserrat') format('svg');
}
@font-face {
	font-family: 'Montserrat';
	font-style: normal;
	font-weight: 700;
	font-display: auto;
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.eot');
	src: url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.eot?#iefix') format('embedded-opentype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.woff2') format('woff2'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.woff') format('woff'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.ttf') format('truetype'),
		url('https://www.habitatfoundation.org.my/wp-content/uploads/2025/06/Montserrat-Bold.svg#Montserrat') format('svg');
}
/* End Custom Fonts CSS */