/* =========================================================
   BuildMarket — Full Stylesheet (FINAL)
   Category tabs: every tab is exactly 130px tall.
   ========================================================= */

:root {
    --ink: #111815;
    --forest: #174c3b;
    --mint: #eaf4ef;
    --gold: #c9974d;
    --sand: #f4f0e8;
    --line: #dfe7e2;
    --muted: #6d7873;
}

body {
    font-family: Manrope, sans-serif;
    color: var(--ink);
    background: #fff;
}

.header-main {
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--forest);
    color: #fff;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: -.4px;
}

.nav-link {
    font-weight: 650;
}

.btn-forest {
    background: var(--forest);
    border-color: var(--forest);
    color: white;
}

.btn-forest:hover {
    background: #0f382b;
    border-color: #0f382b;
    color: #fff;
}

.shopbar {
    background: #111815;
    color: #fff;
    padding: 3px 0;
}

.shopbar a {
    color: #fff;
    text-decoration: none;
    padding: 6px 0;
}

.hero3 {
    min-height: 400px;
    padding: 56px 0;
    background: linear-gradient(90deg, rgba(11, 19, 16, .82), rgba(11, 19, 16, .25)),
        url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1800&q=85') center/cover;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero3 h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.3rem, 4.4vw, 4rem);
    line-height: .96;
}

.section-pad {
    padding: 15px 0;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 800;
    font-size: .74rem;
    color: var(--gold);
}

.cat-tile {
    position: relative;
    border: 0;
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 1.25;
    background: #ddd;
    transition: .25s;
    width: 100%;
}

.cat-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .3s;
}

.cat-tile .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .05));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: white;
}

.cat-tile.dim img {
    filter: grayscale(1);
    opacity: .45;
}

.cat-tile.active {
    outline: 4px solid var(--gold);
    outline-offset: 3px;
}

.group-panel {
    background: var(--mint);
    border-radius: 24px;
    padding: 25px;
}

.group-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    height: 100%;
}

.group-card a {
    color: var(--ink);
    text-decoration: none;
}

.service-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    height: 100%;
    transition: .2s;
    background: white;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 34px rgba(23, 76, 59, .1);
}

.service-card img {
    height: 210px;
    width: 100%;
    object-fit: cover;
}

.provider-card {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    background: white;
}

.provider-score {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--forest);
    font-weight: 800;
}

.soft {
    background: var(--sand);
}

.page-head {
    padding: 60px 0;
    background: linear-gradient(120deg, #111815, #174c3b);
    color: white;
}

.footer {
    background: #0e1512;
    color: #bdc9c2;
}

.footer a {
    color: #bdc9c2;
    text-decoration: none;
}

.rfq-box {
    position: sticky;
    top: 110px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--sand);
}

.dashboard-shell {
    background: #f3f6f4;
    min-height: 100vh;
}

.side3 {
    background: #101915;
    color: #c7d2cc;
    min-height: 100vh;
}

.side3 a {
    color: #c7d2cc;
    text-decoration: none;
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
}

.side3 a.active,
.side3 a:hover {
    background: #1c3e31;
    color: #fff;
}

.metric {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.status-new {
    background: #e8efff;
    color: #365fa8;
}

.status-contacted {
    background: #fff1cf;
    color: #8a6417;
}

.status-won {
    background: #e3f6e8;
    color: #26723d;
}

.status-closed {
    background: #eee;
    color: #555;
}

.toast-demo {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
}

/* ===== Sub-tiles ===== */
.sub-tile {
    display: block;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    height: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    transition: transform .35s cubic-bezier(.34, 1.4, .64, 1), box-shadow .35s, border-color .35s;
}

.sub-tile:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 38px rgba(23, 76, 59, .2);
    border-color: var(--gold);
    color: var(--ink);
}

.sub-tile .n {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--forest);
}

.stat-box {
    border-radius: 20px;
    background: #fff;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
    height: 100%;
}

.stat-box .num {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--forest);
    line-height: 1;
}

.cta-band {
    background: linear-gradient(120deg, #111815, #174c3b);
    color: #fff;
    padding: 70px 0;
}

.cta-band.cta-gold {
    background: var(--gold);
    color: #111;
    padding: 56px 0;
}

.prog {
    height: 10px;
    border-radius: 10px;
    background: var(--mint);
    overflow: hidden;
}

.prog > span {
    display: block;
    height: 100%;
    background: var(--forest);
    border-radius: 10px;
}

.chip {
    border: 1px solid var(--forest);
    color: var(--forest);
    background: #fff;
    border-radius: 30px;
    padding: 10px 22px;
    font-weight: 700;
    text-decoration: none;
    transition: .2s;
}

.chip:hover {
    background: var(--forest);
    color: #fff;
}

.help-box {
    border: 2px dashed var(--forest);
    border-radius: 24px;
    padding: 40px;
    background: var(--mint);
}

.icon-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    height: 100%;
    text-align: center;
}

.icon-card i {
    font-size: 2rem;
    color: var(--gold);
}

.avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--forest);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.6rem;
    margin: 0 auto 14px;
}

.step-no {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--forest);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.journey-step {
    position: relative;
    text-align: center;
}

.journey-step .step-no {
    margin: 0 auto 12px;
}

.partner-box {
    background: #fff;
    border-radius: 28px;
    padding: 60px 24px;
    border: 1px solid var(--line);
}

/* ===== Home visual upgrades ===== */
.bg-img {
    background: linear-gradient(rgba(8, 18, 13, .78), rgba(8, 18, 13, .78)), var(--bg) center/cover no-repeat;
    color: #fff;
}

.photo-frame {
    min-height: 380px;
    border-radius: 28px;
    box-shadow: 0 24px 50px rgba(23, 76, 59, .25);
    background: var(--bg) center/cover no-repeat;
}

.partner-box.bg-img {
    border: 0;
    padding: 80px 24px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .2);
}

.cta-band.bg-img {
    padding: 90px 0;
}

.sub-tile img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: .4s;
}

.sub-tile:hover img {
    transform: scale(1.08);
}

.thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.face {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--forest);
}

.avatar-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--mint);
    margin-bottom: 14px;
    background: var(--forest);
}

.icon-card,
.provider-card,
.stat-box {
    transition: .25s;
}

.icon-card:hover,
.provider-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(23, 76, 59, .12);
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

#home-stats .stat-box {
    border-top: 5px solid var(--gold);
    padding: 38px 24px;
}

#home-stats .stat-box .num {
    font-size: 3.2rem;
}

.cta-band.cta-solid {
    background: linear-gradient(120deg, #e0aa5e, #c9974d 55%, #b8843a);
    color: #111815;
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

.cta-band.cta-solid::before,
.cta-band.cta-solid::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
}

.cta-band.cta-solid::before {
    width: 320px;
    height: 320px;
    left: -80px;
    top: -140px;
}

.cta-band.cta-solid::after {
    width: 240px;
    height: 240px;
    right: -60px;
    bottom: -110px;
}

.cta-band.cta-solid .container {
    position: relative;
    z-index: 1;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: block;
}

.brand-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

/* ===== Project journey timeline ===== */
.jr,
.jr *,
.tm,
.tm * {
    box-sizing: border-box;
}

.jr {
    --p: 0;
    --n: 5;
    max-width: 1100px;
    margin: 0 auto;
}

.jr-view {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 0 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jr-view::-webkit-scrollbar {
    display: none;
}

.jr-rail {
    position: relative;
    display: flex;
    width: 100%;
}

.jr-scroll .jr-rail {
    width: calc(var(--n) * 20%);
}

.jr-scroll .jr-step {
    flex: 0 0 calc(100% / var(--n));
}

.jr-scroll .jr-view {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.jr-track {
    position: absolute;
    top: 38px;
    left: calc(50% / var(--n));
    right: calc(50% / var(--n));
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
}

.jr-fill {
    display: block;
    height: 100%;
    width: 100%;
    border-radius: 4px;
    transform-origin: left;
    transform: scaleX(var(--p));
    transition: transform 1.1s cubic-bezier(.65, 0, .35, 1);
    background: linear-gradient(90deg, var(--forest), #2c7a5f 60%, var(--gold));
}

.jr-step {
    position: relative;
    z-index: 1;
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 0 10px;
    outline: 0;
    cursor: default;
    display: flex;
    flex-direction: column;
}

.jr-node {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.65rem;
    background: #fff;
    color: var(--forest);
    border: 3px solid var(--line);
    box-shadow: 0 6px 16px rgba(23, 76, 59, .08);
    transition: background .45s, color .45s, border-color .45s, transform .45s cubic-bezier(.34, 1.56, .64, 1), box-shadow .45s;
}

.jr-node::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    opacity: 0;
    pointer-events: none;
}

.jr-num {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
}

.jr-card {
    margin: 22px auto 0;
    width: 100%;
    max-width: 210px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 14px 18px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .04);
    transition: transform .4s, box-shadow .4s, border-color .4s;
}

.jr-t {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.jr-d {
    font-size: .9rem;
    color: var(--muted);
    margin: 0;
    text-wrap: balance;
}

.jr-step.done .jr-node {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
}

.jr-step.active .jr-node {
    background: linear-gradient(135deg, var(--forest), #2c7a5f);
    border-color: #fff;
    color: #fff;
    transform: scale(1.14);
    box-shadow: 0 0 0 4px rgba(201, 151, 77, .35), 0 14px 28px rgba(23, 76, 59, .35);
}

.jr-step.active .jr-node::after {
    animation: jrRing 1.4s ease-out infinite;
}

.jr-step.active .jr-node i {
    animation: jrIcon 1.4s ease-in-out infinite;
}

.jr-step.active .jr-card {
    transform: translateY(-6px);
    border-color: var(--gold);
    box-shadow: 0 16px 32px rgba(23, 76, 59, .14);
}

.jr-step:hover .jr-card {
    transform: translateY(-6px);
}

.jr .jr-node,
.jr .jr-card {
    opacity: 0;
}

.jr.go .jr-node {
    animation: jrPop .6s cubic-bezier(.34, 1.56, .64, 1) both;
    animation-delay: calc(var(--i) * .14s);
}

.jr.go .jr-card {
    animation: jrUp .7s ease both;
    animation-delay: calc(var(--i) * .14s + .2s);
}

.jr.go .jr-node,
.jr.go .jr-card {
    opacity: 1;
}

@keyframes jrPop {
    from { opacity: 0; transform: scale(.3); }
    to { opacity: 1; }
}

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

@keyframes jrRing {
    0% { transform: scale(1); opacity: .9; }
    100% { transform: scale(1.55); opacity: 0; }
}

@keyframes jrIcon {
    0%, 100% { transform: translateY(0) rotate(0); }
    30% { transform: translateY(-3px) rotate(-8deg); }
    60% { transform: translateY(0) rotate(8deg); }
}

@media (max-width: 767px) {
    .jr-view {
        overflow: visible;
        -webkit-mask-image: none !important;
        mask-image: none !important;
    }
    .jr-rail,
    .jr-scroll .jr-rail {
        flex-direction: column;
        width: 100%;
        gap: 6px;
        padding-left: 2px;
    }
    .jr-scroll .jr-step {
        flex: 1 1 auto;
    }
    .jr-track {
        top: 32px;
        bottom: 50px;
        left: 34px;
        right: auto;
        width: 4px;
        height: auto;
    }
    .jr-fill {
        transform-origin: top;
        transform: scaleY(var(--p));
    }
    .jr-step {
        flex-direction: row;
        align-items: center;
        gap: 18px;
        text-align: left;
        padding: 0 0 18px;
    }
    .jr-node {
        margin: 0;
        flex-shrink: 0;
        width: 68px;
        height: 68px;
        font-size: 1.45rem;
    }
    .jr-card {
        margin: 0;
        max-width: none;
        flex: 1;
        justify-content: flex-start;
    }
    .jr-step.active .jr-card,
    .jr-step:hover .jr-card {
        transform: translateX(6px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jr *,
    .jr *::after {
        animation: none !important;
        transition: none !important;
    }
    .jr .jr-node,
    .jr .jr-card {
        opacity: 1;
    }
}

/* ===== Testimonials Model 1 (cards) ===== */
.tm-section {
    position: relative;
    padding: 50px 0;
    background: linear-gradient(180deg, #fff 0, var(--sand) 100%);
    overflow: hidden;
}

.tm-section::before,
.tm-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.tm-section::before {
    width: 380px;
    height: 380px;
    right: -120px;
    top: -140px;
    background: radial-gradient(circle, rgba(201, 151, 77, .22), transparent 70%);
}

.tm-section::after {
    width: 340px;
    height: 340px;
    left: -120px;
    bottom: -140px;
    background: radial-gradient(circle, rgba(23, 76, 59, .14), transparent 70%);
}

.tm-section .container {
    position: relative;
    z-index: 1;
}

.tm-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 46px;
}

.tm-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 40px;
    padding: 8px 18px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--muted);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
}

.tm-stars {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: .85rem;
}

.tm {
    --cols: 3;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 26px;
    align-items: stretch;
}

.tm > .tm-card {
    flex: 0 0 calc((100% - (var(--cols) - 1) * 26px) / var(--cols));
}

.tm-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 34px 28px 26px;
    outline: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .05);
    transition: transform .45s cubic-bezier(.34, 1.3, .64, 1), background .45s, color .45s, box-shadow .45s, border-color .45s;
}

.tm-stagger > .tm-card:nth-child(2) {
    margin-top: -18px;
    margin-bottom: 18px;
}

.tm-q {
    position: absolute;
    top: 14px;
    right: 22px;
    font-size: 4.6rem;
    line-height: 1;
    color: var(--gold);
    opacity: .28;
    transition: .45s;
}

.tm-rate {
    color: var(--gold);
    font-size: .9rem;
    letter-spacing: 3px;
    margin-bottom: 14px;
}

.tm-text {
    font-size: 1.08rem;
    line-height: 1.65;
    font-weight: 600;
    margin: 0 0 20px;
    flex: 1;
}

.tm-chip {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--mint);
    color: var(--forest);
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    transition: .45s;
}

.tm-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px dashed var(--line);
    transition: .45s;
}

.tm-face {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--gold);
    background: var(--forest);
}

.tm-loc {
    font-size: .82rem;
    color: var(--muted);
    transition: .45s;
}

.tm-loc i {
    color: var(--gold);
}

.tm-card:hover {
    transform: translateY(-8px);
}

.tm-card.on {
    background: linear-gradient(145deg, var(--forest), #0f382b);
    color: #fff;
    border-color: var(--forest);
    transform: translateY(-10px);
    box-shadow: 0 26px 50px rgba(23, 76, 59, .35);
}

.tm-card.on .tm-q { opacity: .5; }
.tm-card.on .tm-chip { background: rgba(255, 255, 255, .14); color: #fff; }
.tm-card.on .tm-user { border-top-color: rgba(255, 255, 255, .25); }
.tm-card.on .tm-loc { color: rgba(255, 255, 255, .75); }

.tm-card.on .tm-rate i {
    animation: tmStar .6s ease backwards;
}

.tm-card.on .tm-rate i:nth-child(2) { animation-delay: .08s; }
.tm-card.on .tm-rate i:nth-child(3) { animation-delay: .16s; }
.tm-card.on .tm-rate i:nth-child(4) { animation-delay: .24s; }
.tm-card.on .tm-rate i:nth-child(5) { animation-delay: .32s; }

@keyframes tmStar {
    from { opacity: 0; transform: scale(.3) rotate(-40deg); }
}

.reveal.in .tm-card {
    animation: tmUp .8s ease backwards;
    animation-delay: calc(var(--i) * .15s);
}

@keyframes tmUp {
    from { opacity: 0; translate: 0 40px; }
}

@media (max-width: 991px) {
    .tm { gap: 18px; }
    .tm > .tm-card { flex-basis: 100%; }
    .tm-stagger > .tm-card:nth-child(2) { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-card,
    .tm-card * { animation: none !important; }
}

/* ===== Testimonials Model 2 (thumbnails) ===== */
.tm2 {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 26px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, .06);
}

.tm2-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 14px;
    align-content: start;
    max-height: 430px;
    overflow-y: auto;
    padding: 6px 8px 8px 4px;
    scrollbar-width: thin;
}

.tm2-thumb {
    position: relative;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--forest), #2c7a5f);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .08);
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s;
}

.reveal.in .tm2-thumb {
    animation: tmUp .6s ease backwards;
    animation-delay: calc(var(--i) * .06s);
}

.tm2-thumb img,
.tm2-ini {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tm2-ini {
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.8rem;
}

.tm2-thumb em {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 4px 6px;
    font-style: normal;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
    opacity: 0;
    transform: translateY(6px);
    transition: .3s;
}

.tm2-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 0 var(--gold);
    transition: box-shadow .3s;
    pointer-events: none;
}

.tm2-thumb:hover {
    transform: translateY(-4px) scale(1.04);
}

.tm2-thumb:hover em,
.tm2-thumb.on em {
    opacity: 1;
    transform: none;
}

.tm2-thumb.on {
    transform: scale(1.07);
    box-shadow: 0 14px 26px rgba(23, 76, 59, .32);
}

.tm2-thumb.on::after {
    box-shadow: inset 0 0 0 4px var(--gold);
}

.tm2-thumb:not(.on) {
    filter: saturate(.75);
}

.tm2-thumb:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

.tm2-view {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 36px 34px 30px;
    color: #fff;
    background: linear-gradient(145deg, var(--forest), #0f382b);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 360px;
}

.tm2-view::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    top: -90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 151, 77, .4), transparent 70%);
}

.tm2-q {
    position: absolute;
    top: 10px;
    right: 22px;
    font-size: 5.5rem;
    line-height: 1;
    color: var(--gold);
    opacity: .4;
}

.tm2-body { position: relative; }

.tm2-body.swap {
    animation: tm2In .55s cubic-bezier(.2, .8, .2, 1);
}

@keyframes tm2In {
    from { opacity: 0; transform: translateX(26px); }
}

.tm2-text {
    font-size: 1.28rem;
    line-height: 1.65;
    font-weight: 600;
    margin: 0 0 22px;
}

.tm2 .tm-chip {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.tm2-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, .28);
}

.tm2-user .tm-loc { color: rgba(255, 255, 255, .75); }
.tm2-user .tm-face { width: 60px; height: 60px; }

.tm2-count {
    margin-left: auto;
    font-size: .85rem;
    opacity: .7;
}

.tm2-count b {
    font-size: 1.3rem;
    color: var(--gold);
}

.tm2-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, .12);
}

.tm2-bar span {
    display: block;
    height: 100%;
    background: var(--gold);
    transform-origin: left;
    animation: tm2Bar 6s linear forwards;
}

.tm2.paused .tm2-bar span {
    animation-play-state: paused;
}

@keyframes tm2Bar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (max-width: 991px) {
    .tm2 { grid-template-columns: 1fr; padding: 16px; }
    .tm2-list { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); max-height: 230px; }
    .tm2-view { min-height: 0; padding: 30px 22px 26px; }
    .tm2-text { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    .tm2 * { animation: none !important; }
}

/* ===== Sub-tiles carousel ===== */
.sub-carousel-wrap {
    position: relative;
    padding: 0;
    margin-top: 6px;
}

.sub-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    margin: 0 -14px;
    padding: 14px 14px 22px;
    scroll-padding-inline: 14px;
    scrollbar-width: none;
}

.sub-carousel::-webkit-scrollbar { display: none; }

.sub-carousel .sub-tile-item {
    flex: 0 0 calc((100% - 48px) / 4);
    scroll-snap-align: start;
    min-width: 0;
}

@media (max-width: 991px) {
    .sub-carousel .sub-tile-item {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

.sub-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--forest);
    display: none;
    place-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(23, 76, 59, .25);
    transition: .2s;
}

.sub-nav:hover {
    background: var(--forest);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.sub-nav:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.sub-nav:disabled:hover {
    background: #fff;
    color: var(--forest);
    transform: translateY(-50%) scale(1);
}

.sub-nav-prev { left: -16px; }
.sub-nav-next { right: -16px; }

.sub-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
    padding: 0 2px;
}

.sub-head[hidden] { display: none; }

.sub-head.swap {
    animation: subHeadIn .45s ease backwards;
}

@keyframes subHeadIn {
    from { opacity: 0; transform: translateY(-8px); }
}

.sub-head strong { font-size: 1.15rem; }

.sub-head-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    margin-right: 10px;
    box-shadow: 0 0 0 4px rgba(201, 151, 77, .25);
}

.sub-head-meta {
    margin-left: 10px;
    font-size: .88rem;
    color: var(--muted);
}

.sub-head a {
    font-weight: 700;
    font-size: .92rem;
    color: var(--forest);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sub-head a i { transition: transform .25s; }
.sub-head a:hover i { transform: translateX(5px); }

.sub-carousel .sub-tile-item {
    animation: subTileIn .55s cubic-bezier(.2, .8, .2, 1) backwards;
    animation-delay: calc(var(--i) * .09s);
}

@keyframes subTileIn {
    from { opacity: 0; transform: translateY(28px) scale(.96); }
}

.sub-img {
    position: relative;
    height: 150px;
    overflow: hidden;
}

.sub-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, .45), transparent 55%);
}

.sub-tile .sub-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s;
}

.sub-tile:hover .sub-img img {
    transform: scale(1.1);
}

.sub-count {
    position: absolute;
    left: 12px;
    bottom: 10px;
    z-index: 1;
    background: rgba(255, 255, 255, .95);
    color: var(--forest);
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.sub-count b { color: #1c8a5f; }

.sub-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 16px 18px 18px;
}

.sub-name {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
}

.sub-go {
    flex: 0 0 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--mint);
    color: var(--forest);
    transition: .3s;
}

.sub-tile:hover .sub-go {
    background: var(--forest);
    color: #fff;
    transform: rotate(-45deg);
}

@media (prefers-reduced-motion: reduce) {
    .sub-carousel .sub-tile-item,
    .sub-head.swap,
    .tab-cat.active::after {
        animation: none;
    }
}

/* =========================================================
   ✅ Category tabs — 50px height (pill style, all tabs)
   ========================================================= */

#homeCatTabs .tab-cat {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 50px !important;
    min-height: 80px !important;
    max-height: 50px !important;
    box-sizing: border-box;
    padding: 0 16px;
    border: 0;
    border-radius: 25px;
    overflow: hidden;
    font-weight: 700;
    font-size: 1rem;
    text-align: left;
    color: #fff;
    cursor: pointer;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .55) 100%),
        var(--img) center / cover no-repeat;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .15);
    transition: transform .25s, box-shadow .25s;
}

#homeCatTabs .tab-cat .count {
    background: rgba(255, 255, 255, .95);
    color: var(--forest);
    border-radius: 20px;
    padding: 2px 12px;
    font-size: .8rem;
    font-weight: 700;
    margin-left: 10px;
}

#homeCatTabs .tab-cat:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
}

#homeCatTabs .tab-cat.active {
    background:
        linear-gradient(90deg, rgba(23, 76, 59, .9) 0%, rgba(23, 76, 59, .75) 100%),
        var(--img) center / cover no-repeat;
    box-shadow:
        0 0 0 3px var(--gold),
        0 10px 22px rgba(23, 76, 59, .35);
}

#homeCatTabs .tab-cat.active .count {
    background: var(--gold);
    color: #111;
}

@media (max-width: 575px) {
    #homeCatTabs .tab-cat {
        height: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
        font-size: .92rem;
    }
}

/* ===== Active Projects table ===== */
.projects-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--forest) #f4f0e8;
}

.projects-scroll thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    box-shadow: inset 0 -2px 0 var(--line);
    border-bottom: 0;
}

.projects-scroll::-webkit-scrollbar { width: 8px; }
.projects-scroll::-webkit-scrollbar-track { background: #f4f0e8; border-radius: 10px; }
.projects-scroll::-webkit-scrollbar-thumb { background: var(--forest); border-radius: 10px; }
.projects-scroll::-webkit-scrollbar-thumb:hover { background: #0f382b; }