/**
 * Hero Carousel Widget Styles
 */

/* Base Container - Full Bleed (breaks out of container) */
.hero-carousel {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 80vh;
    overflow: hidden;
    border-radius: 0;
}

/* Override Elementor container constraints */
.elementor-widget-granity_hero_carousel {
    max-width: 100vw !important;
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
}

/* Slides Container */
.hero-carousel__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual Slide */
.hero-carousel__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-carousel__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* White Fading Frame */
.hero-carousel__frame {
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 80px);
    max-width: 1280px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    pointer-events: none;
    z-index: 2;
}

.hero-carousel__frame::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
    border-radius: 0 0 12px 12px;
}

/* Content Container */
.hero-carousel__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    max-width: 700px;
    padding: 0 20px;
}

/* Title */
.hero-carousel__title {
    font-family: var(--font-heading, 'League Spartan', sans-serif);
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 500;
    color: #ffffff;
    margin: 0 0 20px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
}

/* Text animations - controlled by JS */
.hero-carousel__slide.is-active .hero-carousel__title {
    animation: heroTextIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

.hero-carousel__slide.is-leaving .hero-carousel__title {
    animation: heroTextOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Description */
.hero-carousel__description {
    font-family: var(--font-body, 'Poppins', sans-serif);
    font-size: clamp(14px, 2vw, 16px);
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 30px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
}

.hero-carousel__slide.is-active .hero-carousel__description {
    animation: heroTextIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

.hero-carousel__slide.is-leaving .hero-carousel__description {
    animation: heroTextOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s forwards;
}

/* Search Bar */
.hero-carousel__search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 14px 24px;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
}

.hero-carousel__slide.is-active .hero-carousel__search {
    animation: heroTextIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s forwards;
}

.hero-carousel__slide.is-leaving .hero-carousel__search {
    animation: heroTextOut 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.15s forwards;
}

.hero-carousel__search-icon {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    width: 20px;
    height: 20px;
}

.hero-carousel__search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-body, 'Poppins', sans-serif);
    font-size: 15px;
}

.hero-carousel__search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Location Label - Right aligned inside frame, above nav */
.hero-carousel__location {
    position: absolute;
    bottom: 85px;
    right: 50%;
    transform: translateX(50%);
    margin-right: calc(-665px + 60px);
    /* Right edge inside 1280px frame */
    font-family: var(--font-body, 'Poppins', sans-serif);
    font-size: 16px;
    color: #ffffff;
    text-align: right;
    z-index: 3;
    opacity: 0;
    animation: heroFadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

@media (max-width: 1360px) {
    .hero-carousel__location {
        right: 0px;
        margin-right: calc(-665px + 60px);
        transform: none;
        margin-right: 0;
    }
}

.hero-carousel__slide.is-active .hero-carousel__location {
    opacity: 0;
    animation: heroFadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s forwards;
}

/* Navigation Lines - Right aligned inside frame, below location */
.hero-carousel__nav {
    position: absolute;
    bottom: 70px;
    right: 50%;
    transform: translateX(50%);
    margin-right: calc(-600px + 60px);
    /* Right edge inside 1280px frame */
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    z-index: 10;
}

@media (max-width: 1360px) {
    .hero-carousel__nav {
        right: 60px;
        transform: none;
        margin-right: 0;
    }
}

.hero-carousel__nav-line {
    position: relative;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    padding: 0;
    transition: background 0.3s ease;
}

.hero-carousel__nav-line:hover {
    background: rgba(255, 255, 255, 0.5);
}

.hero-carousel__nav-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: #cba465;
    /* Gold/brown color */
    border-radius: 2px;
    transition: width 0.1s linear;
}

.hero-carousel__nav-line.is-active .hero-carousel__nav-progress {
    width: 100%;
}

/* Arrow Navigation - Show on Hover */
.hero-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.hero-carousel__arrow--prev {
    left: 40px;
}

.hero-carousel__arrow--next {
    right: 40px;
}

.hero-carousel:hover .hero-carousel__arrow {
    opacity: 1;
    visibility: visible;
}

.hero-carousel__arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.hero-carousel__arrow img {
    width: 24px;
    height: 24px;
    filter: brightness(0);
}

/* Animations */
@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTextOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-carousel__frame {
        width: calc(100% - 60px);
        left: 30px;
        right: 30px;
        transform: none;
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 70vh;
        border-radius: 0;
        /* Keep full width on mobile too */
    }

    .hero-carousel__frame {
        top: 20px;
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: auto;
        transform: none;
        max-width: none;
    }

    .hero-carousel__location {
        bottom: 40px;
        right: 30px;
        font-size: 12px;
    }

    .hero-carousel__nav {
        bottom: 40px;
        right: 30px;
        transform: none;
        margin-right: 0;
    }

    .hero-carousel__nav-line {
        width: 40px;
    }

    .hero-carousel__search {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .hero-carousel__frame {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: 15px;
    }

    .hero-carousel__content {
        padding: 0 15px;
    }

    .hero-carousel__search {
        flex-direction: row;
        max-width: 280px;
        padding: 10px 16px;
    }

    .hero-carousel__nav-line {
        width: 30px;
    }

    .hero-carousel__location {
        bottom: 40px;
        right: 25px;
    }

    .hero-carousel__nav {
        bottom: 30px;
        right: 25px;
    }
}