/* Parallax styles */
.wp-block-cover.has-parallax .wp-block-cover__image-background {
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wp-block-cover.has-parallax {
    position: relative;
    overflow: hidden;
}

.wp-block-group.alignfull.elspc-parallax {
    position: relative;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    overflow: hidden;
}

/* Text animation styles */
.wp-block-cover h2.elspc-animate-text,
.wp-block-cover h3.elspc-animate-text,
.wp-block-cover p.elspc-animate-text,
.wp-block-group.alignfull h2.elspc-animate-text,
.wp-block-group.alignfull h3.elspc-animate-text,
.wp-block-group.alignfull p.elspc-animate-text {
    opacity: 0 !important;
    transform: translateY(50px) !important;
    transition: opacity 1s ease-out, transform 1s ease-out !important;
}

.wp-block-cover h2.elspc-animate-text.visible,
.wp-block-cover h3.elspc-animate-text.visible,
.wp-block-cover p.elspc-animate-text.visible,
.wp-block-group.alignfull h2.elspc-animate-text.visible,
.wp-block-group.alignfull h3.elspc-animate-text.visible,
.wp-block-group.alignfull p.elspc-animate-text.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Carousel styles */
.elspc-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.elspc-carousel__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y;
}

.elspc-carousel__track {
    display: flex;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.elspc-carousel__slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

.elspc-carousel__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
}

.elspc-carousel__caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    padding: 15px;
    font-size: 1.5em;
    border-radius: 5px;
    text-align: left;
}

.elspc-carousel__caption strong {
    display: block;
    font-size: 2em;
    margin-bottom: 8px;
}

.elspc-carousel__caption a {
    color: #fff;
}

.elspc-carousel .elspc-carousel__prev,
.elspc-carousel .elspc-carousel__next {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 40px;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    box-shadow: none;
    cursor: pointer;
    transform: translateY(-50%);
}

.elspc-carousel .elspc-carousel__prev {
    left: 10px;
}

.elspc-carousel .elspc-carousel__next {
    right: 10px;
}

.elspc-carousel .elspc-carousel__prev::before,
.elspc-carousel .elspc-carousel__next::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.elspc-carousel .elspc-carousel__prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.elspc-carousel .elspc-carousel__next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.elspc-carousel .elspc-carousel__prev:disabled,
.elspc-carousel .elspc-carousel__next:disabled {
    opacity: 0.35;
    cursor: default;
}

.elspc-carousel__pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.elspc-carousel .elspc-carousel__dot {
    width: 10px;
    height: 10px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #000;
    box-shadow: none;
    opacity: 0.6;
    cursor: pointer;
}

.elspc-carousel .elspc-carousel__dot[aria-current="true"] {
    opacity: 1;
}

.elspc-carousel button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.6);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .wp-block-cover.has-parallax .wp-block-cover__image-background,
    .wp-block-group.alignfull.elspc-parallax {
        background-attachment: scroll !important;
    }
    .elspc-carousel__caption {
        padding: 10px;
        font-size: 1.2em;
    }
    .elspc-carousel__caption strong {
        font-size: 1.5em; /* Slightly smaller title on mobile */
    }
}