/**
 * Hero Carousel Styles
 */

/* Main Container - Force full width and remove all gaps */
.qc-hero-carousel.alignfull {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    overflow: hidden;
    padding: 0 !important;
    min-height: 85vh;
    background: #000;
}

/* Remove default group inner container padding if it exists */
.qc-hero-carousel > .wp-block-group__inner-container {
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    display: block !important;
}

/* Slides - Target standard Cover blocks directly */
.qc-hero-carousel .wp-block-cover {
    position: absolute !important;
    top: 0;
    left: 0 !important;
    width: 100vw !important; 
    max-width: 100vw !important;
    height: 100% !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
    margin: 0 !important;
    min-height: 85vh !important;
}

.qc-hero-carousel .wp-block-cover.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Ensure the background image covers perfectly */
.qc-hero-carousel .wp-block-cover img,
.qc-hero-carousel .wp-block-cover video,
.qc-hero-carousel .wp-block-cover__image-background {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
}

/* Fix Overlay - The user's recovered code uses a white background span */
.qc-hero-carousel .wp-block-cover__background {
    opacity: 0.5 !important; /* Matches user's dimRatio:50 */
    background-color: #000 !important; /* Force black for text readability, ignoring the #FFF in recovered markup if it looks better */
}

/* Content Centering */
.qc-hero-carousel .wp-block-cover__inner-container {
    width: 100% !important;
    max-width: var(--wp--style--global--content-size, 1200px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 40px !important;
    text-align: center;
    z-index: 10;
}

/* Navigation Arrows - Injected via JS */
.qc-hero-carousel__prev,
.qc-hero-carousel__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 30;
    border-radius: 50%;
    backdrop-filter: none;
    padding: 0;
}

.qc-hero-carousel__prev { left: 40px; }
.qc-hero-carousel__next { right: 40px; }

.qc-hero-carousel__prev:hover,
.qc-hero-carousel__next:hover {
    background: transparent;
    transform: translateY(-50%) scale(1.2);
}

.qc-hero-carousel__prev svg,
.qc-hero-carousel__next svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    fill: none;
}

/* Dots Navigation - Injected via JS */
.qc-hero-carousel__dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 30;
    margin: 0 !important;
    pointer-events: none;
}

.qc-hero-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s ease;
    pointer-events: auto;
}

.qc-hero-carousel__dot.is-active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 862px) {
    .qc-hero-carousel.alignfull {
        min-height: 70vh;
    }
    
    .qc-hero-carousel .wp-block-cover {
        min-height: 70vh !important;
    }

    .qc-hero-carousel__prev,
    .qc-hero-carousel__next {
        width: 44px;
        height: 44px;
    }
    
    .qc-hero-carousel__prev { left: 15px; }
    .qc-hero-carousel__next { right: 15px; }
}

/* Editor adjustments */
.editor-styles-wrapper .qc-hero-carousel {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    border: 2px dashed #eee;
    min-height: 0;
    background: #f9f9f9;
}

.editor-styles-wrapper .qc-hero-carousel .wp-block-cover {
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-bottom: 20px !important;
    min-height: 350px !important;
    width: 100% !important;
}

.editor-styles-wrapper .qc-hero-carousel__dot,
.editor-styles-wrapper .qc-hero-carousel__prev,
.editor-styles-wrapper .qc-hero-carousel__next {
    display: none !important;
}
