/* ==========================================================================
   Two Parts Slider - Exact Recreation from withhonor.org
   
   Z-Index Hierarchy (lowest to highest):
   - .two-parts-slider-holder: z-index: 1 (relative positioning)
   - .two-parts-slider-photos: z-index: -1 (background)
   - .two-parts-slider-photos img: z-index: 1
   - .two-parts-slider-photos:after: z-index: 5 (dark overlay)
   - .two-parts-slider-border: z-index: 5 (fixed border)
   - .part-text: z-index: 10 (text content)
   - Sticky elements: z-index: 99999 (forced above everything)
   ========================================================================== */

.two-parts-slider-holder {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    height: 100vh;
    width: 100%;
}

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

.two-parts-slider-photos {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Position relative to viewport instead of holder */
}

.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: 5;
}

.two-parts-slider-photos .item {
    opacity: 0;
    transition: opacity .5s ease-in-out;
}

.has-animation.animated .two-parts-slider-photos .item.active {
    opacity: 1;
}

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

@media (min-width: 1024px) {
    .has-animation.animated .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%;
    }
}

@media (min-width: 1024px) {
    .two-parts-slider-photos .part:nth-child(1) {
        width: 34.9%;
        left: 0;
    }
}

@media (min-width: 1024px) {
    .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;
    }
}

@media (min-width: 1024px) {
    .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;
    }
}

/* Basic positioning for all screen sizes */
.two-parts-slider-photos .part {
    position: absolute;
    top: 0;
    overflow: hidden;
    height: 100%;
}

.two-parts-slider-photos .part:nth-child(1) {
    width: 35%;
    left: 0;
}

.two-parts-slider-border {
    position: absolute;
    top: 0;
    left: 35%;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
    pointer-events: none;
}

.two-parts-slider-photos .part:nth-child(2) {
    width: 65%;
    right: 0;
}

/* Text containers for both panels */
.part-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 100px;
    z-index: 10; /* Lower z-index to ensure sticky elements are visible */
    pointer-events: none; /* Text is decorative, no interaction needed */
}

/* Ensure text is visible above the fixed background */
.two-parts-slider-holder .part-text {
    pointer-events: none;
    z-index: 10;
}

.left-text {
    align-items: flex-end;
    padding-bottom: 50px;
}

.right-text {
    align-items: center;
}

.part-text p {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}



/* Force sticky elements to appear above the slider - only when they should be visible */
.join-us-sticky-visible:not(.footer-visible) .join-us-sticky {
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Enable clicks on links and buttons inside .part-text */
.part-text a,
.part-text button,
.part-text .button {
    pointer-events: auto;
    position: relative;
    z-index: 11;
    cursor: pointer;
}

/* Additional rule to ensure form is visible when not near footer */
body.join-us-sticky-visible:not(.footer-visible) .join-us-sticky {
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Hide form when footer is visible - respect original behavior */
.footer-visible .join-us-sticky {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(100%) !important;
    z-index: 1 !important;
}

.footer-visible .show-join-us-sticky {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1 !important;
}

.join-us-sticky-hidden:not(.footer-visible) .show-join-us-sticky {
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

body.scrolled:not(.footer-visible) .show-join-us-sticky {
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure mobile sticky elements are also above slider when visible */
@media (max-width: 1023px) {
    .join-us-sticky-visible:not(.footer-visible) .join-us-sticky {
        z-index: 99999 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    body.scrolled:not(.footer-visible) .show-join-us-sticky {
        z-index: 99999 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Ensure navigation menu appears above sticky elements */
.menu {
    z-index: 100000 !important;
}

.menu-opened .menu {
    z-index: 100000 !important;
}

/* Force sticky elements to be below menu when menu is open */
.menu-opened .join-us-sticky,
.menu-opened .show-join-us-sticky {
    z-index: 1 !important;
}

.two-parts-slider-photos img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease-in-out;
    max-width: 100vw;
    z-index: 1;
}

/* ==========================================================================
   Mobile Responsive Styles for Header Two Parts Slider (< 1024px)
   ========================================================================== */

@media (max-width: 1023px) {
    /* Show full image as background of entire block */
    .two-parts-slider-holder {
        position: relative;
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow: hidden;
        min-height: auto;
        height: auto;
    }
    
    /* Background image set via JavaScript on .two-parts-slider-holder */
    .two-parts-slider-holder {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* Add lighter overlay mask covering entire holder - behind content */
    .two-parts-slider-holder::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 0;
        pointer-events: none;
    }
    
    /* Ensure parts don't create overlays */
    .two-parts-slider-photos .part::before,
    .two-parts-slider-photos .part::after {
        display: none !important;
    }
    
    /* Ensure item doesn't create overlays */
    .two-parts-slider-photos .item::before,
    .two-parts-slider-photos .item::after {
        display: none !important;
    }
    
    /* Photos container contributes to layout - background image set via JS on holder */
    .two-parts-slider-photos {
        position: relative;
        height: auto;
        pointer-events: auto;
        z-index: 1;
    }
    
    /* Make the item stack parts vertically */
    .two-parts-slider-photos .item {
        position: relative;
        display: flex;
        flex-direction: column;
        height: auto;
        background-color: rgba(0, 0, 0, 0.3);
    }
    
    /* Hide first part image but keep the part structure for text extraction */
    .two-parts-slider-photos .part:nth-child(1) img {
        display: none !important;
    }
    
    /* Make first part contribute to layout for the text */
    .two-parts-slider-photos .part:nth-child(1) {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        display: flex;
        flex-direction: column;
        order: 2;
    }
    
    /* Extract and show left-text (sidebar) from first part - remove background */
    .two-parts-slider-photos .part:nth-child(1) .part-text.left-text {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        padding: 30px 20px !important;
		padding-bottom: 75px!important;
        margin: 0 !important;
        background: none !important;
        z-index: 10;
        display: flex !important;
        align-items: flex-start;
        justify-content: flex-start;
        box-sizing: border-box;
        left: auto !important;
        top: auto !important;
    }
    
    /* Make second part contribute to layout for the text */
    .two-parts-slider-photos .part:nth-child(2) {
        position: relative;
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 40vh;
		padding-top: 70px;
        order: 1;
				width: 100%!important;

    }
    
    /* Hide second part image - background is set via JS on holder */
    .two-parts-slider-photos .part:nth-child(2) img {
        display: none !important;
    }
    
    /* Extract and show right-text (main content with h1) from second part - remove background */
    .two-parts-slider-photos .part:nth-child(2) .part-text.right-text {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        padding: 40px 20px !important;
        margin: 0 !important;
        background: none !important;
        z-index: 10;
        display: flex !important;
        align-items: flex-start;
        justify-content: flex-start;
        box-sizing: border-box;
        left: auto !important;
        top: auto !important;
    }
    
    /* Disable animations on mobile */
    .two-parts-slider-photos .item.active .part:nth-child(1) img,
    .two-parts-slider-photos .item.active .part:nth-child(2) img {
        transform: none !important;
    }
    
    /* Hide border on mobile */
    .two-parts-slider-border {
        display: none;
    }
    
    /* Hide the photos container overlay on mobile - we use holder::after instead */
    .two-parts-slider-photos:after {
        display: none !important;
        content: none !important;
        background: none !important;
    }
}

/* ==========================================================================
   Two Part Slider Multi - Multi-image version with looping
   ========================================================================== */

.two-part-slider-multi-holder {
    position: relative;
    z-index: 1;
    overflow: hidden;
    color: #fff;
    height: 100vh;
    width: 100%;
}

@media (min-width: 1024px) {
    .two-part-slider-multi-holder {
        padding: 0;
        display: flex;
    }
}

.two-part-slider-multi-photos {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

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

.two-part-slider-multi-photos .item {
    opacity: 0;
    transition: opacity .5s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.two-part-slider-multi-photos .item.active {
    opacity: 1;
}

@media (min-width: 1024px) {
    .has-animation.animated .two-part-slider-multi-photos .item.active .part:nth-child(1) img {
        transform: translate(0, 0) scale(1.1);
    }
}

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

@media (min-width: 1024px) {
    .two-part-slider-multi-photos .part {
        position: absolute;
        top: 0;
        overflow: hidden;
        height: 100%;
    }
}

@media (min-width: 1024px) {
    .two-part-slider-multi-photos .part:nth-child(1) {
        width: 35%;
        left: 0;
    }
}

@media (min-width: 1024px) {
    .two-part-slider-multi-photos .part:nth-child(1) img {
        object-position: left center;
        transform: translate(0, -5%) scale(1.1);
        transition: transform 1.5s ease-in-out;
    }
}

@media (min-width: 1024px) {
    .two-part-slider-multi-photos .part:nth-child(2) {
        width: 65%;
        right: 0;
    }
}

@media (min-width: 1024px) {
    .two-part-slider-multi-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-part-slider-multi-border {
    position: absolute;
    top: 0;
    left: 35%;
    width: 1px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 5;
    pointer-events: none;
}

.two-part-slider-multi-photos .part:nth-child(2) {
    width: 65%;
    right: 0;
}

/* Text containers for both panels */
.two-part-slider-multi-holder .part-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 100px;
    z-index: 10;
    pointer-events: none;
}

.two-part-slider-multi-holder .left-text {
    align-items: flex-end;
    padding-bottom: 50px;
}

.two-part-slider-multi-holder .right-text {
    align-items: center;
}

.two-part-slider-multi-holder .part-text p {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}

/* Slide info section (title and progress bar) */
.slide-info {
    position: absolute;
    bottom: 50px;
    left: 100px;
    right: 100px;
    z-index: 15;
    pointer-events: none;
}

.slide-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #DC1F34;
    width: 0%;
    transition: width linear;
    border-radius: 2px;
}

.two-part-slider-multi-photos img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s ease-in-out;
    max-width: 100vw;
    z-index: 1;
}

/* ==========================================================================
   Timeline Flexible Content Block
   ========================================================================== */

.timeline-wrapper {
    position: relative;
    min-height: 400px;
}

/* Year Column - Left Side */
.timeline-year-column {
    position: sticky;
    top: 100px; /* Offset for header if needed */
    align-self: flex-start;
    padding-right: 20px;
    z-index: 10;
}

.timeline-year-link {
    display: block;
    color: #0e3a60;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 0;
    transition: color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
}

.timeline-year-link:hover {
    color: #DC1F34;
    transform: translateX(5px);
}

.timeline-year-link.active {
    color: #DC1F34;
    font-weight: 700;
}

/* Timeline Content Column - Right Side */
.timeline-content-wrapper {
    position: relative;
}

.timeline-content {
    position: relative;
    padding-left: 20px;
}

/* Sticky positioning for timeline content */
@media (min-width: 768px) {
    .timeline-content-wrapper {
        position: sticky;
        top: 100px; /* Offset for header if needed */
        align-self: flex-start;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Timeline Items */
.timeline-item {
    margin-bottom: 40px;
    padding-bottom: 30px;
    scroll-margin-top: 120px; /* Offset for sticky header when scrolling */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-divider {
    margin: 30px 0 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* Timeline Date */
.timeline-date {
    font-size: 16px;
    font-weight: 600;
    color: #0e3a60;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Timeline Title */
.timeline-title {
    font-size: 24px;
    font-weight: 700;
    color: #0e3a60;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

/* Timeline Text Column */
.timeline-text-column {
    position: relative;
}

/* Timeline Text Wrapper */
.timeline-text-wrapper {
    margin-top: 15px;
}

/* Toggle Button */
.timeline-toggle-btn {
    background: transparent;
    border: 2px solid #0e3a60;
    color: #0e3a60;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-toggle-btn:hover {
    background: #0e3a60;
    color: #fff;
}

.timeline-toggle-btn[aria-expanded="true"] {
    background: #0e3a60;
    color: #fff;
}

.timeline-toggle-btn[aria-expanded="true"] .toggle-icon {
    transform: rotate(45deg);
}

.toggle-icon {
    display: inline-block;
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
}

.toggle-text {
    font-size: 14px;
}

/* Timeline Text Content */
.timeline-text-content {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #333;
    line-height: 1.8;
}

.timeline-text-content p {
    margin-bottom: 15px;
}

.timeline-text-content p:last-child {
    margin-bottom: 0;
}

/* Timeline Image Column */
.timeline-image-column {
    position: sticky;
    top: 100px; /* Match the timeline-content sticky position */
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-left: 20px;
}

@media (max-width: 767px) {
    .timeline-image-column {
        position: relative;
        top: auto;
        max-height: none;
        margin-top: 20px;
        padding-left: 0;
    }
}

.timeline-image-wrapper {
    position: relative;
    width: 100%;
}

.timeline-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .timeline-year-column {
        position: relative;
        top: auto;
        margin-bottom: 30px;
        padding-right: 0;
    }
    
    .timeline-year-link {
        display: inline-block;
        margin-right: 15px;
        padding: 5px 10px;
    }
    
    .timeline-content {
        padding-left: 0;
    }
    
    .timeline-content-wrapper {
        position: relative;
        top: auto;
        max-height: none;
        overflow-y: visible;
    }
    
    .timeline-item {
        scroll-margin-top: 20px;
    }
}


