/**
 * Swiper Slider Pro - Frontend Styles (Clean Rewrite)
 * 
 * Fullscreen layout compatible with fullPage.js
 * Minimal use of !important - only where absolutely necessary
 */

/* ============================================
   CRITICAL: fullPage.js Compatibility
   ============================================ */

/* Force full width for section containing slider */
section.hdev-fullpage:has(.hdev-swiper-fullscreen-wrapper)>.section-content {
    max-width: none;
    width: 100vw;
    height: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Force children full width/height (ONLY for sections with slider) */
section.hdev-fullpage:has(.hdev-swiper-fullscreen-wrapper) .section-content>*,
section.hdev-fullpage:has(.hdev-swiper-fullscreen-wrapper)>* {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* ==================== Slider Container ==================== */
.hdev-fullpage .hdev-swiper-fullscreen-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* Fallback when NOT inside fullpage section */
.hdev-swiper-fullscreen-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    z-index: 1;
}

/* ==================== Swiper Container ==================== */
.hdev-swiper-container {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
}

/* ==================== Background Image ==================== */
.slide-bg {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ==================== Gradient Overlays ==================== */
.overlay-top {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 14rem;
    background: linear-gradient(0deg, rgba(0, 79, 56, .9) 0%, rgba(0, 79, 56, .9) .01%, rgba(0, 79, 56, .74) 41.45%, rgba(0, 79, 56, 0) 100%);
    z-index: 1;
    transform: rotate(180deg);
    pointer-events: none;
}

.overlay-bottom {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    bottom: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(0, 27, 19, .9) 0%, rgba(0, 27, 19, .74) 52%, rgba(0, 27, 19, 0) 100%);
    pointer-events: none;
}

/* ==================== Slide Content - Desktop ==================== */
/* Uses global CSS variables from hdev-theme/assets/css/global-variables.css */
.slide-content {
    position: absolute;
    bottom: 25%;
    /* Adjusted lower */
    left: 0;
    right: 0;
    z-index: 5;
    width: 100%;
    max-width: var(--container-width-base);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    box-sizing: border-box;
    text-align: left;
}

/* Match Flatsome header responsive widths */
@media (min-width: 1200px) {
    .slide-content {
        max-width: var(--container-width-md);
    }
}

@media (min-width: 1400px) {
    .slide-content {
        max-width: var(--container-width-lg);
    }
}

.slide-title {
    color: #ffffff;
    font-size: var(--hdev-fs-heading);
    font-weight: 300;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.4;
    padding: 0;
    max-width: 715px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
}

/* ==================== Diamond Pagination - Desktop ==================== */
/* Pagination wrapper - uses Flatsome container for alignment with title */
.hdev-swiper-pagination-wrapper {
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
    z-index: 9998;
    pointer-events: none;
}

/* Pagination - aligned left inside container (same as title) */
/* Uses global CSS variables from hdev-theme/assets/css/global-variables.css */
.hdev-swiper-container .swiper-pagination {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
    width: auto;
    max-width: var(--container-width-base);
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    box-sizing: border-box;
    left: 0;
    bottom: auto;
    transform: none;
    pointer-events: all;
}

/* Match Flatsome header responsive widths */
@media (min-width: 1200px) {
    .hdev-swiper-container .swiper-pagination {
        max-width: var(--container-width-md);
    }
}

@media (min-width: 1400px) {
    .hdev-swiper-container .swiper-pagination {
        max-width: var(--container-width-lg);
    }
}

/* Diamond bullets styling */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: transparent;
    opacity: 1;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 2px;
    transform: rotate(45deg);
    transition: all 0.4s ease;
    margin: 0;
    cursor: pointer;
}

.swiper-pagination-bullet:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.9);
}

.swiper-pagination-bullet-active {
    background: rgba(212, 175, 55, 1);
    border-color: rgba(255, 215, 0, 1);
    transform: rotate(45deg) scale(1.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255, 215, 0, 0.5);
}

/* ==================== Responsive Design ==================== */

/* Tablet & Mobile: Disable fullscreen behavior */
@media screen and (max-width: 1024px) {

    /* Disable fullscreen on parent sections */
    section.hdev-fullpage:has(.hdev-swiper-fullscreen-wrapper)>*,
    section.hdev-fullpage:has(.hdev-swiper-fullscreen-wrapper) .section-content>* {
        min-height: auto;
    }

    /* Use fixed height instead of 100vh */
    .hdev-swiper-fullscreen-wrapper,
    .hdev-swiper-container,
    .swiper-wrapper,
    .swiper-slide {
        min-height: 500px;
        height: auto;
    }

    .slide-bg {
        min-height: 500px;
        height: 100%;
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {

    /* Increase height on mobile */
    .hdev-swiper-fullscreen-wrapper,
    .hdev-swiper-container,
    .swiper-wrapper,
    .swiper-slide {
        min-height: 550px;
    }

    .slide-bg {
        min-height: 550px;
    }

    /* Center text content */
    .slide-content {
        top: 50%;
        left: 50%;
        bottom: auto;
        right: auto;
        transform: translate(-50%, -50%);
        padding: 0 30px;
        text-align: center;
        max-width: 100%;
        width: calc(100% - 60px);
        margin-bottom: 40px;
    }

    .slide-title {
        font-size: 1.8rem;
        letter-spacing: 0.1em;
        max-width: 100%;
        text-align: center;
        margin: 0 auto;
    }

    /* Center pagination */
    .hdev-swiper-pagination-wrapper {
        bottom: 120px;
        top: auto;
    }

    .hdev-swiper-container .swiper-pagination {
        justify-content: center;
        width: 100%;
        padding: 0 30px;
    }

    .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {

    .hdev-swiper-fullscreen-wrapper,
    .hdev-swiper-container,
    .swiper-wrapper,
    .swiper-slide {
        min-height: 480px;
    }

    .slide-bg {
        min-height: 480px;
    }

    .slide-content {
        padding: 0 20px;
        width: calc(100% - 40px);
        margin-bottom: 30px;
    }

    .slide-title {
        font-size: 1.4rem;
        letter-spacing: 0.08em;
    }

    .hdev-swiper-pagination-wrapper {
        bottom: 100px;
    }

    .hdev-swiper-container .swiper-pagination {
        padding: 0 20px;
        gap: 8px;
    }

    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }
}

/* ==================== Animation ==================== */
.swiper-slide-active .slide-title {
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== Notice Styling ==================== */
.hdev-swiper-notice {
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 16px;
    margin: 20px;
}