/* =========================================
   HOMEPAGE SPECIFIC STYLES (home.css)
   ========================================= */

/* --- 1. HERO SECTION (Tighter & Responsive) --- */
.hero {
    background: url('https://hwy91kickincancer.com/images/gravel-road-runners2.webp') no-repeat center center/cover;
    /* Changed from 90vh to 75vh to show content below fold */
    min-height: 75vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    position: relative;
    /* Fix for iOS scrolling */
    background-attachment: scroll; 
}

/* Dark Overlay */
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 39, 33, 0.4); 
}

/* The Content Box */
.hero-content {
    background-color: rgba(255, 255, 255, 0.96);
    padding: 50px 30px; /* Slightly reduced padding */
    max-width: 750px;
    width: 100%;
    border-radius: 4px;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border-top: 5px solid var(--brand-dark);
}

.hero-tagline {
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 700;
}

.hero h1 {
    font-size: 3rem; /* Slightly smaller for better fit */
    line-height: 1.1;
    margin-bottom: 15px;
    color: var(--brand-dark);
    font-weight: 800;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 25px;
    color: var(--text-main);
    line-height: 1.5;
}

/* --- 2. THE RIBBON BAR --- */
.ribbon-bar {
    height: 8px;
    width: 100%;
    background: linear-gradient(90deg, #FF69B4, #800080, #0000FF, #008000, #FFFF00, #FFA500, #FF0000);
}

/* --- 3. COUNTDOWN TIMER SECTION (High Visibility) --- */
.countdown-section {
    background-color: var(--brand-dark);
    color: var(--white);
    padding: 25px 0; /* Compact padding */
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.countdown-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.countdown-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--white);
    opacity: 0.9;
    margin-right: 10px;
}

.countdown-timer {
    display: flex;
    gap: 20px; /* Tighter gap */
}

.time-block {
    text-align: center;
    min-width: 55px;
}

.time-block span {
    display: block;
    font-size: 2.2rem; /* Big readable numbers */
    font-weight: 800;
    color: var(--brand-gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.time-block small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

/* --- 4. STATS STRIP --- */
.stats-strip {
    background-color: var(--white);
    padding: 50px 0; /* Reduced from 70px */
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.2rem;
    color: var(--brand-dark);
    margin-bottom: 5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums; 
}

.stat-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* --- 5. ORIGIN STORY --- */
.origin-section {
    padding: 80px 0;
    background-color: #f4f7f6;
}

.origin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.origin-image img {
    border-radius: 4px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); 
    width: 100%;
}

.quote-box {
    border-left: 4px solid var(--brand-dark);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: #444;
    font-size: 1.1rem;
    line-height: 1.5;
}

/* --- 6. ROUTE & CARDS --- */
.route-section {
    background-color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.route-section p { color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; }

.route-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.route-card {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px 20px;
    width: 300px;
    border-radius: 4px;
    transition: 0.3s;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.route-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--brand-gold);
}

.route-card i {
    font-size: 2rem;
    color: var(--brand-dark);
    margin-bottom: 15px;
    display: block;
}

.route-card h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--brand-dark);
}

.route-card p {
    font-size: 0.9rem; 
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- 7. SPONSORS (Full Color) --- */
/* --- 7. SPONSORS (Full Color & Larger) --- */
.sponsor-section {
    text-align: center;
    padding: 70px 0;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px; /* More breathing room */
    margin-top: 40px;
}

.sponsor-logos img {
    height: 110px; /* Much larger size */
    width: auto; 
    transition: transform 0.3s ease;
}

.sponsor-logos img:hover {
    transform: translateY(-5px);
}

/* Mobile: Scale down slightly so they fit on screen */
@media (max-width: 600px) {
    .sponsor-logos img { height: 80px; }
}
/* --- 8. SURVIVOR & RUNNER STORIES --- */
.stories-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.story-card {
    background: var(--white);
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--brand-gold); /* Gold accent */
}

.story-card p {
    font-size: 0.95rem;
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.story-author h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin: 0;
}

.story-author span {
    font-size: 0.8rem;
    color: #888;
}

/* --- 9. WAYS TO HELP (Volunteer & Mile Markers) --- */
.help-section {
    padding: 80px 0;
    background-color: var(--brand-dark);
    color: var(--white);
    text-align: center;
}

.help-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-top: 40px;
    text-align: left;
}

.help-card {
    background: rgba(255,255,255,0.05); /* Transparent white */
    padding: 40px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.help-card h3 {
    color: var(--brand-gold);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.help-card p {
    color: #ddd;
    margin-bottom: 25px;
}

/* --- 10. NEW: PHOTO GALLERY GRID --- */
.gallery-section {
    padding: 0; /* Full width, no padding */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 images side-by-side */
    gap: 0; /* Seamless look */
}

.gallery-item {
    position: relative;
    height: 300px; /* Fixed height */
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Effect: Zoom in slightly */
.gallery-item:hover img {
    transform: scale(1.1);
}

/* Optional Overlay on Hover */
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 39, 33, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--brand-gold);
    font-size: 2rem;
}

/* --- UPDATED: WAYS TO HELP (With Background Image) --- */
.help-section {
    /* Adding a background image of a gravel road */
    background: linear-gradient(rgba(20, 39, 33, 0.9), rgba(20, 39, 33, 0.85)), 
                url('https://images.unsplash.com/photo-1445384763658-040093982930?ixlib=rb-1.2.1&auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
    background-attachment: fixed; /* Parallax effect (desktop) */
    padding: 100px 0;
    color: var(--white);
    text-align: center;
}

/* Mobile Tweaks for Images */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); } /* 2x2 on tablet */
    .help-section { background-attachment: scroll; } /* Disable parallax on mobile */
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; } /* Stacked on phone */
    .gallery-item { height: 250px; }
}
@media (max-width: 768px) {
    .help-grid { grid-template-columns: 1fr; }
}
/* =========================================
   RESPONSIVE ADJUSTMENTS (CRITICAL)
   ========================================= */

@media (max-width: 900px) {
    .hero { min-height: auto; padding: 60px 20px; } /* Let content dictate height */
    .hero h1 { font-size: 2.5rem; }
    .origin-grid { grid-template-columns: 1fr; gap: 40px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 600px) {
    /* MOBILE HERO: Compact to show countdown */
    .hero {
        padding: 80px 15px 40px; /* Top padding clears the navbar */
        min-height: auto; 
    }
    
    .hero-content {
        padding: 30px 20px;
        margin-bottom: 0;
    }

    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }

    /* COUNTDOWN ON MOBILE */
    .countdown-section { padding: 20px 0; }
    .countdown-flex { flex-direction: column; gap: 10px; }
    .countdown-label { margin-bottom: 5px; font-size: 1rem; }
    .time-block span { font-size: 1.8rem; }
    .time-block { min-width: 45px; }

    /* STATS ON MOBILE */
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
    .stat-item h3 { font-size: 1.8rem; }
    
    .route-card { width: 100%; }
}
