/* XO Site — Custom CSS (Bootstrap 5.3 via CDN) */

:root {
    --xo-red:        #dc3545;
    --xo-red-dark:   #a71d2a;
    --xo-red-glow:   rgba(220,53,69,0.35);
    --xo-dark:       #0a0a0a;
    --xo-dark-2:     #141414;
    --xo-dark-3:     #1e1e1e;
    --xo-dark-4:     #252525;
    --xo-border:     #2a2a2a;
    --xo-text:       #d0d0d0;
    --xo-text-dim:   #707070;
    --xo-font-phage: 'phage_regularregular', sans-serif;
    --xo-font-head:  'Montserrat', sans-serif;
    --xo-transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--xo-dark);
    color: var(--xo-text);
    font-family: var(--xo-font-head);
    overflow-x: hidden;
}

/* ─── Navbar ─── */
#mainNav {
    background: rgba(10,10,10,0.92) !important;
    border-bottom: 1px solid rgba(220,53,69,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background var(--xo-transition), border-color var(--xo-transition);
}
#mainNav.scrolled {
    background: rgba(10,10,10,0.98) !important;
    border-bottom-color: var(--xo-red);
}
#mainNav .navbar-brand img {
    height: auto;
    width: auto;
    max-height: 34px;
    transition: opacity var(--xo-transition);
}
#mainNav .navbar-brand:hover img { opacity: 0.85; }

/* ─── Shared XO Hamburger (all pages) ─── */
.navbar-toggler.xo-toggler {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    padding: 0.3rem 0.4rem;
    width: 36px;
    height: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}
.navbar-toggler.xo-toggler:focus { box-shadow: none !important; outline: none; }
@media (min-width: 992px) {
    .navbar-toggler.xo-toggler { display: none; }
}
.xo-toggler {
    background: none;
    border: none;
    padding: 0.3rem 0.4rem;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.xo-toggler:focus { outline: none; box-shadow: none; }
@media (max-width: 991.98px) {
    .xo-toggler:not(.navbar-toggler) { display: flex; }
}
.xo-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #d0d0d0;
    border-radius: 1px;
    transition: background 0.2s, opacity 0.2s, transform 0.22s;
}
.xo-toggler:hover .xo-bar { background: #fff; }
.xo-toggler.open .xo-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.xo-toggler.open .xo-bar:nth-child(2) { opacity: 0; }
.xo-toggler.open .xo-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Shared XO Nav Collapse (merch + registration) ─── */
.xo-nav-collapse {
    display: none;
    width: 100%;
    border-top: 1px solid rgba(220,53,69,0.2);
    background: rgba(8,8,8,0.97);
    padding: 0.25rem 0;
}
.xo-nav-collapse.open { display: block; }
.xo-nav-collapse a {
    display: block;
    color: #888;
    text-decoration: none;
    padding: 0.72rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: color 0.15s, background 0.15s;
}
.xo-nav-collapse a:last-child { border-bottom: none; }
.xo-nav-collapse a:hover { color: #fff; background: rgba(220,53,69,0.07); }

#mainNav .nav-link {
    color: #aaa !important;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color var(--xo-transition);
}
#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 1rem;
    width: 0; height: 2px;
    background: var(--xo-red);
    transition: width var(--xo-transition);
}
#mainNav .nav-link:hover { color: #fff !important; }
#mainNav .nav-link:hover::after { width: calc(100% - 2rem); }

/* ─── Hero ─── */
.xo-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    overflow: hidden;
}
@media (max-width: 768px) {
    .xo-hero { background-attachment: scroll; }
}

.xo-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        170deg,
        rgba(8,8,8,0.82) 0%,
        rgba(8,8,8,0.55) 45%,
        rgba(220,53,69,0.08) 100%
    );
    z-index: 1;
}

/* Diagonal cut at bottom */
.xo-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0;
    width: 100%; height: 120px;
    background: var(--xo-dark);
    clip-path: polygon(0 100%, 100% 100%, 100% 55%, 0 100%);
    z-index: 2;
}

.xo-hero .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: clamp(5.5rem, 13vh, 8rem) 1.5rem 4rem;
    max-width: 860px;
    width: 100%;
}
@media (max-width: 767px) {
    .xo-hero .hero-content { padding-top: 5.5rem; }
}

/* Badge — angular data-strip style */
.xo-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    padding: 0.4rem 0.9rem 0.4rem 0.6rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-left: 3px solid var(--xo-red);
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
}
.xo-hero .hero-badge::before {
    content: '';
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--xo-red);
    box-shadow: 0 0 6px var(--xo-red);
    animation: blink 1.2s infinite;
}

.xo-hero .event-title {
    font-family: var(--xo-font-phage);
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 1;
    color: #fff;
    text-shadow: 0 2px 30px rgba(0,0,0,0.8);
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.xo-hero .event-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.04em;
}

/* Info chips */
.hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.hero-chip {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.9);
    padding: 0.38rem 0.9rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.hero-chip i {
    color: var(--xo-red);
    font-size: 0.75rem;
}

/* Countdown — sharp data-display style */
.xo-countdown {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.countdown-unit {
    background: rgba(5,5,5,0.65);
    border: 1px solid var(--xo-border);
    border-top: 2px solid var(--xo-red);
    border-radius: 0;
    padding: 0.8rem 1.1rem 0.7rem;
    min-width: 74px;
    text-align: center;
    backdrop-filter: blur(8px);
    position: relative;
}
.countdown-unit::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--xo-red-glow), transparent);
}
.countdown-num {
    font-family: var(--xo-font-phage);
    font-size: 2.6rem;
    line-height: 1;
    color: #fff;
    display: block;
}
.countdown-label {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--xo-text-dim);
    margin-top: 4px;
    display: block;
}

/* Happening Now */
.happening-now {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(25,135,84,0.12);
    border: 1px solid rgba(25,135,84,0.4);
    border-left: 3px solid #198754;
    color: #6ec99b;
    padding: 0.65rem 1.5rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 2.5rem;
}
.happening-now .dot {
    width: 8px; height: 8px;
    background: #198754;
    border-radius: 50%;
    box-shadow: 0 0 8px #198754;
    animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.15} }

/* CTA button */
.btn-hero {
    padding: 0.9rem 2.8rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: transform var(--xo-transition), box-shadow var(--xo-transition);
}
.btn-hero.btn-danger {
    animation: hero-btn-pulse 2.8s ease-in-out infinite;
}
/* When the button also has the entrance animation class, run both in sequence */
.xo-ha.btn-hero.btn-danger {
    animation: xo-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) both,
               hero-btn-pulse 2.8s ease-in-out 1.7s infinite;
    animation-delay: 0.86s, 1.7s;
}
@keyframes hero-btn-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(220,53,69,0), 0 4px 20px rgba(220,53,69,0.25); }
    50%     { box-shadow: 0 0 0 8px rgba(220,53,69,0), 0 4px 30px rgba(220,53,69,0.55); }
}
.btn-hero:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(220,53,69,0.5) !important;
}

/* Hero event image */
.hero-event-img {
    max-height: clamp(180px, 34vh, 380px);
    max-width: min(90%, 520px);
    width: auto;
    object-fit: contain;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 8px 40px rgba(0,0,0,0.9));
    transition: filter var(--xo-transition);
    animation:
        xo-scale-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both,
        xo-float    6s ease-in-out 1.1s infinite;
}

/* ─── Hero Micro-Animations ─── */
@keyframes xo-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes xo-scale-in {
    from { opacity: 0; transform: scale(0.86) translateY(14px); filter: drop-shadow(0 8px 40px rgba(0,0,0,0.9)) blur(3px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);    filter: drop-shadow(0 8px 40px rgba(0,0,0,0.9)); }
}
@keyframes xo-fade-down {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes xo-float {
    0%,100% { transform: translateY(0)    scale(1); }
    50%      { transform: translateY(-11px) scale(1.018); }
}
/* Staggered entrance helper classes */
.xo-ha   { opacity: 0; animation: xo-fade-up 0.7s cubic-bezier(0.22,1,0.36,1) both; }
.xo-ha-0 { animation-delay: 0.05s; }
.xo-ha-1 { animation-delay: 0.22s; }
.xo-ha-2 { animation-delay: 0.38s; }
.xo-ha-3 { animation-delay: 0.54s; }
.xo-ha-4 { animation-delay: 0.70s; }
.xo-ha-5 { animation-delay: 0.86s; }
.xo-ha-6 { animation-delay: 1.00s; }
.xo-ha-down { animation-name: xo-fade-down; }

/* ─── Section structure ─── */
.xo-section { padding: 5rem 0; }
.xo-section-dark   { background: var(--xo-dark); }
.xo-section-darker { background: var(--xo-dark-2); }

/* Headings — gradient underline replaces flat bar */
.section-heading {
    font-family: var(--xo-font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #fff;
    margin-bottom: 0.5rem;
}
.section-heading::after {
    content: '';
    display: block;
    width: 180px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--xo-red) 30%, var(--xo-red) 70%, transparent);
    margin: 0.7rem auto 0;
    opacity: 0.9;
}
.section-subheading {
    color: var(--xo-text-dim);
    font-weight: 400;
    font-size: 0.95rem;
    margin-bottom: 3rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Events Strip ─── */
#events {
    background: var(--xo-dark-2);
    padding: 3.5rem 0;
}
.events-strip {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--xo-red) transparent;
    flex-wrap: wrap;
    justify-content: center;
}
@media (min-width: 992px) {
    .events-strip {
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, black 2%, black 92%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, black 2%, black 92%, transparent 100%);
    }
}
.events-strip::-webkit-scrollbar { height: 3px; }
.events-strip::-webkit-scrollbar-track { background: transparent; }
.events-strip::-webkit-scrollbar-thumb { background: var(--xo-red); }

.event-card {
    flex: 0 0 270px;
    background: var(--xo-dark-3);
    border-radius: 0;
    overflow: hidden;
    border: 1px solid var(--xo-border);
    border-top: 3px solid #444;
    transition: transform var(--xo-transition), box-shadow var(--xo-transition), border-color var(--xo-transition);
    position: relative;
}
.event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(220,53,69,0.25);
    border-color: rgba(220,53,69,0.3);
}
.event-card.status-upcoming { border-top-color: var(--xo-red); }
.event-card.status-live     { border-top-color: #198754; }
.event-card.status-past     { border-top-color: #444; }

.event-card-img {
    width: 100%; height: 155px;
    object-fit: cover;
    background: #1a1a1a;
    display: block;
    transition: filter var(--xo-transition);
}
.event-card:hover .event-card-img { filter: brightness(1.08); }

.event-card-img-placeholder {
    width: 100%; height: 155px;
    background: linear-gradient(135deg, var(--xo-dark-3) 0%, var(--xo-dark-4) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #333; font-size: 2rem;
}
.event-card-body { padding: 1rem 1.1rem; }

.event-card-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}
.event-card-status::before {
    content: '';
    display: inline-block;
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.event-card-status.upcoming { color: var(--xo-red); }
.event-card-status.upcoming::before { background: var(--xo-red); box-shadow: 0 0 5px var(--xo-red); }
.event-card-status.live     { color: #4caf82; }
.event-card-status.live::before { background: #198754; box-shadow: 0 0 5px #198754; animation: blink 1.2s infinite; }
.event-card-status.past     { color: #555; }
.event-card-status.past::before { background: #444; }

.event-card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.4rem;
    line-height: 1.3;
}
.event-card-date {
    font-size: 0.76rem;
    color: var(--xo-text-dim);
    margin-bottom: 0.9rem;
    line-height: 1.7;
}
.event-card-date i { color: var(--xo-red); opacity: 0.7; }

.event-card-btn {
    width: 100%;
    font-size: 0.7rem;
    padding: 0.45rem 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 1px;
}

/* ─── Spots Remaining — Shared shimmer keyframes ─── */
@keyframes spots-shimmer {
    0%     { transform: translateX(-100%); }
    28%    { transform: translateX(250%); }
    28.1%  { transform: translateX(-100%); }
    100%   { transform: translateX(-100%); }
}
@keyframes spots-pulse-glow {
    0%,100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
@keyframes spots-bar-pulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(220,53,69,0); }
    50%      { box-shadow: 0 0 18px 4px rgba(220,53,69,0.45); }
}

/* ─── HERO urgency bar ─── */
/* Replaces the old small chip — full-width attention bar */
.hero-spots-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 540px;
    margin: 0 auto 1.75rem;
    padding: 0.6rem 1.25rem;
    position: relative;
    overflow: hidden;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 2px;
}
/* Shimmer layer */
.hero-spots-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 50%; height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.28) 50%,
        transparent 100%);
    transform: translateX(-100%);
    animation: spots-shimmer 3s linear infinite;
    pointer-events: none;
}
.hero-spots-bar .spots-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}
.hero-spots-bar.urgency-low {
    background: linear-gradient(90deg, rgba(180,100,0,0.55), rgba(200,120,0,0.45));
    border: 1px solid rgba(255,165,0,0.5);
    border-left: 3px solid #ffaa00;
    color: #ffcc66;
}
.hero-spots-bar.urgency-medium {
    background: linear-gradient(90deg, rgba(200,80,0,0.6), rgba(220,100,0,0.5));
    border: 1px solid rgba(255,120,0,0.55);
    border-left: 3px solid #ff8800;
    color: #ffaa44;
}
.hero-spots-bar.urgency-high {
    background: linear-gradient(90deg, rgba(160,20,30,0.7), rgba(200,30,45,0.55));
    border: 1px solid rgba(220,53,69,0.6);
    border-left: 3px solid #dc3545;
    color: #ff7788;
}
.hero-spots-bar.urgency-critical {
    background: linear-gradient(90deg, rgba(180,10,20,0.85), rgba(220,53,69,0.7));
    border: 1px solid #dc3545;
    border-left: 3px solid #ff2233;
    color: #ffaaaa;
}
.hero-spots-bar.urgency-sold-out {
    background: rgba(40,40,40,0.7);
    border: 1px solid #444;
    border-left: 3px solid #666;
    color: #777;
}
.hero-spots-bar.urgency-sold-out::before { display: none; }

/* ─── EVENT CARD — image banner strip ─── */
.event-card-img-wrap {
    position: relative;
    overflow: hidden;
}
.event-card-spots-banner {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 0.45rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    overflow: hidden;
}
/* Shimmer on card banner */
.event-card-spots-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 35%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: spots-shimmer 3s linear infinite;
    pointer-events: none;
}
.event-card-spots-banner.urgency-low {
    background: linear-gradient(90deg, rgba(140,75,0,0.92), rgba(160,90,0,0.88));
    color: #ffdd88;
}
.event-card-spots-banner.urgency-medium {
    background: linear-gradient(90deg, rgba(160,60,0,0.93), rgba(190,70,0,0.9));
    color: #ffbb55;
}
.event-card-spots-banner.urgency-high {
    background: linear-gradient(90deg, rgba(140,15,25,0.95), rgba(190,30,45,0.92));
    color: #ffaaaa;
}
.event-card-spots-banner.urgency-critical {
    background: linear-gradient(90deg, rgba(180,10,20,0.97), rgba(220,53,69,0.95));
    color: #fff;
}
.event-card-spots-banner.urgency-sold-out {
    background: rgba(20,20,20,0.88);
    color: #666;
}
.event-card-spots-banner.urgency-sold-out::before { display: none; }

/* ─── REGISTRATION PAGE inline chip ─── */
.reg-spots-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.18rem 0.5rem;
    border-radius: 2px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
    white-space: nowrap;
}
.reg-spots-chip::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 35%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
    transform: translateX(-100%);
    animation: spots-shimmer 3s linear infinite;
    pointer-events: none;
}
.reg-spots-chip.urgency-low    { background: rgba(200,120,0,0.18); border: 1px solid rgba(255,165,0,0.4); color: #ffaa00; }
.reg-spots-chip.urgency-medium { background: rgba(220,90,0,0.2); border: 1px solid rgba(255,120,0,0.45); color: #ff8800; }
.reg-spots-chip.urgency-high   { background: rgba(220,53,69,0.2); border: 1px solid rgba(220,53,69,0.5); color: #ff5566; }
.reg-spots-chip.urgency-critical { background: rgba(220,53,69,0.3); border: 1px solid #dc3545; color: #ff2233; }
.reg-spots-chip.urgency-sold-out { background: rgba(60,60,60,0.2); border: 1px solid #444; color: #666; }
.reg-spots-chip.urgency-sold-out::after { display: none; }

/* ─── Services ─── */
.service-item { padding: 0 0.5rem; }

/* Angular clip-path icon — motorsport/tech feel */
.service-icon-wrap {
    width: 76px; height: 76px;
    background: rgba(220,53,69,0.07);
    border: 1px solid rgba(220,53,69,0.25);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.6rem;
    color: var(--xo-red);
    transition: background var(--xo-transition), border-color var(--xo-transition), transform var(--xo-transition);
    position: relative;
}
/* Inner glow corner accent */
.service-icon-wrap::before {
    content: '';
    position: absolute;
    top: 0; right: 14px;
    width: 20px; height: 1px;
    background: var(--xo-red);
    opacity: 0.5;
    transform-origin: right;
    transition: opacity var(--xo-transition);
}
.service-item:hover .service-icon-wrap {
    background: rgba(220,53,69,0.14);
    border-color: rgba(220,53,69,0.6);
    transform: translateY(-4px);
}
.service-item:hover .service-icon-wrap::before { opacity: 1; }

.service-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}
.service-text {
    color: var(--xo-text-dim);
    font-size: 0.875rem;
    line-height: 1.75;
}

/* ─── Timeline ─── */
.timeline {
    list-style: none;
    padding: 0;
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50%; width: 1px;
    background: linear-gradient(to bottom, transparent, var(--xo-red) 8%, var(--xo-red) 92%, transparent);
    transform: translateX(-50%);
}
.timeline li {
    position: relative;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
}
.timeline li:nth-child(odd)  { flex-direction: row; }
.timeline li:nth-child(even) { flex-direction: row-reverse; }

.timeline-image {
    flex: 0 0 96px; width: 96px; height: 96px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--xo-red);
    z-index: 2;
    position: relative;
    background: var(--xo-dark-3);
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    color: #fff;
    font-weight: 700; font-size: 0.75rem; line-height: 1.3;
    box-shadow: 0 0 0 4px var(--xo-dark-2), 0 0 20px rgba(220,53,69,0.2);
}
.timeline-image img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.timeline-panel {
    background: var(--xo-dark-3);
    border: 1px solid var(--xo-border);
    border-left: 3px solid var(--xo-red);
    border-radius: 0 4px 4px 0;
    padding: 1.1rem 1.4rem;
    width: calc(50% - 76px);
    margin: 0 1.75rem;
    position: relative;
}
/* Right-side panels flip the border */
.timeline li:nth-child(even) .timeline-panel {
    border-left: 1px solid var(--xo-border);
    border-right: 3px solid var(--xo-red);
    border-radius: 4px 0 0 4px;
}
.timeline-panel h4 {
    font-size: 0.75rem;
    color: var(--xo-red);
    margin-bottom: 0.2rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.timeline-panel .subheading {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.timeline-panel p {
    font-size: 0.85rem;
    color: var(--xo-text-dim);
    margin: 0;
    line-height: 1.7;
}

/* Mobile timeline */
@media (max-width: 767px) {
    .timeline::before { left: 24px; }
    .timeline li,
    .timeline li:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 56px;
    }
    .timeline-image {
        position: absolute;
        left: -16px; top: 0;
        width: 72px; height: 72px;
    }
    .timeline-panel,
    .timeline li:nth-child(even) .timeline-panel {
        width: 100%;
        margin: 0.75rem 0 0;
        border-left: 3px solid var(--xo-red);
        border-right: 1px solid var(--xo-border);
        border-radius: 0 4px 4px 0;
    }
}

/* ─── Timeline accordion ─── */
.timeline-accordion {
    max-width: 920px;
    margin: 0 auto;
}
.timeline-year-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--xo-border);
}
.timeline-year-btn {
    background: var(--xo-dark-3) !important;
    color: #fff !important;
    border: none;
    border-left: 3px solid var(--xo-red);
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: none !important;
    transition: background var(--xo-transition);
}
.timeline-year-btn:not(.collapsed) {
    background: #1c1c1c !important;
    border-left-color: var(--xo-red);
}
.timeline-year-btn:hover { background: #1f1f1f !important; }
.timeline-year-btn::after { filter: invert(1) brightness(0.7); }

.timeline-year-num {
    font-family: var(--xo-font-phage);
    font-size: 2rem;
    line-height: 1;
    color: var(--xo-red);
    min-width: 64px;
    letter-spacing: 0.05em;
}
.timeline-accordion-body {
    background: var(--xo-dark-2);
    padding: 2.5rem 1.5rem 1.5rem;
}

/* ─── Story cap ─── */
.timeline-story-cap {
    display: inline-flex;
    flex-direction: column;
    align-items: center; justify-content: center;
    width: 120px; height: 120px;
    border-radius: 50%;
    border: 3px solid var(--xo-red);
    background: var(--xo-dark-3);
    box-shadow: 0 0 0 4px var(--xo-dark-2), 0 0 24px rgba(220,53,69,0.2);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
    padding: 0.5rem;
    animation: story-pulse 3s ease-in-out infinite;
}
@keyframes story-pulse {
    0%,100% { box-shadow: 0 0 0 4px var(--xo-dark-2), 0 0 16px rgba(220,53,69,0.15); }
    50%     { box-shadow: 0 0 0 4px var(--xo-dark-2), 0 0 32px rgba(220,53,69,0.4); }
}
.timeline-story-cap p { margin: 0; color: #fff; }

/* ─── Team ─── */
.team-picture { text-align: center; }
.team-picture img {
    width: 100%;
    max-width: 820px;
    border-radius: 4px;
    border: 1px solid var(--xo-border);
    box-shadow: 0 0 60px rgba(220,53,69,0.1), 0 20px 60px rgba(0,0,0,0.5);
}

/* ─── Contact ─── */
.contact-text {
    color: #999;
    line-height: 1.85;
    font-size: 0.92rem;
}
.contact-text p {
    border-left: 2px solid var(--xo-border);
    padding-left: 1.1rem;
    margin-bottom: 1.4rem;
    transition: border-color var(--xo-transition);
}
.contact-text p:hover { border-left-color: var(--xo-red); }
.contact-text a {
    color: var(--xo-red);
    text-decoration: none;
    font-weight: 600;
}
.contact-text a:hover { color: #fff; }

/* ─── Footer ─── */
.xo-footer {
    background: #050505;
    border-top: 1px solid rgba(220,53,69,0.3);
    box-shadow: 0 -1px 30px rgba(220,53,69,0.08);
    padding: 1.75rem 0;
    color: #555;
    font-size: 0.8rem;
}
.xo-footer a { color: #4a4a4a; text-decoration: none; transition: color var(--xo-transition); }
.xo-footer a:hover { color: var(--xo-red); }

.btn-social {
    background: #111;
    border: 1px solid #2a2a2a;
    color: #888;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    transition: background var(--xo-transition), border-color var(--xo-transition), color var(--xo-transition), transform var(--xo-transition);
}
.btn-social:hover {
    background: var(--xo-red);
    border-color: var(--xo-red);
    color: #fff;
    transform: translateY(-2px);
}

/* ─── Entrance animations ─── */
.xo-fade-in {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.xo-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.xo-fade-in:nth-child(2) { transition-delay: 0.08s; }
.xo-fade-in:nth-child(3) { transition-delay: 0.16s; }
.xo-fade-in:nth-child(4) { transition-delay: 0.24s; }

/* ─── Scrollbar (global) ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--xo-dark); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--xo-red); }

/* ─── Bootstrap Overrides (XO Design System) ─── */

/* All buttons: sharp motorsport style */
.btn {
    border-radius: 2px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform var(--xo-transition), box-shadow var(--xo-transition),
                background-color var(--xo-transition), border-color var(--xo-transition);
}
.btn-lg { border-radius: 2px; }
.btn-sm { border-radius: 2px; font-size: 0.72rem; }

/* Hover lift on primary action */
.btn-danger:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(220,53,69,0.4);
}

/* Dark-theme secondary outline */
.btn-outline-secondary {
    color: var(--xo-text-dim);
    border-color: var(--xo-border);
    background: transparent;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: var(--xo-dark-3);
    border-color: #555;
    color: #fff;
}
.btn-outline-secondary:not(:disabled):not(.disabled):active,
.show > .btn-outline-secondary.dropdown-toggle {
    background-color: var(--xo-dark-3);
    border-color: #555;
    color: #fff;
}

/* Dark-theme danger outline */
.btn-outline-danger {
    color: var(--xo-red);
    border-color: rgba(220,53,69,0.45);
}
.btn-outline-danger:hover,
.btn-outline-danger:focus {
    background-color: rgba(220,53,69,0.1);
    border-color: var(--xo-red);
    color: var(--xo-red);
}

/* Form check: dark theme */
.form-check-input {
    background-color: var(--xo-dark-3);
    border-color: #555;
}
.form-check-input:checked {
    background-color: var(--xo-red);
    border-color: var(--xo-red);
}
.form-check-input:focus {
    border-color: var(--xo-red);
    box-shadow: 0 0 0 0.18rem rgba(220,53,69,0.22);
}

/* Alert overrides */
.alert-danger  { background: rgba(220,53,69,0.12); border-color: rgba(220,53,69,0.35); color: #ffaaaa; }
.alert-success { background: rgba(25,135,84,0.12); border-color: rgba(25,135,84,0.35); color: #6ec99b; }
.alert-warning { background: rgba(255,193,7,0.1);  border-color: rgba(255,193,7,0.3);  color: #ffc107; }

/* Badge overrides */
.badge.bg-success { background-color: rgba(25,135,84,0.25) !important; color: #6ec99b; border: 1px solid rgba(25,135,84,0.4); }
.badge.bg-warning { background-color: rgba(255,193,7,0.2)  !important; color: #ffc107; border: 1px solid rgba(255,193,7,0.35); }
.badge.bg-secondary { background-color: var(--xo-dark-3) !important; color: var(--xo-text-dim); border: 1px solid var(--xo-border); }

/* ─── Mobile / Responsive ─── */

/* Navbar: constrain logo width on mobile to preserve aspect ratio */
@media (max-width: 991.98px) {
    #mainNav .navbar-brand img {
        max-height: none;
        max-width: 200px;
    }
}

@media (max-width: 767px) {
    /* Hero: reduce excessive top padding */
    .xo-hero .hero-content {
        padding: 5.5rem 1.25rem 2rem;
    }

    /* Hero event image: smaller so countdown/CTA aren't pushed far down */
    .hero-event-img {
        max-height: 165px;
        max-width: 82%;
    }

    /* Hero chips: slightly smaller text */
    .hero-chip {
        font-size: 0.76rem;
        padding: 0.3rem 0.7rem;
    }

    /* Countdown: fit all 4 units in a single row */
    .xo-countdown { gap: 0.3rem; }
    .countdown-unit {
        min-width: 0;
        width: calc(25% - 0.25rem);
        padding: 0.6rem 0.4rem 0.5rem;
    }
    .countdown-num { font-size: 1.9rem; }
    .countdown-label { font-size: 0.55rem; letter-spacing: 0.12em; }

    /* Sections: tighter padding on mobile */
    .xo-section { padding: 3rem 0; }

    /* Section heading underline: proportionally narrower */
    .section-heading::after { width: 100px; }

    /* Events: cards full-width on mobile */
    .event-card {
        flex: 0 0 calc(100vw - 3rem);
        max-width: 420px;
    }

    /* Services: 2-column grid on mobile */
    .row.text-center.g-4 > [class*="col-md-3"] {
        width: 50%;
    }

    /* Timeline accordion: reduce padding on mobile */
    .timeline-accordion-body {
        padding: 1.25rem 0.75rem 1rem;
    }
    .timeline-year-btn {
        padding: 0.8rem 1rem;
    }
    .timeline-year-num { font-size: 1.65rem; }

    /* Timeline list: tighten on mobile */
    .timeline li { margin-bottom: 1.75rem; }
    .timeline-panel { padding: 0.85rem 1rem; }

    /* Story cap: slightly smaller on mobile */
    .timeline-story-cap {
        width: 100px;
        height: 100px;
        font-size: 0.72rem;
    }

    /* Footer: stack layout on mobile */
    .xo-footer .container > div {
        text-align: center !important;
    }
    .xo-footer .d-flex { justify-content: center !important; }
}

/* Very small phones */
@media (max-width: 400px) {
    .xo-hero .hero-content { padding: 4rem 1rem 1.5rem; }
    .countdown-num { font-size: 1.65rem; }
    .hero-event-img { max-height: 140px; }
    .event-card { flex: 0 0 calc(100vw - 2rem); }
}

/* ─── Shared nav cart icon ─── */
.xo-nav-cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: color 0.2s;
}
.xo-nav-cart-icon:hover { color: #fff; }
.xo-nav-cart-icon .cart-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: var(--xo-red);
    color: #fff;
    border-radius: 50%;
    width: 16px; height: 16px;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Remove auto-margin from toggler when inside the flex wrapper */
#mainNav .navbar-toggler.xo-toggler { margin-left: 0; }
