/**
 * Rizal Pulse Carousel - Frontend Stylesheet
 * Native Swiper.js Hardware-Accelerated Presentation
 *
 * @package RizalPulseCarousel
 */

.rp-carousel-widget {
    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
    --rp-carousel-height: 560px;
    --rp-pine-dark: #090d16;
    --rp-emerald: #10b981;
    --rp-emerald-hover: #059669;
    --rp-gold: #f59e0b;
    perspective: 1200px;
    -webkit-perspective: 1200px;
}

.rp-carousel-widget *,
.rp-carousel-widget *::before,
.rp-carousel-widget *::after {
    box-sizing: border-box;
}

/* Swiper Container */
.rp-carousel-widget .swiper.rp-swiper-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.rp-carousel-widget .swiper-wrapper {
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* 3D Effects Container Overflow Adjustments */
.rp-effect-coverflow .swiper.rp-swiper-container,
.rp-effect-creative .swiper.rp-swiper-container {
    overflow: visible;
    padding: 30px 0;
}

.rp-effect-cards .swiper.rp-swiper-container {
    overflow: visible;
    padding: 35px 0;
    max-width: min(92%, 760px);
    margin: 0 auto;
}

/* Individual Slide */
.rp-carousel-slide {
    position: relative;
    width: 100%;
    min-height: var(--rp-carousel-height);
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: var(--rp-pine-dark);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
}

/* Multi-Card Carousel Variant */
.rp-layout-cards .rp-carousel-slide {
    min-height: 420px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 3D Coverflow Slide Styles */
.rp-effect-coverflow .rp-carousel-slide {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.rp-effect-coverflow .swiper-slide-active {
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(16, 185, 129, 0.35);
}

/* 3D Creative Slide Styles */
.rp-effect-creative .rp-carousel-slide {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* 3D Cards Slide Styles */
.rp-effect-cards .rp-carousel-slide {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Native Swiper 3D Slide Shadows - Blended to Pine Dark Theme */
.rp-carousel-widget .swiper-slide-shadow,
.rp-carousel-widget .swiper-slide-shadow-left,
.rp-carousel-widget .swiper-slide-shadow-right,
.rp-carousel-widget .swiper-slide-shadow-top,
.rp-carousel-widget .swiper-slide-shadow-bottom,
.rp-carousel-widget .swiper-slide-shadow-coverflow {
    border-radius: inherit;
    pointer-events: none;
}

.rp-carousel-widget .swiper-slide-shadow-left {
    background-image: linear-gradient(to left, rgba(9, 13, 22, 0.85), rgba(9, 13, 22, 0)) !important;
}

.rp-carousel-widget .swiper-slide-shadow-right {
    background-image: linear-gradient(to right, rgba(9, 13, 22, 0.85), rgba(9, 13, 22, 0)) !important;
}

.rp-carousel-widget .swiper-slide-shadow-coverflow {
    background-image: linear-gradient(to top, rgba(9, 13, 22, 0.75), rgba(9, 13, 22, 0.15)) !important;
}

/* Media Layer (Image / Video) */
.rp-slide-media-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.rp-slide-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transform: scale(1);
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.swiper-slide-active .rp-slide-bg-img {
    transform: scale(1.04);
}

.rp-slide-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.rp-slide-video-iframe-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 aspect ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 aspect ratio */
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.rp-slide-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Overlay Layer */
.rp-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.3) 0%, rgba(9, 13, 22, 0.78) 100%);
    pointer-events: none;
}

/* Slide Content Wrap */
.rp-slide-content-wrap {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 40px 48px;
    display: flex;
}

.rp-align-left .rp-slide-content-wrap {
    justify-content: flex-start;
    text-align: left;
}

.rp-align-center .rp-slide-content-wrap {
    justify-content: center;
    text-align: center;
}

.rp-align-right .rp-slide-content-wrap {
    justify-content: flex-end;
    text-align: right;
}

.rp-slide-content-box {
    max-width: 680px;
}

.rp-align-center .rp-slide-content-box {
    margin: 0 auto;
}

/* Tag Badge */
.rp-slide-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(6, 78, 59, 0.65);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    color: #34d399;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Title */
.rp-slide-title {
    color: #ffffff;
    font-size: clamp(24px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 14px 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* Description */
.rp-slide-description {
    color: #cbd5e1;
    font-size: clamp(14px, 1.6vw, 17px);
    line-height: 1.6;
    margin: 0 0 24px 0;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
    max-width: 620px;
}

.rp-align-center .rp-slide-description {
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.rp-slide-cta-row {
    margin-top: 10px;
}

.rp-slide-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    background-color: var(--rp-emerald);
    color: #022c22 !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    letter-spacing: 0.01em;
}

.rp-slide-cta-btn:hover {
    background-color: var(--rp-emerald-hover);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Non-active slide treatment for 3D modes */
.rp-effect-coverflow .swiper-slide:not(.swiper-slide-active),
.rp-effect-creative .swiper-slide:not(.swiper-slide-active) {
    opacity: 0.7;
    transition: opacity 0.5s ease, filter 0.5s ease;
}

.rp-effect-coverflow .swiper-slide-active,
.rp-effect-creative .swiper-slide-active {
    opacity: 1;
}

/* Staggered entrance animation for active slide content */
.rp-carousel-slide .rp-slide-badge,
.rp-carousel-slide .rp-slide-title,
.rp-carousel-slide .rp-slide-description,
.rp-carousel-slide .rp-slide-cta-row {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.rp-effect-coverflow .rp-carousel-slide:not(.swiper-slide-active) .rp-slide-badge,
.rp-effect-coverflow .rp-carousel-slide:not(.swiper-slide-active) .rp-slide-title,
.rp-effect-coverflow .rp-carousel-slide:not(.swiper-slide-active) .rp-slide-description,
.rp-effect-coverflow .rp-carousel-slide:not(.swiper-slide-active) .rp-slide-cta-row {
    opacity: 0.35;
    transform: translateY(8px);
}

.rp-effect-coverflow .swiper-slide-active .rp-slide-badge,
.rp-effect-coverflow .swiper-slide-active .rp-slide-title,
.rp-effect-coverflow .swiper-slide-active .rp-slide-description,
.rp-effect-coverflow .swiper-slide-active .rp-slide-cta-row {
    opacity: 1;
    transform: translateY(0);
}

/* Swiper Navigation Arrows */
.rp-swiper-nav-prev,
.rp-swiper-nav-next {
    width: 44px;
    height: 44px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 25;
}

.rp-swiper-nav-prev::after,
.rp-swiper-nav-next::after {
    font-size: 16px !important;
    font-weight: bold;
    color: #ffffff;
}

.rp-swiper-nav-prev:hover,
.rp-swiper-nav-next:hover {
    background: #10b981;
    border-color: #10b981;
    color: #022c22;
    transform: scale(1.08);
}

.rp-swiper-nav-prev:hover::after,
.rp-swiper-nav-next:hover::after {
    color: #022c22;
}

.rp-swiper-nav-prev {
    left: 20px;
}

.rp-swiper-nav-next {
    right: 20px;
}

/* Swiper Pagination Dots */
.rp-carousel-widget .swiper-pagination.rp-swiper-pagination {
    bottom: 18px;
    z-index: 10;
}

.rp-carousel-widget .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.45);
    opacity: 1;
    margin: 0 5px !important;
    border-radius: 50%;
    transition: all 0.25s ease;
}

.rp-carousel-widget .swiper-pagination-bullet-active {
    width: 26px;
    border-radius: 6px;
    background: #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* Mobile & Tablet Responsive Adjustments */
@media (max-width: 1024px) {
    .rp-slide-content-wrap {
        padding: 30px;
    }
}

@media (max-width: 767px) {
    .rp-carousel-widget {
        --rp-carousel-height: 440px;
    }

    .rp-slide-content-wrap {
        padding: 24px 20px;
    }

    .rp-slide-title {
        font-size: 26px;
        margin-bottom: 10px;
    }

    .rp-slide-description {
        font-size: 13.5px;
        margin-bottom: 18px;
    }

    .rp-slide-cta-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .rp-swiper-nav-prev,
    .rp-swiper-nav-next {
        width: 36px;
        height: 36px;
    }

    .rp-swiper-nav-prev::after,
    .rp-swiper-nav-next::after {
        font-size: 13px !important;
    }

    .rp-swiper-nav-prev {
        left: 10px;
    }

    .rp-swiper-nav-next {
        right: 10px;
    }

    /* 3D Effect Mobile Optimizations */
    .rp-effect-coverflow .swiper.rp-swiper-container,
    .rp-effect-creative .swiper.rp-swiper-container {
        padding: 16px 0;
    }

    .rp-effect-cards .swiper.rp-swiper-container {
        padding: 16px 0;
        max-width: 94%;
    }

    .rp-effect-coverflow .rp-carousel-slide,
    .rp-effect-creative .rp-carousel-slide,
    .rp-effect-cards .rp-carousel-slide {
        min-height: 380px;
        border-radius: 12px;
    }
}

/* ==========================================================================
   Sierra Madre Sunrise & Mountain Atmosphere Backdrop
   ========================================================================== */

.rp-has-backdrop {
    background-color: var(--rp-pine-dark);
}

.rp-has-backdrop .rp-carousel-slide {
    background-color: transparent !important;
}

.rp-sierra-sunrise-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
}

/* 1. High-Resolution Scenic Artwork Backdrop */
.rp-backdrop-art {
    background-image: url('../images/sierra-sunrise-backdrop.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* 2. Pure CSS Gradient Backdrop */
.rp-backdrop-vector {
    background: radial-gradient(ellipse 90% 65% at 50% 92%, rgba(245, 158, 11, 0.45) 0%, rgba(217, 119, 6, 0.25) 30%, rgba(6, 78, 59, 0.22) 58%, rgba(9, 13, 22, 0.98) 100%),
                linear-gradient(180deg, #090d16 0%, #064e3b 42%, #78350f 78%, #d97706 100%);
    background-size: cover;
    background-position: center bottom;
}

/* Ambient Radial Bloom & Sun Orb */
.rp-sunrise-ambient-bloom {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(251, 191, 36, 0.35) 0%, rgba(245, 158, 11, 0.18) 40%, rgba(9, 13, 22, 0) 70%);
    filter: blur(40px);
    pointer-events: none;
}

.rp-sunrise-orb {
    position: absolute;
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, #fef08a 0%, #f59e0b 50%, rgba(245, 158, 11, 0) 75%);
    filter: blur(14px);
    pointer-events: none;
    z-index: 1;
}

/* Glow Intensity Variances */
.rp-glow-soft .rp-sunrise-orb {
    opacity: 0.55;
    filter: blur(20px);
}
.rp-glow-medium .rp-sunrise-orb {
    opacity: 0.8;
    filter: blur(15px);
}
.rp-glow-radiant .rp-sunrise-orb {
    opacity: 1;
    filter: blur(12px);
    box-shadow: 0 0 80px rgba(245, 158, 11, 0.6);
}

/* Subtle Breathing Pulse Animation */
@keyframes rpSunriseBreathing {
    0%, 100% {
        opacity: 0.85;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.12);
        filter: blur(10px);
    }
}

.rp-animate-pulse .rp-sunrise-orb {
    animation: rpSunriseBreathing 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Layered Mountain Silhouette Vectors */
.rp-mountain-silhouette {
    position: absolute;
    bottom: -1px;
    width: 50%;
    height: 68%;
    pointer-events: none;
    z-index: 2;
}

.rp-mountain-left {
    left: 0;
}

.rp-mountain-right {
    right: 0;
}

/* Valley Mist Veil */
.rp-sunrise-mist-veil {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 38%;
    background: linear-gradient(0deg, rgba(9, 13, 22, 0.95) 0%, rgba(9, 13, 22, 0.6) 45%, rgba(9, 13, 22, 0) 100%);
    pointer-events: none;
    z-index: 3;
}
