/* Audax UAE — BRM Registration Platform Styles */

:root {
    --primary: #1a5f3a;
    --primary-light: #2d8a5e;
    --primary-dark: #0f3d25;
    --accent: #d4a017;
    --accent-light: #f0c030;
    --bg: #fafbfc;
    --bg-alt: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-muted: #5a5a7a;
    --border: #e0e4e8;
    --danger: #d32f2f;
    --success: #2e7d32;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --max-width: 1200px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header / Navigation */
.site-header {
    background: var(--primary-dark);
    color: white;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}

.logo-img {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex: 1;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.nav-auth {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-align: center;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-accent {
    background: var(--accent);
    color: var(--text);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-outline:hover {
    border-color: white;
    color: white;
}

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

.btn-text {
    background: none;
    color: rgba(255, 255, 255, 0.7);
}

.btn-text:hover {
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Main Content */
.main-content {
    flex: 1;
}

.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.section-narrow {
    max-width: 720px;
}

.section-alt {
    background: var(--bg-alt);
    max-width: none;
    padding: 3rem 1rem;
}

.section-alt > * {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.page-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
}

.section-action {
    margin-top: 1.5rem;
    text-align: center;
}

.section-action .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero-description {
    opacity: 0.8;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

.event-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.event-card:hover {
    box-shadow: var(--shadow-lg);
}

.event-distance {
    padding: 0.75rem 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: var(--primary);
}

.event-info {
    padding: 1rem;
}

.event-info h3 {
    margin-bottom: 0.5rem;
}

.event-date, .event-location, .event-slots {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.event-info .btn {
    margin-top: 0.75rem;
}

/* Distance colors */
.distance-200 { background: #2196F3; }
.distance-300 { background: #4CAF50; }
.distance-400 { background: #FF9800; }
.distance-600 { background: #F44336; }
.distance-1000 { background: #9C27B0; }

.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.info-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.results-table th,
.results-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.results-table th {
    background: var(--bg-alt);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.results-table tbody tr:hover {
    background: var(--bg-alt);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-upcoming { background: #e3f2fd; color: #1565c0; }
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-completed { background: #f3e5f5; color: #7b1fa2; }
.status-cancelled { background: #fbe9e7; color: #d32f2f; }
.status-finished { background: #e8f5e9; color: #2e7d32; }
.status-dnf { background: #fff3e0; color: #ef6c00; }
.status-dns { background: #eceff1; color: #546e7a; }

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Detail Card */
.detail-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.detail-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
}

.detail-list dt {
    font-weight: 600;
    color: var(--text-muted);
}

/* Event Detail */
.event-detail-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.event-distance-large {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
}

.event-meta {
    color: var(--text-muted);
}

.event-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.reg-count {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.reg-status {
    margin-bottom: 1rem;
}

.reg-confirmed {
    color: var(--success);
    font-weight: 600;
}

.rider-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.rider-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.rider-emirate {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Forms */
.form-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-section-title {
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
    color: var(--primary-dark);
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-muted);
}

.form-static {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #fce4e4;
    color: var(--danger);
    border: 1px solid #f5c6c6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Profile Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* SR Card */
.sr-card { border-left: 4px solid var(--accent); }
.sr-progress {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.sr-badge {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.sr-done {
    background: var(--success);
    color: white;
}

.sr-pending {
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 2px dashed var(--border);
}

.sr-achieved {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}

.sr-note {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin Actions */
.admin-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.admin-actions .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

/* Clubs Grid */
.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.club-card {
    background: var(--bg-alt);
    padding: 1.25rem;
    border-radius: var(--radius);
}

/* Content Body */
.content-body h2 {
    margin: 2rem 0 0.75rem;
    color: var(--primary-dark);
}

.content-body h2:first-child {
    margin-top: 0;
}

.content-body ul, .content-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-body li {
    margin-bottom: 0.4rem;
}

.content-body p {
    margin-bottom: 1rem;
}

/* News */
.news-list {
    display: grid;
    gap: 1.5rem;
}

.news-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.news-item h3 {
    margin-bottom: 0.25rem;
}

.news-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 1rem 1rem;
    margin-top: auto;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 0.75rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links,
    .nav-auth {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 1rem;
    }

    .nav-links.active,
    .nav-auth.active {
        display: flex;
    }

    .nav-auth.active {
        top: auto;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .event-detail-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}


/* Merchandise */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.merch-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow 0.2s;
}

.merch-card:hover {
    box-shadow: var(--shadow-lg);
}

.merch-image {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.merch-card h3 {
    margin-bottom: 0.5rem;
}

.merch-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.merch-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.merch-notice {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 2rem;
}

.merch-notice h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

.merch-notice p {
    margin-bottom: 0.75rem;
}


/* Social Links */
.social-links {
    margin-top: 0.75rem;
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.social-links a:hover {
    color: white;
}

.social-links-large {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-alt);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: var(--text);
    font-weight: 500;
    transition: box-shadow 0.2s;
}

.social-card:hover {
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.social-icon {
    font-size: 1.5rem;
}


/* FAQ */
.faq-section {
    margin-bottom: 2.5rem;
}

.faq-section h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.faq-item {
    background: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1rem 1.25rem;
    margin: 0;
    font-size: 1rem;
    color: var(--primary-dark);
    cursor: default;
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer ul, .faq-answer ol {
    margin-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.faq-answer li {
    margin-bottom: 0.4rem;
}

.faq-answer table {
    margin-top: 0.5rem;
}

.faq-contact {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
}

.faq-contact h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}
