/**
 * Two Parts Slider Styles
 * 
 * Matches the header slider structure with text overlays on images
 * Works independently without requiring old theme scripts/styles
 */

.two-parts-slider-holder {
    position: relative;
    z-index: 20;
    overflow: hidden;
    color: #fff;
    min-height: 500px;
}

@media (min-width: 1024px) {
    .two-parts-slider-holder {
        min-height: 90vh;
        display: flex;
    }
}

/* Background Images */
.two-parts-slider-photos {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.two-parts-slider-photos:after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.two-parts-slider-photos .item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
}

.two-parts-slider-photos .item.active,
.two-parts-slider-photos .item:first-child {
    opacity: 1;
}

@media (min-width: 1024px) {
    .two-parts-slider-photos .item.active .part:nth-child(1) img {
        transform: translate(0, 0) scale(1.1);
    }
    
    .two-parts-slider-photos .item.active .part:nth-child(2) img {
        transform: translate(3.5%, 0) scale(1.1);
    }
}

@media (min-width: 1024px) {
    .two-parts-slider-photos .part {
        position: absolute;
        top: 0;
        overflow: hidden;
        height: 100%;
    }
    
    .two-parts-slider-photos .part:nth-child(1) {
        width: 34.9%;
        left: 0;
    }
    
    .two-parts-slider-photos .part:nth-child(1) img {
        object-position: left center;
        transform: translate(0, -5%) scale(1.1);
        transition: transform 1.5s ease-in-out;
    }
    
    .two-parts-slider-photos .part:nth-child(2) {
        width: 65.1%;
        right: 0;
    }
    
    .two-parts-slider-photos .part:nth-child(2) img {
        object-position: -34.9vw center;
        transform: translate(0, 5%) scale(1.1);
        transition: transform 1.5s ease-in-out;
    }
}

.two-parts-slider-photos .part {
    position: relative;
    width: 100%;
    height: 50%;
}

@media (min-width: 1024px) {
    .two-parts-slider-photos .part {
        position: absolute;
        height: 100%;
    }
}

.two-parts-slider-photos .part img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.5s ease-in-out;
}

@media (min-width: 1024px) {
    .two-parts-slider-photos .part img {
        width: 100vw;
        max-width: 100vw;
    }
}

/* Text Overlays */
.part-text {
    position: absolute;
    z-index: 30;
    color: #fff;
    padding: 40px;
    display: none;
    align-items: center;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
}

.part-text.active,
.part-text:first-child {
    display: flex;
}

@media (min-width: 1024px) {
    .part-text {
        padding: 100px;
    }
}

/* Stack panels on mobile - single background image */
@media (max-width: 1000px) {
    .two-parts-slider-photos .item {
        flex-direction: column;
    }
    
    .two-parts-slider-photos .part {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    /* Hide the first part image on mobile, show only the second part */
    .two-parts-slider-photos .part:nth-child(1) img {
        display: none;
    }
    
    .two-parts-slider-photos .part:nth-child(2) {
        width: 100%;
        height: 100%;
    }
    
    .two-parts-slider-photos .part:nth-child(2) img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    .part-text.left-text {
        height: 50%;
        top: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .part-text.right-text {
        height: 50%;
        top: 50%;
    }
}

.part-text.left-text {
    left: 0;
    justify-content: space-between;
    align-items: flex-start;
    flex-direction: column;
    padding: 40px;
    width: 100%;
    box-sizing: border-box;
}

.part-text.left-text.static {
    position: absolute;
    z-index: 30;
    display: flex;
}

@media (min-width: 1024px) {
    .part-text.left-text {
        width: 34.9%;
        padding: 100px;
        box-sizing: border-box;
    }
    
    .part-text.left-text.static {
        width: 34.9%;
    }
}

.part-text.left-text > div {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: space-between;
    max-width: 100%;
    box-sizing: border-box;
}

.part-text.left-text .fitem-tag {
    margin-top: 0;
    margin-bottom: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.part-text.left-text .slider-sidebar {
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.part-text.left-text .slider-sidebar * {
    max-width: 100%;
}

.part-text.right-text {
    right: 0;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .part-text.right-text {
        right: 0;
        left: auto;
        padding: 100px;
        box-sizing: border-box;
    }
}

.part-text.right-text > div {
    width: 100%;
    max-width: 100%;
}

.part-text.right-text h1,
.part-text.right-text .h1,
.part-text.right-text p,
.part-text.right-text div {
    width: 100%;
    max-width: 100%;
}

.part-text.right-text ul {
    font-size: 30px;
    line-height: 40px;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.part-text.right-text ul li {
    padding-left: 50px;
    margin-bottom: 20px;
    position: relative;
    background-image: url('../img/ico-star.svg');
    background-repeat: no-repeat;
    background-position: left top 8px;
    background-size: 24px 24px;
}

.part-text.right-text ul li:last-child {
    margin-bottom: 0;
}

.part-text h1,
.part-text .h1 {
    color: #fff;
    font-size: 28px;
    line-height: 110%;
    margin: 0;
}

@media (min-width: 768px) {
    .part-text h1,
    .part-text .h1 {
        font-size: 36px;
    }
}

@media (min-width: 1024px) {
    .part-text h1,
    .part-text .h1 {
        font-size: 40px;
    }
}

@media (min-width: 1440px) {
    .part-text h1,
    .part-text .h1 {
        font-size: 48px;
    }
}

@media (min-width: 1800px) {
    .part-text h1,
    .part-text .h1 {
        font-size: 60px;
    }
}

.part-text p {
    font-size: 14px;
    line-height: 142%;
    margin: 0;
}

@media (min-width: 768px) {
    .part-text p {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    .part-text p {
        font-size: 18px;
    }
}

@media (min-width: 1800px) {
    .part-text p {
        font-size: 22px;
    }
}

.fitem-tag {
    color: #fff;
    margin-bottom: 20px;
    font-size: 20px;
}

@media (min-width: 768px) {
    .fitem-tag {
        font-size: 28px;
    }
}

/* Border */
.two-parts-slider-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 25;
}

@media (min-width: 1024px) {
    .two-parts-slider-border {
        left: 34.9%;
        width: 1px;
        height: 100%;
        top: 0;
        bottom: auto;
    }
}

/* Three Titles at Bottom - Always Visible in Right Column */
.two-parts-slider-titles {
    position: relative;
    z-index: 30;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    padding: 15px;
    margin-bottom: 45px;
    background-color: transparent;
    width: 100%;
    border-bottom: 2px solid rgba(255, 255, 255, 0.33);
}

@media (min-width: 1024px) {
    .two-parts-slider-titles {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 65.1%;
        padding: 15px;
        margin-bottom: 45px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 40px;
        justify-content: center;
        border-bottom: 2px solid rgba(255, 255, 255, 0.33);
    }
}

.two-parts-slider-titles .item {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px 0;
    position: relative;
    overflow: visible;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 1024px) {
    .two-parts-slider-titles .item {
        flex: 1 1 0;
        min-width: 0;
    }
}

.two-parts-slider-titles .item:hover {
    opacity: 0.8;
}

/* Filling bar timer effect - fills underneath active title with progress */
.two-parts-slider-titles .item.active::after {
    content: "";
    position: absolute;
    bottom: -17px;
    left: 0;
    height: 2px;
    background-color: #fff;
    width: var(--progress, 0%);
    z-index: 10;
    transition: none;
    display: block !important;
    opacity: 1;
}

.two-parts-slider-titles .item h4,
.two-parts-slider-titles .item .h3 {
    color: #fff;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    line-height: 1.2;
    text-align: center;
}

@media (min-width: 768px) {
    .two-parts-slider-titles .item h4,
    .two-parts-slider-titles .item .h3 {
        font-size: 24px;
    }
}

@media (min-width: 1024px) {
    .two-parts-slider-titles .item h4,
    .two-parts-slider-titles .item .h3 {
        font-size: 28px;
    }
}

.two-parts-slider-titles .item.active h4,
.two-parts-slider-titles .item.active .h3 {
    color: #fff;
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 1000px) {
    .two-parts-slider-holder {
        min-height: 500px;
    }
    
    .two-parts-slider-titles {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px;
        padding: 15px;
        margin-bottom: 45px;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid rgba(255, 255, 255, 0.33);
    }
    
    .two-parts-slider-titles .item {
        padding: 10px 0;
        flex: 0 0 auto;
        min-width: fit-content;
    }
}

