/**
 * AEI Hero Ultimate - Frontend Styles
 */

/* ========================================
   HERO CONTAINER
   ======================================== */

.aei-hero-ultimate {
    position: relative;
    width: 100%;
    max-width: var(--hero-max-width, 1920px);
    margin: 0 auto;
    overflow: hidden;
    background: #000;
}

.aei-hero-ultimate[data-height-mode="vh"] {
    height: var(--hero-height, 80vh);
}

.aei-hero-ultimate[data-height-mode="aspect"],
.aei-hero-ultimate[data-height-mode="dimensions"] {
    aspect-ratio: var(--hero-aspect-ratio, 16 / 9);
}

.aei-hero-ultimate[data-height-mode="fixed"] {
    height: var(--hero-height-px, 600px);
}

/* ========================================
   SINGLE IMAGE
   ======================================== */

.aei-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ========================================
   VIDEO HERO TYPE
   ======================================== */

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

.aei-hero-video-container .aei-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Hide all native video controls */
.aei-hero-video-container .aei-hero-video::-webkit-media-controls {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-panel {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-play-button {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-timeline {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-toggle-closed-captions-button {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.aei-hero-video-container .aei-hero-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Show controls only when the controls attribute is present */
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-enclosure,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-panel,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-play-button,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-timeline,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-mute-button,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-volume-slider,
.aei-hero-video-container .aei-hero-video[controls]::-webkit-media-controls-fullscreen-button {
    display: flex !important;
}

.aei-hero-video-container .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;
}

/* ========================================
   SLIDESHOW CONTAINER
   ======================================== */

.aei-hero-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ========================================
   SLIDES - BASE STYLES
   ======================================== */

.aei-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    z-index: 1;
}

.aei-hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Video Slides (in slideshow) */
.aei-hero-slide.video-slide {
    background-image: none !important;
}

.aei-hero-slide .aei-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
}

/* ========================================
   FADE TRANSITION (Default)
   ======================================== */

.aei-hero-slideshow.transition-fade .aei-hero-slide {
    transition: opacity 0.8s ease-in-out;
}

.aei-hero-slideshow.transition-fade .aei-hero-slide.active {
    opacity: 1;
}

.aei-hero-slideshow.transition-fade .aei-hero-slide.slide-out {
    opacity: 0;
    z-index: 1;
}

/* ========================================
   SLIDE TRANSITION
   ======================================== */

.aei-hero-slideshow.transition-slide .aei-hero-slide {
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.8s ease-in-out;
    z-index: 0;
}

.aei-hero-slideshow.transition-slide .aei-hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.aei-hero-slideshow.transition-slide .aei-hero-slide.slide-out {
    opacity: 1;
    transform: translateX(-100%);
    z-index: 1;
}

.aei-hero-slideshow.transition-slide .aei-hero-slide.slide-out-right {
    opacity: 1;
    transform: translateX(100%);
    z-index: 2;
}

.aei-hero-slideshow.transition-slide .aei-hero-slide.slide-in-prev {
    opacity: 1 !important;
    transform: translateX(-100%) !important;
    transition: none !important;
    z-index: 2;
}

.aei-hero-slideshow.transition-slide .aei-hero-slide.slide-in-prev.active {
    opacity: 1 !important;
    transform: translateX(0) !important;
    transition: transform 0.8s ease-in-out !important;
    z-index: 2;
}

/* ========================================
   ZOOM TRANSITION
   ======================================== */

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

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

.aei-hero-slideshow.transition-zoom .aei-hero-slide.slide-out {
    opacity: 0;
    transform: scale(0.8);
    z-index: 1;
}

/* ========================================
   KEN BURNS TRANSITION
   ======================================== */

.aei-hero-slideshow[data-ken-burns="true"] .aei-hero-slide.active {
    overflow: hidden;
}

.aei-hero-slideshow[data-ken-burns="true"] .aei-hero-slide.active::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-image: inherit;
    background-size: cover;
    background-position: inherit;
    animation: kenBurns 15s ease-in-out infinite alternate;
    z-index: 0;
}

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

/* ========================================
   OVERLAY
   ======================================== */

.aei-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

/* ========================================
   CONTENT
   ======================================== */

.aei-hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    color: #fff;
}

.aei-hero-content[data-align="left"] {
    left: 0;
    text-align: left;
}

.aei-hero-content[data-align="center"] {
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.aei-hero-content[data-align="right"] {
    right: 0;
    text-align: right;
}

.aei-hero-content[data-vertical="top"] {
    top: 2rem;
}

.aei-hero-content[data-vertical="center"] {
    top: 50%;
    transform: translateY(-50%);
}

.aei-hero-content[data-align="center"][data-vertical="center"] {
    transform: translate(-50%, -50%);
}

.aei-hero-content[data-vertical="bottom"] {
    bottom: 2rem;
}

.aei-hero-headline {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin: 0 0 1rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.aei-hero-subheadline {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin: 0 0 1.5rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.aei-hero-cta {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.aei-hero-cta.style-primary {
    background: #C4A962;
    color: #2F2F2C;
    border-color: #C4A962;
}

.aei-hero-cta.style-primary:hover {
    background: #d4b890;
    border-color: #d4b890;
}

.aei-hero-cta.style-secondary {
    background: #842D2D;
    color: #fff;
    border-color: #842D2D;
}

.aei-hero-cta.style-secondary:hover {
    background: #9a3535;
    border-color: #9a3535;
}

.aei-hero-cta.style-outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.aei-hero-cta.style-outline:hover {
    background: #fff;
    color: #2F2F2C;
}

/* ========================================
   NAVIGATION ARROWS
   ======================================== */

.aei-hero-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

.aei-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aei-hero-ultimate:hover .aei-hero-arrow {
    opacity: 1;
}

.aei-hero-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
}

.aei-hero-arrow.prev {
    left: 20px;
}

.aei-hero-arrow.next {
    right: 20px;
}

.aei-hero-arrow::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}

.aei-hero-arrow.prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.aei-hero-arrow.next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* ========================================
   DOTS NAVIGATION
   ======================================== */

.aei-hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15;
}

.aei-hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.aei-hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.aei-hero-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* ========================================
   SCROLL INDICATOR
   ======================================== */

.aei-hero-scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    animation: heroFadeInUp 1s ease-out 0.6s both;
}

.aei-hero-scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.aei-hero-scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 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);
    }
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .aei-hero-content {
        padding: 1rem;
    }
    
    .aei-hero-arrow {
        width: 40px;
        height: 40px;
    }
    
    .aei-hero-arrow.prev {
        left: 10px;
    }
    
    .aei-hero-arrow.next {
        right: 10px;
    }
    
    .aei-hero-dots {
        bottom: 10px;
    }
    
    .aei-hero-dot {
        width: 10px;
        height: 10px;
    }
    
    .aei-hero-scroll-indicator {
        bottom: 15px;
    }
    
    .aei-hero-scroll-indicator span {
        width: 24px;
        height: 40px;
    }
}
