:root {
    --primary: #1a365d;
    --accent: #e53e3e;
    --accent-light: #fc8181;
    --bg: #f7fafc;
    --card-bg: #ffffff;
    --text: #2d3748;
    --text-light: #5a6b80; /* darkened from #718096 to meet WCAG AA 4.5:1 on light backgrounds */
    --border: #e2e8f0;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
}
/* Base resets, layout, nav, hero, stats-row, stat-card base: MIGRATED to input.css + Tailwind classes */
/* Keep .hero-img for legacy usage */
.hero-img { max-width: 100%; border-radius: 12px; margin-top: 20px; box-shadow: 0 8px 30px rgba(0,0,0,0.3); max-height: 400px; object-fit: cover; }
/* Enhanced hover animations (not in Tailwind) */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover::before {
    transform: scaleX(1);
}

/* Enhanced table row hover */
tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
tbody tr:hover {
    background: linear-gradient(90deg, #edf2f7 0%, #e2e8f0 100%) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Enhanced badge hover effects */
.badge-dnf {
    background: linear-gradient(135deg, #fef5e7, #fefcbf);
    box-shadow: 0 2px 8px rgba(116, 66, 16, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.badge-dnf:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 66, 16, 0.3);
}
.sr-badge {
    box-shadow: 0 2px 8px rgba(214, 158, 46, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sr-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 158, 46, 0.5);
}
.pbp-badge {
    box-shadow: 0 2px 8px rgba(128, 90, 213, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.pbp-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.5);
}

/* Enhanced sortable column hover */
th.sortable:hover {
    background: rgba(255,255,255,0.15) !important;
    transform: translateY(-1px);
}
th.sortable:active {
    transform: translateY(0);
}
.frozen-table thead .frozen-col.sortable:hover { background: rgba(42, 74, 127, 1) !important; }

/* Enhanced frozen col hover */
.frozen-table tbody tr:hover .frozen-col {
    background: linear-gradient(90deg, #edf2f7 0%, #e2e8f0 100%);
}

/* Coach box (used by about + resources) */
.coach-box { background: linear-gradient(135deg, #faf5ff, #ebf8ff); border: 2px solid #805ad5; border-radius: 12px; padding: 24px; margin: 20px 0; scroll-margin-top: 240px; }
.coach-box h3 { color: #553c9a; margin-bottom: 10px; }

/* Resource Grid */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

/* Resource Cards */
.resource-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.resource-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}
.resource-card:hover::before {
    transform: scaleX(1);
}
.resource-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

/* Resource Badges */
.resource-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}
.resource-badge.video {
    background: linear-gradient(135deg, #e53e3e, #fc8181);
    color: white;
}
.resource-badge.pdf {
    background: linear-gradient(135deg, #dd6b20, #ed8936);
    color: white;
}
.resource-badge.blog {
    background: linear-gradient(135deg, #38b2ac, #4fd1c5);
    color: white;
}
.resource-badge.guide {
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    color: white;
}
.resource-badge.tool {
    background: linear-gradient(135deg, #805ad5, #b794f4);
    color: white;
}
.resource-badge.product {
    background: linear-gradient(135deg, #d69e2e, #f6ad55);
    color: white;
}

/* Team Badge */
.team-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    color: white;
    margin-bottom: 12px;
    margin-left: 6px;
}

/* Resource Link */
.resource-link {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.resource-link:hover {
    color: var(--accent);
}

/* Resource Description */
.resource-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Gear Section */
.gear-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.gear-category {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}
.gear-category:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.gear-category-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}
.gear-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gear-item {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 0;
    transition: all 0.2s;
    display: inline-block;
}
.gear-item:hover {
    color: var(--accent);
    transform: translateX(4px);
}
.gear-item-text {
    color: var(--text);
    font-weight: 500;
    padding: 6px 0;
    display: block;
}

/* Checklist Grid */
.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.checklist-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}
.checklist-card:hover {
    border-left-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.checklist-title {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.checklist-card p {
    color: var(--text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Clubs Grid */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.club-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.club-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: transform 0.3s ease;
    transform: scaleY(0);
    transform-origin: top;
}
.club-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.club-card:hover::before {
    transform: scaleY(1);
}
.club-card.sfr::before { background: #e74c3c; }
.club-card.dbc::before { background: #2ecc71; }
.club-card.scr::before { background: #3498db; }
.club-card.rusa::before { background: #ff6b00; }
.club-name {
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.club-desc {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}
.club-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.club-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Section Navigation Bar (Resources page) */
.section-nav-bar-inner {
    background: var(--card-bg);
    border-bottom: 2px solid var(--border);
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.section-nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}
.section-nav-item {
    color: var(--text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    background: var(--bg);
    border: 1px solid var(--border);
}
.section-nav-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Section Headers (Resources page) */
.section-header {
    text-align: center;
    margin: 50px 0 30px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    scroll-margin-top: 240px;
}
.section-title {
    color: var(--primary);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent);
    display: inline-block;
}
.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 10px;
}

/* Tab styling (keep - used by multiple pages) */
.tab-btn { flex: 1; padding: 10px 16px; font-size: 0.85rem; font-weight: 600; border: 2px solid var(--border); border-bottom: none; border-radius: 8px 8px 0 0; cursor: pointer; background: var(--card-bg); color: var(--text-light); transition: all 0.2s; }
.tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-panel { border: 2px solid var(--primary); border-radius: 0 0 8px 8px; }

@media (max-width: 640px) {
    .tab-btn { padding: 8px 10px; font-size: 0.78rem; }
    .coach-box { padding: 16px; }
    #feedback-modal > div { width: 95%; padding: 20px; }
    .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* About Page Redesign */
.intro-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.intro-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}
.intro-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
}
.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    max-width: 900px;
    margin: 0 auto;
}

/* BRM Distance Cards */
.brm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.brm-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    border: 2px solid var(--border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.brm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: left;
}
.brm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.brm-card:hover::before {
    transform: scaleX(1);
}
.brm-card.brm-200::before { background: linear-gradient(90deg, #48bb78, #68d391); }
.brm-card.brm-200:hover { border-color: #48bb78; }
.brm-card.brm-300::before { background: linear-gradient(90deg, #4299e1, #63b3ed); }
.brm-card.brm-300:hover { border-color: #4299e1; }
.brm-card.brm-400::before { background: linear-gradient(90deg, #ed8936, #f6ad55); }
.brm-card.brm-400:hover { border-color: #ed8936; }
.brm-card.brm-600::before { background: linear-gradient(90deg, #e53e3e, #fc8181); }
.brm-card.brm-600:hover { border-color: #e53e3e; }
.brm-card.brm-1000::before { background: linear-gradient(90deg, #805ad5, #b794f4); }
.brm-card.brm-1000:hover { border-color: #805ad5; }
.brm-card.brm-1200::before { background: linear-gradient(90deg, #d53f8c, #f687b3); }
.brm-card.brm-1200:hover { border-color: #d53f8c; }
.brm-distance {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.brm-unit {
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 4px;
}
.brm-time {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}
.brm-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #ebf8ff, #e9d8fd);
    border-left: 4px solid var(--primary);
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
}
.info-box p {
    margin: 0;
    line-height: 1.7;
    font-size: 1.05rem;
}

/* SR Highlight */
.sr-highlight {
    background: linear-gradient(135deg, #fef5e7, #fefcbf);
    border: 3px solid #d69e2e;
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
}
.sr-content {
    display: flex;
    gap: 30px;
    align-items: center;
}
.sr-badge-large {
    background: linear-gradient(135deg, #d69e2e, #f6ad55);
    color: white;
    font-size: 3rem;
    font-weight: 800;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(214, 158, 46, 0.3);
}
.sr-text {
    flex: 1;
}
.sr-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}
.sr-description {
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.05rem;
}
.sr-requirements {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.sr-req {
    background: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--primary);
    border: 2px solid #d69e2e;
}

/* PBP Hero */
.pbp-hero {
    background: linear-gradient(135deg, #f7fafc 0%, #e6fffa 100%);
    border: 3px solid #805ad5;
    border-radius: 16px;
    padding: 40px;
    margin: 30px 0;
}
.pbp-main {
    margin-bottom: 30px;
}
.pbp-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}
.pbp-description {
    line-height: 1.7;
    font-size: 1.05rem;
}
.pbp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.pbp-stat {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}
.pbp-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.pbp-stat.highlight {
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
    border-color: #ff6b00;
}
.pbp-stat.highlight .pbp-stat-number,
.pbp-stat.highlight .pbp-stat-label {
    color: white;
}
.pbp-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
}
.pbp-stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Achievement Banner */
.achievement-banner {
    background: linear-gradient(135deg, #faf5ff, #e9d8fd);
    border: 2px solid #805ad5;
    border-radius: 12px;
    padding: 24px 30px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}
.achievement-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.achievement-banner p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.feature-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--accent);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}
.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.feature-desc {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Team Info */
.team-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 30px 0;
}
.team-section {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 30px;
}
.team-section.purpose-section {
    background: linear-gradient(135deg, #fff5f5, #fed7d7);
    border-color: #fc8181;
}
.team-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}
.team-section-text {
    line-height: 1.7;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

/* Clubs List */
.clubs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0;
}
.club-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: white;
    transition: all 0.2s;
}
.club-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.club-badge.sfr {
    background: linear-gradient(135deg, #e74c3c, #ec7063);
}
.club-badge.dbc {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
}
.club-badge.scr {
    background: linear-gradient(135deg, #3498db, #5dade2);
}

/* Purpose Highlight */
.purpose-highlight {
    background: white;
    border: 2px solid #fc8181;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}
.purpose-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
.purpose-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.5;
}

/* Mobile adjustments for About page */
@media (max-width: 768px) {
    .intro-card { padding: 20px; }
    .intro-title { font-size: 1.4rem; }
    .intro-text { font-size: 0.95rem; }
    .sr-content {
        flex-direction: column;
        text-align: center;
    }
    .sr-highlight { padding: 20px; }
    .sr-badge-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    .sr-title { font-size: 1.3rem; }
    .pbp-hero { padding: 20px; }
    .pbp-title { font-size: 1.3rem; }
    .pbp-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .pbp-stat { padding: 14px; }
    .pbp-stat-number { font-size: 1.8rem; }
    .brm-distance { font-size: 1.8rem; }
    .brm-card { padding: 16px 14px; }
    .feature-card { padding: 20px; }
    .feature-icon { font-size: 2rem; }
    .feature-title { font-size: 1rem; }
    .team-section { padding: 20px; }
    .achievement-banner { flex-direction: column; text-align: center; padding: 16px; }
    .clubs-list {
        flex-direction: column;
    }
    .club-badge {
        text-align: center;
    }
    .section-header { margin: 30px 0 20px; padding: 20px 15px; scroll-margin-top: 180px; }
    .section-title { font-size: 1.3rem; }
    .section-nav-item { padding: 6px 10px; font-size: 0.78rem; }
    .resource-grid { gap: 12px; }
    .gear-section { gap: 12px; }
    .checklist-grid { gap: 12px; }
    .clubs-grid { gap: 12px; }
    .club-card { padding: 16px; }
}

/* --- Accessibility: visible keyboard focus (WCAG 2.4.7) --- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}
/* On the dark gradient header, use a light ring so focus stays visible */
header :focus-visible {
    outline-color: #ffffff;
}

/* --- Accessibility: respect reduced-motion (WCAG 2.3.3 / 2.2.2) --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
