/**
 * fullPage.js Custom Styles
 * Premium UX Integration with Flatsome Theme
 */

/* ============================================
   1. Hide fullPage.js Watermark
   ============================================ */
.fp-watermark {
    display: none !important;
}

/* ============================================
   2. Header Integration
   ============================================ */
/* Desktop: Force header visibility */
@media (min-width: 1025px) {
    #header {
        position: fixed;
        top: 20px;
        left: 0;
        width: 100%;
        z-index: 9999;
    }

    #header.stuck {
        top: 0 !important;
    }
}

#header .header-wrapper {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    box-sizing: border-box;
}

#header .header-main {
    width: 100%;
    max-width: 100%;
}

#header .header-inner {
    width: 100%;
}

@media (min-width: 1200px) {
    #header .header-wrapper {
        max-width: 1200px;
    }
}

@media (min-width: 1400px) {
    #header .header-wrapper {
        max-width: 1330px;
    }
}

/* ============================================
   3. Logo Size Override
   ============================================ */
@media (min-width: 1025px) {

    #header #logo img,
    #header .header-logo img {
        max-height: none !important;
        height: auto !important;
        width: auto !important;
        max-width: 100% !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #header #logo {
        display: flex;
        align-items: center;
    }
}

/* ============================================
   4. Section Layout & Scrollbar Hide
   ============================================ */
@media (min-width: 1025px) {
    .hdev-fullpage {
        height: 100vh;
        display: flex;
        align-items: center;
        transition: opacity 0.3s ease;
    }
}

@media (max-width: 1024px) {
    .hdev-fullpage {
        height: auto;
        min-height: auto;
        display: block;
    }
}

html.fp-enabled,
body.fp-enabled {
    overflow: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
}

html.fp-enabled::-webkit-scrollbar,
body.fp-enabled::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

html.fp-enabled *,
body.fp-enabled * {
    scrollbar-width: none;
}

html.fp-enabled *::-webkit-scrollbar,
body.fp-enabled *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ============================================
   5. Mobile Responsive
   ============================================ */

/* Auto-Height Section Support (Generic & Footer Specific) */
body:not(.ux-builder-active) .hdev-fullpage.fp-auto-height,
body:not(.ux-builder-active) .fp-section.fp-auto-height,
body:not(.ux-builder-active) #footer.fp-section,
body:not(.ux-builder-active) #footer.hdev-fullpage {
    height: auto !important;
    min-height: 100vh !important;
    display: flex !important;
    /* Use flex to ensure proper content distribution */
    flex-direction: column !important;
    justify-content: flex-start !important;
    /* Align content to top to avoid 'gap above' if centered */
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Check for builder editor execution context to be safe */
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.fp-section,
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.hdev-fullpage {
    height: auto !important;
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
}


body:not(.ux-builder-active):not(.ux-builder-editor) .hdev-fullpage.fp-auto-height .col .img.has-hover img,
body:not(.ux-builder-active):not(.ux-builder-editor) .hdev-fullpage.fp-auto-height .col .img.has-hover .attachment-original,
body:not(.ux-builder-active):not(.ux-builder-editor) .fp-section.fp-auto-height .col .img.has-hover img,
body:not(.ux-builder-active):not(.ux-builder-editor) .fp-section.fp-auto-height .col .img.has-hover .attachment-original,
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.hdev-fullpage .col .img.has-hover img,
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.hdev-fullpage .col .img.has-hover .attachment-original,
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.fp-section .col .img.has-hover img,
body:not(.ux-builder-active):not(.ux-builder-editor) #footer.fp-section .col .img.has-hover .attachment-original {
    position: relative !important;
    /* Stop absolute positioning */
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}

/* Mobile Responsive Rules */
@media (max-width: 1024px) {

    #header .header-logo img,
    #header .logo img {
        max-height: 50px !important;
        width: auto !important;
    }

    .hdev-hamburger-wrapper {
        position: absolute !important;
        left: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
        z-index: 10 !important;
    }

    #header .header-right {
        position: absolute !important;
        right: 15px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }

    body.fp-responsive .hdev-fullpage {
        height: auto !important;
        min-height: 100vh;
    }

    body.fp-responsive {
        overflow: auto !important;
    }

    body.fp-responsive #fp-nav {
        display: none;
    }
}