/* Patriotic Color Variables */
:root {
    --patriot-red: #B22234;
    --patriot-white: #FFFFFF;
    --patriot-blue: #3C3B6E;
    --star-white: #FFF;
    --dark-blue: #002868;
}

/* Global Styles */
body {
    font-family: 'Georgia', serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
}

/* Navbar Customization */
.navbar-brand {
    color: var(--patriot-blue) !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: var(--dark-blue) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--patriot-red) !important;
}

.navbar-nav .nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--patriot-red);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover:after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero-section {
    background: 
        linear-gradient(rgba(60, 59, 110, 0.8), rgba(0, 40, 104, 0.8)),
        url('/static/images/480825111_1350382056361724_2698447386396046619_n.webp') center/cover no-repeat;
    color: white;
    padding: 120px 0;
    position: relative;
    overflow: hidden;
    background-attachment: fixed;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, transparent 30%, rgba(178, 34, 52, 0.1) 70%),
        radial-gradient(circle at 80% 50%, transparent 30%, rgba(60, 59, 110, 0.1) 70%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse-bg 4s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

@keyframes drift {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 3px 3px 8px rgba(0,0,0,0.7), 0 0 20px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #FFFFFF;
    position: relative;
    display: inline-block;
    z-index: 2;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.8), 0 0 15px rgba(0,0,0,0.6);
    font-weight: 400;
    letter-spacing: 1px;
    z-index: 2;
    position: relative;
}

/* Button Styles */
.btn-primary {
    background-color: var(--patriot-blue);
    border-color: var(--patriot-blue);
}

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

.btn-danger {
    background-color: var(--patriot-red);
    border-color: var(--patriot-red);
}

.btn-danger:hover {
    background-color: #8B0000;
    border-color: #8B0000;
}

.btn-patriot {
    background: linear-gradient(45deg, var(--patriot-red) 0%, var(--patriot-red) 33%, white 33%, white 66%, var(--patriot-blue) 66%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    border: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-patriot:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card-header {
    background-color: var(--patriot-blue);
    color: white;
    font-weight: bold;
}

/* Section Styling */
.section-title {
    color: var(--patriot-blue);
    font-size: 2.5rem;
    font-weight: bold;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--patriot-red) 33%, white 33%, white 66%, var(--patriot-blue) 66%);
}

/* Stars Decoration */
.star-decoration {
    display: inline-block;
    color: var(--patriot-blue);
    margin: 0 10px;
}

/* Hero with Background Image Option */
.hero-section.hero-with-image {
    background: 
        linear-gradient(rgba(60, 59, 110, 0.85), rgba(0, 40, 104, 0.85)),
        url('/static/images/hero-bg.jpg') center/cover;
}

/* Fireworks Animation */
.fireworks {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700;
    animation: firework 1.5s ease-out forwards;
}

@keyframes firework {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* Race Info Cards */
.race-info-card {
    background-color: #f8f9fa;
    border-left: 4px solid var(--patriot-red);
    padding: 20px;
    margin-bottom: 20px;
}

/* Veterans Park Section */
.veterans-section {
    background-color: #f8f9fa;
    padding: 60px 0;
}

/* Footer */
footer {
    background-color: var(--dark-blue) !important;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: #FFD700 !important;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

/* Patriotic Ribbon */
.patriotic-ribbon {
    background: repeating-linear-gradient(
        90deg,
        var(--patriot-red),
        var(--patriot-red) 20px,
        white 20px,
        white 40px
    );
    height: 10px;
    width: 100%;
}

/* Animation for CTA buttons */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(178, 34, 52, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(178, 34, 52, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(178, 34, 52, 0);
    }
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Badge Styles */
.badge {
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Countdown Styles */
#countdown {
    background: rgba(0, 0, 0, 0.6);
    padding: 25px 35px;
    border-radius: 15px;
    display: inline-block;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    #countdown {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .countdown-number {
        -webkit-text-stroke: 1px rgba(0, 0, 0, 0.8);
    }
    
    .countdown-label {
        -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.6);
    }
}

/* Logo Styles */
.navbar-brand img {
    object-fit: contain;
    vertical-align: middle;
}

footer img {
    opacity: 1;
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 40px;
    }
}