/* Race Information Page Styles */

/* CSS Variables (if not already in base) */
:root {
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --orange-500: #f97316;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
}

/* Page Header */
.page-header {
    padding-top: 120px;
    padding-bottom: 60px;
    background: linear-gradient(135deg, var(--gray-900) 0%, #1a1a2e 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-header h1 {
    font-family: 'Racing Sans One', cursive;
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 4rem;
    }
}

.page-header p {
    font-size: 1.25rem;
    color: var(--gray-400);
    max-width: 600px;
    margin: 0 auto;
}

.page-header-highlight {
    color: var(--amber-400);
}

/* UCI Stripe */
.uci-stripe {
    height: 4px;
    background: linear-gradient(90deg,
        #0033A0 0%, #0033A0 20%,
        #C8102E 20%, #C8102E 40%,
        #000000 40%, #000000 60%,
        #FFD100 60%, #FFD100 80%,
        #009639 80%, #009639 100%
    );
}

/* Tab Navigation */
.tab-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 76px;
    z-index: 50;
}

.tab-nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.tab-link {
    padding: 1.25rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.tab-link:hover {
    color: var(--gray-800);
    background: var(--gray-50);
}

.tab-link.active {
    color: var(--red-600);
    border-bottom-color: var(--red-600);
}

/* Content Sections */
.section {
    padding: 5rem 1.5rem;
}

.section-gray {
    background: var(--gray-50);
}

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--red-600), var(--red-700));
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.section-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.section-icon.amber {
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.section-icon.green {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--red-600);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.section-title {
    font-family: 'Racing Sans One', cursive;
    font-size: 2.5rem;
    letter-spacing: 0.02em;
    color: var(--gray-800);
}

/* Track Section Styles */
.track-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.track-tab {
    padding: 1rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 1rem;
}

.track-tab:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.track-tab.active {
    border-color: var(--red-600);
    background: var(--red-600);
    color: var(--white);
}

.track-tab .distance {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 0.25rem;
}

.track-content {
    display: none;
}

.track-content.active {
    display: block;
}

.track-info-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .track-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.track-info-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.track-info-card .icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.track-info-card .value {
    font-family: 'Racing Sans One', cursive;
    font-size: 1.75rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.track-info-card .label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.track-map-container {
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 2rem;
}

.track-map-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.track-map-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.track-map-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.start { background: var(--green-500); }
.legend-dot.finish { background: var(--red-600); }
.legend-dot.feed { background: var(--blue-500); }
.legend-dot.checkpoint { background: var(--amber-500); }

.track-map {
    height: 450px;
    background: #f0f0f0;
    position: relative;
}

.track-map .leaflet-control-attribution {
    font-size: 10px;
}

/* Elevation Profile */
.elevation-container {
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 2rem;
}

.elevation-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.elevation-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.elevation-profile {
    padding: 2rem;
    background: var(--gray-50);
}

.elevation-svg {
    width: 100%;
    height: 200px;
}

.elevation-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

@media (min-width: 640px) {
    .elevation-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.elevation-stat {
    text-align: center;
}

.elevation-stat .stat-value {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.elevation-stat .stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Checkpoints */
.checkpoints-container {
    background: var(--white);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 2rem;
}

.checkpoints-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.checkpoints-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
}

.checkpoints-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.checkpoint-item {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    gap: 1rem;
}

.checkpoint-item:last-child {
    border-bottom: none;
}

.checkpoint-km {
    width: 60px;
    height: 60px;
    background: var(--gray-100);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkpoint-km .km {
    font-family: 'Racing Sans One', cursive;
    font-size: 1.25rem;
    color: var(--gray-800);
}

.checkpoint-km .label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.checkpoint-km.start {
    background: var(--green-500);
}

.checkpoint-km.start .km,
.checkpoint-km.start .label {
    color: var(--white);
}

.checkpoint-km.finish {
    background: var(--red-600);
}

.checkpoint-km.finish .km,
.checkpoint-km.finish .label {
    color: var(--white);
}

.checkpoint-km.feed {
    background: var(--blue-500);
}

.checkpoint-km.feed .km,
.checkpoint-km.feed .label {
    color: var(--white);
}

.checkpoint-info {
    flex: 1;
}

.checkpoint-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 0.25rem 0;
}

.checkpoint-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

.checkpoint-elevation {
    text-align: right;
    flex-shrink: 0;
}

.checkpoint-elevation .alt {
    font-weight: 700;
    color: var(--gray-800);
}

.checkpoint-elevation .label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* GPX Download */
.gpx-download {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.gpx-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--gray-800);
    color: var(--white);
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.gpx-btn:hover {
    background: var(--gray-900);
    transform: translateY(-2px);
}

.gpx-btn.strava {
    background: #fc4c02;
}

.gpx-btn.strava:hover {
    background: #e34402;
}

/* Regulations Section */
.regulations-grid {
    display: grid;
    gap: 1.5rem;
}

.regulation-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.regulation-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-color: var(--gray-300);
}

.regulation-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.regulation-card h3 .icon {
    font-size: 1.25rem;
}

.regulation-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.regulation-card li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.regulation-card li::before {
    content: '✓';
    color: var(--green-600);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.regulation-card.warning li::before {
    content: '⚠';
    color: var(--amber-500);
}

.regulation-card.important li::before {
    content: '!';
    color: var(--red-600);
    background: rgba(220, 38, 38, 0.1);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Download Section */
.download-section {
    background: var(--gray-100);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .download-section {
        flex-direction: row;
        text-align: left;
    }
}

.download-icon {
    width: 60px;
    height: 60px;
    background: var(--red-600);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.download-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.download-info {
    flex: 1;
}

.download-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0 0 0.25rem 0;
}

.download-info p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
}

.download-btn {
    background: var(--gray-800);
    color: var(--white);
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.download-btn:hover {
    background: var(--gray-900);
}

/* Schedule Section */
.schedule-container {
    position: relative;
}

.schedule-date-card {
    background: linear-gradient(135deg, var(--red-600), var(--red-700));
    color: var(--white);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.schedule-date-card h3 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
    margin: 0 0 0.5rem 0;
}

.schedule-date {
    font-family: 'Racing Sans One', cursive;
    font-size: 2.5rem;
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .schedule-date {
        font-size: 3rem;
    }
}

.schedule-location {
    margin-top: 0.5rem;
    opacity: 0.9;
}

.schedule-timeline {
    position: relative;
    padding-left: 2rem;
}

.schedule-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.schedule-item {
    position: relative;
    padding-bottom: 2rem;
    padding-left: 2rem;
}

.schedule-item:last-child {
    padding-bottom: 0;
}

.schedule-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 4px;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 3px solid var(--red-600);
    border-radius: 50%;
    z-index: 1;
}

.schedule-item.highlight::before {
    background: var(--red-600);
    border-color: var(--red-600);
    width: 20px;
    height: 20px;
    left: calc(-2rem - 2px);
}

.schedule-time {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--red-600);
    margin-bottom: 0.25rem;
}

.schedule-event {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.schedule-details {
    font-size: 0.9rem;
    color: var(--gray-500);
}

.schedule-day-divider {
    position: relative;
    padding: 1.5rem 0 1.5rem 2rem;
    margin-left: -2rem;
}

.schedule-day-divider h4 {
    background: var(--amber-400);
    color: var(--gray-900);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    display: inline-block;
    margin: 0;
}

/* Prizes Section */
.prizes-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .prizes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.prize-card {
    background: var(--white);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--gray-200);
    position: relative;
    transition: all 0.3s;
}

.prize-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.prize-card.gold {
    border-color: #fbbf24;
    background: linear-gradient(180deg, #fffbeb 0%, var(--white) 100%);
}

.prize-card.silver {
    border-color: #94a3b8;
    background: linear-gradient(180deg, #f8fafc 0%, var(--white) 100%);
}

.prize-card.bronze {
    border-color: #d97706;
    background: linear-gradient(180deg, #fffbeb 0%, var(--white) 100%);
}

.prize-position {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-family: 'Racing Sans One', cursive;
    font-size: 1.5rem;
    color: var(--white);
}

.prize-card.gold .prize-position {
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.prize-card.silver .prize-position {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.prize-card.bronze .prize-position {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.prize-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.prize-amount {
    font-family: 'Racing Sans One', cursive;
    font-size: 2.5rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.prize-extras {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.prize-extras li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Age Category Prizes */
.age-prizes {
    margin-top: 3rem;
    background: var(--gray-800);
    border-radius: 1.5rem;
    padding: 2rem;
    color: var(--white);
}

.age-prizes h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.age-prizes-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .age-prizes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.age-prize-item {
    background: rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.age-prize-item h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: var(--amber-400);
}

.age-prize-item p {
    font-size: 0.875rem;
    color: var(--gray-300);
    margin: 0;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}