/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #E85D04;
    --primary-dark: #C24D02;
    --primary-light: #FF8534;
    --secondary: #0F172A;
    --text: #1E293B;
    --text-muted: #64748B;
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --border: #E2E8F0;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.08), 0 12px 32px rgba(0,0,0,0.1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
img { max-width: 100%; }

/* ===== NAVIGATION ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--secondary);
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1rem, 4vw, 3rem);
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: white;
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.nav-brand .brand-icon { font-size: 1.375rem; }
.nav-brand .brand-accent { color: var(--primary-light); }

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.dropdown-toggle .chevron {
    font-size: 0.65rem;
    transition: transform 0.2s;
}

.nav-dropdown:hover .chevron { transform: rotate(180deg); }

.dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 240px;
    padding: 0.5rem;
}

.nav-dropdown:hover .dropdown-panel { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    color: var(--text);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: var(--bg-alt);
    color: var(--primary);
}

.dropdown-item .item-icon {
    font-size: 1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== HERO ===== */
.hero {
    background: var(--secondary);
    position: relative;
    overflow: hidden;
    padding: 7rem clamp(1rem, 4vw, 3rem);
    text-align: center;
    color: white;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 60%, rgba(232,93,4,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(79,70,229,0.12) 0%, transparent 50%);
}

.hero-inner {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(232,93,4,0.15);
    border: 1px solid rgba(232,93,4,0.3);
    color: #FF8534;
    border-radius: 99px;
    padding: 0.375rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero h1 em {
    color: var(--primary-light);
    font-style: normal;
}

.hero .hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.65);
    max-width: 500px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.625rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,93,4,0.35);
}

.btn-ghost {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.25);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.45);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* ===== PAGE HEADER ===== */
.page-hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e2a4a 100%);
    padding: 4.5rem clamp(1rem, 4vw, 3rem);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(232,93,4,0.1) 0%, transparent 60%);
}

.page-hero .eyebrow {
    display: inline-block;
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    position: relative;
}

.page-hero h1 {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.875rem;
    position: relative;
}

.page-hero p {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

/* ===== LAYOUT ===== */
.section {
    padding: 5rem clamp(1rem, 4vw, 3rem);
}

.section-alt { background: var(--bg-alt); }

.container {
    max-width: 1100px;
    margin: 0 auto;
}

.section-heading {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-heading h2 {
    font-size: clamp(1.625rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
    margin-bottom: 0.875rem;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== CARDS ===== */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.25s;
    display: block;
    color: inherit;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    border-color: transparent;
}

.card-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(232,93,4,0.08), rgba(232,93,4,0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-primary {
    background: rgba(232,93,4,0.1);
    color: var(--primary);
}

.tag-muted {
    background: rgba(100,116,139,0.1);
    color: var(--text-muted);
}

/* ===== COACHING PLANS ===== */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.75rem;
    transition: all 0.25s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.plan-card.featured {
    border-color: var(--primary);
    border-width: 2px;
}

.plan-badge {
    position: absolute;
    top: 0;
    right: 1.5rem;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 0 0 6px 6px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.plan-icon { font-size: 2.5rem; margin-bottom: 1rem; }

.plan-name {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.plan-tagline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}

.plan-divider {
    height: 1px;
    background: var(--border);
    margin-bottom: 1.25rem;
}

.plan-coming {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== TEAM ===== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.team-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.25s;
}

.team-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.team-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.25rem;
    box-shadow: 0 0 0 4px rgba(232,93,4,0.15);
}

.team-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.team-role {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ===== RACE CALENDAR ===== */
.calendar-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.filter-chip {
    padding: 0.5rem 1rem;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.filter-chip:hover,
.filter-chip.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(232,93,4,0.06);
}

.filter-select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1.5px solid var(--border);
    background: white;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s;
}

.filter-select:focus { border-color: var(--primary); }

.filter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-right: 0.25rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
    background: white;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.35;
    display: block;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.95rem;
    max-width: 380px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ===== ABOUT / STORY ===== */
.story-block {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    border-left: 4px solid var(--primary);
}

.story-block p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
    font-style: italic;
}

/* ===== EXPERTISE SIDEBAR ===== */
.expertise-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

.expertise-sidebar {
    position: sticky;
    top: 84px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    overflow: hidden;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(232,93,4,0.08);
    color: var(--primary);
}

/* ===== FOOTER ===== */
footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.55);
    padding: 3.5rem clamp(1rem, 4vw, 3rem) 2rem;
}

.footer-inner { max-width: 1100px; margin: 0 auto; }

.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 2rem;
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.875rem;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 260px;
}

.footer-col h4 {
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-col a {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
    transition: color 0.15s;
}

.footer-col a:hover { color: white; }

.footer-bottom {
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 1rem;
    justify-content: center;
    position: relative;
}

.breadcrumb a { color: rgba(255,255,255,0.6); transition: color 0.15s; }
.breadcrumb a:hover { color: white; }
.breadcrumb .sep { opacity: 0.4; }

/* ===== LIVE RACE CALENDAR ===== */

/* Status bar */
.calendar-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    margin-right: 0.4rem;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    background: white;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-refresh:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-refresh.spinning .refresh-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Events list */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Individual event card */
.event-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.125rem 1.375rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s;
}

.event-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: transparent;
}

/* Date badge */
.event-date {
    text-align: center;
    background: var(--bg-alt);
    border-radius: 8px;
    padding: 0.625rem 0.75rem;
    min-width: 58px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.event-date .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.event-date .month {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 0.1rem;
}

.event-date .year {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Event body */
.event-info { flex: 1; min-width: 0; }

.event-title {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.event-location { display: flex; align-items: center; gap: 0.25rem; }

.event-distances {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.event-price {
    font-weight: 600;
    color: var(--text-muted);
}

.event-source {
    font-size: 0.72rem;
    color: rgba(100,116,139,0.6);
    margin-left: auto;
}

/* Register button */
.event-actions { flex-shrink: 0; }

/* Loading skeleton */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.skeleton-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.125rem 1.375rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.skeleton-block {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .expertise-layout { grid-template-columns: 1fr; }
    .expertise-sidebar { position: static; }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-menu { display: none; }
    .hero { padding: 4.5rem 1.25rem; }
    .section { padding: 3.5rem 1.25rem; }
    .footer-top { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .plan-grid { grid-template-columns: 1fr; }
}
