/*!
 * Helderkruin Sport Widgets — frontend styles
 *
 * Sections:
 *   1. Shared tokens + icon rules + header typography
 *   2. Disciplines (accordion)
 *   3. Reis (Mini → Senior journey)
 *   4. Kompetisies (card grid)
 *   5. Klinieke (feature card with quote)
 *   6. Drome (closing banner with floating stars)
 *   7. Mobile + reduced-motion
 */

/* =========================================================================
   1. SHARED TOKENS
   ========================================================================= */
.hkspw-disc *, .hkspw-disc *::before, .hkspw-disc *::after,
.hkspw-reis *, .hkspw-reis *::before, .hkspw-reis *::after,
.hkspw-komp *, .hkspw-komp *::before, .hkspw-komp *::after,
.hkspw-klin *, .hkspw-klin *::before, .hkspw-klin *::after,
.hkspw-drome *, .hkspw-drome *::before, .hkspw-drome *::after { box-sizing: border-box; }

.hkspw-disc, .hkspw-reis, .hkspw-komp, .hkspw-klin, .hkspw-drome {
    font-family: 'Montserrat', sans-serif;
    color: #15204D;
}

/* Inline SVG icons — defensive against theme overrides */
.hkspw-disc .hkspw-icon,
.hkspw-reis .hkspw-icon,
.hkspw-komp .hkspw-icon,
.hkspw-klin .hkspw-icon,
.hkspw-drome .hkspw-icon {
    display: inline-block !important;
    width: 1em !important;
    height: 1em !important;
    line-height: 1 !important;
    fill: currentColor !important;
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    vertical-align: -0.125em;
}

.hkspw-disc .hkspw-icon path,
.hkspw-reis .hkspw-icon path,
.hkspw-komp .hkspw-icon path,
.hkspw-klin .hkspw-icon path,
.hkspw-drome .hkspw-icon path {
    fill: currentColor !important;
}

/* Shared header typography — used by Disciplines, Reis, Kompetisies */
.hkspw-disc__header,
.hkspw-reis__header,
.hkspw-komp__header {
    text-align: center;
    margin: 0 auto 30px auto;
    max-width: 760px;
}

.hkspw-disc__eyebrow,
.hkspw-reis__eyebrow,
.hkspw-komp__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}

.hkspw-disc__title,
.hkspw-reis__title,
.hkspw-komp__title {
    margin: 0 0 12px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: 1.2px;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 400;
}

.hkspw-disc__intro,
.hkspw-reis__intro,
.hkspw-komp__intro {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    font-style: italic;
}

/* Shared shimmery item-in animation for cards (used by multiple widgets) */
@keyframes hkspw-card-in {
    0%   { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   2. DISCIPLINES (TAB STRIP + CARD GRID)
   ========================================================================= */
.hkspw-disc {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ---------- Tab strip ---------- */
.hkspw-disc__tabs {
    display: inline-flex;
    align-self: center;
    background: #F0F3FA;
    border-radius: 999px;
    padding: 6px;
    gap: 4px;
    margin: 4px 0 0;
}

.hkspw-disc .hkspw-disc__tab {
    /* Defensive button reset (theme buttons can be aggressive) */
    appearance: none !important;
    -webkit-appearance: none !important;
    border: 0 !important;
    cursor: pointer !important;
    background: transparent !important;
    padding: 11px 22px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 16px !important;
    letter-spacing: 1.4px !important;
    text-transform: uppercase !important;
    color: #6B7BA0 !important;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
    line-height: 1 !important;
}

.hkspw-disc .hkspw-disc__tab:hover {
    color: #15204D !important;
}

.hkspw-disc .hkspw-disc__tab.is-active {
    background: #FFFFFF !important;
    color: #15204D !important;
    box-shadow: 0 4px 14px -6px rgba(21, 32, 77, 0.22) !important;
}

.hkspw-disc__tab-emoji {
    font-size: 16px;
    line-height: 1;
}

/* ---------- Viewport (height-animated container) ---------- */
.hkspw-disc__viewport {
    position: relative;
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hkspw-disc__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hkspw-disc__panel.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
}

/* When JS hasn't booted yet, ensure the active panel is still visible */
.hkspw-disc__panel[hidden] {
    display: none !important;
}

/* ---------- Section header (inside each panel) ---------- */
.hkspw-disc__panel-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 10px;
    color: #7096C8;
    line-height: 1.2;
}

.hkspw-disc__panel-intro {
    text-align: center;
    margin: 0 auto 26px;
    max-width: 640px;
    font-size: 14.5px;
    line-height: 1.6;
    font-style: italic;
    color: #5B6B85;
}

/* ---------- Card grid ---------- */
.hkspw-disc__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

/* ---------- Card ---------- */
.hkspw-disc__card {
    background: #FFFFFF;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}

.hkspw-disc--shadow-none   .hkspw-disc__card { box-shadow: none; }
.hkspw-disc--shadow-soft   .hkspw-disc__card { box-shadow: 0 4px 14px -6px rgba(21, 32, 77, 0.12); }
.hkspw-disc--shadow-medium .hkspw-disc__card { box-shadow: 0 10px 26px -12px rgba(21, 32, 77, 0.18); }
.hkspw-disc--shadow-strong .hkspw-disc__card { box-shadow: 0 16px 36px -16px rgba(21, 32, 77, 0.24); }

.hkspw-disc__card:hover {
    transform: translateY(-3px);
}
.hkspw-disc--shadow-medium .hkspw-disc__card:hover { box-shadow: 0 18px 36px -16px rgba(21, 32, 77, 0.24); }
.hkspw-disc--shadow-strong .hkspw-disc__card:hover { box-shadow: 0 24px 46px -18px rgba(21, 32, 77, 0.30); }

.hkspw-disc__card-stripe {
    height: 5px;
    background: var(--hkspw-disc-accent, #15204D);
}

.hkspw-disc__card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hkspw-disc__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hkspw-disc__card-diamond {
    font-size: 11px;
    color: #7096C8;
    line-height: 1;
    flex-shrink: 0;
}

.hkspw-disc__card-name {
    margin: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 21px;
    line-height: 1.05;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 400;
    color: #15204D;
}

.hkspw-disc__card-grade {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hkspw-disc-accent, #15204D);
    line-height: 1.3;
}

.hkspw-disc__card-grade-emoji {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.hkspw-disc__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hkspw-disc__bullet {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    line-height: 1.5;
    color: #15204D;
}

.hkspw-disc__bullet-tick {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--hkspw-disc-accent, #15204D);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* =========================================================================
   3. REIS (MINI → SENIOR JOURNEY)
   ========================================================================= */
.hkspw-reis {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hkspw-reis__journey {
    display: flex;
    align-items: stretch;
    gap: 18px;
    flex-wrap: nowrap;
}

.hkspw-reis__stage {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    padding: 28px 28px 24px;
    box-shadow: 0 14px 32px -14px rgba(21, 32, 77, 0.18);
    border-top: 4px solid var(--hkspw-reis-accent, #15204D);
    opacity: 0;
    transform: translateY(8px);
    animation: hkspw-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--hkspw-reis-delay, 0s);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hkspw-reis__stage:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px -16px rgba(21, 32, 77, 0.22);
}

.hkspw-reis__stage-num {
    position: absolute;
    top: 18px;
    right: 22px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 80px;
    line-height: 1;
    color: color-mix(in srgb, var(--hkspw-reis-accent) 14%, white);
    font-weight: 400;
    pointer-events: none;
    user-select: none;
}

.hkspw-reis__stage-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--hkspw-reis-accent, #15204D);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.hkspw-reis__stage-title {
    margin: 0 0 4px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 32px;
    letter-spacing: 1px;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.hkspw-reis__stage-subtitle {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--hkspw-reis-accent, #15204D);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.hkspw-reis__stage-desc {
    margin: 0 0 16px 0;
    font-size: 13.5px;
    line-height: 1.55;
    position: relative;
    z-index: 1;
}

.hkspw-reis__sports {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.hkspw-reis__sport {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.25s ease;
}

.hkspw-reis__sport:hover {
    transform: translateY(-2px);
}

.hkspw-reis__sport-emoji {
    font-size: 14px;
    line-height: 1;
}

.hkspw-reis__connector {
    flex: 0 0 auto;
    align-self: center;
    font-size: 28px;
    color: #7096C8;
    animation: hkspw-reis-bounce 1.6s ease-in-out infinite;
}

@keyframes hkspw-reis-bounce {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(6px); }
}

/* =========================================================================
   4. KOMPETISIES (CARD GRID)
   ========================================================================= */
.hkspw-komp {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hkspw-komp__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.hkspw-komp__card {
    position: relative;
    padding: 26px 22px 22px;
    box-shadow: 0 12px 26px -14px rgba(21, 32, 77, 0.16);
    border-top: 4px solid var(--hkspw-komp-accent, #15204D);
    opacity: 0;
    transform: translateY(8px);
    animation: hkspw-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--hkspw-komp-delay, 0s);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease;
}

.hkspw-komp__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px -18px rgba(21, 32, 77, 0.24);
}

.hkspw-komp__icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--hkspw-komp-accent) 14%, white);
    color: var(--hkspw-komp-accent, #15204D);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 28px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hkspw-komp__card:hover .hkspw-komp__icon-wrap {
    transform: scale(1.08) rotate(-6deg);
}

.hkspw-komp__tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--hkspw-komp-accent, #15204D);
    margin-bottom: 4px;
}

.hkspw-komp__name {
    margin: 0 0 8px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 400;
}

.hkspw-komp__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
}

/* =========================================================================
   5. KLINIEKE (FEATURE CARD)
   ========================================================================= */
.hkspw-klin {
    position: relative;
    width: 100%;
    padding: 36px 38px 32px;
    border-top: 4px solid #E71615;
    box-shadow: 0 18px 40px -20px rgba(21, 32, 77, 0.18);
    overflow: hidden;
}

.hkspw-klin__eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.hkspw-klin__title {
    margin: 0 0 14px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 3.6vw, 38px);
    letter-spacing: 1.1px;
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 400;
}

.hkspw-klin__desc {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.6;
}

.hkspw-klin__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.hkspw-klin__highlight {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.hkspw-klin__highlight:hover {
    transform: translateY(-2px);
}

.hkspw-klin__highlight-emoji {
    font-size: 16px;
    line-height: 1;
}

.hkspw-klin__quote {
    margin: 8px 0 0 0;
    padding: 22px 26px 20px 36px;
    background: rgba(112, 150, 200, 0.08);
    border-left: 4px solid #E71615;
    border-radius: 0 16px 16px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hkspw-klin__quote-mark {
    position: absolute;
    left: 12px;
    top: 4px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 56px;
    line-height: 0.8;
    color: #E71615;
    opacity: 0.5;
    pointer-events: none;
}

.hkspw-klin__quote-text {
    margin: 0;
    font-family: 'Caveat', cursive;
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    color: #15204D;
}

.hkspw-klin__quote-attr {
    font-style: normal;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #E71615;
}

/* =========================================================================
   6. DROME (CLOSING BANNER)
   ========================================================================= */
.hkspw-drome {
    --hkspw-drome-from: #15204D;
    --hkspw-drome-to: #E71615;
    --hkspw-drome-angle: 135deg;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: linear-gradient(
        var(--hkspw-drome-angle),
        var(--hkspw-drome-from) 0%,
        var(--hkspw-drome-to) 100%
    );
    box-shadow: 0 22px 50px -22px rgba(21, 32, 77, 0.4);
}

.hkspw-drome__inner {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}

.hkspw-drome__emoji {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 14px;
    animation: hkspw-drome-bounce 2.4s ease-in-out infinite;
}

@keyframes hkspw-drome-bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25%      { transform: translateY(-6px) rotate(-3deg); }
    50%      { transform: translateY(0) rotate(0deg); }
    75%      { transform: translateY(-3px) rotate(3deg); }
}

.hkspw-drome__title {
    margin: 0 0 16px 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 44px;
    letter-spacing: 1.4px;
    line-height: 1.05;
    text-transform: uppercase;
    font-weight: 400;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.hkspw-drome__subtitle {
    font-family: 'Caveat', cursive;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 8px;
}

.hkspw-drome__tagline {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.5;
    font-style: italic;
}

/* Floating decoration (stars/trophy/medal) */
.hkspw-drome__deco {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.hkspw-drome__deco--1 {
    top: 16%;
    left: 8%;
    font-size: 38px;
    animation: hkspw-drome-float-1 6s ease-in-out infinite;
}

.hkspw-drome__deco--2 {
    top: 22%;
    right: 12%;
    font-size: 32px;
    animation: hkspw-drome-float-2 7s ease-in-out infinite;
}

.hkspw-drome__deco--3 {
    bottom: 18%;
    left: 14%;
    font-size: 36px;
    animation: hkspw-drome-float-3 5.5s ease-in-out infinite;
}

.hkspw-drome__deco--4 {
    bottom: 22%;
    right: 8%;
    font-size: 28px;
    animation: hkspw-drome-float-4 6.5s ease-in-out infinite;
}

@keyframes hkspw-drome-float-1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(8px, -10px) rotate(15deg); }
}

@keyframes hkspw-drome-float-2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-6px, -8px) rotate(-12deg); }
}

@keyframes hkspw-drome-float-3 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(10px, 8px) rotate(20deg); }
}

@keyframes hkspw-drome-float-4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-8px, 6px) rotate(-18deg); }
}

/* =========================================================================
   7. MOBILE + REDUCED-MOTION
   ========================================================================= */
@media (max-width: 880px) {
    /* Reis stacks vertically with arrow rotated down */
    .hkspw-reis__journey {
        flex-direction: column;
    }
    .hkspw-reis__connector {
        transform: rotate(90deg);
    }
    @keyframes hkspw-reis-bounce {
        0%, 100% { transform: rotate(90deg) translateX(0); }
        50%      { transform: rotate(90deg) translateX(6px); }
    }

    /* Disciplines: tighter card padding + smaller tabs on tablet */
    .hkspw-disc__tabs { padding: 5px; gap: 3px; }
    .hkspw-disc .hkspw-disc__tab { padding: 9px 14px !important; font-size: 14px !important; letter-spacing: 1.1px !important; gap: 6px !important; }
    .hkspw-disc__card-body { padding: 16px 16px 18px; }
    .hkspw-disc__card-name { font-size: 19px; }
    .hkspw-disc__panel-title { font-size: 19px; }

    /* Kompetisies: 2-column on tablet */
    .hkspw-komp__grid { grid-template-columns: 1fr 1fr; }

    /* Klinieke: tighter padding */
    .hkspw-klin { padding: 28px 24px 24px; }
    .hkspw-klin__quote { padding: 18px 20px 16px 30px; }

    /* Drome: smaller decorative items, less aggressive sizes */
    .hkspw-drome__title { font-size: 32px !important; }
    .hkspw-drome__subtitle { font-size: 22px !important; }
    .hkspw-drome__deco--1, .hkspw-drome__deco--2,
    .hkspw-drome__deco--3, .hkspw-drome__deco--4 {
        font-size: 22px !important;
    }
}

@media (max-width: 540px) {
    .hkspw-komp__grid { grid-template-columns: 1fr; }
    .hkspw-reis__stage { padding: 22px 22px 20px; }
    .hkspw-reis__stage-num { font-size: 60px; top: 14px; right: 18px; }
    .hkspw-reis__stage-title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
    .hkspw-disc__card,
    .hkspw-disc__panel,
    .hkspw-disc__viewport,
    .hkspw-reis__stage,
    .hkspw-komp__card,
    .hkspw-komp__icon-wrap,
    .hkspw-reis__sport {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
    .hkspw-disc__card:hover,
    .hkspw-reis__stage:hover,
    .hkspw-komp__card:hover {
        transform: none;
    }
    .hkspw-reis__connector,
    .hkspw-drome__emoji,
    .hkspw-drome__deco {
        animation: none;
    }
}
