/* ==========================================================
   EXHIBITIO — HERO SLIDER
   ==========================================================
   Purpose:
   - Full-width homepage slider
   - Swiper fade transitions
   - Centered slide content
   - Responsive typography
   - Overlay, navigation, and pagination
   - Slider positioned below the header stacking layer
========================================================== */


/* ==========================================================
   1. HERO SLIDER CONTAINER
   ==========================================================
   Main slider wrapper.

   position: relative:
   Creates the positioning reference for slider elements.

   z-index: 0:
   Keeps the slider in a low stacking layer.

   isolation: isolate:
   Contains internal stacking layers so the overlay and
   slide content cannot escape above unrelated page elements.
========================================================== */

.hero-slider {
    position: relative;
    z-index: 0;
    isolation: isolate;

    width: 100%;
    height: 60vh;
    min-height: 400px;

    overflow: hidden;
    background-color: #000;
}


/* ==========================================================
   2. SWIPER WRAPPER
   ==========================================================
   Holds all slides.

   Scoped to .hero-slider to avoid affecting other Swiper
   components that may be used elsewhere in Exhibitio.
========================================================== */

.hero-slider .swiper-wrapper {
    width: 100%;
    height: 100%;
}


/* ==========================================================
   3. INDIVIDUAL SLIDES
   ==========================================================
   Each slide contains:
   - Background image
   - Color overlay
   - Title, subtitle, description, and button

   Background images cover the available slide area.
========================================================== */

.hero-slider .swiper-slide {
    position: relative;

    width: 100%;
    height: 100%;

    flex-shrink: 0;

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    overflow: hidden;
}


/* ==========================================================
   4. SLIDE OVERLAY
   ==========================================================
   Adds a semi-transparent color above the background image.

   The actual overlay color and opacity are supplied
   dynamically by render.php.

   z-index: 1:
   Places the overlay above the background image.

   pointer-events: none:
   Prevents the overlay from blocking buttons and links.
========================================================== */

.hero-slider .overlay {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 1;
    pointer-events: none;
}


/* ==========================================================
   5. OPTIONAL OVERLAY PRESETS
   ==========================================================
   These classes provide fallback overlay styles.

   They can be used when an inline overlay color is
   not supplied by PHP.
========================================================== */

.hero-slider .overlay-light {
    background-color: rgba(255, 255, 255, 0.4);
}

.hero-slider .overlay-dark {
    background-color: rgba(0, 0, 0, 0.5);
}


/* ==========================================================
   6. HERO CONTENT CONTAINER
   ==========================================================
   Centers the content horizontally and vertically.

   z-index: 2:
   Places text and buttons above the overlay.

   max-width: 1200px:
   Matches the Exhibitio content width.
========================================================== */

.hero-slider .hero-content {
    position: absolute;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    z-index: 2;

    width: 90%;
    max-width: 1200px;

    padding: 2rem;

    color: #fff;
    text-align: center;

    box-sizing: border-box;
}


/* ==========================================================
   7. HERO SUBTITLE
   ==========================================================
   Displays the smaller introductory text above the title.
========================================================== */

.hero-slider .hero-content .subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.3;

    margin: 0 0 10px;

    color: #fff;
}


/* ==========================================================
   8. HERO TITLE
   ==========================================================
   Main heading displayed in each slide.

   Uses a large desktop font size with responsive
   adjustments further below.
========================================================== */

.hero-slider .hero-content h2 {
    font-size: 4.5rem;
    font-weight: 600;
    line-height: 1.3;

    margin: 10px 0;

    color: #fff;
}


/* ==========================================================
   9. HERO DESCRIPTION
   ==========================================================
   Supports paragraphs generated by wpautop() in render.php.

   Keeps spacing consistent between the title,
   description, and button.
========================================================== */

.hero-slider .hero-content .hero-excerpt {
    max-width: 900px;
    margin: 0 auto;
}

.hero-slider .hero-content p {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.6;

    margin: 0 0 30px;

    color: #fff;
}

.hero-slider .hero-content p:last-child {
    margin-bottom: 0;
}


/* ==========================================================
   10. HERO BUTTON
   ==========================================================
   Transparent button with a white border.

   Hover:
   Uses the Exhibitio accent color.

   The button remains above the overlay and clickable.
========================================================== */

.hero-slider .hero-content .button {
    display: inline-block;

    background-color: transparent;
    color: #fff;

    padding: 0.75rem 1.5rem;
    margin-top: 30px;

    border: 1px solid #fff;
    border-radius: 0;

    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;

    text-decoration: none;

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.hero-slider .hero-content .button:hover,
.hero-slider .hero-content .button:focus-visible {
    background-color: var(--exhibitio-accent, #503AA8);
    border-color: var(--exhibitio-accent, #503AA8);
    color: #fff;

    text-decoration: none;
}


/* ==========================================================
   11. SWIPER FADE TRANSITION
   ==========================================================
   Supports Swiper's fade effect.

   Swiper JavaScript controls the transition duration
   and active slide opacity.

   Avoid forcing opacity: 0 on every slide because it
   can interfere with Swiper initialization.
========================================================== */

.hero-slider.swiper-fade .swiper-slide {
    transition-property: opacity;
}

.hero-slider.swiper-fade .swiper-slide-active {
    z-index: 1;
}


/* ==========================================================
   12. NAVIGATION ARROWS
   ==========================================================
   Previous and Next arrows.

   z-index: 3:
   Keeps navigation above overlays and slide content.

   Color changes from light gray to white on hover.
========================================================== */

.hero-slider .swiper-button-prev,
.hero-slider .swiper-button-next {
    width: 50px;
    height: 50px;

    color: #d1d1d1;

    z-index: 3;

    transition: color 0.3s ease;
}

.hero-slider .swiper-button-prev:hover,
.hero-slider .swiper-button-next:hover {
    color: #fff;
}


/* ==========================================================
   13. NAVIGATION ARROW POSITIONS
   ==========================================================
   Positions arrows near the left and right edges
   of the slider.
========================================================== */

.hero-slider .swiper-button-prev {
    left: 30px;
}

.hero-slider .swiper-button-next {
    right: 30px;
}


/* ==========================================================
   14. NAVIGATION ARROW SIZE
   ==========================================================
   Controls the size of Swiper's default arrow icons.
========================================================== */

.hero-slider .swiper-button-prev::after,
.hero-slider .swiper-button-next::after {
    font-size: 24px;
    font-weight: 400;
}


/* ==========================================================
   15. PAGINATION CONTAINER
   ==========================================================
   Centers pagination bullets at the bottom.

   gap:
   Provides consistent spacing between bullets.

   z-index: 3:
   Keeps bullets above slide overlays.
========================================================== */

.hero-slider .swiper-pagination {
    position: absolute;

    bottom: 20px;
    left: 0;

    width: 100%;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 12px;

    z-index: 3;
}


/* ==========================================================
   16. PAGINATION BULLETS
   ==========================================================
   Default bullets are black.

   Uses a larger visual size while keeping
   the actual clickable area consistent.
========================================================== */

.hero-slider .swiper-pagination-bullet {
    width: 8px;
    height: 8px;

    margin: 0 5px;

    background-color: #000;
    opacity: 1;

    border-radius: 50%;

    transform: scale(2);

    cursor: pointer;

    transition:
        background-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}


/* ==========================================================
   17. ACTIVE PAGINATION BULLET
   ==========================================================
   Uses the Exhibitio accent color.

   Includes a subtle glow around the active bullet.
========================================================== */

.hero-slider .swiper-pagination-bullet-active {
    background-color: var(--exhibitio-accent, #503AA8);

    transform: scale(2);

    box-shadow:
        0 0 10px var(--exhibitio-accent, #503AA8);
}


/* ==========================================================
   18. TABLET RESPONSIVE STYLES
   ==========================================================
   Applies to screens 1024px wide and smaller.

   Reduces heading sizes and horizontal spacing.
========================================================== */

@media (max-width: 1024px) {

    .hero-slider {
        height: 55vh;
        min-height: 400px;
    }

    .hero-slider .hero-content {
        width: 90%;
        padding: 1.5rem;
    }

    .hero-slider .hero-content h2 {
        font-size: 3rem;
        line-height: 1.25;
    }

    .hero-slider .hero-content .subtitle {
        font-size: 1.3rem;
    }

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

    .hero-slider .swiper-button-prev {
        left: 15px;
    }

    .hero-slider .swiper-button-next {
        right: 15px;
    }

}


/* ==========================================================
   19. MOBILE RESPONSIVE STYLES
   ==========================================================
   Applies to screens 768px wide and smaller.

   - Smaller typography
   - Reduced padding
   - Compact navigation
   - Improved text readability
========================================================== */

@media (max-width: 768px) {

    .hero-slider {
        height: 60vh;
        min-height: 400px;
    }

    .hero-slider .hero-content {
        width: 90%;
        padding: 1rem;
    }

    .hero-slider .hero-content h2 {
        font-size: 2rem;
        line-height: 1.3;

        margin: 10px 0;
    }

    .hero-slider .hero-content .subtitle {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .hero-slider .hero-content p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-slider .hero-content .button {
        padding: 0.65rem 1.25rem;
        margin-top: 20px;

        font-size: 0.9rem;
    }

    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        width: 35px;
        height: 35px;
    }

    .hero-slider .swiper-button-prev::after,
    .hero-slider .swiper-button-next::after {
        font-size: 18px;
    }

    .hero-slider .swiper-button-prev {
        left: 8px;
    }

    .hero-slider .swiper-button-next {
        right: 8px;
    }

    .hero-slider .swiper-pagination {
        bottom: 15px;
    }

}


/* ==========================================================
   20. SMALL MOBILE DEVICES
   ==========================================================
   Applies to screens 480px wide and smaller.

   Further reduces typography and navigation size
   to avoid crowding.
========================================================== */

@media (max-width: 480px) {

    .hero-slider {
        height: 65vh;
        min-height: 420px;
    }

    .hero-slider .hero-content {
        width: 88%;
        padding: 0.75rem;
    }

    .hero-slider .hero-content h2 {
        font-size: 1.7rem;
        line-height: 1.25;
    }

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

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

    .hero-slider .hero-content .button {
        padding: 0.6rem 1rem;
        margin-top: 15px;

        font-size: 0.85rem;
    }

    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        width: 30px;
        height: 30px;
    }

    .hero-slider .swiper-button-prev::after,
    .hero-slider .swiper-button-next::after {
        font-size: 16px;
    }

    .hero-slider .swiper-pagination {
        bottom: 12px;
    }

}


/* ==========================================================
   21. ACCESSIBILITY — REDUCED MOTION
   ==========================================================
   Reduces CSS transitions for visitors who prefer
   reduced motion.

   Note:
   Swiper autoplay and animation duration must also be
   handled in JavaScript for complete reduced-motion support.
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .hero-slider .swiper-slide,
    .hero-slider .hero-content .button,
    .hero-slider .swiper-pagination-bullet,
    .hero-slider .swiper-button-prev,
    .hero-slider .swiper-button-next {
        transition-duration: 0.01ms;
    }

}