/**
 * Hero Carousel Block Styles
 *
 * @package Realar Child
 */

/* Hero Carousel Section */
.hero-carousel {
    width: 100%;
    min-height: 702px;
    background-color: rgba(101, 84, 66, 1);
    background-position: 100% 25%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-carousel__container {
    max-width: 1784px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 68px;
}

.hero-carousel__content {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    position: relative;
}

/* Large Image (Left Side) */
.hero-carousel__main-image {
    width: 711px;
    height: 619px;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.hero-carousel__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hero-carousel__image.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-carousel__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right Side Content */
.hero-carousel__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Text Content */
.hero-carousel__text {
    max-width: 661px;
}

.hero-carousel__title {
    color: rgba(207, 199, 178, 1);
    font-size: 72px;
    font-family: var(--second-family);
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 24px 0;
}

.hero-carousel__description p{
    color: rgba(238, 237, 233, 1);
    font-size: 18px;
    font-family: var(--font-family);
    line-height: 1.6;
}

.hero-carousel__description p {
    margin: 0;
}

/* Preview Section (Right Side) */
.hero-carousel__nav{
    position: absolute;
}

.hero-carousel__nav--prev{
    left: 15px;
}

.hero-carousel__nav--next{
    right: 15px;
}

.hero-carousel__preview {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;
    margin-top: 99px;
}

.hero-carousel__preview-grid {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.hero-carousel__preview-item {
    width: 323px;
    height: 192px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.hero-carousel__preview-item.hidden {
    display: none;
}

.hero-carousel__preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-carousel__preview-item:hover {
    transform: scale(1.02);
}

/* Navigation Arrows */
.hero-carousel__nav {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10;
    flex-shrink: 0;
}

.hero-carousel__nav:hover {
    transform: scale(1.1);
}

.hero-carousel__nav svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 1600px) {
    .hero-carousel__container {
        padding: 0 40px;
    }

    .hero-carousel__preview {
        width: 84%;
    }

    .hero-carousel__main-image {
        width: 600px;
        height: 520px;
    }

    .hero-carousel__title {
        font-size: 60px;
    }

    .hero-carousel__preview-item {
        width: 280px;
        height: 170px;
    }
}

@media (max-width: 1440px){
    .hero-carousel__preview {
        width: 77%; 
    }
}

@media (max-width: 1300px){
    .hero-carousel__preview {
        width: 65%;
    }
    .hero-carousel__text {
        max-width: 560px;
    }
}

@media (max-width: 1200px) {
    .hero-carousel__content {
        flex-direction: column;
        gap: 40px;
    }

    .hero-carousel__container {
        padding: 60px 40px;
    }

    .hero-carousel__main-image {
        width: 100%;
        max-width: 600px;
        height: 450px;
        margin: 0 auto;
    }

    .hero-carousel__right {
        width: 100%;
    }

    .hero-carousel__preview {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        order: -1;
        margin-top: 18px;
    }

    .hero-carousel__preview-grid {
        flex-direction: row;
        gap: 16px;
    }

    .hero-carousel__preview-item {
        width: 250px;
        height: 150px;
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        min-height: auto;
        padding: 40px 0;
    }

    .hero-carousel__container {
        padding: 0 20px;
    }

    .hero-carousel__content {
        min-height: auto;
    }

    .hero-carousel__main-image {
        height: 350px;
    }

    .hero-carousel__preview-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .hero-carousel__preview-grid::-webkit-scrollbar {
        display: none;
    }

    .hero-carousel__preview-item {
        width: 200px;
        height: 120px;
        flex-shrink: 0;
    }

    .hero-carousel__title {
        font-size: 40px;
    }

    .hero-carousel__description {
        font-size: 16px;
    }

    .hero-carousel__nav {
        display: none;
    }
}

/* Mobile: max-width 550px */
@media (max-width: 768px) {

    .hero-carousel {
        width: 100%;
        height: auto;
        background-color: rgba(101, 84, 66, 1);
        border-radius: 0;
    }

    .hero-carousel__container {
        width: 100%;
        margin: 0 auto;
        padding: 0;
    }

    .hero-carousel__content {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        padding: 0 12px;
        box-sizing: border-box;
    }

    /* Image first */
    .hero-carousel__main-image {
        order: 1;
        width: 100%;
        max-width: 366px;
        height: 300px;
        border-radius: 30px;
        overflow: hidden;
        margin: 0 auto;
        padding-top: 40px;
        padding-bottom: 0;
        flex-shrink: 0;
    }

    .hero-carousel__main-image .hero-carousel__image img {
        border-radius: 30px;
    }

    /* Navigation (arrows only, hide preview thumbnails) */
    .hero-carousel__right {
        order: 2;
        width: 100%;
        flex-direction: column;
        gap: 0;
        align-items: center;
    }

    .hero-carousel__preview {
        order: 1;
        margin-top: 10px;
        margin-bottom: 0;
        width: 100%;
        height: 57px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 78px;
        background-color: transparent;
    }

    .hero-carousel__preview-grid {
        display: none;
    }

    .hero-carousel__nav {
        display: flex !important;
        position: static;
        padding: 0;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        align-items: center;
        justify-content: center;
        background-color: rgba(238, 237, 233, 1);
        border: 1px solid rgba(238, 237, 233, 1);
        border-radius: 99px;
    }

    .hero-carousel__nav svg {
        width: 40px;
        height: 40px;
    }

    .hero-carousel__nav--prev {
        left: auto;
    }

    .hero-carousel__nav--next {
        right: auto;
    }

    /* Text content last */
    .hero-carousel__text {
        order: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 18px;
        padding: 0;
        margin: 0 auto;
    }

    .hero-carousel__title {
        font-size: 40px;
        font-family: var(--second-family);
        font-weight: 600;
        color: rgba(207, 199, 178, 1);
        text-align: center;
        width: 100%;
    }

    .hero-carousel__description {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .hero-carousel__description p:first-of-type {
        font-size: 16px;
        font-family: var(--font-family);
        text-align: center;
    }

    .hero-carousel__description p {
        font-size: 18px;
        font-family: var(--font-family);
        text-align: center;
    }

    .hero-carousel__description p:first-of-type {
        font-size: 16px;
    }
}
