/* AEI Hero Manager - Frontend Styles */

.aei-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #2F2F2C;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure content flows below hero - not behind it */
.aei-hero + .site-main,
.aei-hero + #primary,
.aei-hero + main,
.aei-hero ~ .site-main,
.aei-hero ~ #primary,
.aei-hero ~ main {
    position: relative;
    z-index: 0;
    margin-top: 0 !important;
}

/* Fix for GeneratePress parent theme negative margins */
body.home .site-main,
body.page .site-main,
body.home .inside-article,
body.page .inside-article,
body.home .entry-content,
body.page .entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure hero scroll indicator doesn't overlap content */
.aei-hero-scroll-indicator {
    bottom: 20px;
}

/* Background Layer */
.aei-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Slideshow */
.aei-hero-slideshow {
    position: absolute;
    inset: 0;
}

.aei-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.aei-slide.active {
    opacity: 1;
}

/* Ken Burns Effect */
.aei-ken-burns .aei-slide {
    animation: kenBurns 20s ease-in-out infinite alternate;
}

.aei-ken-burns .aei-slide:nth-child(odd) {
    animation-direction: alternate-reverse;
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.1) translate(-2%, -1%);
    }
}

/* Slide Transitions */
.aei-hero-slideshow.transition-slide .aei-slide {
    transform: translateX(100%);
    opacity: 1;
    transition: transform 0.8s ease-in-out;
}

.aei-hero-slideshow.transition-slide .aei-slide.active {
    transform: translateX(0);
}

.aei-hero-slideshow.transition-slide .aei-slide.prev {
    transform: translateX(-100%);
}

.aei-hero-slideshow.transition-zoom .aei-slide {
    transform: scale(1.2);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.aei-hero-slideshow.transition-zoom .aei-slide.active {
    transform: scale(1);
}

/* Video Background */
.aei-hero-video {
    position: absolute;
    inset: 0;
}

.aei-hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--focus-point, center);
}

.aei-hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    min-height: 100vh;
    min-width: 177.77vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Overlay */
.aei-hero-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Content */
.aei-hero-content {
    position: relative;
    z-index: 10;
    padding: 40px 20px;
    text-align: center;
}

.aei-hero-align-left .aei-hero-content {
    text-align: left;
    margin-right: auto;
    margin-left: 5%;
}

.aei-hero-align-right .aei-hero-content {
    text-align: right;
    margin-left: auto;
    margin-right: 5%;
}

/* Headline */
.aei-hero-headline {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 400;
    color: #C5A880;
    margin: 0 0 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: heroFadeInUp 1s ease-out;
}

/* Subheadline */
.aei-hero-subheadline {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    color: #FDF9F3;
    margin: 0 0 30px;
    line-height: 1.6;
    opacity: 0.95;
    animation: heroFadeInUp 1s ease-out 0.2s both;
}

/* CTA Button */
.aei-hero-cta {
    display: inline-block;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    animation: heroFadeInUp 1s ease-out 0.4s both;
}

.aei-cta-primary {
    background: #C5A880;
    color: #2F2F2C;
    border: 2px solid #C5A880;
}

.aei-cta-primary:hover {
    background: #FDF9F3;
    border-color: #FDF9F3;
    color: #2F2F2C;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.aei-cta-secondary {
    background: #842D2D;
    color: #FDF9F3;
    border: 2px solid #842D2D;
}

.aei-cta-secondary:hover {
    background: #9a3535;
    border-color: #9a3535;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.aei-cta-outline {
    background: transparent;
    color: #FDF9F3;
    border: 2px solid #FDF9F3;
}

.aei-cta-outline:hover {
    background: #FDF9F3;
    color: #2F2F2C;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Scroll Indicator */
.aei-hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    animation: heroFadeInUp 1s ease-out 0.6s both;
}

.aei-hero-scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(253, 249, 243, 0.5);
    border-radius: 15px;
    position: relative;
}

.aei-hero-scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 6px;
    height: 6px;
    background: #C5A880;
    border-radius: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(15px);
    }
    60% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* Animations */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .aei-hero {
        min-height: 100vh !important;
    }
    
    .aei-hero-content {
        padding: 30px 20px;
    }
    
    .aei-hero-headline {
        font-size: 2.5rem;
    }
    
    .aei-hero-subheadline {
        font-size: 1.1rem;
    }
    
    .aei-hero-cta {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    
    .aei-hero-align-left .aei-hero-content,
    .aei-hero-align-right .aei-hero-content {
        text-align: center;
        margin: 0 auto;
    }
}
