.cms-hero-widget {
    position: relative;
    overflow: hidden;
    display: flex;
    width: 100%;
}

.cms-hero-background {
    position: absolute;
    top: -10px; /* Extra space for blur */
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: 1;
    background-color: #333;
}

.cms-hero-background-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease-out;
}

.cms-hero-background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cms-hero-background-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
}

.cms-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.cms-hero-content-wrap {
    position: relative;
    z-index: 3;
    width: 100%;
    display: flex;
    padding: 2rem;
}

.cms-hero-content {
    width: 100%;
}

.cms-hero-content h1,
.cms-hero-content h2,
.cms-hero-content h3,
.cms-hero-content p,
.cms-hero-content ul,
.cms-hero-content li {
    color: inherit;
}

/* Fix for centered/right-aligned lists */
.cms-hero-content[style*="text-align: center"] ul,
.cms-hero-content[style*="text-align: center"] ol {
    text-align: left;
    display: inline-block; /* This centers the list block */
    margin: 0 auto;
}

.cms-hero-content[style*="text-align: right"] ul,
.cms-hero-content[style*="text-align: right"] ol {
    text-align: left;
    display: inline-block; /* This allows the block to be pushed right */
}


/* Ken Burns Effect */
@keyframes kenburns-in {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}
@keyframes kenburns-out {
    0% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.ken-burns-in .cms-hero-background-image {
    animation: kenburns-in 15s ease-out forwards;
}
.ken-burns-out .cms-hero-background-image {
    animation: kenburns-out 15s ease-out forwards;
}

/* Entrance Animations */
.hero-content-animated {
    opacity: 0;
    transition: opacity 1s, transform 1s;
}

.hero-animation-fade-in.is-visible {
    opacity: 1;
}

.hero-animation-slide-up {
    transform: translateY(50px);
}
.hero-animation-slide-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Content Visibility */
.cms-visible-desktop {
    display: block;
}
.cms-visible-mobile {
    display: none;
}

@media (max-width: 767px) {
    .cms-visible-desktop {
        display: none;
    }
    .cms-visible-mobile {
        display: block;
    }
}
