/* ================================================================
   J17 Basketball  |  style-j17-20261117.css
   2026-11-12 round 1: the home page (home-en/zh.jsp), /membership (membership-*.jsp), the "Ready to Join" block and footer additions
   (layout/footer.jsp) and the purple mobile top bar (layout/header.jsp). Loaded after the theme's sheets.
   Colours: navy #081021, purple #5B3991, orange #F69E45, light grey #F4F4F7.
   ================================================================ */

.j17-page {
    font-family: 'Roboto', Arial, sans-serif;
    color: #1E1E1E;
    font-size: 15px;
    line-height: 1.75;
    overflow-x: hidden;
}
.j17-page *,
.j17-join * { box-sizing: border-box; }
.j17-page p { margin: 0; }
.j17-page img { max-width: 100%; }

.j17-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}
.j17-section { padding: clamp(56px, 7vw, 96px) 0; background: #FFFFFF; }
.j17-bg-light { background: #F4F4F7; }
.j17-bg-navy { background: #081021; color: #FFFFFF; }
.j17-bg-purple { background: #5B3991; color: #FFFFFF; }
.j17-anchor { scroll-margin-top: 90px; }

.j17-stack { display: flex; flex-direction: column; gap: 16px; }
.j17-stack-sm { display: flex; flex-direction: column; gap: 8px; }
.j17-stack-lg { display: flex; flex-direction: column; gap: 32px; }
.j17-narrow { max-width: 780px; }
.j17-list-reset { list-style: none; margin: 0; padding: 0; }
.j17-nowrap { white-space: nowrap; }
.j17-center { text-align: center; }
.j17-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Type ───────────────────────────────────────────────────── */
.j17-eyebrow {
    align-self: flex-start;
    font-family: 'Kanit', sans-serif;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    padding-left: 14px;
    border-left: 4px solid #E49A4F;
    line-height: 1.2;
    color: #151515;
}
.j17-eyebrow-light { color: #FFFFFF; border-left-color: #F69E45; }

.j17-page .j17-h1 {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.02;
    letter-spacing: .5px;
    color: #FFFFFF;
}
.j17-page .j17-h2,
.j17-join .j17-h2 {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.15;
    letter-spacing: .02em;
    color: #0D0D14;
}
.j17-page .j17-h3 {
    margin: 0;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #151515;
}
.j17-page .j17-light { color: #FFFFFF; }
.j17-purple { color: #5B3991; }
.j17-lead { font-size: 16px; line-height: 1.75; color: #3A3A45; }
.j17-muted-light { color: #D6D9E2; }
.j17-muted-purple { color: #EFEAF7; }
.j17-small { font-size: 14px; color: #4A4A55; }
.j17-bg-navy .j17-small { color: #D6D9E2; }
.j17-form .j17-small { color: #4A4A55; }
/* a link inside a sentence: its tap area is 44px tall without moving the text around it */
.j17-page .j17-inline-link { display: inline-block; padding: 12px 0; margin: -12px 0; color: #081021; font-weight: 700; text-decoration: underline; }

/* ── Buttons (at least 44px tall) ───────────────────────────── */
.j17-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 7px;
    border: 2px solid transparent;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1.2px;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.j17-btn:hover { transform: translateY(-1px); }
.j17-btn-auto { align-self: flex-start; }
.j17-btn-orange,
.j17-btn-orange:hover,
.j17-btn-orange:focus { background: #F69E45; color: #081021 !important; }
.j17-btn-orange:hover { background: #E49A4F; }
.j17-btn-outline-light,
.j17-btn-outline-light:focus { border-color: #FFFFFF; color: #FFFFFF !important; background: transparent; }
.j17-btn-outline-light:hover { background: #FFFFFF; color: #081021 !important; }
.j17-btn-outline-dark,
.j17-btn-outline-dark:focus { border-color: #081021; color: #081021 !important; background: transparent; }
.j17-btn-outline-dark:hover { background: #081021; color: #FFFFFF !important; }
.j17-btn-navy,
.j17-btn-navy:focus { background: #081021; color: #FFFFFF !important; }
.j17-btn-navy:hover { background: #5B3991; color: #FFFFFF !important; }
.j17-btn-purple,
.j17-btn-purple:focus { background: #5B3991; color: #FFFFFF !important; min-height: 48px; font-size: 14px; }
.j17-btn-purple:hover { background: #3F2766; color: #FFFFFF !important; }
.j17-btn-outline-purple,
.j17-btn-outline-purple:focus { border-color: #5B3991; color: #5B3991 !important; background: transparent; min-height: 48px; font-size: 14px; }
.j17-btn-outline-purple:hover { background: #5B3991; color: #FFFFFF !important; }
/* Two buttons of the same width, side by side; on a phone one above the other, each the full width */
.j17-btn-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.j17-btn-pair-even { max-width: 452px; }
.j17-btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.j17-text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    align-self: flex-start;
    font-size: 15px;
    font-weight: 500;
    text-decoration: underline !important;
}
.j17-text-link-light,
.j17-text-link-light:hover { color: #FFFFFF !important; }

/* ── Shared blocks ──────────────────────────────────────────── */
.j17-card { background: #FFFFFF; border-radius: 3px; box-shadow: 0 8px 16px rgba(0, 0, 0, .08); }
.j17-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F69E45;
    color: #081021;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
}
.j17-num-navy { width: 44px; height: 44px; background: #081021; color: #F69E45; font-weight: 800; }
.j17-split { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: center; }
.j17-split > * { flex: 1 1 420px; min-width: 0; }
.j17-split-top { align-items: flex-start; }
.j17-split-stretch { align-items: stretch; }
.j17-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.j17-grid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.j17-faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
.j17-faq-item { border-top: 1px solid #DCDCE3; padding: 20px 0; }
.j17-faq-item .j17-h3 { font-size: 17px; margin-bottom: 6px; }
.j17-faq-item p { font-size: 15px; line-height: 1.7; color: #3A3A45; }
@media (max-width: 1080px) {
    .j17-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .j17-grid5 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .j17-faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .j17-grid4 { grid-template-columns: minmax(0, 1fr); }
}

/* ── Home: hero ─────────────────────────────────────────────── */
.j17-hero { position: relative; background: #081021; color: #FFFFFF; overflow: hidden; }
.j17-hero-media { position: absolute; inset: 0; }
.j17-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.j17-hero-inner { position: relative; padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(40px, 7vw, 96px); }
.j17-hero-panel {
    background: rgba(8, 16, 33, .92);
    padding: clamp(24px, 4vw, 48px);
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-top: 6px solid #F69E45;
}
.j17-hero-lead { font-size: 17px; line-height: 1.7; color: #D6D9E2; }
@media (max-width: 720px) {
    .j17-hero-inner { padding: 40px 16px; }
    .j17-hero-panel { max-width: none; background: rgba(8, 16, 33, .82); }
}

/* ── Home: programs ─────────────────────────────────────────── */
.j17-programs-band { background: #081021; color: #FFFFFF; padding: clamp(48px, 6vw, 72px) 0 150px; }
.j17-programs-band .j17-lead { max-width: 760px; }
.j17-program-cards { position: relative; margin-top: -110px; }
.j17-program-card { overflow: hidden; display: flex; flex-direction: column; color: #1E1E1E; text-decoration: none !important; transition: transform .2s, box-shadow .2s; }
a.j17-program-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0, 0, 0, .14); color: #1E1E1E; }
.j17-program-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.j17-program-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.j17-program-card-body p { font-size: 15px; line-height: 1.6; color: #3A3A45; flex-grow: 1; }
.j17-card-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #5B3991 !important;
    text-decoration: none !important;
}
.j17-card-links { display: flex; flex-wrap: wrap; gap: 0 20px; }
.j17-programs + .j17-section { padding-top: clamp(64px, 8vw, 96px); }

/* ── Home: who we are ───────────────────────────────────────── */
.j17-who-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.j17-who-photos img { width: 100%; height: 220px; object-fit: cover; border-radius: 3px; display: block; }
.j17-who-photos .j17-who-photo-wide { grid-column: span 2; height: 340px; }
.j17-features { display: flex; flex-direction: column; gap: 16px; margin-top: 6px; }
.j17-feature { display: flex; gap: 14px; align-items: flex-start; }
.j17-feature .j17-h3 { font-size: 17px; margin-bottom: 4px; }
.j17-feature p { font-size: 15px; line-height: 1.6; color: #3A3A45; }
@media (max-width: 900px) {
    .j17-who-text { order: -1; }
}

/* ── Home: why J17, pathway, session, safety, visit ─────────── */
.j17-reason { background: rgba(255, 255, 255, .1); border-radius: 3px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.j17-reason p { font-size: 15px; line-height: 1.6; color: #EFEAF7; }
.j17-photo-43 { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 3px; display: block; }
.j17-level { background: #F4F4F7; border-radius: 3px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.j17-level .j17-h3,
.j17-step .j17-h3 { font-size: 17px; }
.j17-level-top { background: #081021; }
.j17-step { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.j17-step p { font-size: 15px; line-height: 1.6; color: #3A3A45; }
.j17-split-safety > :first-child { flex-basis: 520px; }
.j17-split-safety > :last-child { flex-basis: 360px; }
.j17-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.j17-badges li { border: 1px solid rgba(255, 255, 255, .22); border-radius: 3px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.j17-badges span { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 15px; text-transform: uppercase; }
.j17-visit-text { justify-content: center; }
.j17-visit-list { display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.6; color: #3A3A45; }
.j17-visit-list li { display: flex; gap: 12px; }
.j17-visit-list svg { flex-shrink: 0; margin-top: 3px; }
.j17-map { min-height: 340px; border-radius: 3px; overflow: hidden; background: #E3E1EA; }
.j17-map iframe { display: block; width: 100%; height: 100%; min-height: 340px; }

/* ── Membership: hero ───────────────────────────────────────── */
.j17-member-hero-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 80px); }
.j17-member-hero-text { flex: 1 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.j17-member-hero-text .j17-h1 { font-size: clamp(36px, 5vw, 58px); }
.j17-price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px !important; }
.j17-price-amount { font-family: 'Kanit', sans-serif; font-weight: 800; font-size: clamp(64px, 8vw, 96px); line-height: 1; color: #F69E45; }
.j17-price-unit { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 24px; }
.j17-price-note { margin-top: -8px !important; font-size: 14px; color: #D6D9E2; }
.j17-member-hero-photo { flex: 1 1 380px; min-width: 0; position: relative; container-type: inline-size; }
.j17-member-hero-photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; display: block; }
/* The three tags stay on one line inside the photo at every width, 360px included: they scale with the photo's own width (cqi) */
.j17-photo-tags {
    position: absolute;
    left: 3cqi;
    right: 3cqi;
    bottom: 3cqi;
    display: flex;
    flex-wrap: nowrap;
    gap: 1.4cqi;
}
.j17-photo-tags span {
    background: #FFFFFF;
    color: #081021;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: clamp(9px, 2.5cqi, 14px);
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .45em .75em;
    border-radius: 7px;
    white-space: nowrap;
    line-height: 1.4;
}

/* ── Membership: savings, perks, tracks ─────────────────────── */
.j17-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.j17-compare-card { background: #F4F4F7; border-radius: 3px; padding: 28px; display: flex; flex-direction: column; gap: 10px; color: #3A3A45; }
.j17-compare-label { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 1.4px; text-transform: uppercase; color: #3A3A45; }
.j17-compare-total { border-top: 1px solid #D5D5DE; padding-top: 12px; display: flex; align-items: baseline; gap: 4px; }
.j17-compare-amount { font-family: 'Kanit', sans-serif; font-weight: 800; font-size: 44px; line-height: 1; color: #0D0D14; }
.j17-compare-unit { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 16px; }
.j17-compare-member { background: #081021; color: #D6D9E2; border-top: 4px solid #F69E45; }
.j17-compare-member .j17-compare-label,
.j17-compare-member .j17-compare-amount { color: #F69E45; }
.j17-compare-member .j17-compare-unit { color: #FFFFFF; }
.j17-compare-member .j17-compare-total { border-top-color: rgba(255, 255, 255, .18); }
.j17-savings {
    background: #F69E45;
    color: #081021;
    border-radius: 7px;
    padding: 18px 24px;
    text-align: center;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 2.4vw, 28px);
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.2;
}

.j17-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.j17-perk { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.j17-perk p { color: #3A3A45; }
.j17-perk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.j17-limited {
    background: #C62828;
    color: #FFFFFF;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    line-height: 1.6;
}
/* The 6th cell: navy card, text left, the whole machine right (net to wheels: the photo is 2:3 and its column is always narrower than
   that, so "cover" trims only its sides) */
.j17-machine-card {
    border-radius: 3px;
    overflow: hidden;
    min-height: 260px;
    background: #081021;
    color: #FFFFFF;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 45%;
}
.j17-machine-text { padding: 32px 20px 32px 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.j17-machine-big { font-family: 'Kanit', sans-serif; font-weight: 800; font-size: clamp(38px, 3.6vw, 52px); line-height: 1; color: #F69E45; white-space: nowrap; }
.j17-machine-mid { font-family: 'Kanit', sans-serif; font-weight: 700; font-size: 17px; line-height: 1.35; letter-spacing: 1px; text-transform: uppercase; }
.j17-machine-small { font-size: 14px; line-height: 1.5; color: #D6D9E2; }
.j17-machine-card img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: center; display: block; background: #FFFFFF; }
@media (max-width: 400px) {
    .j17-machine-text { padding: 24px 12px 24px 20px; }
}

.j17-tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.j17-track { padding: 32px; display: flex; flex-direction: column; gap: 14px; border-top: 4px solid #F69E45; }
.j17-track .j17-h3 { font-size: 24px; font-weight: 800; }
.j17-track p { color: #3A3A45; }
.j17-track-dark { background: #081021; }
.j17-track-dark p { color: #D6D9E2; }
.j17-track-label { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: #F69E45; }

/* ── Membership: facility, schedule, steps ──────────────────── */
.j17-facility { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.j17-facility-text { flex: 1 1 320px; min-width: 0; }
.j17-facility-photos { flex: 2 1 560px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.j17-facility-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; display: block; }
.j17-facility-photos .j17-facility-photo-wide { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.j17-schedule-join { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: start; }
.j17-schedule { background: #081021; color: #FFFFFF; border-radius: 3px; padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; gap: 20px; }
.j17-schedule-table { width: 100%; border-collapse: collapse; font-family: 'Kanit', sans-serif; }
.j17-schedule-table tr { border-top: 1px solid rgba(255, 255, 255, .18); }
.j17-schedule-table tbody tr:last-child { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.j17-schedule-table th { text-align: left; padding: 16px 0; font-weight: 700; font-size: 20px; letter-spacing: 1px; text-transform: uppercase; color: #FFFFFF; }
.j17-schedule-table td { text-align: right; padding: 16px 0; font-weight: 600; font-size: 20px; color: #F69E45; }
.j17-schedule-place { display: flex; gap: 10px; align-items: flex-start; color: #D6D9E2; }
.j17-schedule-place svg { flex-shrink: 0; margin-top: 3px; }
.j17-join-steps { display: flex; flex-direction: column; gap: 24px; margin-top: 8px; }
.j17-join-steps li { display: flex; gap: 18px; align-items: flex-start; }
.j17-join-steps .j17-h3 { margin-bottom: 4px; }
.j17-join-steps p { color: #3A3A45; }

/* ── Membership: registration form ──────────────────────────── */
.j17-register { max-width: 860px; display: flex; flex-direction: column; gap: 28px; }
.j17-form,
.j17-form-success { background: #FFFFFF; border-radius: 3px; padding: clamp(18px, 4vw, 44px); color: #1E1E1E; }
.j17-form { display: flex; flex-direction: column; gap: 32px; }
.j17-form[hidden],
.j17-form-success[hidden],
.j17-form [hidden] { display: none !important; }
.j17-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.j17-legend {
    padding: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    color: #0D0D14;
}
.j17-legend-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #F69E45;
    color: #081021;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.j17-children { display: flex; flex-direction: column; gap: 16px; }
.j17-child { background: #F4F4F7; border-radius: 3px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.j17-child-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.j17-child-title { font-family: 'Kanit', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase; color: #3A3A45; }
.j17-remove-child {
    min-height: 44px;
    padding: 0 8px;
    background: transparent;
    border: 0;
    color: #C62828;
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}
.j17-field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.j17-field-grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.j17-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.j17-form label,
.j17-track-set legend { font-size: 14px; font-weight: 500; color: #1E1E1E; margin: 0; padding: 0; }
.j17-form input[type="text"],
.j17-form input[type="email"],
.j17-form input[type="tel"],
.j17-form select,
.j17-form textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #B9BCC8;
    border-radius: 7px;
    padding: 0 14px;
    font: 15px 'Roboto', sans-serif;
    background: #FFFFFF;
    color: #1E1E1E;
}
.j17-form textarea { padding: 12px 14px; resize: vertical; }
.j17-form [aria-invalid="true"] { border-color: #C62828 !important; }
.j17-req { color: #C62828; }
.j17-optional { color: #4A4A55; font-weight: 400; }
.j17-field-error { min-height: 0; font-size: 13px; line-height: 1.4; color: #B71C1C; }
.j17-field-error:empty { display: none; }
.j17-track-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.j17-track-set legend { margin-bottom: 6px; }
.j17-track-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.j17-form .j17-track-option {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    background: #FFFFFF;
    border: 1px solid #B9BCC8;
    border-radius: 7px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 400;
}
.j17-track-option input { width: 18px; height: 18px; margin: 0; accent-color: #081021; flex-shrink: 0; }
.j17-add-child {
    min-height: 52px;
    border: 2px dashed #B9BCC8;
    border-radius: 7px;
    background: #FFFFFF;
    color: #081021;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.j17-check-wrap { display: flex; flex-direction: column; gap: 4px; }
.j17-form .j17-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 15px; font-weight: 400; line-height: 1.6; min-height: 44px; }
.j17-check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: #081021; flex-shrink: 0; }
.j17-form-note { background: #F4F4F7; border-radius: 7px; padding: 14px 16px; font-size: 14px; color: #3A3A45; }
.j17-form-failed { background: #FDECEC; border: 1px solid #E5A3A3; border-radius: 7px; padding: 14px 16px; font-size: 14px; color: #8A1C1C; }
.j17-submit {
    min-height: 56px;
    border: 0;
    border-radius: 7px;
    background: #F69E45;
    color: #081021;
    font-family: 'Kanit', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
}
.j17-submit:disabled { opacity: .7; cursor: wait; }
.j17-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.j17-form-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.j17-success-icon { width: 64px; height: 64px; border-radius: 50%; background: #F69E45; color: #081021; display: flex; align-items: center; justify-content: center; }
.j17-form-success .j17-h3 { font-size: 28px; font-weight: 800; color: #0D0D14; }
.j17-success-text { max-width: 520px; color: #3A3A45; }
.j17-back { min-height: 44px; background: transparent; border: 0; color: #081021; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* ── "Ready to Join" on every page (layout/footer.jsp) ──────── */
.j17-join { padding: clamp(48px, 6vw, 72px) 0; background: #FFFFFF; }
.j17-join-inner { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 56px); align-items: center; }
.j17-join-text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 14px; text-align: left; }
.j17-join-lead { margin: 0; font-size: 16px; line-height: 1.7; color: #3A3A45; }
.j17-join-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.j17-join-newsletter { flex: 1 1 380px; min-width: 0; background: #FFFFFF; border-radius: 3px; box-shadow: 0 8px 16px rgba(0, 0, 0, .08); padding: 24px; text-align: left; }
.j17-newsletter-title { margin: 0 0 12px; font-family: 'Kanit', sans-serif; font-weight: 700; font-size: 18px; text-transform: uppercase; color: #151515; }
@media (max-width: 575.98px) {
    .j17-join-buttons .j17-btn { width: 100%; }
}

/* ── Footer additions ───────────────────────────────────────── */
.j17-footer-heading { margin: 0; font-family: 'Kanit', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: .02em; color: #FFFFFF; }
.j17-service-area { font-size: 13px; line-height: 1.6; margin-bottom: 8px; }

/* ── Mobile top bar (RD Navbar's fixed layout, below 1200px): one purple bar, Logo · phone / email / Instagram · EN / 中文 · menu ── */
@media (max-width: 1199.98px) {
    .j17-header .rd-navbar-fixed .rd-navbar-panel {
        background: #5B3991;
        height: 72px !important;
        padding: 6px 8px 6px 12px;
        gap: 4px;
    }
    .j17-header .rd-navbar-fixed .rd-navbar-panel .brand { order: 1; padding-top: 0 !important; padding-bottom: 0 !important; margin-right: auto; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel .brand img { height: 56px !important; max-height: 56px !important; width: auto !important; max-width: none !important; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list ul,
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list li { margin: 0 !important; padding: 0 !important; transform: none !important; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list ul { display: flex; align-items: center; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list li { display: flex; align-items: center; justify-content: center; }
    /* the theme pads the logo from 768px (py-md-2), which shrank it in the 56px bar */
    .j17-header .rd-navbar-fixed .rd-navbar-panel .brand img { padding: 0 !important; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-inner { order: 2; padding: 0; margin: 0; max-width: none; flex: 0 1 auto; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-inner > * + * { margin-left: 4px; }
    .j17-header .rd-navbar-fixed .rd-navbar-toggle { order: 3; position: relative; left: auto; right: auto; top: auto; transform: none; width: 44px; height: 44px; flex-shrink: 0; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list > ul { display: flex; align-items: center; gap: 4px; padding-right: 0 !important; margin: 0; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-list > ul > li { margin: 0 !important; }
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link { width: 44px; height: 44px; line-height: 44px; margin-right: 0; background: rgba(255, 255, 255, .08); border-radius: 6px; }
    .j17-header .rd-navbar-fixed .rd-mail-link .icon { color: #F69E45; }
    /* icons only, the whole box the link: the theme does this below 576px only, so from 576px to 1199px the number and address spilled
       out of the boxes */
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link { position: relative; text-align: center; }
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link .unit { display: block; }
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link .unit-body { position: static; }
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link a { display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; font-size: 0; }
    .j17-header .rd-navbar-fixed .fa-instagram { position: static; top: auto; margin: 0; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 6px; background: rgba(255, 255, 255, .08); color: #F69E45 !important; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-inner .list-inline-xs { margin: 0; top: 0; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-inner a[lang] { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 44px; padding: 0 4px !important; color: #F69E45 !important; font-size: 14px; }
}
@media (max-width: 400px) {
    .j17-header .rd-navbar-fixed .rd-navbar-panel { padding-left: 6px; padding-right: 4px; gap: 2px; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel .brand img { max-height: 48px !important; }
    .j17-header .rd-navbar-modern.rd-navbar-fixed .rd-mail-link,
    .j17-header .rd-navbar-fixed .fa-instagram { width: 40px; height: 44px; }
    .j17-header .rd-navbar-fixed .rd-navbar-panel-inner a[lang] { min-width: 30px; padding: 0 2px !important; }
}
