/**
 * RB Homepage Slider - Styles
 * Matches the Moderno c-ip-slider layout: text left 33%, image right 67%
 * Fixed height to prevent layout shifts between slides
 */

/* Container - full width */
.rb-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.rb-slider__track {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
}

/* Slide items - hide non-active slides immediately to prevent FOUC */
.rb-slider__item {
    display: block;
    opacity: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    visibility: hidden;
    transform: translateX(100%);
}

.rb-slider__item:first-child {
    visibility: visible;
    transform: translateX(0);
}

/* Inner layout: text left, image right - fixed height */
.rb-slider__item-inner {
    display: flex;
    align-items: stretch;
    height: 700px;
}

/* Text content - left 33% */
.rb-slider__content {
    flex: 0 0 33.333%;
    padding: 90px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Title - matches Elementor slider */
.rb-slider__title {
    font-size: 41px;
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 20px;
    color: #070707;
    letter-spacing: -1.8px;
    text-transform: none;
}

/* Subtitle/description */
.rb-slider__subtitle {
    font-size: 13px;
    line-height: 1.7;
    color: #555;
    margin: 0 0 30px;
}

.rb-slider__subtitle p {
    margin: 0 0 10px;
}

.rb-slider__subtitle p:last-child {
    margin-bottom: 0;
}

/* CTA button */
.rb-slider__button {
    display: inline-block;
    padding: 18px 50px;
    background: #070707;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    transition: background 0.3s ease;
    width: fit-content;
    border: none;
    cursor: pointer;
}

.rb-slider__button:hover {
    background: #333;
    color: #fff;
    text-decoration: none;
}

/* Image - right 67% */
.rb-slider__image {
    flex: 0 0 66.666%;
    overflow: hidden;
    position: relative;
}

.rb-slider__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dot pagination - inside slider at bottom-left */
.rb-slider__pagination {
    position: absolute;
    bottom: 30px;
    left: 0;
    display: flex;
    gap: 10px;
    padding: 0 70px;
    z-index: 10;
}

/* Dot wrapper - contains the dot + SVG ring */
.rb-slider__dot,
.rb-slider .rb-slider__dot {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 24px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;
    margin: 0;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    box-shadow: none;
}

/* Inner dot circle */
.rb-slider__dot::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: background 0.3s ease;
}

.rb-slider__dot:hover::after {
    background: #999;
}

.rb-slider__dot--active::after {
    background: #070707;
}

/* SVG countdown ring - CSS keyframe animation */
@keyframes rb-ring-countdown {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}

.rb-slider__dot-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
    pointer-events: none;
}

.rb-slider__dot-ring circle {
    fill: none;
    stroke: transparent;
    stroke-width: 2;
    stroke-dasharray: 100 100;
    stroke-dashoffset: 100;
    stroke-linecap: round;
}

.rb-slider__dot--active .rb-slider__dot-ring circle {
    stroke: #070707;
    animation: rb-ring-countdown var(--rb-slider-delay, 5s) linear forwards;
}

/* Pause ring animation on hover */
.rb-slider--paused .rb-slider__dot-ring circle {
    animation-play-state: paused;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .rb-slider__track {
        height: 500px;
    }

    .rb-slider__item-inner {
        height: 500px;
    }

    .rb-slider__content {
        padding: 50px 40px;
    }

    .rb-slider__title {
        font-size: 32px;
    }

    .rb-slider__pagination {
        padding: 0 40px;
        bottom: 20px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .rb-slider__track {
        height: 600px;
    }

    .rb-slider__item-inner {
        flex-direction: column-reverse;
        height: 600px;
    }

    .rb-slider__content,
    .rb-slider__image {
        flex: none;
        width: 100%;
    }

    .rb-slider__image {
        height: 320px;
    }

    .rb-slider__image img {
        height: 100%;
    }

    .rb-slider__content {
        padding: 30px 20px;
        flex: 1;
    }

    .rb-slider__title {
        font-size: 28px;
        letter-spacing: -1px;
    }

    .rb-slider__subtitle {
        margin-bottom: 20px;
    }

    .rb-slider__pagination {
        position: absolute;
        bottom: 15px;
        left: 0;
        right: 0;
        justify-content: center;
        padding: 0 20px;
    }
}
