/* =========================================================
   Partners in Success — logo panel below the Activities slider

   One white panel floating on the same background the Activities
   section uses, so the two read as a continuous block rather than yet
   another row of cards. Individual cards were rejected: by this point
   the page has already shown 17 service cards and a large activity
   card, and a fourth set of tiles turns into visual noise.

   Logo walls live or die on optical consistency — every brand mark
   arrives at a different size, ratio and weight — so each logo gets an
   identical 248x128 stage and is fitted into a 224x98 safe area. A wide
   wordmark and a square badge then read at the same visual size.

   The panel is width:fit-content on purpose: with only two partners it
   shrinks to hug them instead of stranding them in a wide empty box.

   No hairline dividers between logos — they break as soon as the logos
   wrap, leaving the first item of the second row with a stray rule on
   its left.
   ========================================================= */

.partners-section {
    position: relative;
    /* Activities above already ends with 6rem of padding, so this needs
       breathing room rather than a full section gap. */
    padding: 2rem 0 7rem;
    background: var(--bg-color);
    width: 100%;
}

.partners-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ---------- Header ---------- */

.partners-header {
    text-align: center;
    margin-bottom: 44px;
}

.partners-eyebrow {
    display: block;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 12px;
}

.partners-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--btn-color);
    background: linear-gradient(135deg, var(--btn-color) 0%, #e5920d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.partners-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: #64748b;
    max-width: 620px;
    margin: 16px auto 0;
}

/* ---------- The panel ---------- */

.partners-panel {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px 40px;
    padding: 26px 32px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 30px;
    box-shadow: 0 10px 44px rgba(15, 23, 42, 0.06);
}

.partner-item {
    flex: 0 0 auto;
    width: 248px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
}

/* Full colour, full opacity — a partner logo is a credential, so it
   should be legible at a glance rather than greyed out until hover. */
.partner-item img {
    max-width: 224px;
    max-height: 98px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.partner-item:hover {
    background: rgba(254, 214, 0, 0.07);
}

.partner-item:hover img,
.partner-item:focus-visible img {
    transform: scale(1.06);
}

.partner-item:focus-visible {
    outline: 3px solid var(--btn-hover);
    outline-offset: 2px;
}

/* A partner with no website is rendered as a div, not a link — it should
   neither look clickable nor react like one. */
.partner-item.is-static {
    cursor: default;
}

.partner-item.is-static:hover {
    background: transparent;
}

/* Fallback while a partner still has no logo uploaded. Set as a wordmark
   rather than grey placeholder text, so a partner waiting on its logo
   still looks deliberate next to the real marks. */
.partner-item .partner-name-fallback {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 800;
    color: #334155;
    text-align: center;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .partners-panel {
        gap: 10px 32px;
        padding: 20px 26px;
        border-radius: 26px;
    }

    .partner-item {
        width: 200px;
        height: 108px;
    }

    .partner-item img {
        max-width: 182px;
        max-height: 82px;
    }

    .partner-item .partner-name-fallback {
        font-size: 1.05rem;
    }
}

@media (max-width: 560px) {
    .partners-section {
        padding: 1rem 0 4.5rem;
    }

    .partners-section .container {
        padding: 0 1.25rem;
    }

    /* Below this width the panel spans the container instead of hugging
       its contents, otherwise two logos leave it awkwardly narrow. */
    .partners-panel {
        width: auto;
        gap: 6px 12px;
        padding: 16px 12px;
        border-radius: 22px;
    }

    .partner-item {
        width: calc(50% - 6px);
        height: 88px;
    }

    .partner-item img {
        max-width: 100%;
        max-height: 66px;
    }

    .partner-item .partner-name-fallback {
        font-size: 0.92rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .partner-item,
    .partner-item img {
        transition: none;
    }

    .partner-item:hover img {
        transform: none;
    }
}
