/**
 * Mobile Hero Image Fix
 * Adds hero background image for mobile devices
 * Version: 1.0.0
 */

/* Mobile Hero Background Image */
@media (max-width: 768px) {
    /* Add background image to hero section on mobile */
    .hero-section-enhanced {
        background-image: url('../images/hero-bg-mobile.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        min-height: 500px;
    }

    /* Fallback gradient if image doesn't exist */
    .hero-section-enhanced:before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(45, 95, 63, 0.9) 0%, rgba(46, 125, 50, 0.9) 100%);
        z-index: 1;
    }

    /* Ensure content is above background */
    .hero-content-wrapper {
        position: relative;
        z-index: 2;
    }

    /* Improve contrast for mobile */
    .hero-overlay {
        background: rgba(0, 0, 0, 0.4);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
}

/* Featured Section Image Fix for Mobile */
@media (max-width: 768px) {
    /* Force featured trail images to show */
    .featured-trail-card .trail-image {
        display: block !important;
        min-height: 200px;
        background-size: cover;
        background-position: center;
    }

    .featured-trail-card img {
        display: block !important;
        width: 100%;
        height: auto;
        min-height: 200px;
        object-fit: cover;
    }

    /* Add placeholder if no featured image */
    .featured-trail-card .trail-image:not(:has(img)) {
        background-image: url('../images/trail-placeholder.jpg');
        background-color: #f0f0f0;
    }
}

/* Alternative: Use the desktop hero background on mobile too */
@media (max-width: 768px) {
    .hero-section-enhanced {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
            url('../images/cliffs-of-moher.jpg'),
            url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
        background-size: cover;
        background-position: center;
        background-attachment: scroll; /* Better for mobile performance */
    }
}

/* Hero Section Mobile Layout Improvements */
@media (max-width: 768px) {
    .hero-section-enhanced {
        padding: 60px 15px 40px;
        text-align: center;
    }

    .hero-brand {
        font-size: 2rem !important;
        margin-bottom: 15px;
    }

    .hero-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 15px;
    }

    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px;
    }

    .hero-stats {
        flex-direction: row;
        justify-content: space-around;
        margin-bottom: 30px;
        gap: 10px;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-number {
        font-size: 1.5rem !important;
    }

    .stat-label {
        font-size: 0.75rem !important;
    }

    .hero-cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .hero-cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}