/* Club brand layer for the athlete lookup (athletes-lookup.html) and athlete profile
   (athlete-profile.html). Same identity as the public results / program pages (brand.css):
   navy band with the pink/blue/lime stripe, light page, white cards, UTM-Avo, lime accents.
   Loaded after each page's own <style>; light only, like the other public pages. */

@font-face { font-family: 'UTM-Avo'; src: url('UTM-Avo.ttf'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'UTM-Avo'; src: url('UTM-AvoBold.ttf'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'UTM-Avo'; src: url('UTM-AvoItalic.ttf'); font-weight: 400; font-style: italic; font-display: swap; }

:root, :root:root {
    --brand-navy: #002CA6;
    --brand-deep: #001A66;
    --brand-blue: #018CF0;
    --brand-lime: #85C61E;
    --brand-pink: #E90763;
    --stripe: linear-gradient(90deg, var(--brand-pink) 0 33.33%, var(--brand-blue) 33.33% 66.66%, var(--brand-lime) 66.66% 100%);

    --primary: var(--brand-navy);
    --primary-light: var(--brand-blue);
    --accent: var(--brand-blue);
    --bg-color: #f3f5fa;
    --card-bg: #ffffff;
    --text-main: #1c202c;
    --text-muted: #69718a;
    --border-color: #dfe4ee;
    --border: #dfe4ee;
    --gold: #D4A017;
    --silver: #969EAC;
    --bronze: #B87333;
    --pb-bg: var(--brand-lime);
    --pb-text: var(--brand-deep);
    --male-bg: #e3efff;
    --male-icon: var(--brand-blue);
    --female-bg: #fde6f0;
    --female-icon: var(--brand-pink);
    color-scheme: light;
}
body { font-family: 'UTM-Avo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg-color); color: var(--text-main); }
button, input, select { font-family: inherit; }

/* ================= Lookup page ================= */

/* Header band */
body > header {
    position: relative;
    background: linear-gradient(90deg, var(--brand-deep), var(--brand-navy));
    padding: 2.4rem 1rem 2.6rem;
    box-shadow: 0 2px 12px rgba(0, 26, 102, 0.3);
}
body > header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--stripe); }
body > header h1 { font-weight: 700; letter-spacing: 0.3px; font-size: 1.9rem; }
body > header p { color: var(--brand-lime); opacity: 1; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; font-size: 0.85rem; }

/* Search */
.controls-section { border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 26, 102, 0.06); }
#search-input, .filter-select { background-color: #f7f9fd; border: 1.5px solid var(--border-color); border-radius: 10px; }
#search-input:focus, .filter-select:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(1, 140, 240, 0.15); background-color: #fff; }

/* Stats */
.stats-bar { border-radius: 14px; box-shadow: 0 1px 3px rgba(0, 26, 102, 0.06); border: 1px solid var(--border-color); position: relative; }
.stats-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.stat-num { color: var(--brand-navy); font-weight: 700; }
.stat-label { font-weight: 700; }

/* Section titles */
.guide-section h2, .top-section h2 { color: var(--brand-deep); font-weight: 700; padding-left: 10px; border-left: 4px solid var(--brand-lime); }
.guide-step { background: var(--brand-navy); }
.guide-card h4 { color: var(--brand-deep); }

/* Athlete cards (search results + "VĐV tiêu biểu") */
.card { border-radius: 14px; padding: 1.1rem 1.1rem 0.9rem; box-shadow: 0 1px 3px rgba(0, 26, 102, 0.06); }
.card:hover { border-color: var(--brand-blue); box-shadow: 0 8px 22px rgba(0, 44, 166, 0.14); }
.card-header { gap: 0.85rem; align-items: center; margin-bottom: 0.8rem; min-width: 0; }
.avatar-container { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 26, 102, 0.15); }
.avatar-container .avatar, .avatar-container .avatar-placeholder { width: 100%; height: 100%; border: none; border-radius: 0; display: block; object-fit: cover; }
/* The card template reuses .card-info for the name block: undo the meta-row styling it inherits */
.card-header .card-info { display: block; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: none; font-size: inherit; }
.card-name { font-size: 1.05rem; line-height: 1.25; color: var(--brand-deep); margin: 0 0 0.25rem; overflow-wrap: anywhere; padding-right: 1.6rem; }
.card-club { display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--brand-navy); background: #eef2fb; border-radius: 6px; padding: 0.15rem 0.5rem; margin: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rank-badge { top: 10px; right: 12px; opacity: 1; font-size: 1.05rem; color: var(--brand-navy); }
.card-meta { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-muted); padding: 0.6rem 0; border-top: 1px solid var(--border-color); }
.card-meta strong { color: var(--text-main); }
.card-medals { display: flex; justify-content: space-around; background: #f5f7fc; border-radius: 10px; padding: 0.5rem; margin: 0.2rem 0 0.7rem; }
.card-medals .medal-item { font-size: 1rem; font-weight: 700; color: var(--brand-deep); }
.card-footer { font-size: 0.78rem; }

.btn-load-more { background: var(--brand-navy); border-radius: 10px; }
.btn-load-more:hover { background: #0a3cc4; }
.spinner { border-color: rgba(1, 140, 240, 0.2); border-top-color: var(--brand-blue); }

/* ================= Profile page ================= */

.navbar { position: relative; background: linear-gradient(90deg, var(--brand-deep), var(--brand-navy)); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.navbar::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 4px; background: var(--stripe); border-radius: 4px 4px 0 0; }
.nav-link { color: #fff; font-weight: 700; }
.navbar .nav-link:hover { color: var(--brand-lime); }
.btn-share { background: var(--brand-lime); color: var(--brand-deep); font-weight: 700; border: none; }
.btn-share:hover { background: #79b51a; }
.message-box .nav-link { color: var(--brand-navy); }

.glass { background: #fff; border: 1px solid var(--border-color); box-shadow: 0 1px 3px rgba(0, 26, 102, 0.06); backdrop-filter: none; }
.hero { border-radius: 16px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--brand-lime); }
.hero-name { color: var(--brand-deep); font-weight: 700; }
.club-tag { background: var(--brand-navy); color: #fff; }
.hero-medals { color: var(--brand-deep); font-weight: 700; }

.tab-btn { font-weight: 700; color: var(--text-muted); }
.tab-btn.active { background: var(--brand-navy); color: #fff; }
.sub-tab-btn.active { color: var(--brand-navy); border-bottom-color: var(--brand-lime); }
.stroke-group { border-left-color: var(--brand-lime); }
.stroke-title { color: var(--brand-deep); }
th { color: var(--text-muted); background: #f5f7fc; font-weight: 700; }
.time-cell { font-family: 'UTM-Avo', monospace; font-weight: 700; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.badge-pb { background: var(--brand-lime); color: var(--brand-deep); font-weight: 700; }
.accordion-title { color: var(--brand-deep); }
.chart-select:focus { border-color: var(--brand-blue); }

@media (max-width: 600px) {
    body > header { padding: 1.8rem 1rem 2rem; }
    body > header h1 { font-size: 1.45rem; }
}
