.projects-showcase {
    padding: 58px 0 18px;
    overflow: hidden;
    background: #fff;
}

.showcase-anchor {
    position: absolute;
}

.showcase-heading {
    max-width: 900px;
    margin: 0 auto 24px;
    text-align: center;
}

.showcase-heading .kicker {
    margin-bottom: 5px;
    color: var(--red);
    font-size: 16px;
    font-weight: 900;
}

.showcase-heading h2 {
    margin: 0;
    color: var(--navy-deep);
    font-size: clamp(30px, 3vw, 43px);
    line-height: 1.25;
}

.showcase-heading p {
    max-width: 760px;
    margin: 7px auto 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.showcase-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 940px;
    margin: 0 auto 25px;
}

.showcase-metric {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 5px 22px;
}

.showcase-metric + .showcase-metric {
    border-inline-start: 2px solid rgba(206, 18, 45, .42);
}

.showcase-metric-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    color: var(--navy-deep);
}

.showcase-metric-icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.showcase-metric strong,
.showcase-metric span {
    display: block;
}

.showcase-metric strong {
    color: var(--navy-deep);
    font-size: 18px;
    line-height: 1.15;
    white-space: nowrap;
}

.showcase-metric span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}

.showcase-rail-shell {
    position: relative;
}

.showcase-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 6);
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 2px 1px 12px;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
}

.showcase-rail::-webkit-scrollbar {
    display: none;
}

.showcase-project-card {
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid #dce3eb;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(10, 31, 62, .07);
    transition: transform .18s ease, box-shadow .18s ease;
}

.showcase-project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(10, 31, 62, .12);
}

.showcase-project-media {
    position: relative;
    height: 137px;
    overflow: hidden;
    background: #e8edf2;
}

.showcase-project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showcase-project-year {
    position: absolute;
    inset-inline-start: 9px;
    bottom: 0;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    background: var(--red);
    color: #fff;
    font-family: Inter, Arial, sans-serif;
    font-size: 10px;
    font-weight: 900;
}

.showcase-project-body {
    padding: 11px 12px 12px;
    text-align: start;
}

.showcase-project-body h3 {
    min-height: 35px;
    margin: 0;
    color: var(--navy-deep);
    font-size: 10.5px;
    line-height: 1.65;
}

.showcase-project-owner,
.showcase-project-location {
    display: block;
    color: #5f6e82;
    font-size: 9px;
    line-height: 1.55;
}

.showcase-project-owner {
    min-height: 28px;
    margin-top: 3px;
}

.showcase-project-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #173d73;
}

.showcase-project-location svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.showcase-project-tag {
    display: inline-flex;
    max-width: 100%;
    margin-top: 8px;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 5px;
    background: #eef2fb;
    color: #173d73;
    font-size: 8px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.showcase-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    border: 1px solid #dce3eb;
    border-radius: 50%;
    background: #fff;
    color: var(--navy-deep);
    box-shadow: 0 4px 14px rgba(10, 31, 62, .1);
    cursor: pointer;
}

.showcase-arrow:hover {
    border-color: var(--red);
    color: var(--red);
}

.showcase-arrow:disabled {
    opacity: .38;
    cursor: default;
}

.showcase-arrow svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

html[dir="rtl"] .showcase-arrow svg {
    transform: scaleX(-1);
}

.showcase-arrow.prev {
    inset-inline-start: -48px;
}

.showcase-arrow.next {
    inset-inline-end: -48px;
}

.showcase-action {
    margin-top: 2px;
    text-align: center;
}

.showcase-action .btn {
    min-width: 200px;
    border-color: rgba(206, 18, 45, .7);
    background: #fff;
    color: var(--navy-deep);
}

.showcase-clients {
    padding: 10px 0 28px;
    background: linear-gradient(180deg, #f6f8fb 0%, #fff 100%);
}

.showcase-clients .showcase-heading {
    margin-bottom: 15px;
}

.showcase-clients .showcase-heading h2 {
    font-size: clamp(27px, 2.7vw, 38px);
}

.client-rail {
    grid-auto-columns: calc((100% - 70px) / 8);
    gap: 10px;
    padding-block: 3px 10px;
}

.client-card {
    display: grid;
    min-height: 72px;
    place-items: center;
    padding: 10px 12px;
    scroll-snap-align: start;
    border: 1px solid #dfe5ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 13px rgba(10, 31, 62, .055);
}

.client-card img {
    width: 100%;
    height: 48px;
    object-fit: contain;
}

.client-card.more {
    align-content: center;
    gap: 2px;
    color: var(--navy-deep);
    font-size: 9px;
    font-weight: 900;
}

.client-card.more strong {
    color: var(--red);
    font-size: 22px;
    line-height: 1;
}

.showcase-clients .showcase-action {
    margin: 0 0 17px;
}

.emergency-banner {
    display: grid;
    grid-template-columns: 265px minmax(260px, 1.3fr) repeat(3, minmax(112px, .48fr)) 180px;
    min-height: 98px;
    overflow: hidden;
    align-items: stretch;
    border: 1px solid rgba(206, 18, 45, .78);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(10, 31, 62, .06);
    direction: ltr;
}

.emergency-visual {
    display: grid;
    grid-template-columns: 1fr 74px;
    min-width: 0;
}

.emergency-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 43%;
}

.emergency-siren {
    display: grid;
    place-items: center;
    background: var(--red);
    color: #fff;
}

.emergency-siren svg {
    width: 39px;
    height: 39px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.emergency-copy,
.emergency-detail,
.emergency-cta {
    direction: var(--showcase-dir, rtl);
}

.emergency-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px;
    text-align: start;
}

.emergency-copy h2 {
    margin: 0;
    color: var(--red);
    font-size: 22px;
    line-height: 1.35;
}

.emergency-copy p {
    margin: 4px 0 0;
    color: #58677b;
    font-size: 9.5px;
    line-height: 1.7;
}

.emergency-detail {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-inline-start: 1px solid #d9dee6;
    text-align: center;
}

.emergency-detail svg {
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    fill: none;
    stroke: var(--navy-deep);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.emergency-detail small,
.emergency-detail strong {
    display: block;
}

.emergency-detail small {
    color: #526175;
    font-size: 8px;
}

.emergency-detail strong {
    margin-top: 2px;
    color: var(--red);
    font-family: Inter, Arial, sans-serif;
    font-size: 10.5px;
    white-space: nowrap;
}

.emergency-cta {
    display: grid;
    align-items: center;
    padding: 13px 16px;
}

.emergency-cta .btn {
    min-width: 0;
    min-height: 48px;
    font-size: 10px;
}

@media (max-width: 1380px) {
    .showcase-arrow.prev { inset-inline-start: 7px; }
    .showcase-arrow.next { inset-inline-end: 7px; }
    .emergency-banner { grid-template-columns: 220px minmax(240px, 1.1fr) repeat(2, minmax(112px, .48fr)) 165px; }
    .emergency-detail.email { display: none; }
}

@media (max-width: 1080px) {
    .showcase-rail { grid-auto-columns: calc((100% - 24px) / 3); }
    .client-rail { grid-auto-columns: calc((100% - 30px) / 4); }
    .emergency-banner { grid-template-columns: 190px minmax(230px, 1fr) repeat(2, minmax(105px, .45fr)) 150px; }
    .emergency-copy { padding-inline: 16px; }
    .emergency-copy h2 { font-size: 19px; }
}

@media (max-width: 760px) {
    .projects-showcase { padding-top: 44px; }
    .showcase-heading { margin-bottom: 20px; }
    .showcase-heading .kicker { font-size: 15px; }
    .showcase-heading h2 { font-size: 29px; }
    .showcase-heading p { font-size: 10.5px; }
    .showcase-metrics { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
    .showcase-metric { justify-content: flex-start; padding: 10px 12px; border: 1px solid #e0e6ee !important; border-radius: 8px; }
    .showcase-metric-icon { width: 35px; height: 35px; flex-basis: 35px; }
    .showcase-metric-icon svg { width: 25px; height: 25px; }
    .showcase-metric strong { font-size: 15px; }
    .showcase-metric span { font-size: 8.5px; }
    .showcase-rail { grid-auto-columns: minmax(230px, 82%); }
    .client-rail { grid-auto-columns: minmax(145px, 46%); }
    .showcase-project-media { height: 150px; }
    .showcase-arrow { width: 34px; height: 34px; }
    .showcase-arrow.prev { inset-inline-start: 5px; }
    .showcase-arrow.next { inset-inline-end: 5px; }
    .emergency-banner { grid-template-columns: 1fr; }
    .emergency-visual { min-height: 170px; }
    .emergency-copy { padding: 20px; text-align: center; }
    .emergency-detail { min-height: 68px; border-inline-start: 0; border-top: 1px solid #e2e6ec; }
    .emergency-detail.email { display: flex; }
    .emergency-cta { padding: 14px; border-top: 1px solid #e2e6ec; }
}

@media (max-width: 440px) {
    .showcase-metrics { grid-template-columns: 1fr; }
    .showcase-rail { grid-auto-columns: 88%; }
    .client-rail { grid-auto-columns: 72%; }
}

/* Deliver the approved homepage technician artwork even when the application server's local asset path is stale. */
#about .about-media {
    background-image: url('https://raw.githubusercontent.com/MohamedAdel90/unifco_platform/main/public/images/home/about-technician-v14.webp');
    background-size: cover;
    background-position: center 34%;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

#about .about-media > img {
    visibility: hidden;
}
