/* =====================================================================
   PROJECTS PAGE  (projects.php)
   1. Section + tabs   2. Project card   3. Project popup + gallery
   4. Breakpoints (mobile -> 8K)
   Fonts and colours come from style.css: --theme (orange),
   --font_poppins. No clamp() - sizes are set per breakpoint.
   ===================================================================== */

:root {
    --prj-orange: var(--theme, #FE0100);
    --prj-orange-dark: #E00000;
    --prj-ink: #101D63;
    --prj-text: #626578;
    --prj-line: #ECEEF1;
    --prj-dark: #0E1955;
    --prj-radius: 12px;
}


/* ---------------------------------------------------------------------
   1. SECTION + TABS
--------------------------------------------------------------------- */

.prj-area {
    padding: 100px 0 30px;
    background: #fff;
    font-family: var(--font_poppins, "Poppins", sans-serif);
}

.prj-container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.prj-head {
    max-width: 820px;
    margin: 0 auto 46px;
    text-align: center;
}

.prj-head .section-subtitle {
    justify-content: center;
}

.prj-head .title-wrapper {
    margin-top: 18px;
}

.prj-intro {
    margin: 18px auto 0;
    max-width: 720px;
    font-size: 16px;
    line-height: 1.75;
    color: var(--prj-text);
}

.prj-tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 0 0 44px;
    border-bottom: 1px solid var(--prj-line);
}

.prj-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px 16px;
    font-family: var(--font_poppins, "Poppins", sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6B6E80;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .25s ease;
}

.prj-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--prj-orange);
    transform: scaleX(0);
    transition: transform .3s ease;
}

.prj-tab:hover,
.prj-tab:focus-visible {
    color: var(--prj-ink);
}

.prj-tab.active {
    color: var(--prj-ink);
}

.prj-tab.active::after {
    transform: scaleX(1);
}

.prj-tab:focus-visible {
    outline: 2px solid var(--prj-orange);
    outline-offset: 4px;
    border-radius: 4px;
}

.prj-tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    color: #6B6E80;
    background: #F2F3F5;
    border-radius: 12px;
    transition: background-color .25s ease, color .25s ease;
}

.prj-tab.active .prj-tab-count {
    color: #fff;
    background: var(--prj-orange);
}

.prj-area .tab-pane.fade {
    transition: opacity .35s ease;
}


/* cards sit in Bootstrap columns (set in projects.php, e.g.
   col-12 col-md-6 col-xl-6). The gap is the Bootstrap gutter. */

.prj-row {
    --bs-gutter-x: 28px;
    --bs-gutter-y: 28px;
}

.prj-col {
    display: flex;
    flex-direction: column;
}

.prj-col>.prj-card {
    flex: 1 0 auto;
}

.prj-empty {
    padding: 40px 0;
    text-align: center;
    color: var(--prj-text);
}


/* ---------------------------------------------------------------------
   2. PROJECT CARD  (reference image 1)
--------------------------------------------------------------------- */

.prj-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    aspect-ratio: 19 / 10;
    /* grows taller if the text needs more room */
    color: #fff;
    background: var(--prj-dark);
    border-radius: var(--prj-radius);
    box-shadow: 0 10px 28px rgba(14, 25, 85, .14);
    cursor: pointer;
    transition: transform .35s ease, box-shadow .35s ease;
}

.prj-card-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    border-radius: inherit;
}

.prj-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s cubic-bezier(.2, .7, .2, 1);
}


/* dark overlay: strongest on the left and at the bottom (as in the reference) */

.prj-card-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(13, 23, 80, .9) 0%, rgba(13, 23, 80, .66) 40%, rgba(13, 23, 80, .22) 75%, rgba(13, 23, 80, .12) 100%), linear-gradient(0deg, rgba(13, 23, 80, .82) 0%, rgba(13, 23, 80, 0) 48%);
}

.prj-card-shade::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(13, 23, 80, .18);
    opacity: 0;
    transition: opacity .35s ease;
}

.prj-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px 24px 20px;
}

.prj-card-cat {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--prj-orange);
}

.prj-card-details {
    display: none;
}

.prj-card-title {
    max-width: 80%;
    margin: 0;
    font-family: var(--font_poppins, "Poppins", sans-serif);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.32;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prj-card-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
}

.prj-card-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.prj-card-meta li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .86);
}

.prj-card-meta i {
    flex: 0 0 auto;
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
}

.prj-card-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.prj-card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    color: var(--prj-orange);
    background: none;
    border: 0;
    cursor: pointer;
}

.prj-card-more i {
    font-size: 14px;
    transition: transform .3s ease;
}

.prj-card-arrow {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 16px;
    color: #fff;
    background: var(--prj-orange);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(254, 1, 0, .35);
    cursor: pointer;
    transition: transform .3s ease, background-color .3s ease;
}


/* hover: subtle zoom, slightly stronger overlay, small lift */

.prj-card:hover,
.prj-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(14, 25, 85, .22);
}

.prj-card:hover .prj-card-media img,
.prj-card:focus-within .prj-card-media img {
    transform: scale(1.06);
}

.prj-card:hover .prj-card-shade::after,
.prj-card:focus-within .prj-card-shade::after {
    opacity: 1;
}

.prj-card:hover .prj-card-more i {
    transform: translateX(4px);
}

.prj-card:hover .prj-card-arrow {
    transform: translateX(2px);
    background: var(--prj-orange-dark);
}

.prj-card-more:focus-visible {
    outline: 2px solid var(--prj-orange);
    outline-offset: 4px;
    border-radius: 4px;
}


/* ---------------------------------------------------------------------
   3. PROJECT POPUP  (reference image 2)
--------------------------------------------------------------------- */

html.prj-locked,
html.prj-locked body {
    overflow: hidden !important;
}

.prj-modal {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    font-family: var(--font_poppins, "Poppins", sans-serif);
}

.prj-modal[hidden] {
    display: none;
}

.prj-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 22, 75, .8);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .3s ease;
}

.prj-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    overflow: hidden;
    background: var(--prj-dark);
    border-radius: 14px;
    box-shadow: 0 40px 90px rgba(11, 19, 66, .45);
    opacity: 0;
    transform: translateY(18px) scale(.985);
    transition: opacity .3s ease, transform .3s ease;
}

.prj-modal.is-open .prj-modal-backdrop {
    opacity: 1;
}

.prj-modal.is-open .prj-modal-dialog {
    opacity: 1;
    transform: none;
}


/* the two columns: gallery (left) + details (right) */

.prj-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 14px;
    max-height: calc(100vh - 60px);
    padding: 14px;
}


/* close button (top right, dark icon on the white panel) */

.prj-close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 5;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 22px;
    color: var(--prj-ink);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.prj-close:hover,
.prj-close:focus-visible {
    color: var(--prj-orange);
    background: #F4F5F7;
}

.prj-close:focus-visible {
    outline: 2px solid var(--prj-orange);
    outline-offset: 2px;
}


/* gallery (left) */

.prj-gallery {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    min-height: 0;
}

.prj-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 320px;
    overflow: hidden;
    background: #101D63;
    border-radius: 9px;
}

.prj-stage-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s ease;
}

.prj-stage-img.is-changing {
    opacity: 0;
}

.prj-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 15px;
    color: #fff;
    background: rgba(14, 25, 85, .55);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.prj-nav--prev {
    left: 14px;
}

.prj-nav--next {
    right: 14px;
}

.prj-nav:hover,
.prj-nav:focus-visible {
    background: var(--prj-orange);
    border-color: var(--prj-orange);
}


/* only one photo: no arrows, no thumbnails */

.prj-single .prj-nav,
.prj-single .prj-thumbs {
    display: none;
}

.prj-counter {
    position: absolute;
    left: 0;
    bottom: 0;
    z-index: 2;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 18px 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .8);
    background: rgba(14, 25, 85, .78);
    border-top-right-radius: 9px;
}

.prj-counter b {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.prj-counter em {
    font-style: normal;
    color: var(--prj-orange);
}

.prj-thumbs {
    flex: 0 0 auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 40px) / 5);
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.prj-thumbs::-webkit-scrollbar {
    display: none;
}

.prj-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    padding: 0;
    overflow: hidden;
    background: #101D63;
    border: 2px solid transparent;
    border-radius: 6px;
    opacity: .62;
    cursor: pointer;
    scroll-snap-align: start;
    transition: opacity .2s ease, border-color .2s ease;
}

.prj-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prj-thumb:hover,
.prj-thumb:focus-visible {
    opacity: 1;
}

.prj-thumb.is-active {
    opacity: 1;
    border-color: var(--prj-orange);
}

.prj-thumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}


/* details (right, white panel) */

.prj-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    max-height: calc(100vh - 88px);
    padding: 34px 34px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-radius: 9px;
}

.prj-info-cat {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding-right: 48px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--prj-orange);
}

.prj-info-cat::after {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--prj-orange);
}

.prj-info-title {
    margin: 12px 0 12px;
    padding-right: 30px;
    font-family: var(--font_poppins, "Poppins", sans-serif);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--prj-ink);
    overflow-wrap: anywhere;
}

.prj-info-content p {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--prj-text);
}

.prj-info-content ul {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.prj-info-content li {
    display: grid;
    grid-template-columns: 22px 104px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    font-size: 13.5px;
    line-height: 1.45;
    border-bottom: 1px solid var(--prj-line);
}

.prj-info-content li:first-child {
    border-top: 1px solid var(--prj-line);
}

.prj-info-content li>i {
    font-size: 15px;
    color: #4B4F63;
    text-align: center;
}

.prj-info-content li>span {
    color: #7B7E90;
}

.prj-info-content li>b {
    font-weight: 600;
    color: var(--prj-ink);
    overflow-wrap: anywhere;
}

.prj-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.prj-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1F9D55;
}

.prj-status--ongoing::before {
    background: var(--prj-orange);
}

.prj-info-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    background: var(--prj-orange);
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(254, 1, 0, .28);
    transition: background-color .25s ease;
}

.prj-info-cta i {
    transition: transform .25s ease;
}

.prj-info-cta:hover,
.prj-info-cta:focus-visible {
    color: #fff;
    background: var(--prj-orange-dark);
}

.prj-info-cta:hover i {
    transform: translateX(4px);
}


/* ---------------------------------------------------------------------
   4. BREAKPOINTS
--------------------------------------------------------------------- */


/* MOBILE (0 - 550) */

@media (min-width: 0px) and (max-width: 550px) {
    .prj-area {
        padding: 60px 0 20px;
    }
    .prj-head {
        margin-bottom: 30px;
    }
    .prj-intro {
        font-size: 15px;
    }
    .prj-tabs {
        gap: 18px;
        margin-bottom: 28px;
    }
    .prj-tab {
        gap: 8px;
        padding-bottom: 13px;
        font-size: 12.5px;
        letter-spacing: .03em;
    }
    .prj-tab-count {
        min-width: 22px;
        height: 22px;
        font-size: 11px;
    }
    .prj-row {
        --bs-gutter-x: 18px;
        --bs-gutter-y: 18px;
    }
    .prj-card-body {
        padding: 22px 18px 16px;
    }
    .prj-card-title {
        max-width: 92%;
        font-size: 18px;
    }
    .prj-card-foot {
        gap: 10px;
        padding-top: 14px;
    }
    .prj-card-meta {
        gap: 4px 16px;
    }
    .prj-card-meta li {
        font-size: 12.5px;
    }
    .prj-card-actions {
        gap: 10px;
    }
    .prj-card-arrow {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
        font-size: 15px;
    }
}


/* phones: short tab labels ("Completed" / "Ongoing"), full text kept for screen readers */

@media (max-width: 480px) {
    .prj-tab-extra {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
    .prj-tab {
        font-size: 13px;
        letter-spacing: .05em;
    }
}


/* very small phones: metadata on its own row, actions below on the right */

@media (max-width: 420px) {
    .prj-card {
        aspect-ratio: 16 / 10;
    }
    .prj-card-foot {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    .prj-card-meta {
        flex: 1 1 100%;
    }
    .prj-card-actions {
        margin-left: auto;
    }
}


/* LARGE MOBILE / SMALL TABLET (551 - 767) */

@media (min-width: 551px) and (max-width: 767px) {
    .prj-area {
        padding: 70px 0 90px;
    }
    .prj-tabs {
        gap: 30px;
        margin-bottom: 32px;
    }
    .prj-tab {
        font-size: 14px;
    }
    .prj-row {
        --bs-gutter-x: 22px;
        --bs-gutter-y: 22px;
    }
    .prj-card-title {
        font-size: 22px;
        max-width: 75%;
    }
}


/* TABLET (768 - 991) */

@media (min-width: 768px) and (max-width: 991px) {
    .prj-area {
        padding: 80px 0 100px;
    }
    .prj-row {
        --bs-gutter-x: 22px;
        --bs-gutter-y: 22px;
    }
    .prj-card-body {
        padding: 22px 20px 18px;
    }
    .prj-card-title {
        font-size: 18px;
        max-width: 92%;
    }
    .prj-card-meta {
        gap: 4px 16px;
    }
    .prj-card-meta li {
        font-size: 12.5px;
    }
    .prj-card-actions {
        gap: 10px;
    }
    .prj-card-arrow {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
}


/* SMALL DESKTOP (992 - 1199) */

@media (min-width: 992px) and (max-width: 1199px) {
    .prj-container {
        max-width: 960px;
    }
    .prj-row {
        --bs-gutter-x: 26px;
        --bs-gutter-y: 26px;
    }
    .prj-card-title {
        font-size: 22px;
    }
}


/* DESKTOP (1200 - 1366) */

@media (min-width: 1200px) and (max-width: 1366px) {
    .prj-container {
        max-width: 1200px;
    }
    .prj-card-body {
        padding: 24px 20px 18px;
    }
    .prj-card-title {
        font-size: 19px;
        max-width: 90%;
    }
    .prj-card-meta {
        gap: 4px 16px;
    }
    .prj-card-meta li {
        font-size: 12.5px;
    }
    .prj-card-actions {
        gap: 10px;
    }
    .prj-card-arrow {
        flex-basis: 42px;
        width: 42px;
        height: 42px;
    }
}


/* LARGE DESKTOP (1367 - 1920) */

@media (min-width: 1367px) and (max-width: 1920px) {
    .prj-container {
        max-width: 1350px;
    }
    .prj-row {
        --bs-gutter-x: 30px;
        --bs-gutter-y: 30px;
    }
    .prj-card-title {
        font-size: 22px;
    }
    .prj-modal-dialog {
        max-width: 1180px;
    }
}

@media (min-width: 1600px) and (max-width: 1920px) {
    .prj-container {
        max-width: 1520px;
    }
}


/* 2K (1921 - 2560) */

@media (min-width: 1921px) and (max-width: 2560px) {
    .prj-area {
        padding: 130px 0 150px;
    }
    .prj-container {
        max-width: 2200px;
    }
    .prj-head {
        max-width: 1000px;
        margin-bottom: 60px;
    }
    .prj-intro {
        max-width: 880px;
        font-size: 18px;
    }
    .prj-tabs {
        gap: 56px;
        margin-bottom: 56px;
    }
    .prj-tab {
        font-size: 17px;
        padding-bottom: 20px;
    }
    .prj-tab-count {
        min-width: 28px;
        height: 28px;
        font-size: 13px;
        border-radius: 14px;
    }
    .prj-row {
        --bs-gutter-x: 34px;
        --bs-gutter-y: 34px;
    }
    .prj-card {
        border-radius: 14px;
    }
    .prj-card-body {
        padding: 32px 28px 24px;
    }
    .prj-card-cat {
        font-size: 12px;
    }
    .prj-card-title {
        font-size: 24px;
    }
    .prj-card-meta li {
        font-size: 14px;
    }
    .prj-card-more {
        font-size: 14px;
    }
    .prj-card-arrow {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 18px;
    }
    .prj-modal-dialog {
        max-width: 1480px;
        border-radius: 18px;
    }
    .prj-modal-body {
        padding: 18px;
        gap: 18px;
    }
    .prj-info {
        max-height: calc(100vh - 96px);
    }
    .prj-stage {
        min-height: 420px;
        border-radius: 12px;
    }
    .prj-info {
        padding: 44px 44px 40px;
        border-radius: 12px;
    }
    .prj-close {
        top: 30px;
        right: 30px;
        width: 48px;
        height: 48px;
        font-size: 26px;
    }
    .prj-info-cat {
        font-size: 13px;
    }
    .prj-info-title {
        font-size: 32px;
    }
    .prj-info-content p {
        font-size: 16px;
    }
    .prj-info-content li {
        grid-template-columns: 26px 130px minmax(0, 1fr);
        padding: 14px 0;
        font-size: 15px;
    }
    .prj-info-content li>i {
        font-size: 17px;
    }
    .prj-info-cta {
        padding: 17px 34px;
        font-size: 16px;
    }
    .prj-nav {
        width: 50px;
        height: 50px;
        font-size: 17px;
    }
    .prj-counter {
        font-size: 16px;
        padding: 12px 22px 12px 18px;
    }
    .prj-counter b {
        font-size: 24px;
    }
}


/* 4K / LARGE SCREENS (2561+) */

@media (min-width: 2561px) {
    .prj-area {
        padding: 170px 0 200px;
    }
    .prj-container {
        max-width: 3200px;
        padding: 0 30px;
    }
    .prj-head {
        max-width: 1300px;
        margin-bottom: 80px;
    }
    .prj-intro {
        max-width: 1150px;
        font-size: 24px;
    }
    .prj-tabs {
        gap: 72px;
        margin-bottom: 72px;
        border-bottom-width: 2px;
    }
    .prj-tab {
        font-size: 22px;
        padding-bottom: 26px;
        gap: 14px;
    }
    .prj-tab::after {
        height: 3px;
        bottom: -2px;
    }
    .prj-tab-count {
        min-width: 36px;
        height: 36px;
        font-size: 17px;
        border-radius: 18px;
    }
    .prj-row {
        --bs-gutter-x: 46px;
        --bs-gutter-y: 46px;
    }
    .prj-card {
        border-radius: 18px;
    }
    .prj-card-body {
        padding: 44px 38px 32px;
    }
    .prj-card-cat {
        font-size: 16px;
        margin-bottom: 14px;
    }
    .prj-card-title {
        font-size: 32px;
    }
    .prj-card-foot {
        padding-top: 24px;
        gap: 20px;
    }
    .prj-card-meta {
        gap: 8px 30px;
    }
    .prj-card-meta li {
        font-size: 18px;
        gap: 10px;
    }
    .prj-card-meta i {
        font-size: 19px;
    }
    .prj-card-actions {
        gap: 20px;
    }
    .prj-card-more {
        font-size: 18px;
        gap: 10px;
    }
    .prj-card-more i {
        font-size: 19px;
    }
    .prj-card-arrow {
        flex-basis: 66px;
        width: 66px;
        height: 66px;
        font-size: 22px;
    }
    .prj-modal {
        padding: 60px;
    }
    .prj-modal-dialog {
        max-width: 2100px;
        border-radius: 24px;
    }
    .prj-modal-body {
        max-height: calc(100vh - 120px);
        padding: 24px;
        gap: 24px;
    }
    .prj-info {
        max-height: calc(100vh - 168px);
    }
    .prj-stage {
        min-height: 620px;
        border-radius: 16px;
    }
    .prj-thumbs {
        gap: 16px;
        grid-auto-columns: calc((100% - 64px) / 5);
    }
    .prj-thumb {
        border-width: 3px;
        border-radius: 10px;
    }
    .prj-info {
        padding: 64px 60px 56px;
        border-radius: 16px;
    }
    .prj-close {
        top: 44px;
        right: 44px;
        width: 64px;
        height: 64px;
        font-size: 34px;
    }
    .prj-info-cat {
        font-size: 17px;
    }
    .prj-info-cat::after {
        width: 48px;
        height: 2px;
    }
    .prj-info-title {
        font-size: 44px;
        margin: 18px 0;
    }
    .prj-info-content p {
        font-size: 21px;
        margin-bottom: 28px;
    }
    .prj-info-content ul {
        margin-bottom: 36px;
    }
    .prj-info-content li {
        grid-template-columns: 34px 180px minmax(0, 1fr);
        padding: 18px 0;
        font-size: 20px;
        gap: 14px;
    }
    .prj-info-content li>i {
        font-size: 22px;
    }
    .prj-info-cta {
        padding: 22px 44px;
        font-size: 21px;
        border-radius: 10px;
        gap: 16px;
    }
    .prj-nav {
        width: 68px;
        height: 68px;
        font-size: 22px;
    }
    .prj-nav--prev {
        left: 22px;
    }
    .prj-nav--next {
        right: 22px;
    }
    .prj-counter {
        font-size: 21px;
        padding: 16px 28px 16px 24px;
    }
    .prj-counter b {
        font-size: 32px;
    }
}


/* 8K and ultra-wide (3841+) */

@media (min-width: 3841px) {
    .prj-container {
        max-width: 4600px;
    }
    .prj-row {
        --bs-gutter-x: 60px;
        --bs-gutter-y: 60px;
    }
    .prj-card-title {
        font-size: 38px;
    }
    .prj-modal-dialog {
        max-width: 2800px;
    }
    .prj-stage {
        min-height: 840px;
    }
}


/* ---------- popup: tablet + mobile layout (stacked, scrolls inside) ---------- */

@media (max-width: 991px) {
    .prj-modal {
        padding: 20px;
    }
    .prj-modal-dialog {
        max-width: 720px;
    }
    .prj-modal-body {
        grid-template-columns: minmax(0, 1fr);
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .prj-stage {
        flex: 0 0 auto;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
    .prj-info {
        max-height: none;
        overflow: visible;
        padding: 30px 28px 28px;
    }
    /* close button sits over the image and stays put while the popup scrolls */
    .prj-close {
        top: 24px;
        right: 24px;
        width: 42px;
        height: 42px;
        font-size: 20px;
        color: #fff;
        background: var(--prj-dark);
        box-shadow: 0 6px 16px rgba(11, 19, 66, .35);
    }
    .prj-close:hover,
    .prj-close:focus-visible {
        color: #fff;
        background: var(--prj-orange);
    }
    .prj-info-cat {
        padding-right: 0;
    }
}

@media (max-width: 550px) {
    .prj-modal {
        padding: 10px;
    }
    .prj-modal-dialog {
        border-radius: 12px;
    }
    .prj-modal-body {
        max-height: calc(100vh - 20px);
        padding: 8px;
        gap: 8px;
    }
    .prj-stage {
        border-radius: 8px;
    }
    .prj-thumbs {
        gap: 8px;
        grid-auto-columns: calc((100% - 24px) / 4);
    }
    .prj-thumb {
        border-radius: 5px;
    }
    .prj-nav {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .prj-nav--prev {
        left: 8px;
    }
    .prj-nav--next {
        right: 8px;
    }
    .prj-counter {
        padding: 7px 12px;
        font-size: 12px;
    }
    .prj-counter b {
        font-size: 16px;
    }
    .prj-info {
        padding: 24px 18px 20px;
        border-radius: 8px;
    }
    .prj-info-title {
        font-size: 21px;
        padding-right: 0;
    }
    .prj-info-content p {
        font-size: 14px;
    }
    .prj-info-content li {
        grid-template-columns: 20px 86px minmax(0, 1fr);
        gap: 8px;
        font-size: 13px;
    }
    .prj-info-cta {
        align-self: stretch;
        justify-content: center;
        margin-top: 4px;
    }
    .prj-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}


/* dynamic viewport height (mobile browser bars) */

@supports (height: 100dvh) {
    .prj-modal-body {
        max-height: calc(100dvh - 60px);
    }
    .prj-info {
        max-height: calc(100dvh - 88px);
    }
    @media (min-width: 1921px) and (max-width: 2560px) {
        .prj-info {
            max-height: calc(100dvh - 96px);
        }
    }
    @media (min-width: 2561px) {
        .prj-modal-body {
            max-height: calc(100dvh - 120px);
        }
        .prj-info {
            max-height: calc(100dvh - 168px);
        }
    }
    @media (max-width: 991px) {
        .prj-modal-body {
            max-height: calc(100dvh - 40px);
        }
        .prj-info {
            max-height: none;
        }
    }
    @media (max-width: 550px) {
        .prj-modal-body {
            max-height: calc(100dvh - 20px);
        }
    }
}


/* short desktop windows: let the details panel scroll, keep image visible */

@media (min-width: 992px) and (max-height: 640px) {
    .prj-stage {
        min-height: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prj-card,
    .prj-card-media img,
    .prj-card-more i,
    .prj-card-arrow,
    .prj-modal-dialog,
    .prj-modal-backdrop,
    .prj-stage-img {
        transition: none;
    }
    .prj-card:hover,
    .prj-card:focus-within {
        transform: none;
    }
    .prj-card:hover .prj-card-media img {
        transform: none;
    }
}
/* Red text on navy cards: lighter red for readability */
.prj-card .prj-card-cat,
.prj-card .prj-card-more,
.prj-counter em {
    color: #FF5A5A;
}
