/* SISV v1 — sponsor sections (home.aspx, ls.aspx, qs.aspx). Same look everywhere, based on the QS page:
   a centred title, solid coloured tier bars (Diamond / Platinum, Gold, Silver, Bronze) and plain logos underneath.

   <section class="ed-sponsors">
     <div class="ed-sp-group">
       <div class="ed-sp-kicker">With thanks to</div>            (optional)
       <h3 class="ed-sp-title">Our 2026 CPD Sponsors</h3>
       <p class="ed-sp-lead">…</p>                               (optional)
       <div class="ed-sp-row">                                   one row = tiers shown side by side
         <div class="ed-sp-tier is-gold">                        is-diamond | is-platinum | is-gold | is-silver | is-bronze | is-sponsor
           <div class="ed-sp-label">Gold Sponsors</div>
           <div class="ed-sp-logos">
             <a class="ed-sp-logo" href="…" target="_blank" rel="noopener" title="Name"><span style="background-image:url('…')"></span></a>
           </div>
         </div>
       </div>
       <p class="ed-sp-note">To sponsor …</p>                     (optional)
     </div>
   </section>
*/
.ed-sponsors {
    background: #fff;
    border: 1px solid var(--ed-line, #e6ebf2);
    border-radius: var(--ed-radius, 18px);
    box-shadow: var(--ed-shadow, none);
    padding: 26px 22px;
    margin-top: 24px;
    text-align: center;
}
#edPage section.ed-sponsors { padding: 26px 22px; border: 1px solid var(--ed-line, #e6ebf2); }
.ed-sp-group + .ed-sp-group { margin-top: 30px; padding-top: 28px; border-top: 1px dashed var(--ed-line, #e6ebf2); }
.ed-sp-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ed-muted, #64748b); margin-bottom: 4px; }
.ed-sp-title { margin: 0 0 18px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ed-ink, #13243a); }
.ed-sp-lead { max-width: 640px; margin: -8px auto 20px; font-size: 14.5px; color: var(--ed-muted, #64748b); }
.ed-sp-row { display: flex; justify-content: center; align-items: flex-start; gap: 20px 28px; }
.ed-sp-row + .ed-sp-row { margin-top: 22px; }
.ed-sp-tier { flex: 1 1 0; min-width: 0; max-width: 520px; }
.ed-sp-row > .ed-sp-tier:only-child { max-width: 760px; }
.ed-sp-label {
    display: block;
    max-width: 380px;
    margin: 0 auto 12px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #1f2937;
    background: #e5e7eb;
}
.ed-sp-tier.is-diamond .ed-sp-label,
.ed-sp-tier.is-platinum .ed-sp-label { background: navajowhite; color: #1f2937; }
.ed-sp-tier.is-gold .ed-sp-label { background: gold; color: #1f2937; }
.ed-sp-tier.is-silver .ed-sp-label { background: silver; color: #fff; }
.ed-sp-tier.is-bronze .ed-sp-label { background: #967444; color: #fff; }
.ed-sp-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; }
.ed-sp-logo { display: block; width: 130px; height: 80px; padding: 6px; text-decoration: none !important; transition: opacity .2s ease; }
.ed-sp-logo span { display: block; width: 100%; height: 100%; background-position: center; background-repeat: no-repeat; background-size: contain; }
.ed-sp-logo:hover { opacity: .6; }
.ed-sp-tier.is-diamond .ed-sp-logo,
.ed-sp-tier.is-platinum .ed-sp-logo { width: 200px; height: 100px; }
.ed-sp-tier.is-gold .ed-sp-logo { width: 150px; height: 86px; }
.ed-sp-row > .ed-sp-tier:not(:only-child) .ed-sp-logo { width: 110px; height: 72px; }   /* tiers side by side: smaller logos */
.ed-sp-note { margin: 18px 0 0; font-size: 14px; color: var(--ed-muted, #64748b); }

@media (max-width: 767px) {
    .ed-sponsors, #edPage section.ed-sponsors { padding: 22px 14px; }
    .ed-sp-title { font-size: 18px; }
    .ed-sp-row { flex-direction: column; align-items: stretch; }
    .ed-sp-tier { max-width: none; }
    .ed-sp-label { max-width: none; }
    .ed-sp-logo { width: calc(33.333% - 12px); min-width: 90px; height: 70px; }
    .ed-sp-tier.is-diamond .ed-sp-logo,
    .ed-sp-tier.is-platinum .ed-sp-logo { width: calc(50% - 9px); height: 86px; }
    .ed-sp-tier.is-gold .ed-sp-logo { width: calc(33.333% - 12px); height: 74px; }
    .ed-sp-row > .ed-sp-tier:not(:only-child) .ed-sp-logo { width: calc(33.333% - 12px); height: 70px; }
}

/* placed straight after the banner (LS) or inside the home page grid: spacing comes from the layout */
#edPage > .ed-sponsors { margin: 0 0 24px; }
.hm-main > .ed-sponsors { margin-top: 0; }

/* ---------- Desktop arrangement, as on sisv.org.sg ----------
   is-wide    : full-width tier bar, logos spread across (home Diamond / Gold, QS award Bronze)
   is-joined  : tiers side by side with the bars touching (QS CPD Gold | Silver | Bronze)
   is-pair    : two tiers side by side with a gap (QS award Gold | Silver)
   is-cards   : logos in white cards (LS Singapore Geospatial)  */
.ed-sp-tier.is-bronze.is-chocolate .ed-sp-label { background: chocolate; color: #fff; }
.ed-sp-tier.is-sponsor .ed-sp-label { background: silver; color: #fff; }
@media (min-width: 768px) {
    .ed-sp-row > .ed-sp-tier:only-child .ed-sp-label { max-width: 545px; }
    .ed-sp-row > .ed-sp-tier.is-wide { flex: 1 1 100%; max-width: none; }
    .ed-sp-row > .ed-sp-tier.is-wide .ed-sp-label { max-width: none; }
    .ed-sp-tier.is-wide .ed-sp-logos { justify-content: space-around; flex-wrap: nowrap; gap: 10px; }
    .ed-sp-tier.is-diamond.is-wide .ed-sp-logo { width: calc((100% - 30px) / 4); max-width: 250px; height: 100px; }
    .ed-sp-tier.is-gold.is-wide .ed-sp-logo { width: calc((100% - 50px) / 6); max-width: 160px; height: 96px; }
    .ed-sp-row > .ed-sp-tier.is-bronze.is-wide .ed-sp-logo { width: 120px; height: 80px; }

    .ed-sp-row.is-joined { gap: 0; }
    .ed-sp-row.is-joined > .ed-sp-tier { max-width: none; }
    .ed-sp-row.is-joined .ed-sp-label { max-width: none; margin-bottom: 16px; }
    .ed-sp-row.is-joined .ed-sp-logos { gap: 8px 12px; flex-wrap: nowrap; padding: 0 6px; }
    .ed-sp-row.is-joined > .ed-sp-tier .ed-sp-logo { width: calc((100% - 24px) / 3); max-width: 100px; height: 80px; }

    .ed-sp-row.is-pair { gap: 20px; }
    .ed-sp-row.is-pair > .ed-sp-tier { flex: 0 1 350px; }
    .ed-sp-row.is-pair .ed-sp-label { max-width: none; }
    .ed-sp-row.is-pair > .ed-sp-tier .ed-sp-logo { width: 220px; height: 100px; }

    .ed-sponsors.is-cards .ed-sp-row + .ed-sp-row { margin-top: 44px; }
    .ed-sponsors.is-cards .ed-sp-label { max-width: 576px; padding: 12px; border-radius: 6px; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 32px; }
    .ed-sponsors.is-cards .ed-sp-tier { max-width: none; }
    .ed-sponsors.is-cards .ed-sp-logos { gap: 28px 36px; }
    .ed-sponsors.is-cards .ed-sp-logo {
        width: 230px; height: 150px; padding: 26px 32px; border-radius: 6px;
        background: #fff; border: 1px solid var(--ed-line, #e6ebf2); box-shadow: 0 1px 3px rgba(16, 36, 64, .08);
        transition: transform .3s ease, box-shadow .3s ease;
    }
    .ed-sponsors.is-cards .ed-sp-logo:hover { opacity: 1; transform: translateY(-4px); box-shadow: 0 10px 22px -12px rgba(16, 36, 64, .35); }
    .ed-sponsors.is-cards .ed-sp-tier.is-diamond .ed-sp-logo { width: 350px; height: 170px; padding: 24px 40px; }
    .ed-sponsors.is-cards .ed-sp-tier.is-gold .ed-sp-logo { width: calc((100% - 72px) / 3); max-width: 340px; height: 160px; padding: 30px 44px; }
    .ed-sponsors.is-cards .ed-sp-tier.is-silver .ed-sp-logo { width: calc((100% - 108px) / 4); max-width: 240px; height: 150px; padding: 24px 26px; }
}
