/* Random Hero Section Styles */

.random-hero-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #000;
    overflow: hidden;
}

.random-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.random-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.random-hero-text-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.random-hero-title {
    margin: 0;
    padding: 0;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    word-wrap: break-word;
}

.random-hero-description {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
    word-wrap: break-word;
}

/* Sensible default fallbacks (Elementor responsive controls override these) */
@media (max-width: 1024px) {
    .random-hero-title {
        font-size: 36px;
    }

    .random-hero-description {
        font-size: 16px;
    }
}

@media (max-width: 767px) {
    /*
     * Mobile: the SECTION height is controlled by backend (Hero Height
     * mobile control — e.g. 60vh).  The banner IMAGE must display fully
     * inside that section — width fits the mobile screen, height scales
     * in natural aspect ratio, image never overflows the screen.
     *
     * Uses `contain` so the whole image is always visible (no cropping,
     * no horizontal overflow) regardless of whether the image is
     * landscape or portrait.
     *
     * !important + doubled-class selector forces this over any per-slide
     * Elementor "Image Fit" value (cover / fit-width / fit-height /
     * custom) that may have been saved at the desktop level.
     */
    .random-hero-section,
    .random-hero-section.random-hero-section {
        background-size: contain !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        /* iOS Safari has rendering glitches with fixed backgrounds +
           causes the image to look zoomed/jumpy on mobile. Keep it
           scrolling on small screens. */
        background-attachment: scroll !important;
    }

    /* Neutralize per-slide custom width/height CSS vars on mobile so the
       "Custom" image_fit option can't force a stretched size either. */
    .random-hero-section {
        --rh-bg-w: 100%;
        --rh-bg-h: auto;
    }

    .random-hero-title {
        font-size: 28px;
    }

    .random-hero-description {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .random-hero-title {
        font-size: 24px;
    }

    .random-hero-description {
        font-size: 14px;
    }
}

/* Elementor Editor Styles */
.elementor-editor-active .random-hero-section {
    min-height: 400px;
}
