/* ProTech Team Slider - front-end styles. Author: ESCiT (https://escit.co.uk)
 *
 * Selectors are prefixed with .ptts so they beat typical theme rules such as
 * .entry-content h3 or .entry-content img. Card typography scales with the
 * card width (container query units) with viewport-based fallbacks.
 */

/* Bebas Neue (SIL Open Font License) bundled so the cards look the same on any theme. */
@font-face {
    font-family: "Bebas Neue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/bebas-neue-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Bebas Neue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/bebas-neue-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.ptts,
.ptts * { box-sizing: border-box; }

.ptts {
    --ptts-blue: #29BDEF;
    --ptts-dark: #1d1e24;
    --ptts-light: #eaf7fc;
    --ptts-split: 42%;
    --ptts-transition: 500ms;
    --ptts-gap: clamp(16px, 2vw, 36px);
    --ptts-desktop: 4;
    --ptts-tablet: 2;
    --ptts-mobile: 1;
    --ptts-visible: var(--ptts-desktop);
    --ptts-arrow: 76px;                                   /* arrow button size */
    --ptts-arrow-gap: 28px;                               /* space between the cards and each arrow */
    --ptts-arrow-space: calc(var(--ptts-arrow) + 2 * var(--ptts-arrow-gap)); /* reserved outside the cards per side */
    --ptts-max: 1680px;
    --ptts-heading-font: "Bebas Neue", "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    position: relative;
    width: 100%;
    color: #1d1e24;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.4;
}

/* Optional full width: break out of the page/theme container to the browser edges.
 * Off by default: the slider respects the row/column it is placed in and only the
 * arrows sit outside it. The script refines the width to exclude the scrollbar. */
.ptts.ptts-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.ptts-stage {
    position: relative;
    isolation: isolate;
    overflow: visible;               /* lets the arrows hang outside the row; the track clips itself */
    padding: clamp(30px, 4vw, 70px) 0 clamp(36px, 4vw, 64px);
}

.ptts-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(
        to bottom,
        #fff 0,
        #fff var(--ptts-split),
        var(--ptts-blue) var(--ptts-split),
        var(--ptts-blue) 100%
    );
}

/* The cards fill the row the shortcode sits in; arrows are positioned outside that width. */
.ptts-inner {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
/* In full-width mode there is no row to hang outside of, so reserve room for the arrows. */
.ptts.ptts-full .ptts-inner {
    width: min(var(--ptts-max), calc(100% - 2 * var(--ptts-arrow-space)));
}

/* The section heading keeps the theme's own h2 font/weight/case so it matches the rest of the site. */
.ptts .ptts-heading {
    margin: 0 0 clamp(28px, 3.5vw, 56px);
    padding: 0;
    font-size: clamp(40px, 4.6vw, 76px);
    line-height: .95;
    color: #292929;
}

.ptts-slider-row { position: relative; }

.ptts-viewport {
    overflow: hidden;
    min-width: 0;
    touch-action: pan-y;
}

.ptts-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ptts-track {
    display: flex;
    gap: var(--ptts-gap);
    margin: 0;
    padding: 0;
    transform: translate3d(0,0,0);
    transition: transform var(--ptts-transition) cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

/* ---- Cards ---- */

.ptts .ptts-card {
    /* Pre-JS fallback width; the script sets an exact pixel width once it runs. */
    flex: 0 0 calc((100% - (var(--ptts-visible) - 1) * var(--ptts-gap)) / var(--ptts-visible));
    container-type: inline-size;
    position: relative;
    margin: 0;
    width: auto;
    max-width: none;
    min-width: 0;
    float: none;
    aspect-ratio: 34 / 55;           /* card proportions from the ProTech design; grows if content needs more */
    max-height: 640px;
    border: 6px solid #fff;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(20px, 7%, 34px);
    overflow: hidden;
    user-select: none;
    -webkit-user-drag: none;
}
.ptts .ptts-card.is-dark { background: var(--ptts-dark); color: #fff; }
.ptts .ptts-card.is-blue { background: var(--ptts-blue); color: #151821; }

.ptts .ptts-card-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.ptts .ptts-card-name,
.ptts .ptts-card-title,
.ptts .ptts-profile-name,
.ptts .ptts-profile-title {
    font-family: var(--ptts-heading-font);
    font-weight: 400; /* Bebas Neue ships one weight; faux bold looks muddy */
    text-transform: uppercase;
    color: inherit;
    padding: 0;
}

.ptts .ptts-card-name {
    margin: 0;
    max-width: 100%;
    min-height: 1.9em;               /* two lines, keeps titles level for typical names */
    font-size: clamp(34px, 3.6vw, 66px);
    line-height: .95;
    letter-spacing: 0;
    overflow-wrap: break-word;       /* split a word only when it cannot fit on its own line */
    hyphens: auto;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.ptts .ptts-card-name.is-long {
    font-size: clamp(26px, 2.7vw, 50px);
    -webkit-line-clamp: 4;
}

.ptts .ptts-card-title {
    margin: .5em 0 0;
    min-height: 2em;
    font-size: clamp(18px, 2vw, 36px);
    line-height: 1;
    letter-spacing: 0;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

@supports (width: 1cqw) {
    .ptts .ptts-card-name { font-size: clamp(34px, 18cqw, 66px); }
    .ptts .ptts-card-name.is-long { font-size: clamp(26px, 13.5cqw, 50px); }
    .ptts .ptts-card-title { font-size: clamp(18px, 9.5cqw, 36px); }
}

.ptts .ptts-view-profile {
    appearance: none;
    -webkit-appearance: none;
    display: inline-block;
    width: auto;
    min-height: 0;
    margin: 20px 0 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    color: #202127;
    font: 400 14px/1.2 Arial, Helvetica, sans-serif;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    white-space: nowrap;
    padding: 9px 14px;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}
.ptts .ptts-view-profile:hover { background: #fff; color: #202127; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.ptts .ptts-view-profile:focus-visible,
.ptts .ptts-arrow:focus-visible,
.ptts .ptts-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ptts .ptts-card.is-blue .ptts-view-profile:focus-visible { outline-color: var(--ptts-dark); }

.ptts .ptts-card-photo-wrap {
    width: clamp(110px, 43%, 190px);
    aspect-ratio: 4 / 5;
    margin-top: 24px;
    overflow: hidden;
    align-self: flex-start;
    flex: 0 0 auto;
    background: rgba(255,255,255,.12);
}

.ptts .ptts-photo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    display: block;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    pointer-events: none;
}

.ptts .ptts-placeholder {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 28%, rgba(255,255,255,.24) 0 15%, transparent 15.5%),
        linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.2));
    border: 2px solid rgba(255,255,255,.28);
}
.ptts .ptts-placeholder span {
    display: grid;
    place-items: center;
    width: 40%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--ptts-dark);
    font-family: var(--ptts-heading-font);
    font-size: clamp(18px, 12cqw, 30px);
    font-weight: 700;
    letter-spacing: .03em;
}
.ptts .ptts-card.is-blue .ptts-placeholder { border-color: rgba(0,0,0,.12); background: linear-gradient(145deg, rgba(255,255,255,.35), rgba(255,255,255,.12)); }

/* ---- Arrows: absolutely positioned outside the card column ---- */

.ptts .ptts-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: var(--ptts-arrow);
    height: var(--ptts-arrow);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    color: var(--ptts-blue);
    display: grid;
    place-items: center;
    font-size: calc(var(--ptts-arrow) * .6);
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 160ms ease, opacity 200ms ease;
}
.ptts .ptts-arrow-prev { left: calc(-1 * (var(--ptts-arrow) + var(--ptts-arrow-gap))); }
.ptts .ptts-arrow-next { right: calc(-1 * (var(--ptts-arrow) + var(--ptts-arrow-gap))); }
.ptts .ptts-arrow:hover:not(:disabled) { background: #fff; color: var(--ptts-blue); transform: translateY(-50%) scale(1.06); }
.ptts .ptts-arrow:disabled { opacity: .35; cursor: default; }
.ptts .ptts-arrow[hidden] { display: none; }

/* Optional: arrows only while the pointer is over the slider (or it has keyboard focus). */
.ptts.ptts-arrows-hover .ptts-arrow { opacity: 0; }
.ptts.ptts-arrows-hover:hover .ptts-arrow,
.ptts.ptts-arrows-hover:focus-within .ptts-arrow { opacity: 1; }
.ptts.ptts-arrows-hover:hover .ptts-arrow:disabled,
.ptts.ptts-arrows-hover:focus-within .ptts-arrow:disabled { opacity: .35; }
@media (hover: none) {
    .ptts.ptts-arrows-hover .ptts-arrow { opacity: 1; }
    .ptts.ptts-arrows-hover .ptts-arrow:disabled { opacity: .35; }
}

/* ---- Expanded profile ---- */

/* Expanded profile sits inside the same row as the cards (full-width mode adds side padding). */
.ptts .ptts-detail {
    background: var(--ptts-blue);
    padding: 0 0 clamp(36px, 4vw, 64px);
}
.ptts.ptts-full .ptts-detail { padding-left: clamp(18px, 4vw, 52px); padding-right: clamp(18px, 4vw, 52px); }
.ptts .ptts-detail[hidden] { display: none; }

.ptts .ptts-profile-card {
    position: relative;
    width: min(1480px, 100%);
    margin: 0 auto;
    background: var(--ptts-light);
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 72px);
    padding: clamp(26px, 4vw, 56px);
    box-shadow: 0 20px 50px rgba(20, 30, 40, .12);
    border-top: 7px solid #fff;
    animation: pttsReveal 260ms ease both;
}

@keyframes pttsReveal {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ptts .ptts-profile-photo-wrap { width: 100%; align-self: start; }
.ptts .ptts-profile-photo-wrap .ptts-photo,
.ptts .ptts-profile-photo-wrap .ptts-placeholder { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; }
.ptts .ptts-profile-photo-wrap .ptts-placeholder span { width: 74px; font-size: 30px; }

.ptts .ptts-profile-main { min-width: 0; padding-right: 48px; }
.ptts .ptts-profile-name {
    margin: 0;
    font-size: clamp(40px, 4.6vw, 72px);
    line-height: .96;
    letter-spacing: 0;
    color: var(--ptts-dark);
    overflow-wrap: break-word;
}
.ptts .ptts-profile-title {
    margin: 10px 0 22px;
    font-size: clamp(24px, 2.2vw, 36px);
    line-height: 1.02;
    color: var(--ptts-dark);
}

/* Scan-to-add-contact block under the profile photo */
.ptts .ptts-vcard {
    margin: 18px 0 0;
    padding: 14px 12px 12px;
    background: #fff;
    text-align: center;
}
.ptts .ptts-vcard-label {
    margin: 0 0 10px;
    font-family: var(--ptts-heading-font);
    font-size: 22px;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ptts-dark);
}
.ptts .ptts-vcard svg {
    display: block;
    width: min(180px, 100%);
    height: auto;
    margin: 0 auto;
    background: #fff;
}
.ptts .ptts-vcard-download {
    display: inline-block;
    margin-top: 10px;
    font: 600 14px/1.3 Arial, Helvetica, sans-serif;
    color: var(--ptts-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ptts .ptts-vcard[hidden] { display: none; }
.ptts .ptts-contact { margin: 0 0 28px; font-size: clamp(17px, 1.5vw, 23px); }
.ptts .ptts-contact p { margin: 5px 0; overflow-wrap: anywhere; }
.ptts .ptts-contact a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ptts .ptts-tagline { margin: 0 0 26px; font-size: clamp(19px, 1.5vw, 25px); line-height: 1.38; font-weight: 700; max-width: 920px; }
.ptts .ptts-bio { font-size: clamp(17px, 1.3vw, 21px); line-height: 1.56; max-width: 980px; }
.ptts .ptts-bio > :first-child { margin-top: 0; }
.ptts .ptts-bio > :last-child { margin-bottom: 0; }

.ptts .ptts-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--ptts-dark);
    color: #fff;
    font-size: 31px;
    line-height: 1;
    cursor: pointer;
}

.ptts-empty { padding: 16px; background: #f4f4f4; }

/* ---- Responsive ----
 * Breakpoints in team-slider.js work on the slider's own width, so these only
 * provide sensible pre-JS defaults and the arrow placement.
 */

@media (max-width: 1180px) {
    /* Not enough room outside the column: arrows move below the cards, centred. */
    .ptts { --ptts-arrow: 56px; --ptts-arrow-space: 0px; }
    .ptts.ptts-full .ptts-inner { width: min(var(--ptts-max), calc(100% - 40px)); }
    .ptts-slider-row { padding-bottom: calc(var(--ptts-arrow) + 24px); }
    .ptts.ptts-no-slide .ptts-slider-row { padding-bottom: 0; }
    .ptts .ptts-arrow { top: auto; bottom: 0; transform: none; }
    .ptts .ptts-arrow-prev { left: calc(50% - var(--ptts-arrow) - 8px); }
    .ptts .ptts-arrow-next { right: calc(50% - var(--ptts-arrow) - 8px); }
    .ptts .ptts-arrow:hover:not(:disabled) { transform: scale(1.06); }
    .ptts.ptts-arrows-hover .ptts-arrow { opacity: 1; }
    .ptts.ptts-arrows-hover .ptts-arrow:disabled { opacity: .35; }
}

@media (max-width: 1050px) {
    .ptts { --ptts-visible: var(--ptts-tablet); }
}

@media (max-width: 680px) {
    .ptts { --ptts-visible: var(--ptts-mobile); }
    .ptts-stage { padding-top: 28px; }
    .ptts.ptts-full .ptts-inner { width: calc(100% - 32px); }
    .ptts .ptts-heading { margin-bottom: 24px; font-size: clamp(38px, 12vw, 58px); }
    .ptts .ptts-card { border-width: 4px; }
    .ptts.ptts-full .ptts-detail { padding-left: 12px; padding-right: 12px; }
    .ptts .ptts-profile-card { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
    .ptts .ptts-profile-photo-wrap { width: min(280px, 100%); }
    .ptts .ptts-profile-main { padding-right: 0; }
    .ptts .ptts-close { width: 42px; height: 42px; top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .ptts-track,
    .ptts .ptts-view-profile,
    .ptts .ptts-arrow,
    .ptts .ptts-profile-card { transition: none !important; animation: none !important; }
}
