/* =========================================================================
   INDUSTRY PORTFOLIO PAGE (portfolio-healthcare.php, …)
   Loaded after portfolio-page.css, which gives the shared pieces:
   colours, .pf-head, .pf-numbers, .pf-chip, .pf-indc, .pf-mid, .pf-about,
   .pf-contact and the glass form.

   1. Banner (text left, photo right)
   2. Projects (cards from portfolio-page.css; this adds the empty message)
   3. Other industries
   4. About the industry
   5. Services
   6. Why choose us
   7. Tablets and phones
   8. Less motion
   ========================================================================= */

/* ---------- 1. Banner ---------- */
.pi-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(480px, 62vh, 580px);
    padding: clamp(48px, 6vw, 80px) 0;
    overflow: hidden;
    background:
        radial-gradient(ellipse 50% 70% at 0% 0%, rgba(21, 157, 211, 0.1), transparent 70%),
        linear-gradient(110deg, #f4f9fd 0%, #eef6fb 50%, #ffffff 100%);
}

/* the photo fills the right half and fades into the background */
.pi-hero__media {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    bottom: 0;
    width: 54%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 18%, #000 38%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.6) 18%, #000 38%);
}

.pi-hero__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 30%;
}

.pi-hero__content {
    max-width: 560px;
}

.pi-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--pf-text);
    font-size: 13px;
}

.pi-crumbs a {
    color: var(--pf-text);
    text-decoration: none;
}

.pi-crumbs a:hover {
    color: var(--pf-blue);
}

.pi-crumbs i {
    font-size: 9px;
    opacity: 0.6;
}

.pi-crumbs span {
    color: var(--pf-title);
    font-weight: 600;
}

.pi-hero__title {
    margin: 0;
    font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-align: left;
}

.pi-hero__title .cs-accent {
    display: block;
}

.pi-hero__text {
    margin: 16px 0 0;
    color: #4f5f6b;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.06rem);
    line-height: 1.75;
}

.pi-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 14px;
    margin-top: 28px;
}

/* ---------- 2. Projects ---------- */
.pi-work {
    background: #ffffff;
}

/* services without projects yet: quieter, still clickable (they offer samples) */
.pi-work .pf-chip.is-empty:not(.is-active) {
    color: #7a8a96;
    background: #f8fbfd;
    border-style: dashed;
}

.pi-work .pf-chip.is-empty:not(.is-active) small {
    color: #8b9aa5;
    background: #eef3f6;
}

.pi-work .pf-filters {
    margin-top: 0;
}

.pi-empty {
    max-width: 640px;
    margin: 0 auto;
    padding: 30px 24px;
    text-align: center;
    background: #f6fafc;
    border: 1px dashed #cfe2ee;
    border-radius: 22px;
}

.pi-empty[hidden] {
    display: none;
}

.pi-empty__icon {
    display: inline-grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--pf-blue);
    font-size: 22px;
    background: var(--pf-ice);
    border-radius: 16px;
}

.pi-empty p {
    margin: 14px 0 0;
    color: var(--pf-text);
    line-height: 1.6;
}

.pi-empty strong {
    display: block;
    color: var(--pf-title);
}

.pi-empty__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 18px;
    margin-top: 18px;
}

.pi-empty__reset {
    padding: 0;
    color: var(--pf-blue);
    font-weight: 700;
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- 3. Other industries ---------- */
.pi-related {
    background:
        radial-gradient(ellipse 50% 60% at 100% 0%, rgba(21, 157, 211, 0.07), transparent 70%),
        #f5fafd;
}

/* the "All Industries" card */
.pi-indc-all {
    color: #ffffff;
    background: var(--pf-grad);
    border-color: transparent;
}

.pi-indc-all .pf-indc__icon {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
}

.pi-indc-all .pf-indc__count {
    color: rgba(255, 255, 255, 0.8);
}

.pi-indc-all .pf-indc__more {
    color: #ffffff;
}

.pi-indc-all:hover .pf-indc__more,
.pi-indc-all:focus-visible .pf-indc__more {
    color: var(--pf-blue);
}

.pi-mid {
    padding-top: clamp(48px, 6vw, 72px);
}

/* ---------- 4. About the industry ---------- */
.pi-checks {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.pi-checks li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--pf-title);
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.5;
}

.pi-checks i {
    margin-top: 3px;
    color: #1aa260;
}

/* ---------- 5. Services ---------- */
.pi-services {
    background: #ffffff;
}

.pi-svcs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pi-svcc {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px 26px 24px;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--pf-line);
    border-radius: 22px;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

/* a coloured line along the top, shown on hover */
.pi-svcc::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--tone);
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 0.4s ease;
    content: "";
}

.pi-svcc:hover {
    border-color: var(--tone-line);
    box-shadow: 0 22px 44px rgba(8, 72, 112, 0.12);
    transform: translateY(-5px);
}

.pi-svcc:hover::before {
    transform: scaleX(1);
}

.pi-svcc:focus-visible {
    outline: 3px solid var(--pf-cyan);
    outline-offset: 3px;
}

.pi-svcc__icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: var(--tone);
    font-size: 23px;
    background: var(--tone-bg);
    border: 1px solid var(--tone-line);
    border-radius: 18px;
    transition: transform 0.35s ease;
}

.pi-svcc:hover .pi-svcc__icon {
    transform: rotate(-6deg) scale(1.05);
}

.pi-svcc__title {
    margin: 20px 0 8px;
    color: var(--pf-title);
    font-size: 1.12rem;
    font-weight: 700;
}

.pi-svcc__text {
    margin: 0 0 18px;
    color: var(--pf-text);
    font-size: 0.93rem;
    line-height: 1.65;
}

.pi-svcc__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--tone);
    font-size: 0.9rem;
    font-weight: 700;
}

.pi-svcc__more i {
    transition: transform 0.25s ease;
}

.pi-svcc:hover .pi-svcc__more i {
    transform: translateX(4px);
}

/* ---------- 6. Why choose us ---------- */
.pi-why {
    position: relative;
    color: #ffffff;
    background:
        radial-gradient(ellipse 50% 60% at 0% 0%, rgba(21, 157, 211, 0.28), transparent 70%),
        radial-gradient(ellipse 40% 50% at 100% 100%, rgba(8, 112, 175, 0.3), transparent 70%),
        var(--pf-navy);
}

.pi-why__title {
    margin: 0;
    font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.35rem);
    text-align: left;
}

.pi-why__text {
    margin: 16px 0 0;
    color: #c4d4de;
    font-size: 1rem;
    line-height: 1.7;
}

.pi-why__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 22px;
    padding: 14px 16px;
    color: #d5e2ea;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.pi-why__rating strong {
    color: #ffffff;
}

.pi-why__stars {
    color: #fbbc04;
    letter-spacing: 2px;
}

.pi-why__btn {
    margin-top: 24px;
}

.pi-reasons {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pi-reason {
    padding: 24px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition:
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.pi-reason:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.pi-reason__icon {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    color: var(--tone);
    font-size: 19px;
    background: var(--tone-bg);
    border-radius: 15px;
}

.pi-reason__title {
    margin: 18px 0 8px;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.35;
}

.pi-reason__text {
    margin: 0;
    color: #b8c9d4;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ---------- 7. Tablets and phones ---------- */
@media (max-width: 1199.98px) {
    .pi-reasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    /* banner: text first, then the photo */
    .pi-hero {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding-bottom: 0;
    }

    .pi-hero__media {
        position: relative;
        z-index: 0;
        order: 2;
        width: 100%;
        height: clamp(260px, 50vw, 380px);
        margin-top: 32px;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    }

    .pi-hero__content {
        max-width: 680px;
    }

    .pi-svcs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pi-reasons {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .pi-reasons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .pi-hero__actions .cs-btn {
        justify-content: center;
        width: 100%;
    }

    /* service buttons: one row that scrolls sideways */
    .pi-work .pf-filters__chips {
        flex-wrap: nowrap;
        margin: 0 -12px;
        padding: 2px 12px 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .pi-work .pf-chip {
        flex: 0 0 auto;
    }

    .pi-work .pf-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pi-svcs,
    .pi-reasons {
        grid-template-columns: minmax(0, 1fr);
    }

    /* services and reasons: icon on the left to keep the list short */
    .pi-svcc,
    .pi-reason {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
        padding: 20px 18px;
    }

    .pi-svcc__icon,
    .pi-reason__icon {
        grid-row: span 3;
        width: 48px;
        height: 48px;
        font-size: 19px;
        border-radius: 15px;
    }

    .pi-svcc__title,
    .pi-reason__title {
        margin: 2px 0 6px;
    }

    .pi-svcc__text {
        margin-bottom: 10px;
    }
}

/* ---------- 8. Less motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .pi-svcc,
    .pi-svcc::before,
    .pi-svcc__icon,
    .pi-svcc__more i,
    .pi-reason {
        transition: none;
    }
}
