/* ==========================================================================
   StrideForward Marathon — Custom styles (Tailwind + theme)
   ========================================================================== */

/* ---- Base ---- */
html { scroll-behavior: smooth; }

/* ---- Header / navigation ---- */
#site-header {
    background: transparent;
}
#site-header.scrolled #nav-bar {
    background: rgba(43, 43, 43, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.45);
}

.nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.2s ease;
    padding: 0.25rem 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: #b6d137;
    border-radius: 2px;
    transition: width 0.25s ease;
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #fff; }

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #d2e868, #b6d137 55%, #9cb329);
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(182, 209, 55, 0.7);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(182, 209, 55, 0.85);
}
.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: transparent;
    backdrop-filter: blur(4px);
}
.btn-outline-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}
.btn-outline-brand {
    border: 2px solid #b6d137;
    color: #b6d137;
    background: transparent;
}
.btn-outline-brand:hover {
    background: #b6d137;
    color: #fff;
    transform: translateY(-2px);
}

/* ---- Logo ---- */
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    color: #fff;
    background: linear-gradient(135deg, #d2e868, #9cb329);
    box-shadow: 0 6px 16px -4px rgba(182, 209, 55, 0.6);
}
.site-logo,
.site-logo-footer {
    display: block;
    width: auto !important;
    height: 36px !important;
    max-height: 36px !important;
    max-width: 150px;
    object-fit: contain;
}
.site-logo-footer {
    height: 40px !important;
    max-height: 40px !important;
    max-width: 170px;
}

/* ---- Social buttons ---- */
.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background: #4a4a4a;
    color: #cbd5e1;
    transition: all 0.25s ease;
}
.social-btn:hover {
    background: #b6d137;
    color: #fff;
    transform: translateY(-3px);
}

/* ---- Footer links ---- */
.footer-link {
    transition: color 0.2s ease;
}
.footer-link:hover { color: #b6d137; }

/* ---- Typography helpers ---- */
.text-gradient {
    background: linear-gradient(135deg, #e4f29c, #d2e868 45%, #b6d137);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #333333;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 75% 30%, rgba(182, 209, 55, 0.35), transparent 55%),
        radial-gradient(ellipse at 10% 85%, rgba(14, 165, 233, 0.12), transparent 50%),
        linear-gradient(160deg, #2b2b2b 0%, #3b3b3b 55%, #333333 100%);
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 78%);
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 78%);
}
.runner-figure {
    position: absolute;
    right: -4rem;
    bottom: 0;
    width: 42%;
    max-width: 620px;
    animation: floatIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes floatIn {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Stat cards ---- */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, #b6d137, #d2e868);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.stat-card:hover::before { transform: scaleX(1); }
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px -12px rgba(14, 31, 46, 0.3);
}

/* ---- Feature cards ---- */
.feature-card {
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px -12px rgba(14, 31, 46, 0.25);
}
.feature-card .feature-icon {
    transition: transform 0.3s ease;
}
.feature-card:hover .feature-icon {
    transform: scale(1.12) rotate(-4deg);
}

/* ---- Countdown number boxes ---- */
.countdown-box {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    border-radius: 0.9rem;
    min-width: 5rem;
    transition: transform 0.25s ease;
}
.countdown-box:hover { transform: translateY(-4px); }

/* ---- Race track / ribbon decoration ---- */
.race-lines {
    background-image:
        repeating-linear-gradient(45deg, transparent 0 18px, rgba(255,255,255,0.35) 18px 20px),
        repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255,255,255,0.25) 12px 14px);
}

/* ---- Testimonials ---- */
.testimonial-card {
    transition: all 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px -12px rgba(14, 31, 46, 0.22);
}

/* ---- FAQ accordion ---- */
.faq-item {
    transition: box-shadow 0.25s ease;
}
.faq-item summary {
    list-style: none;
    cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] {
    box-shadow: 0 20px 45px -15px rgba(182, 209, 55, 0.35);
}
.faq-icon { transition: transform 0.3s ease; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }

/* ---- Timeline for About ---- */
.timeline-line {
    position: relative;
}
.timeline-line::before {
    content: '';
    position: absolute;
    left: 7px; top: 8px; bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, #b6d137, transparent);
}

/* ---- Forms ---- */
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    font-size: 0.925rem;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #b6d137;
    box-shadow: 0 0 0 4px rgba(182, 209, 55, 0.12);
}
.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin-bottom: 0.4rem;
}
.form-error { color: #e11d48; font-size: 0.8rem; margin-top: 0.3rem; }

/* ---- Flash alerts ---- */
.flash-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.1rem;
    border-radius: 0.7rem;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 15px 35px -10px rgba(0,0,0,0.25);
    animation: slideDown 0.35s ease both;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.flash-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.flash-error   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.flash-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ---- Sponsor tier cards ---- */
.tier-card {
    transition: all 0.3s ease;
    position: relative;
}
.tier-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(14, 31, 46, 0.3);
}
.tier-featured {
    border: 2px solid #b6d137;
    box-shadow: 0 15px 40px -12px rgba(182, 209, 55, 0.5);
}

/* ---- Admin ---- */
.admin-link {
    transition: all 0.2s ease;
}
.admin-link:hover, .admin-link.active {
    background: #b6d137;
    color: #fff;
}

/* ---- Upload dropzone focus ---- */
.dropzone-focus {
    border-color: #b6d137 !important;
    background: rgba(182, 209, 55, 0.05) !important;
}

/* ---- Reveal on scroll ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---- Misc ---- */
.mobile-link {
    transition: color 0.2s ease;
    position: relative;
}
.mobile-link:hover { color: #b6d137; }

/* Pulse dot for "live" registrations */
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.pulse-dot { animation: pulseDot 1.8s ease-in-out infinite; }

/* Timer for trivia */
@keyframes ticker {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-track { animation: ticker 30s linear infinite; }
.ticker-track:hover { animation-play-state: paused; }

/* Print-friendly tables */
@media print {
    #site-header, #mobile-menu, footer, .no-print { display: none !important; }
}

/* ---- Animated runner (SVG, running in place) ---- */
.animated-runner {
    transform-origin: 50% 100%;
    animation: runnerBob 0.9s ease-in-out infinite;
}
@keyframes runnerBob {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50%      { transform: translateY(-10px) rotate(1.5deg); }
}
.runner-leg-l, .runner-leg-r, .runner-arm-l, .runner-arm-r {
    transform-origin: top;
}
.runner-leg-l { animation: legSwingL 0.9s ease-in-out infinite; }
.runner-leg-r { animation: legSwingR 0.9s ease-in-out infinite; }
.runner-arm-l { animation: armSwingL 0.9s ease-in-out infinite; }
.runner-arm-r { animation: armSwingR 0.9s ease-in-out infinite; }
@keyframes legSwingL {
    0%, 100% { transform: rotate(24deg); }
    50%      { transform: rotate(-28deg); }
}
@keyframes legSwingR {
    0%, 100% { transform: rotate(-28deg); }
    50%      { transform: rotate(24deg); }
}
@keyframes armSwingL {
    0%, 100% { transform: rotate(-22deg); }
    50%      { transform: rotate(26deg); }
}
@keyframes armSwingR {
    0%, 100% { transform: rotate(26deg); }
    50%      { transform: rotate(-22deg); }
}

/* ---- Moving road / track effect ---- */
.road-foreground {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 90px;
    overflow: hidden;
}
.road-lanes {
    position: absolute;
    top: 55%; left: -50%;
    display: flex;
    gap: 80px;
    width: 200%;
    animation: roadMove 2.4s linear infinite;
}
.road-lane-dash {
    width: 70px; height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}
.road-lane-solid {
    width: 70px; height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}
@keyframes roadMove {
    0%   { transform: translateX(0); }
    100% { transform: translateX(150px); }
}

/* ---- Floating hero badges / icons ---- */
.float-badge { animation: floatY 4s ease-in-out infinite; }
.float-badge-2 { animation-delay: 1.2s; }
.float-badge-3 { animation-delay: 2.2s; }
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ---- Pulse rings ---- */
.pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid rgba(182, 209, 55, 0.5);
    animation: ringPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes ringPulse {
    0%   { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ---- Logo / partner marquee ---- */
.logo-ticker-wrap {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.logo-ticker-track {
    display: flex;
    width: max-content;
    animation: tickerX 30s linear infinite;
}
.logo-ticker-wrap:hover .logo-ticker-track { animation-play-state: paused; }
@keyframes tickerX {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.partner-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    margin: 0 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    min-width: 160px;
    box-shadow: 0 6px 16px -8px rgba(14,31,46,0.15);
    transition: transform .25s ease, box-shadow .25s ease;
}
.partner-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 26px -10px rgba(14,31,46,0.25);
}

/* ---- Testimonial carousel ---- */
.carousel-viewport {
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}
.carousel-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: carouselX 44s linear infinite;
}
.carousel-viewport:hover .carousel-track { animation-play-state: paused; }
@keyframes carouselX {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.carousel-card {
    width: 340px;
    flex-shrink: 0;
}

/* ---- Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 0.9rem; }
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    cursor: pointer;
    display: block;
}
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(51,51,51,.75), transparent 55%);
    opacity: 0;
    transition: opacity .35s ease;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item .gallery-overlay .cap {
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    transform: translateY(8px);
    transition: transform .35s ease;
}
.gallery-item:hover .gallery-overlay .cap { transform: translateY(0); }

/* ---- Lightbox ---- */
.lightbox {
    position: fixed; inset: 0;
    z-index: 200;
    background: rgba(6, 13, 20, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; animation: lbIn .3s ease both; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
    max-width: min(92vw, 1100px);
    max-height: 82vh;
    border-radius: 1rem;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.lightbox .lb-caption { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: #cbd5e1; font-size: .9rem; text-align: center; }
.lightbox .lb-close { position: absolute; top: 1.25rem; right: 1.75rem; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .8; transition: opacity .2s; }
.lightbox .lb-close:hover { opacity: 1; }
.lightbox .lb-prev, .lightbox .lb-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px; border-radius: 999px;
    background: rgba(255,255,255,.08); color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s; font-size: 1.6rem;
}
.lightbox .lb-prev { left: 1.5rem; } .lightbox .lb-next { right: 1.5rem; }
.lightbox .lb-prev:hover, .lightbox .lb-next:hover { background: rgba(182,209,55,.6); }
@media (max-width: 640px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
    .lightbox .lb-prev { left: .75rem; } .lightbox .lb-next { right: .75rem; }
}

/* ---- Hero background image treatment ---- */
.hero-bgimg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center 30%;
    opacity: .55;
}
.hero-vignette {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 68% 40%, transparent 0%, rgba(51,51,51,.45) 70%),
        linear-gradient(to right, rgba(51,51,51,.92) 0%, rgba(51,51,51,.6) 45%, rgba(51,51,51,.35) 100%),
        linear-gradient(to top, rgba(51,51,51,.95) 0%, transparent 55%);
}