/* =====================================================================
   Kaypic public club pages (register.kaypic.com/{club}...)
   Portal home (circle/Default.aspx), donation campaigns list and donation form.
   The club colour is set per page on .kp-home: style="--kp-brand:...;--kp-on-brand:..."
   (computed by App_Code/_circle/PortalLook.cs).
   ===================================================================== */
.kp-home {
    --kp-brand: #1c55a9;
    --kp-on-brand: #ffffff;
    --kp-ink: #17202c;
    --kp-muted: #5d6778;
    --kp-line: #e3e7ec;
    --kp-soft: #f5f7f9;
    --kp-give: #15803d;
    --kp-volunteer: #b68207;
    --kp-fan: #2f7cb3;
    --kp-alumni: #4b5565;
    color: var(--kp-ink);
    padding-bottom: 72px;
    font-size: 15px;
}
.kp-home h1, .kp-home h2, .kp-home h3 { font-family: Montserrat, system-ui, sans-serif; color: inherit; margin: 0; }
.kp-home a { text-decoration: none; }
.kp-home :focus-visible { outline: 3px solid var(--kp-brand); outline-offset: 2px; border-radius: 6px; }

/* Hero: the one bold element, in the club's own colour, with a sport photo or drawing */
.kp-hero { position: relative; overflow: hidden; isolation: isolate; margin-top: 8px; border-radius: 18px; min-height: 300px;
           background: var(--kp-brand); color: var(--kp-on-brand); display: flex; align-items: center; }
.kp-hero.has-photo { background: var(--kp-brand) var(--kp-photo) right center / cover no-repeat; }
.kp-hero.has-photo::before { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, var(--kp-brand) 0%, var(--kp-brand) 34%, color-mix(in srgb, var(--kp-brand) 70%, transparent) 58%, color-mix(in srgb, var(--kp-brand) 10%, transparent) 100%); }
.kp-hero-art { position: absolute; z-index: -1; right: -40px; top: 50%; width: 360px; height: 360px; transform: translateY(-50%); color: var(--kp-on-brand); opacity: .16; }
.kp-hero-art svg { width: 100%; height: 100%; }
.kp-hero-body { padding: 36px 40px; max-width: 640px; }
.kp-logo { width: 84px; height: 84px; border-radius: 16px; background: #fff; display: grid; place-items: center; padding: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.18); margin-bottom: 18px; }
.kp-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kp-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.015em; }
.kp-hero p { margin: 10px 0 0; font-size: 1.05rem; line-height: 1.5; opacity: .9; max-width: 46ch; }
.kp-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.kp-btn.is-light { background: #fff; color: #17202c !important; }
.kp-btn.is-light:hover { filter: brightness(.95); }
.kp-btn.is-lg { padding: 12px 20px; font-size: .98rem; }

/* Layout */
.kp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; margin-top: 28px; align-items: start; }
.kp-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.kp-main { display: grid; gap: 28px; min-width: 0; }
.kp-section-title { font-size: 1.2rem; font-weight: 700; }
.kp-section-sub { color: var(--kp-muted); margin: 4px 0 0; }

.kp-panel { background: #fff; border: 1px solid var(--kp-line); border-radius: 14px; padding: 24px; }

/* Activities (rows rendered by uc_player_registration) */
.kp-activities .kp-list { margin-top: 18px; }
.kp-activities .activity-item {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 18px; margin-bottom: 10px;
    border: 1px solid var(--kp-line); border-radius: 10px; background: #fff;
    color: var(--kp-ink); font-weight: 600; font-size: 1.02rem; transition: border-color .15s, background .15s;
}
.kp-activities .activity-item::after {
    content: ""; flex: none; width: 34px; height: 34px; border-radius: 50%;
    background: var(--kp-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317202c' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.kp-activities a:hover .activity-item { border-color: var(--kp-brand); background: var(--kp-soft); }
.kp-activities a:focus-visible { outline: none; }
.kp-activities a:focus-visible .activity-item { outline: 3px solid var(--kp-brand); outline-offset: 2px; }
.kp-activities .has-text-danger:empty { display: none; }
.kp-activities .has-text-danger { display: block; padding: 22px; text-align: center; border: 1px dashed var(--kp-line); border-radius: 10px; color: var(--kp-muted) !important; font-style: normal !important; background: var(--kp-soft); }

/* Get involved */
.kp-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.kp-role { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--kp-line); border-radius: 14px; overflow: hidden; }
.kp-role-art { height: 104px; display: grid; place-items: center; position: relative; overflow: hidden;
               background: color-mix(in srgb, var(--kp-role) 11%, #fff); color: var(--kp-role); }
.kp-role-art::before, .kp-role-art::after { content: ""; position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--kp-role) 14%, transparent); }
.kp-role-art::before { width: 120px; height: 120px; right: -30px; top: -50px; }
.kp-role-art::after { width: 70px; height: 70px; left: -20px; bottom: -30px; }
.kp-role-art svg { width: 48px; height: 48px; position: relative; }
.kp-role-body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.kp-give-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #e8f5ec; color: var(--kp-give); margin-bottom: 12px; }
.kp-give-badge svg { width: 22px; height: 22px; }
.kp-role h3 { font-size: 1.02rem; font-weight: 700; }
.kp-role p { margin: 6px 0 16px; color: var(--kp-muted); font-size: .92rem; line-height: 1.5; flex: 1; }
.kp-role.is-volunteer { --kp-role: var(--kp-volunteer); }
.kp-role.is-fan { --kp-role: var(--kp-fan); }
.kp-role.is-alumni { --kp-role: var(--kp-alumni); }
.kp-soon { display: inline-block; align-self: flex-start; padding: 6px 10px; border-radius: 999px; background: var(--kp-soft); color: var(--kp-muted); font-size: .82rem; font-weight: 600; }

/* Buttons */
.kp-btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 9px; font-weight: 600; font-size: .92rem; border: 1px solid transparent; cursor: pointer; text-align: center; transition: background .15s, border-color .15s, filter .15s; }
.kp-btn.is-outline { background: #fff; border-color: var(--kp-line); color: var(--kp-ink) !important; }
.kp-btn.is-outline:hover { border-color: var(--kp-ink); }
.kp-btn.is-give { background: var(--kp-give); color: #fff !important; }
.kp-btn.is-give:hover { filter: brightness(1.08); }
.kp-btn.is-link-quiet { background: transparent; color: var(--kp-give) !important; padding-left: 0; padding-right: 0; }
.kp-btn.is-link-quiet:hover { text-decoration: underline; }
.kp-btn.is-wide { width: 100%; }

/* Giving */
.kp-give { border-top: 4px solid var(--kp-give); position: sticky; top: 16px; }
.kp-give .kp-section-title { font-size: 1.12rem; }
.kp-campaign { padding: 16px 0; border-bottom: 1px solid var(--kp-line); }
.kp-campaign:first-of-type { margin-top: 10px; }
.kp-campaign h3 { font-size: 1rem; font-weight: 700; }
.kp-campaign p { margin: 4px 0 0; color: var(--kp-muted); font-size: .9rem; }
.kp-bar { height: 8px; background: #e6efe9; border-radius: 4px; margin: 12px 0 6px; overflow: hidden; }
.kp-bar i { display: block; height: 100%; min-width: 4px; background: var(--kp-give); border-radius: 4px; }
.kp-raised { font-size: .85rem; color: var(--kp-muted); }
.kp-raised strong { color: var(--kp-ink); }
.kp-campaign .kp-btn { margin-top: 12px; }
.kp-give-general { margin-top: 14px; text-align: center; }

@media (max-width: 980px) {
    .kp-grid { grid-template-columns: minmax(0, 1fr); }
    .kp-give { position: static; }
    /* small screens: activities, then giving, then other roles */
    .kp-main { display: contents; }
    .kp-activities { order: 1; }
    .kp-give { order: 2; }
    .kp-join { order: 3; }
}
@media (max-width: 720px) {
    .kp-roles { grid-template-columns: minmax(0, 1fr); }
    .kp-hero { min-height: 0; border-radius: 14px; }
    .kp-hero.has-photo { background-position: 70% center; }
    .kp-hero.has-photo::before { background: linear-gradient(180deg, color-mix(in srgb, var(--kp-brand) 55%, transparent) 0%, var(--kp-brand) 70%); }
    .kp-hero-body { padding: 24px 20px; }
    .kp-hero-art { width: 220px; height: 220px; right: -50px; top: 30%; }
    .kp-logo { width: 64px; height: 64px; border-radius: 12px; padding: 6px; margin-bottom: 14px; }
    .kp-hero-actions .kp-btn { flex: 1 1 auto; }
    .kp-panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .kp-home * { transition: none !important; } }

/* Bulma colours <strong> dark grey; inside the hero it must follow the hero text colour */
.kp-hero strong { color: inherit; }
