/**
 * Custom Horizontal Scroll Styles
 */

/* Scroll Container */
.scroll {
    position: relative;
    width: 100%;
    overflow: visible;
    margin: 2rem 0;
    cursor: grab;
    min-height: 400px;
}

.scroll:active {
    cursor: grabbing;
}

/* Scroll Content */
.scroll-content {
    display: flex;
    white-space: nowrap;
    position: relative;
    will-change: transform;
    min-height: 400px;
    overflow-x: auto;
    overflow-y: visible;
    gap: 1.5rem;
    padding: 0.5rem 2rem 0.5rem 0.5rem;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Slides - image-based layout */
.slide {
    flex-shrink: 0;
    min-width: 500px;
    width: 600px;
    height: 400px;
    display: block;
    position: relative;
    visibility: visible;
    opacity: 1;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(2, 57, 9, 0.12);
}

/* Image background */
.slide__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
}

/* Text overlay on left side */
.slide__text {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 5rem 2.5rem 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    background: linear-gradient(to top, rgba(2, 57, 9, 0.85) 0%, rgba(2, 57, 9, 0.75) 50%, rgba(2, 57, 9, 0.6) 100%);
    color: #ffffff;
    z-index: 2;
    border-radius: 0 0 12px 12px;
    min-height: 40%;
}

.slide__text * {
    color: #ffffff !important;
}

.slide__text p,
.slide__text .slide__description,
.slide__text p.slide__description,
.slide .slide__text p,
.slide .slide__text .slide__description {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Override any muted or other color classes */
.slide__text .muted,
.slide__text p.muted,
.slide__description.muted {
    color: #ffffff !important;
}

/* Slide number (for process) */
.slide__num {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    color: #ffffff !important;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    z-index: 3;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.slide:hover .slide__num {
    opacity: 1;
}

/* Slide title */
.slide__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff !important;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

/* Slide description */
.slide__description,
.slide .slide__text .slide__description,
.slide__text p.slide__description,
p.slide__description {
    font-size: 0.95rem;
    color: #ffffff !important;
    margin: 0;
    line-height: 1.7;
    font-weight: 400;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Timeline period */
.slide__period {
    font-size: 9px;
    font-weight: 700;
    color: #ffffff !important;
    margin-bottom: 0.5rem;
}

/* Timeline list */
.slide__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.slide__list li {
    font-size: 8px;
    color: #ffffff !important;
    margin-bottom: 0.375rem;
    padding-left: 0.75rem;
    position: relative;
    line-height: 1.5;
}

.slide__list li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ffffff !important;
    font-size: 20px;
    line-height: 1;
}

/* When positioned absolutely by JS */
.slide[style*="position: absolute"] {
    flex-shrink: 0;
}

.scroll-process .slide {
    width: 600px;
    min-width: 500px;
}

.scroll-timeline .slide {
    width: 600px;
    min-width: 500px;
}

/* Scrollbar */
.scrollbar {
    position: relative;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.1);
    margin-top: 1rem;
    border-radius: 1px;
}

.scrollbar__handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #4eaf45;
    transform: scaleX(0);
    transform-origin: left;
    border-radius: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        cursor: default;
    }

    .scroll-content {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 1rem 0.5rem 0.5rem;
        gap: 1rem;
        transform: none !important;
    }

    .slide {
        min-width: 280px;
        width: 320px;
        height: 280px;
        position: relative !important;
        left: auto !important;
    }

    .scroll-process .slide,
    .scroll-timeline .slide {
        width: 320px;
        min-width: 280px;
    }

    .slide__text {
        width: 100%;
        padding: 1.25rem;
        padding-top: 3.5rem;
        min-height: 40%;
    }

    .slide__title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .slide__description,
    .slide__list li {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .slide__num {
        right: 0.75rem;
        top: 0.75rem;
        font-size: 2rem;
    }

    .scrollbar {
        display: none;
    }
}