/**
 * Horizontal Scroll Section
 * Vertical scroll drives horizontal movement through 5 panels (joint effect).
 */

.horizontal-scroll-section {
    height: 700vh;
    position: relative;
    padding: 125px 0;
    background-color: #000000;
}

@media (max-width: 576px) {
    .horizontal-scroll-section {
        padding: 0;
    }

    .horizontal-scroll-track {
        padding: 100px 0 50px 0px;
        background-image: url(../Images/stroke-background-mobile.png) !important;
        background-size: 400vw 100% !important;
    }

    .horizontal-panel-number {
        font-size: 32px !important;
        line-height: 40px !important;
    }

    .horizontal-panel-title {
        font-size: 32px !important;
        line-height: 40px !important;
        margin-bottom: 24px !important;
    }

    .horizontal-scroll-section .hs-collage-wrapper {
        width: 350px;
        height: auto;
        margin-left: 50px;
        min-height: 250px !important;
        margin-bottom: 70px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .horizontal-scroll-section {
        padding: 100px 0;
    }

    .horizontal-scroll-track {
        padding: 100px 0 80px 0px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .horizontal-scroll-section {
        padding: 100px 0;
    }
}

@media (min-width: 577px) and (max-width: 991px) {
    .horizontal-panel-title {
        font-size: 48px !important;
        line-height: 56px !important;
        margin-bottom: 24px !important;
    }
}

@media (min-width: 992px) and (max-width: 1280px) {
    .horizontal-scroll-section {
        padding: 100px 0;
    }

    .horizontal-panel-inner {
        padding-left: 50px !important;
        padding-right: 50px !important;
    }

    .horizontal-panel-title {
        font-size: 48px !important;
        line-height: 56px !important;
    }

    .horizontal-scroll-section .hs-collage-wrapper {
        min-height: auto !important;
    }
}

@media (min-width: 1281px) {
    .horizontal-scroll-section {
        padding: 50px 0;
    }

    .horizontal-scroll-section .hs-collage-wrapper {
        min-height: auto !important;
    }
}

.horizontal-scroll-pin {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #000000;
}

.horizontal-scroll-track {
    display: flex;
    width: 500vw;
    height: 100vh;
    will-change: transform;
    background-color: #000000;
    background-image: url(../Images/stroke-background.png);
    background-repeat: no-repeat;
    background-position: 0 center;
    background-size: 385vw 100%;
}

.horizontal-scroll-panel {
    width: 100vw;
    min-width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* TEMP: Panel overlap/peek commented out - uncomment to restore 55px/150px peek effect
.horizontal-scroll-panel:nth-child(2),
.horizontal-scroll-panel:nth-child(3) {
    margin-left: -55px;
}
.horizontal-scroll-panel:nth-child(4),
.horizontal-scroll-panel:nth-child(5) {
    margin-left: -150px;
}
*/

/* Panel background removed - section background covers all panels */
.horizontal-panel-bg {
    display: none;
}

.horizontal-panel-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 140px;
    padding-right: 140px;
    box-sizing: border-box;
}

/* 2 equal columns, no Bootstrap */
.horizontal-panel-col {
    flex: 1;
    min-width: 0;
}

.horizontal-panel-col-1 {
    padding-right: 40px;
    padding-left: 0;
    will-change: transform, opacity;
    transition: transform 0.12s ease-out, opacity 0.15s ease-out;
}

/* Collage column: overlapping images, absolute positioning */
.horizontal-panel-col-2.hs-collage-column {
    padding-left: 40px;
    padding-right: 40px;
    position: relative;
}

.hs-collage-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 500px;
}

@media (max-width: 991px) {
    .hs-collage-wrapper {
        min-height: 360px !important;
    }
}

.hs-collage-item {
    position: absolute;
    transform-origin: center center;
    opacity: 1;
}

.hs-collage-item-inner {
    width: 100%;
    height: 100%;
    will-change: transform, opacity;
    transition: transform 0.12s ease-out, opacity 0.15s ease-out;
}

.hs-collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Z-index stacking: base defaults, can be overridden per type */
.hs-collage-pos-1 { z-index: 4; }
.hs-collage-pos-2 { z-index: 3; }
.hs-collage-pos-3 { z-index: 2; }
.hs-collage-pos-4 { z-index: 4; }

/* ---- COLLAGE TYPE 1: pos1 bottom-left, pos2 main, pos3 top-left, pos4 top-right (instant position, no load animation) ---- */
.hs-collage-type-1 .hs-collage-pos-1 { animation: ct1-pos1 0.001s ease-out both; }
.hs-collage-type-1 .hs-collage-pos-2 { animation: ct1-pos2 0.001s ease-out both; }
.hs-collage-type-1 .hs-collage-pos-3 { animation: ct1-pos3 0.001s ease-out both; }
.hs-collage-type-1 .hs-collage-pos-4 { animation: ct1-pos4 0.001s ease-out both; }

@keyframes ct1-pos1 {
    from { left: 50%; top: 50%; width: 19%; height: 20%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 6%; top: auto; bottom: 10%; width: 19%; height: 20%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct1-pos2 {
    from { left: 50%; top: 50%; width: 55%; height: 97%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 50%; top: 0; width: 55%; height: 97%; transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes ct1-pos3 {
    from { left: 50%; top: 50%; width: 36%; height: 48%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 0; top: 25%; width: 36%; height: 48%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct1-pos4 {
    from { left: 50%; top: 50%; width: 22%; height: 28%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: auto; right: 10%; top: 15%; width: 22%; height: 28%; transform: translate(0, 0) scale(1); opacity: 1; }
}

/* ---- COLLAGE TYPE 2: main shifted left, overlaps from right and bottom ---- */
.hs-collage-type-2 .hs-collage-pos-1 { animation: ct2-pos1 0.001s ease-out both; width: 27%; height: 23%; }
.hs-collage-type-2 .hs-collage-pos-2 { animation: ct2-pos2 0.001s ease-out both; }
.hs-collage-type-2 .hs-collage-pos-4 { animation: ct2-pos4 0.001s ease-out both; width: 18%; height: 32%; z-index: 3; }

@keyframes ct2-pos1 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 5%; top: auto; bottom: 0; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct2-pos2 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 50%; top: 0; bottom: 8%; transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes ct2-pos3 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { top: 0; left: 15%; bottom: auto; right: auto; height: auto; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct2-pos4 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: auto; right: 10%; top: 20%; bottom: auto; transform: none; opacity: 1; }
}

/* ---- COLLAGE TYPE 3: custom positions ---- */
.hs-collage-type-3 .hs-collage-pos-1 {
    animation: ct2-pos1 0.001s ease-out both;
    width: 38%;
    height: 29%;
    bottom: -8% !important;
    left: 7% !important;
}
.hs-collage-type-3 .hs-collage-pos-2 { animation: ct2-pos2 0.001s ease-out both; }
.hs-collage-type-3 .hs-collage-pos-3 {
    animation: ct2-pos3 0.001s ease-out both;
    width: 28%;
    height: 49% !important;
    top: -8% !important;
    left: 20% !important;
}
.hs-collage-type-3 .hs-collage-pos-4 {
    animation: ct2-pos4 0.001s ease-out both;
    width: 26%;
    height: 26%;
    right: 0 !important;
    top: 8% !important;
    z-index: 2;
}

@keyframes ct3-pos1 {
    from { left: 50%; top: 50%; width: 28%; height: 32%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 8%; top: auto; bottom: 8%; width: 28%; height: 32%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct3-pos2 {
    from { left: 50%; top: 50%; width: 60%; height: 92%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 50%; top: 4%; width: 60%; height: 92%; transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes ct3-pos3 {
    from { left: 50%; top: 50%; width: 30%; height: 40%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 0; top: 5%; width: 30%; height: 40%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct3-pos4 {
    from { left: 50%; top: 50%; width: 22%; height: 55%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: auto; right: 5%; top: 15%; width: 22%; height: 55%; transform: translate(0, 0) scale(1); opacity: 1; }
}

/* ---- COLLAGE TYPE 4: custom layout for panel 4 ---- */
.hs-collage-type-4 .hs-collage-pos-1 {
    animation: ct4-pos1 0.001s ease-out both;
    width: 19%;
    height: 28%;
    top: 50% !important;
    left: auto !important;
    right: 19% !important;
}
.hs-collage-type-4 .hs-collage-pos-2 {
    animation: ct4-pos2 0.001s ease-out both;
    top: 0% !important;
    bottom: 0% !important;
}
.hs-collage-type-4 .hs-collage-pos-3 {
    animation: ct4-pos3 0.001s ease-out both;
    width: 37%;
    height: 33%;
    left: -8% !important;
}
.hs-collage-type-4 .hs-collage-pos-4 {
    animation: ct4-pos4 0.001s ease-out both;
    width: 34%;
    height: 27%;
    bottom: -17% !important;
    right: 26% !important;
}

@keyframes ct4-pos1 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 0; top: auto; bottom: 10%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct4-pos2 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 40%; top: auto; bottom: 15%; transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes ct4-pos3 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 5%; top: 10%; bottom: auto; right: auto; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct4-pos4 {
    from { left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: auto; right: 10%; top: auto; bottom: 20%; transform: translate(0, 0) scale(1); opacity: 1; }
}

/* ---- COLLAGE TYPE 5: balanced, different z-order (pos3 over pos2, pos1 & pos4 at sides) ---- */
.hs-collage-type-5 .hs-collage-pos-1 { animation: ct5-pos1 0.001s ease-out both; }
.hs-collage-type-5 .hs-collage-pos-2 { animation: ct5-pos2 0.001s ease-out both; }
.hs-collage-type-5 .hs-collage-pos-3 { animation: ct5-pos3 0.001s ease-out both; }
.hs-collage-type-5 .hs-collage-pos-4 { animation: ct5-pos4 0.001s ease-out both; }

@keyframes ct5-pos1 {
    from { left: 50%; top: 50%; width: 34%; height: 36%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 5%; top: auto; bottom: 8%; width: 34%; height: 36%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct5-pos2 {
    from { left: 50%; top: 50%; width: 54%; height: 88%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 50%; top: 6%; width: 54%; height: 88%; transform: translate(-50%, 0) scale(1); opacity: 1; }
}
@keyframes ct5-pos3 {
    from { left: 50%; top: 50%; width: 36%; height: 50%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: 0; top: 3%; width: 36%; height: 50%; transform: translate(0, 0) scale(1); opacity: 1; }
}
@keyframes ct5-pos4 {
    from { left: 50%; top: 50%; width: 26%; height: 60%; transform: translate(-50%, -50%) scale(0.05); opacity: 0; }
    to { left: auto; right: 3%; top: 18%; width: 26%; height: 60%; transform: translate(0, 0) scale(1); opacity: 1; }
}

.horizontal-panel-number {
    display: block;
    font-family: 'Lora', serif;
    font-size: 42px;
    line-height: 44px;
    color: #373634;
    margin: 0 0 8px 0;
}

.horizontal-panel-title {
    display: block;
    font-size: 64px;
    line-height: 72px;
    font-weight: 400;
    color: #F0F0F2;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 56px 0;
    font-family: 'Lora', serif;
}

.horizontal-panel-text {
    font-size: 18px;
    line-height: 26px;
    color: #6C6970;
    margin: 0 0 16px 0;
    padding-left: 80px;
    font-family: 'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (max-width: 991px) {
    .horizontal-panel-inner {
        flex-direction: column;
        justify-content: center;
        padding-left: 0px;
        padding-right: 0;
    }

    .horizontal-panel-col-2.hs-collage-column {
        padding-left: 0;
    }

    .hs-collage-wrapper {
        min-height: 500px;
    }

    /* Use internal padding instead of large gap so last panel can fully fit */
    .horizontal-scroll-panel {
        padding: 0 24px;
    }

}

@media (max-width: 768px) {
    .hs-collage-type-4 .hs-collage-pos-1 {
        right: 25% !important;
    }

    .horizontal-panel-inner {
        padding-left: 0px;
        padding-right: 0;
    }

    .horizontal-panel-col {
        flex: none;
        margin-bottom: 80px;
    }

    .horizontal-panel-col-1 {
        padding-right: 0px;
    }

    .horizontal-panel-text {
        font-size: 16px;
        line-height: 20px;
        padding-left: 0px;
        margin-bottom: 12px;
    }

}
