/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: rgb(90, 121, 209);
    --secondary: #10b981;
    --secondary-dark: #10a674;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

  html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%),
                url('../img/og-img.jpg') center/cover no-repeat fixed;
    opacity: 0.15;
    z-index: -1;
}

/* Header */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.logo:hover {
    transform: translateY(-1px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.logo-name span {
    color: var(--secondary);
}

.logo-tagline {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.user-nav a {
    margin-left: 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s;
}

.user-nav a:hover {
    color: var(--primary);
}

.user-nav-user a {
    margin: 0, 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    color: var(--primary);
}

.user-nav-user a:hover {
    color: var(--secondary);
}

/* -- Notification Bell ------------------------------------------ */

.notif-bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell-btn {
    position: relative;
    display: inline-flex;
    padding-top: 5px; 
    align-items: center;
    align-self: center;
    vertical-align: middle;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    color: var(--text-dark);
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.notif-bell-btn:hover,
.notif-bell-btn[aria-expanded="true"] {
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    transition: transform 0.2s;
}

.notif-badge--hidden {
    display: none;
}

/* -- Notification Overlay & Panel -------------------------------- */

.notif-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notif-overlay.active {
    display: block;
    opacity: 1;
}

.notif-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s ease;
}

.notif-panel:not([hidden]) {
    transform: translateX(0);
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notif-panel-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.notif-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    color: var(--text-light);
    transition: background 0.2s, color 0.2s;
    display: flex;
}

.notif-close-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

/* -- Notification Loading State ----------------------------------- */

.notif-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.notif-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: notifSpin 0.7s linear infinite;
}

@keyframes notifSpin {
    to { transform: rotate(360deg); }
}

/*-- Notification Sections ---------------------------------------- */

.notif-section {
    padding: 0 0 0.5rem 0;
}

.notif-section + .notif-section {
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.notif-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-light);
    padding: 0.5rem 1.5rem 0.25rem;
}

/* ── Individual Notification Items ──────────────────────────────────────── */

.notif-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    border-left: 3px solid transparent;
    gap: 0.75rem;
}

.notif-section a:hover {
    color: var(--primary);
    
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-dark);
    white-space: normal;
}

.notif-item-meta {
    font-size: 0.775rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    line-height: 1.4;
}

.notif-item-terrain {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
    margin-right: 0.35rem;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.terrain-fell    { background: #fef3c7; color: #92400e; }
.terrain-trail   { background: #d1fae5; color: #065f46; }
.terrain-road    { background: #dbeafe; color: #1e40af; }
.terrain-mixed   { background: #ede9fe; color: #5b21b6; }

/* ── Countdown Badge ─────────────────────────────────────────────────────── */

.notif-countdown-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
    flex-shrink: 0;
}

/*-- Empty / Nudge States ----------------------------------------- */

.notif-empty {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.notif-nudge {
    margin: 0.75rem 1.5rem;
    padding: 0.875rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.notif-nudge-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.notif-nudge-text {
    font-size: 0.825rem;
    color: #92400e;
    line-height: 1.4;
}

.notif-nudge-link {
    display: inline-block;
    margin-top: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.notif-nudge-link:hover {
    text-decoration: underline;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

/* Hint bar above the ghost buttons */
.locked-actions-wrap {
    margin-bottom: 1rem;
}

.locked-actions-hint {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.locked-actions-hint svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--text-light);
}

.locked-signin-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.locked-signin-link:hover {
    text-decoration: underline;
}

.locked-actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Wrapper needed to position the tooltip */
.locked-btn-wrapper {
    position: relative;
    display: inline-flex;
}

/* Ghost locked button — same size/shape as real buttons, visually muted */
.locked-btn {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none; /* disable click entirely */
    filter: grayscale(0.3);
}

/* Re-enable pointer events on the wrapper so the tooltip shows on hover */
.locked-btn-wrapper {
    pointer-events: auto;
}

.locked-btn-wrapper:hover .locked-btn,
.locked-btn-wrapper:focus-within .locked-btn {
    opacity: 0.65;
}

/* Lock icon inside locked buttons */
.locked-btn-icon {
    width: 15px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.3rem;
    flex-shrink: 0;
}

/* Tooltip — appears above the button on hover/focus */
.locked-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: auto; /* allow clicking the sign-in link inside tooltip */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 10;
}

/* Tooltip arrow */
.locked-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--text-dark);
}

.locked-btn-wrapper:hover .locked-tooltip,
.locked-btn-wrapper:focus-within .locked-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Locked textarea */
.locked-textarea {
    opacity: 0.5;
    cursor: not-allowed !important;
    background: var(--bg-light);
    resize: none;
}

/* Locked star rating */
.star-rating-locked .star {
    color: var(--border);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Locked notes section — subtle visual difference from active notes */
.notes-section-locked {
    opacity: 0.85;
}

.notes-section-locked .notes-header h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-light);
}

.notes-section-locked .notes-header h3 .locked-btn-icon {
    color: var(--text-light);
    margin-right: 0;
}

.nudge-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    padding: 0.75rem 1rem;
    position: relative;
    border-radius: 12px;
    margin-bottom: 1rem; 
}

.nudge-bar__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-right: 2.5rem; /* space for dismiss button */
}

.nudge-bar__message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.nudge-bar__icons {
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nudge-bar__text {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.95;
}

.nudge-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nudge-bar__cta {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.nudge-bar__cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nudge-bar__cta--primary {
    background: #fff;
    color: var(--primary);
}

.nudge-bar__cta--secondary {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.nudge-bar__cta--secondary:hover {
    border-color: #fff;
}

.nudge-bar__dismiss {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.15s ease;
}

.nudge-bar__dismiss:hover {
    color: #fff;
}

/* Smooth collapse on dismiss */
.nudge-bar.is-hidden {
    display: none;
}

.privacy-list {
    padding-left: 40px;
    
}

/* Hero Introduction */
.hero-intro {
   padding-top: 1rem;
}

.hero-intro h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-intro p {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.5;
    max-width: 900px;
}

.hero-intro img {
    float: right;
    padding-left: 50px;
}

.privacy-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.privacy-card p {
    margin-bottom: 1.5rem;
}

/* Make the image responsive and stack nicely on mobile */
.privacy-card img {
    max-width: 100%;
    height: 500px;
    float: right;
}

.privacy-list {
    padding-left: 40px;
    
}

/* Featured Races Section */
.featured-races-section {
    margin-bottom: 1rem;
}

.featured-races-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.featured-races-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.featured-races-header .featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge svg {
    width: 14px;
    height: 14px;
}

.featured-races-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.featured-race-card {
    position: relative;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.featured-race-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-race-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 1;
}

.featured-race-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.featured-race-content {
    position: relative;
    z-index: 2;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.featured-race-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.featured-race-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    text-align: center;
}

.featured-race-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 0.875rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.featured-race-meta svg {
    width: 16px;
    height: 16px;
}

.featured-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* ── Category browse bar labels ──────────────────────────────────────────── */
.filter-bar__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    align-self: center;
    white-space: nowrap;
}

/* terrain-btn as <a> — reset link styles to match button appearance */
a.terrain-btn {
    text-decoration: none;
    color: var(--text-dark);
}
a.terrain-btn svg {
    color: var(--text-dark);
    stroke: currentColor;
}

/* Terrain Filter Bar */
.filter-bar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
}

.terrain-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.terrain-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.terrain-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.terrain-btn svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}

.terrain-btn.active svg {
    stroke: white;
}

/* Search and Sort Bar */
.search-sort-bar {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-container {
    flex: 1;
    min-width: 200px;
    max-width: 350px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.sort-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.sort-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 1.5rem;
}
 
.breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-light);
}
 
.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}
 
.breadcrumb a:hover {
    text-decoration: underline;
}
 
.breadcrumb__sep {
    color: var(--text-light);
    font-size: 0.75rem;
}
 
/* Category hero */
.category-hero {
    padding-top: 0.1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}
 
.category-hero__badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}
 
.category-hero__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.75rem;
    line-height: 1.2;
}
 
.category-hero__description {
    color: var(--text-light);
    max-width: 680px;
    line-height: 1.6;
    margin: 0 0 0.75rem;
}
 
.category-hero__count {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}
 
.category-hero__count strong {
    color: var(--text-dark);
    font-weight: 600;
}
 
/* County filter links */
.category-counties {
    margin-bottom: 2rem;
}
 
.category-counties__heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
}
 
.category-counties__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
 
.category-county-link {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-dark);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
 
.category-county-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
 
.category-county-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
 
/* Empty state */
.category-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}
 
.category-empty p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
 
/* Sibling terrain links */
.category-siblings {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
 
.category-siblings__heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
}
 
.category-siblings__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
 
.category-sibling-link {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-white);
    border: 1px solid var(--border);
    color: var(--text-dark);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}
 
.category-sibling-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-recommend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-recommend:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-recommend svg {
    width: 20px;
    height: 20px;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: 8px;
    margin-left: 170px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-light);
}

.view-btn:hover {
    background: var(--bg-white);
    color: var(--text-dark);
}

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

.view-btn svg {
    width: 20px;
    height: 20px;
}

/* Time Filter Toggle */
.time-filter-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: 8px;
}

.time-filter-toggle .view-btn {
    padding: 0.625rem 1rem;
    min-width: 80px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Recommend Filters Panel */
.recommend-filters {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recommend-header {
    margin-bottom: 2rem;
    text-align: center;
}

.recommend-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.recommend-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.recommend-filter-group {
    display: flex;
    flex-direction: column;
}

.recommend-filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.recommend-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.recommend-actions .btn {
    min-width: 150px;
}

/* Checkbox label for filter */
.checkbox-label-filter {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
}

.checkbox-label-filter:hover {
    border-color: var(--primary);
    background: var(--bg-white);
}

.checkbox-label-filter input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-label-filter span {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--text-dark);
}

.recommend-club-filter {
    grid-column: 1 / -1;
}

/* Optional: Style for when checkbox is checked */
.checkbox-label-filter:has(input:checked) {
    background: rgba(37, 99, 235, 0.05);
    border-color: var(--primary);
}

.checkbox-label-filter:has(input:checked) span {
    color: var(--primary);
    font-weight: 600;
}

/* Race Cards Grid */
.races-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    transition: opacity 0.3s ease;
}

.races-grid.fade-out {
    opacity: 0;
}

/* Calendar View */
.calendar-view {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: opacity 0.3s ease;
}

.calendar-view.fade-out {
    opacity: 0;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.calendar-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
}

.calendar-nav-btn {
    background: var(--bg-light);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
    padding: 1rem 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    grid-column: span 1;
}

#calendarDays {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    background: var(--bg-white);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day.today {
    border-color: var(--primary);
    border-width: 2px;
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.calendar-day.today .calendar-day-number {
    color: var(--primary);
}

.calendar-races {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: calc(100% - 1.5rem);
    overflow-y: auto;
}

.calendar-race-item {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-race-item:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.calendar-race-item.terrain-fell {
    background: #dc2626;
}

.calendar-race-item.terrain-road {
    background: #2563eb;
}

.calendar-race-item.terrain-trail {
    background: #10b981;
}

.calendar-race-item.terrain-mixed {
    background: #f59e0b;
}

.calendar-day:has(.calendar-race-item):hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ── FRA Category info popover ───────────────────────────────────────────── */
.fra-info-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.fra-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-light);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    user-select: none;
}

.fra-popover {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.78rem;
    line-height: 1.5;
    width: 240px;
    z-index: 200;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.fra-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-dark);
}

.fra-popover strong {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.fra-popover strong:first-child {
    margin-top: 0;
}

.fra-popover-section {
    display: block;
    margin-top: 0.4rem;
}

.fra-info-wrap:hover .fra-popover,
.fra-info-wrap.active .fra-popover {
    visibility: visible;
    opacity: 1;
}

/* Touch devices — hide popover until explicitly activated via tap */
@media (hover: none) {
    .fra-popover {
        visibility: hidden;
        opacity: 0;
    }
    .fra-info-wrap.active .fra-popover {
        visibility: visible;
        opacity: 1;
    }
}

.hero-feature-sub {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
}

.hero-feature-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--secondary);
}

.hero-feature-divider {
    color: var(--border);
    font-size: 1rem;
    line-height: 1;
    user-select: none;
}

/* Calendar options list */
.calendar-options {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.calendar-options__legend {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    padding: 0;
}
.calendar-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}
.calendar-option:last-of-type {
    border-bottom: none;
}
.calendar-option input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
}
.calendar-option__label {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
}
.calendar-option__desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.1rem;
}
 
/* Reminder select */
.calendar-reminder {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
}
.calendar-reminder__label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    white-space: nowrap;
}
.calendar-reminder__select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: var(--bg-white);
    cursor: pointer;
}
 
/* Feed URL panel */
.calendar-feed {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.calendar-feed__url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.calendar-feed__url-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--bg-white);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-feed__hint {
    font-size: 0.8rem;
    color: var(--secondary);
    margin: 0.4rem 0 0;
}
.calendar-feed__footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.calendar-feed__created {
    font-size: 0.78rem;
    color: var(--text-light);
    flex: 1;
    margin: 0;
}
 
/* Instructions accordion */
.calendar-instructions {
    margin-top: 1rem;
}
.calendar-instructions__toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
}
.calendar-instructions__toggle svg {
    transition: transform 0.2s;
}
.calendar-instructions__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.calendar-instructions__body {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 8px;
    border: 1px solid var(--border);
}
.calendar-instructions__steps {
    margin: 0 0 0.75rem;
    padding-left: 1.2rem;
}
.calendar-instructions__steps li {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.5;
}
.calendar-instructions__note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}
 
/* Danger buttons */
.btn--danger {
    color: #dc2626;
}
.btn--danger:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* ── No Club notice (clubs directory) ───────────────────────────── */
.no-club-notice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.no-club-notice svg {
    flex-shrink: 0;
    color: var(--primary);
}
.no-club-notice a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.no-club-notice a:hover {
    text-decoration: underline;
}

/* bottom CTA */

.club-cta {
    /* background: linear-gradient(135deg, var(--primary), var(--secondary)); */
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(16, 185, 129, 0.75)), url('../img/club-cta-bg.jpg') center / cover no-repeat;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-top: 1.5rem;
}

.club-cta__inner {
    max-width: 680px;
    margin: 0 auto;
}

.club-cta__icon {
    margin: 0 auto 1.5rem;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-cta__icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.club-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.club-cta p {
    font-size: 1.1rem;
    opacity: 0.95;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.club-cta__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: inline-flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}

.club-cta__features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    opacity: 0.95;
}

.club-cta__features svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
}

.club-cta__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.club-cta__btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
}

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

.club-cta__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.club-cta__btn--secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.club-cta__btn--secondary:hover {
    border-color: white;
    background: rgba(255, 255, 255, 0.1);
}


/* Race Clash Indicator */
.clash-indicator {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.clash-indicator.red {
    background-color: #fee;
    border: 2px solid #dc2626;
    color: #991b1b;
}

.clash-indicator.orange {
    background-color: #fff7ed;
    border: 2px solid #f97316;
    color: #9a3412;
}

.clash-indicator.green {
    background-color: #f0fdf4;
    border: 2px solid #16a34a;
    color: #166534;
}

.clash-indicator.blue {
    background-color: #eff6ff;
    border: 2px solid #3b82f6;
    color: #1e40af;
}

.clash-indicator-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.clash-indicator-content {
    flex: 1;
}

.clash-indicator-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.clash-indicator-details {
    font-size: 0.875rem;
    opacity: 0.9;
}

.clashing-races-list {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.clashing-races-list li {
    margin-bottom: 0.25rem;
}

/* ── Race Navigation ─────────────────────────────────────────────────── */
.race-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.race-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.race-nav-btn:hover:not(.race-nav-disabled) {
    border-color: var(--primary);
    background: var(--bg-light);
}

.race-nav-disabled {
    opacity: 0.4;
    cursor: default;
}

.race-nav-prev { justify-content: flex-start; }
.race-nav-next { justify-content: flex-end; text-align: right; }

.race-nav-center {
    justify-content: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.race-nav-label {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.race-nav-label small {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.race-nav-label span,
.race-nav-next .race-nav-label,
.race-nav-prev .race-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.race-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.club-indicators {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.club-indicators-club {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    padding-top: 150px;
}

.club-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.club-indicator.watching {
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.club-indicator.entered {
    color: var(--secondary);
    border: 1.5px solid var(--secondary);
}

.club-indicator svg {
    width: 14px;
    height: 14px;
}

.race-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.race-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.race-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.race-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
}

.race-card-body {
    padding: 1.25rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.race-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.stars {
    color: #fbbf24;
}

/* Race Detail Page */
.race-detail {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.detail-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.detail-meta {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-card {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.detail-card a {
    text-decoration: none;
}

.detail-card h3 {
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.detail-card p {
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-weather {
    background: var(--bg-light);
    border: 2px solid var(--border);
    border-radius: 8px;
}

.btn-weather:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Hide WhatsApp button by default (desktop) */
.whatsapp-share-container {
    display: none;
}

/* WhatsApp green background color */
.whatsapp-share-btn {
    background-color: #25D366 !important;
    border-color: #25D366 !important;
}

.whatsapp-share-btn:hover {
    background-color: #1ebe57 !important;
    border-color: #1ebe57 !important;
}

/* Layout for rating/review sections when user is authenticated */
.user-content-layout {
    display: grid;
    grid-template-columns: 65% 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

.user-content-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* User notes section */
.notes-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: fit-content;
}

.notes-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.notes-char-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

.notes-char-count.warning {
    color: #f59e0b;
}

.notes-char-count.error {
    color: #ef4444;
}

.notes-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.notes-textarea::placeholder {
    color: var(--text-light);
}

.notes-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.notes-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

/* ============================================
   RACE TAGS STYLES
   ============================================ */

.race-tags-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.race-tags-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.user-race-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 2rem;
}

.no-tags-message {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
}

.race-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.race-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tag-label {
    line-height: 1;
}

.tag-remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.tag-remove:hover {
    opacity: 1;
}

.tag-remove svg {
    width: 14px;
    height: 14px;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

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

.tag-selector {
    margin-top: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tag-selector-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-option {
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-dark);
}

.tag-option:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.no-tags-available {
    color: var(--text-light);
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
}

.club-members-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(16, 185, 129, 0.05));
    border: 2px solid var(--primary);
}

.club-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.club-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.club-stat.watching {
    color: var(--primary);
}

.club-stat.entered {
    color: var(--secondary);
}

.club-stat svg {
    width: 20px;
    height: 20px;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

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

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

.btn-donate:hover {
    background: var(--secondary-dark);
}

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

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

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

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

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

/* Rating System */
.rating-section {
    margin: 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
    font-size: 2rem;
}

.star {
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s;
}

.star:hover,
.star.active {
    color: #fbbf24;
}

/* Reviews Section */
.reviews-section {
    margin-top: 0;
}

.review-form {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.review-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
}

.review-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.review-item {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.review-author {
    font-weight: 600;
}

.review-date {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Authentication Pages */
.auth-container {
    max-width: 1000px;
    margin: 3rem auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.auth-box {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
}

.auth-tab {
    flex: 1;
    padding: 1.25rem;
    background: var(--bg-light);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    background: var(--bg-white);
    color: var(--text-dark);
}

.auth-tab.active {
    background: var(--bg-white);
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    margin-bottom: -2px;
}

.auth-form {
    display: none;
    padding: 2rem;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    position: relative;
    background: var(--bg-white);
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.demo-credentials {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
}

.demo-credentials strong {
    color: var(--text-dark);
}

.error-message {
    display: none;
    padding: 0.875rem 1rem;
    background: #fee;
    color: #c33;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #fcc;
}

.success-message {
    display: none;
    padding: 0.875rem 1rem;
    background: #efe;
    color: #3c3;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #cfc;
}

/* Auth Features Section */
.auth-features {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-features h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.donate-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
}

.feature-item svg {
    width: 40px;
    height: 40px;
    color: var(--secondary);
    flex-shrink: 0;
}

.feature-item h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Autocomplete wrapper */
.autocomplete-wrapper {
    position: relative;
}

/* Club dropdown */
.club-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: -1px;
}

/* Individual club option */
.club-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.club-option:last-child {
    border-bottom: none;
}

.club-option:hover {
    background-color: #f8f9fa;
}

.club-option.no-results {
    cursor: default;
    color: #999;
    text-align: center;
}

.club-option.no-results:hover {
    background-color: transparent;
}

/* Add new club option styling */
.club-option.add-new-club {
    color: #2563eb;
    font-weight: 500;
    border-top: 2px solid #e5e7eb;
    background-color: #f8fafc;
}

.club-option.add-new-club:hover {
    background-color: #eff6ff;
}

/* Scrollbar styling for dropdown */
.club-dropdown::-webkit-scrollbar {
    width: 8px;
}

.club-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 0 8px 0;
}

.club-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.club-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 24px;
}

.modal-description {
    color: #6b7280;
    margin-bottom: 24px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Toast notification styles */
.toast-notification {
    position: fixed;
    height: 100px;
    right: 10px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification svg {
    width: 20px;
    height: 20px;
}

.toast-success {
    border-left: 4px solid #10b981;
    color: #065f46;
}

.toast-success svg {
    stroke: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.toast-error svg {
    stroke: #ef4444;
}

/* Responsive modal */
@media (max-width: 640px) {
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 85vh;
    }
}

/* My Races Page */
.my-races-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.my-races-header__cal-btn {
    margin-left: auto;
}

.my-races-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.my-races-header .subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
}

.my-races-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.my-race-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.my-race-tab svg {
    width: 24px;
    height: 24px;
}

.my-race-tab:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.my-race-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.my-race-tab.active svg {
    stroke: white;
}

.tab-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
}

.my-race-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.2);
}

.my-races-content {
    min-height: 400px;
}

.my-race-card {
    position: relative;
}

.my-race-card .race-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.race-title-section {
    flex: 1;
    min-width: 0;
}

.race-title-section .race-title {
    margin-bottom: 0.5rem;
}

.race-title-section .race-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: all 0.2s;
    border-radius: 6px;
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #fee;
    color: #c33;
}

.remove-btn svg {
    width: 20px;
    height: 20px;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

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

.empty-state p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* News Page */
.news-header {
    margin-bottom: 2rem;
}

.news-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.news-header .subtitle {
    color: var(--text-light);
    font-size: 1.125rem;
}

.news-grid {
    display: grid;
    gap: 2rem;
}

.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-image .news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

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

.news-title {
    font-size: 1.3rem;
    margin: 0 0 0.8rem 0;
    color: var(--text-dark);
    line-height: 1.3;
}

.news-preview {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

.news-read-more {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Article Page Styles */
.article-full {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-title {
    font-size: 2.5rem;
    margin: 1rem 0;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.article-author {
    font-weight: 600;
}

.article-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 200px;
    display: block;
    object-fit: cover;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    text-decoration: underline;
}

.news-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.news-category svg {
    width: 16px;
    height: 16px;
}

.category-platform {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.category-races {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
}

.category-community {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.category-announcement {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.news-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.news-excerpt {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 500;
}

.news-content {
    color: var(--text-light);
    line-height: 1.7;
}

.news-meta {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Suggest Changes Page */
.suggestion-header {
    margin-bottom: 2rem;
}

.suggestion-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.race-info-box {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.race-info-box h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.race-info-meta {
    display: flex;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.suggestion-form-container {
    max-width: 800px;
}

.suggestion-info {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.suggestion-info svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.suggestion-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.suggestion-info p {
    color: var(--text-light);
    line-height: 1.6;
}

.suggestion-form {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.success-message {
    display: none;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.success-message svg {
    width: 24px;
    height: 24px;
    color: var(--secondary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.success-message strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.success-message p {
    color: var(--text-light);
    margin: 0;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-success {
    border-left: 4px solid var(--secondary);
}

.toast-success svg {
    color: var(--secondary);
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error svg {
    color: #ef4444;
}

.toast-notification span {
    color: var(--text-dark);
    font-weight: 500;
}

/* Home CTA strip — My Races + My Club cards */
.home-cta-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.home-cta-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}
.home-cta-card--races {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}
.home-cta-card--club {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #bbf7d0;
}
.home-cta-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.home-cta-card--races:hover { border-color: var(--primary); }
.home-cta-card--club:hover  { border-color: var(--secondary); }
 
.home-cta-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-cta-card--races .home-cta-card__icon { background: var(--primary); color: #fff; }
.home-cta-card--club  .home-cta-card__icon { background: var(--secondary); color: #fff; }
 
.home-cta-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.home-cta-card__body strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-cta-card__body span {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.3;
}
 
.home-cta-card__arrow {
    flex-shrink: 0;
    color: var(--text-light);
    transition: transform 0.15s ease, color 0.15s ease;
}
.home-cta-card:hover .home-cta-card__arrow {
    transform: translateX(3px);
    color: var(--primary);
}
.home-cta-card--club:hover .home-cta-card__arrow {
    color: var(--secondary);
}
 
.home-cta-card__badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    white-space: nowrap;
}
.home-cta-card--races .home-cta-card__badge {
    background: var(--primary);
    color: #fff;
}
.home-cta-card--club .home-cta-card__badge {
    background: var(--secondary);
    color: #fff;
}
 
/* Dimmed state when no club linked */
.home-cta-card--no-club {
    opacity: 0.7;
}

/* Footer */
.site-footer {
    background: var(--text-dark);
    color: #ffffff;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
    color: #ffffff;
}

.footer-social svg {
    width: 18px;
    height: 18px;
}

/* Photo Upload Modal */
.photo-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    padding: 1rem;
}

.photo-modal {
    background: var(--bg-white);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 100000;
}

.photo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border);
    background: var(--bg-white);
}

.photo-modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: all 0.2s;
    border-radius: 6px;
}

.modal-close-btn:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.modal-close-btn svg {
    width: 24px;
    height: 24px;
}

.photo-modal-body {
    padding: 1.5rem;
    background: var(--bg-white);
}

.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
}

.file-upload-label:hover {
    border-color: var(--primary);
    background: var(--bg-white);
}

.file-upload-label svg {
    width: 48px;
    height: 48px;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.file-upload-label span {
    color: var(--text-dark);
    font-weight: 500;
}

.photo-preview-container {
    margin: 1rem 0;
}

.photo-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Photo Gallery */
.photos-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border);
}

.photos-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.no-photos-message {
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-thumbnail {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
}

.photo-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-thumbnail:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay svg {
    width: 48px;
    height: 48px;
    color: white;
}

/* Photo Lightbox */
.photo-lightbox {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 2rem;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 100001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
    color: white;
}

.lightbox-content {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    z-index: 100000;
}

.lightbox-image-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 1rem;
    min-height: 400px;
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: calc(90vh - 2rem);
    object-fit: contain;
}

.lightbox-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    min-width: 300px;
    background: var(--bg-white);
}

.lightbox-caption {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.lightbox-caption svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 0.125rem;
}

.lightbox-caption p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.6;
}

.lightbox-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.lightbox-meta svg {
    width: 16px;
    height: 16px;
}

.lightbox-meta strong {
    color: var(--text-dark);
}

/* ============================================================
   MY PROFILE PAGE
   ============================================================ */

.profile-header {
    margin-bottom: 2rem;
}

.profile-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.profile-subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* Two-column grid on wider screens, single column on mobile */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Individual card */
.profile-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.profile-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.profile-card__desc {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Avatar initial circle */
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    user-select: none;
}

/* Info rows */
.profile-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 1.5rem;
}

.profile-info-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-info-row:last-child {
    border-bottom: none;
}

.profile-info-row dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 0 0 110px;
}

.profile-info-row dd {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
}

.profile-no-club {
    color: var(--text-light);
    font-style: italic;
}

.profile-info-note {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

.profile-info-note a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.profile-info-note a:hover {
    text-decoration: underline;
}

/* Visibility toggle */
.visibility-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.visibility-label {
    font-size: 0.9375rem;
    color: var(--text-dark);
    line-height: 1.5;
}

.visibility-label strong {
    color: var(--primary);
}

/* Active-public state — green tint to signal "on" */
.btn--active-public {
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
}

.btn--active-public:hover {
    background: var(--secondary) !important;
    color: #fff !important;
}

/* Inline feedback messages */
.profile-feedback {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

.profile-feedback[hidden] {
    display: none;
}

.profile-feedback--success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-feedback--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Hamburger Menu Styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative; 
}

.mobile-menu-toggle svg {
    width: 28px;
    height: 28px;
    color: var(--text-dark);
}

.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
}

.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-nav-menu.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-header h2 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin: 0;
}

.mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
    transition: color 0.2s;
}

.mobile-nav-close:hover {
    color: var(--text-dark);
}

.mobile-nav-close svg {
    width: 24px;
    height: 24px;
}

.mobile-nav-links {
    padding: 1rem 0;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.mobile-nav-links a:hover {
    background: var(--bg-light);
    border-left-color: var(--primary);
}

.mobile-nav-links a svg {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    color: var(--text-light);
}

.mobile-user-greeting {
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.mobile-user-greeting a {
    margin: 0;
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.mobile-user-greeting a:hover {
    color: var(--secondary);
}

/* ── Shared: form feedback ─────────────────────────────────────────────────── */
.form-error,
.form-success {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}
.form-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ── Shared: form label ────────────────────────────────────────────────────── */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}
.form-label .required {
    color: #ef4444;
    margin-left: 0.15rem;
}

/* ── Shared: select & file input ───────────────────────────────────────────── */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}
.form-input--file {
    padding: 0.5rem;
    cursor: pointer;
    background: var(--bg-light, #f9fafb);
}
.form-input--file::file-selector-button {
    padding: 0.35rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    background: var(--white, #fff);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin-right: 0.75rem;
    transition: background 0.15s;
}
.form-input--file::file-selector-button:hover {
    background: var(--bg-light, #f3f4f6);
}

/* ── Shared: ghost button ──────────────────────────────────────────────────── */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-medium);
}
.btn-ghost:hover {
    background: var(--bg-light, #f3f4f6);
    color: var(--text-dark);
}

/* ── Shared: club notices ──────────────────────────────────────────────────── */
.club-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.5;
    border: 1px solid transparent;
}
.club-notice svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.club-notice strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.club-notice p {
    margin: 0;
    color: inherit;
    opacity: 0.85;
}
.club-notice--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}
.club-notice--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.club-notice--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}
.club-notice--verified {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #4c1d95;
}

/* Club notice content (for the admin banner variant with meta row) */
.club-notice__content {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.club-notice__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}
.club-notice__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ── Page header (shared across inner pages) ───────────────────────────────── */
.page-header {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.page-header__inner {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.2;
}
.page-subtitle {
    font-size: 1rem;
    color: var(--text-medium);
    margin: 0;
}

/* ── Form card ─────────────────────────────────────────────────────────────── */
.form-card {
    background: var(--white, #fff);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* ── Form sections ─────────────────────────────────────────────────────────── */
.form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
    border-bottom: none;
}
.form-section__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ── Two-column form row ───────────────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* ── Form actions bar ──────────────────────────────────────────────────────── */
.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: var(--bg-light, #f9fafb);
    border-top: 1px solid var(--border);
}

/* ── Logo preview ──────────────────────────────────────────────────────────── */
.logo-preview-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-light, #f9fafb);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.logo-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.logo-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.8rem;
    text-align: center;
    padding: 0.5rem;
}
.logo-preview-placeholder svg {
    color: var(--text-light);
}
    
/* Responsive Design 768TOP */
@media (max-width: 768px) {
    
      .category-hero__title {
        font-size: 1.5rem;
    }
 
    .category-counties__links,
    .category-siblings__links {
        gap: 0.375rem;
    }
 
    .category-county-link,
    .category-sibling-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem;
    }
    
    .club-stats-bar__item--next       { border-top-color: var(--primary); }
.club-stats-bar__item--next:hover { background: #eff6ff; }
.club-stats-bar__item--empty      { cursor: default; pointer-events: none; opacity: 0.7; }
    
    .home-cta-strip {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .home-cta-card__body span {
        display: none; /* keep it tight on mobile — title + badge is enough */
    }
    
         .profile-header h1 {
            font-size: 1.75rem;
        }

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

        .profile-card {
            padding: 1.5rem;
        }

        .visibility-toggle-wrap {
            flex-direction: column;
            align-items: flex-start;
        }

        .visibility-toggle-wrap .btn {
            width: 100%;
            justify-content: center;
        }

        .profile-info-row {
            flex-direction: column;
            gap: 0.25rem;
        }

    .profile-info-row dt {
            flex: none;
        }

    .notif-panel {
            width: 100vw;
            top: auto;
            bottom: 0;
            height: 85vh;
            border-radius: 16px 16px 0 0;
            transform: translateY(100%);
            transition: transform 0.28s ease;
        }

    .notif-panel:not([hidden]) {
            transform: translateY(0);
        }

    #notifMobileTrigger {
        display: flex;
        align-items: center;
        padding: 1rem 1.5rem;
        color: var(--text-dark);
        text-decoration: none;
        font-weight: 500;
        transition: background 0.2s;
        border-left: 3px solid transparent;
        background: none;
        border-top: none;
        border-right: none;
        border-bottom: none;
        width: 100%;
        cursor: pointer;
        font-size: 1rem;
        font-family: inherit;
        text-align: left;
    }

    #notifMobileTrigger:hover {
        background: var(--bg-light);
        border-left-color: var(--primary);
    }

    #notifMobileTrigger svg {
        width: 20px;
        height: 20px;
        margin-right: 0.75rem;
        color: var(--text-light);
        flex-shrink: 0;
    }

    .mobile-notif-badge {
        margin-left: auto;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        background: var(--primary);
        color: #fff;
        font-size: 0.7rem;
        font-weight: 700;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .locked-actions-buttons {
          flex-direction: column;
      }
 
      .locked-btn-wrapper {
          width: 100%;
      }
 
      .locked-btn {
          width: 100%;
          justify-content: center;
      }
 
      .locked-tooltip {
          white-space: normal;
          width: 180px;
          text-align: center;
      }
    
     .nudge-bar__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
        padding-right: 2rem;
    }

    .nudge-bar__icons {
        display: none; /* keeps it compact on small screens */
    }

    .nudge-bar__text {
        font-size: 0.85rem;
    }

    .nudge-bar__actions {
        width: 100%;
    }
    
     .hero-feature-sub {
        gap: 0.5rem;
    }

    .hero-feature-divider {
        display: none;
    }

    .hero-feature-item {
        font-size: 0.8rem;
    }

     .club-cta {
        padding: 2rem 1.25rem;
    }

    .club-cta h2 {
        font-size: 1.5rem;
    }

    .club-cta p {
        font-size: 1rem;
    }

    .club-cta__actions {
        flex-direction: column;
    }

    .club-cta__btn {
        width: 100%;
        text-align: center;
    }
    
    .nudge-bar__cta {
        flex: 1;
        text-align: center;
    }
    
     .user-race-tags {
        gap: 0.4rem;
    }
    
    .race-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    .tag-option {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Show WhatsApp button only on mobile devices */
    .whatsapp-share-container {
        display: block;
    }
    
    #copy-race-btn {
        display: none !important;
    }
    
    .race-nav {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    }
    .race-nav-center {
        grid-column: 1 / -1;
        order: -1;
    }
    .race-nav-label {
        display: none;
    }

    .privacy-card img {
        float: none;
        display: block;
        margin: 0 auto 1.5em;
        padding: 0;
        height: 50%;
    }
    
    /* Mobile Header */
     .header-content {
        padding: 1rem;
        position: relative;
        z-index: 50; /* Ensure header is above other content */
    }
    
    .logo {
        position: relative;
        z-index: 50; /* Lower than mobile menu */
    }
    
    .user-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 50; 
    }
    
    .modal {
        padding: 0 !important;
        align-items: flex-end !important;
    }
    
    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px 12px 0 0 !important;
        max-height: 90vh !important;
    }
    
    #forgotPasswordModal {
        z-index: 10000 !important;
    }
    
    .featured-races-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-race-card {
        height: 180px;
    }
    
    .featured-race-name {
        font-size: 1.125rem;
    }
    
    .featured-race-meta {
        font-size: 0.8125rem;
        gap: 0.75rem;
    }
        
    .featured-races-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .featured-race-card {
        height: 180px;
    }
    
    .featured-race-name {
        font-size: 1.125rem;
    }
    
    .featured-race-meta {
        font-size: 0.8125rem;
        gap: 0.75rem;
    }
    
    .races-grid {
        grid-template-columns: 1fr;
    }
    
    .search-sort-bar {
        flex-direction: column;
    }
    
    .terrain-filters {
        gap: 0.5rem;
    }
    
    .terrain-btn {
        min-width: 80px;
        padding: 0.75rem 1rem;
    }
    
    .detail-title {
        font-size: 1.5rem;
    }
    
    .auth-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 2rem auto;
    }
    
    .auth-features {
        order: -1;
    }
    
    .my-races-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .my-races-header h1 {
        font-size: 2rem;
    }
    
    .my-races-header__cal-btn {
    display: none;
}
    
    .toast-notification {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .hero-intro h1 {
        font-size: 1.75rem;
    }
    
    .hero-intro p {
        font-size: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .search-container {
        max-width: none;
        min-width: 100%;
    }
    
    .btn-recommend {
        width: 100%;
        justify-content: center;
    }
    
    .recommend-grid {
        grid-template-columns: 1fr;
    }
    
    .recommend-actions {
        flex-direction: column;
    }
    
    .recommend-actions .btn {
        width: 100%;
    }
    
    .search-sort-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
        min-width: 100%;
        order: 1;
    }
    
    .sort-container {
        order: 2;
        justify-content: space-between;
    }
      
    .search-sort-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
        min-width: 100%;
        order: 1;
    }
    
    .sort-container {
        order: 2;
        justify-content: space-between;
    }
    
    .btn-recommend {
        width: 100%;
        justify-content: center;
        order: 3;
    }
    
    /* NEW: Time filter toggle on mobile */
    .time-filter-toggle {
        order: 4;
        width: 100%;
        justify-content: center;
    }
    
    .view-toggle {
        order: 5;
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
    
    .calendar-header h2 {
        font-size: 1.25rem;
    }
    
    .calendar-day-header {
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .calendar-day {
        padding: 0.25rem;
    }
    
    .calendar-day-number {
        font-size: 0.75rem;
    }
    
    .calendar-race-item {
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
    }
    
/* Mobile photo adjustments */
    .photo-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }
    
    .lightbox-content {
        flex-direction: column;
        max-height: 90vh;
    }
    
    .lightbox-image-container {
        flex: none;
        max-height: 50vh;
        min-height: 300px;
    }
    
    .lightbox-info {
        flex: none;
        min-width: 0;
        max-height: 40vh;
    }
    
    .photo-lightbox {
        padding: 0.5rem;
    }
    
     .article-title {
        font-size: 1.8rem;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .news-image {
        height: 180px;
    }

    .notes-textarea {
        min-height: 200px;
    }
    
    .notes-actions {
        flex-direction: column;
    }
    
    .notes-actions button {
        width: 100%;
    }
    
    .user-content-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .notes-section {
        order: 1;
    }
    
    .user-content-left {
        order: 2;
    }
    
    .form-section {
        padding: 1.5rem 1rem;
    }
    .form-actions {
        padding: 1rem;
        flex-direction: column-reverse;
    }
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .page-title {
        font-size: 1.4rem;
    }
    .club-notice__meta {
        flex-direction: column;
        gap: 0.4rem;
    }
}