/**
 * Hero Section Component Styles
 *
 * This file contains styling for hero/header image sections used on:
 * - Events archive page
 * - Business Directory archive page
 * - Knowledge Hub archive page
 * - On Demand archive page
 * - Single pages (future enhancement)
 *
 * Hero sections are configured through WordPress admin settings and use
 * dynamic CSS values from user preferences.
 *
 * @package MemberPulse
 * @subpackage Components
 */

/* Base Hero Section */
.memberpulse-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    font-family: inherit;
}


/* Hero Background Image */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark Overlay for Text Readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1;
}

/* Hero Content Container */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 75rem;
    width: 100%;
    padding: 0;
    text-align: left; /* Default, overridden by settings */
}

/* Hero Heading */
.hero-content h1 {
    margin: 0 0 1rem 0;
    font-size: 3rem; /* Default, overridden by settings */
    font-weight: 700;
    line-height: 1.2;
    color: white; /* Default, overridden by settings */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Hero Subheading */
.hero-content p {
    margin: 0;
    font-size: 1.125rem; /* Default, overridden by settings */
    font-weight: 300;
    line-height: 1.5;
    color: white; /* Default, overridden by settings */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 600px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

@media (max-width: 768px) {
    .memberpulse-hero {
        height: 70% !important; /* Reduce height on tablets */
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .memberpulse-hero {
        height: 60% !important; /* Further reduce height on mobile */
    }

    .hero-content {
        padding: 0 0.75rem;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Text Alignment Variations (Applied via inline styles from settings) */
.hero-content.text-center {
    text-align: center;
}

.hero-content.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.hero-content.text-right {
    text-align: right;
}

.hero-content.text-right p {
    margin-left: auto;
}

/* Fallback for when no hero image is set */
.memberpulse-hero.no-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 200px;
}

.memberpulse-hero.no-image .hero-overlay {
    background-color: rgba(0, 0, 0, 0.3);
}