/* ===========================
   Hero Section: Form + Slider
   =========================== */
.rs-hero-section {
    padding: 28px 0 20px;
    background: #f8f9fa;
}

/* Home hero: background image + overlay system */
.rs-hero-home {
    position: relative;
    overflow: visible;
    padding: 32px 0 0;
    background: transparent;
}

.rs-hero-bg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.rs-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 20%;
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}

.rs-hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 20%;
    z-index: 1;
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
    background:
        linear-gradient(
            135deg,
            rgba(180, 20, 20, 0.82) 0%,
            rgba(220, 38, 38, 0.65) 30%,
            rgba(255, 255, 255, 0.50) 70%,
            rgba(248, 249, 250, 0.85) 100%
        );
}

.rs-hero-bg-decor {
    display: none;
}

.rs-hero-content {
    position: relative;
    z-index: 2;
}

/* Home-specific: stacked layout (form on top, slider below) */
.rs-hero-home .rs-hero-form-home {
    margin-bottom: 24px;
    position: relative;
    z-index: 3;
}

.rs-hero-home .rs-hero-form-home .modern-search-container {
    margin: 0;
    border-radius: 16px;
    padding: 24px 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
}

.rs-hero-home .rs-hero-form-home .modern-form-card {
    padding: 20px;
    border-radius: 12px;
}

.rs-hero-home .rs-hero-form-home .modern-search-title {
    font-size: 22px;
    margin-bottom: 4px;
}

.rs-hero-home .rs-hero-form-home .modern-search-subtitle {
    font-size: 13px;
    margin-bottom: 14px;
}

.rs-hero-home .rs-hero-form-home .modern-input-group {
    margin-bottom: 0;
}

.rs-hero-home .rs-hero-form-home .modern-label {
    font-size: 12px;
    margin-bottom: 4px;
}

.rs-hero-home .rs-hero-form-home .modern-btn-search {
    padding: 12px 24px;
    font-size: 15px;
}

.rs-hero-home .rs-hero-form-home .modern-info-badge {
    margin-top: 8px;
    font-size: 11px;
}

/* Desktop home: form fields in 1 row */
@media (min-width: 992px) {
    .rs-hero-home .rs-hero-form-home .modern-form-card > .row {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        align-items: flex-end;
    }

    .rs-hero-home .rs-hero-form-home .modern-form-card > .row > [class*="col-"] {
        flex: 1;
        width: auto;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .rs-hero-home .rs-hero-form-home .modern-form-card > .row > .col-home-search-btn {
        flex: 0 0 auto;
        width: auto;
    }

    .rs-hero-home .rs-hero-form-home .modern-btn-search {
        white-space: nowrap;
        width: auto;
        padding: 12px 28px;
    }

    .rs-hero-home .rs-hero-form-home .modern-input-group {
        margin-bottom: 0;
    }
}

/* Home slider: full-width landscape banner */
.rs-hero-slider-home {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    position: relative;
    margin-bottom: 24px;
}

.rs-compact-slider {
    position: relative;
    margin-bottom: 0;
    overflow: hidden;
}

.rs-compact-slide {
    position: relative;
    overflow: hidden;
}

/* Desktop 2-column slider: add gap between slides */
@media (min-width: 992px) {
    .rs-hero-slider-home .rs-compact-slider .slick-slide {
        padding: 0 8px;
    }

    .rs-hero-slider-home .rs-compact-slider .slick-list {
        margin: 0 -8px;
    }

    .rs-hero-slider-home {
        box-shadow: none;
        border-radius: 0;
    }

    .rs-compact-slide .rs-slide-img-wrap {
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
    }
}

.rs-slide-link {
    display: block;
    text-decoration: none;
}

/* Landscape ratio for slider */
.rs-slide-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 50%; /* 2:1 landscape ratio for 2-up */
    overflow: hidden;
}

.rs-slide-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 6s ease;
}

.rs-compact-slide:hover .rs-slide-img,
.slick-active .rs-slide-img {
    transform: scale(1.04);
}

.rs-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0.08) 50%,
        transparent 100%
    );
    z-index: 1;
}

.rs-slide-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rs-slide-caption-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.rs-slide-caption-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.rs-slide-link:hover .rs-slide-caption-cta {
    opacity: 1;
    gap: 12px;
}

.rs-slide-caption-cta i {
    transition: transform 0.3s ease;
}

.rs-slide-link:hover .rs-slide-caption-cta i {
    transform: translateX(4px);
}

/* Compact Slider Dots */
.rs-compact-slider .slick-dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: flex !important;
    justify-content: center;
    gap: 8px;
    z-index: 3;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Desktop 2-column: dots below slider, not overlapping */
@media (min-width: 992px) {
    .rs-compact-slider .slick-dots {
        position: relative;
        bottom: auto;
        margin-top: 14px;
    }

    .rs-compact-slider .slick-dots li button {
        border-color: rgba(180, 20, 20, 0.4);
    }

    .rs-compact-slider .slick-dots li button:hover {
        background: rgba(220, 38, 38, 0.3);
    }

    .rs-compact-slider .slick-dots li.slick-active button {
        background: #dc2626;
        border-color: #dc2626;
    }
}

.rs-compact-slider .slick-dots li {
    margin: 0;
}

.rs-compact-slider .slick-dots li button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    font-size: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.rs-compact-slider .slick-dots li button:hover {
    background: rgba(255,255,255,0.5);
}

.rs-compact-slider .slick-dots li.slick-active button {
    background: #fff;
    width: 22px;
    border-radius: 8px;
    border-color: #fff;
}

/* Legacy non-home hero grid (kept for other pages if needed) */
.rs-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.rs-hero-form .modern-search-container {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.18);
}

.rs-hero-form .modern-form-card {
    flex: 1;
    padding: 24px;
    border-radius: 12px;
}

.rs-hero-form .modern-search-title {
    font-size: 24px;
    margin-bottom: 6px;
}

.rs-hero-form .modern-search-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
}

.rs-hero-form .modern-input-group {
    margin-bottom: 16px;
}

.rs-hero-form .modern-label {
    font-size: 13px;
    margin-bottom: 6px;
}

.rs-hero-form .modern-btn-search {
    padding: 13px 24px;
    font-size: 15px;
}

.rs-hero-form .modern-info-badge {
    margin-top: 10px;
    font-size: 12px;
}

/* ===========================
   Responsive Hero
   =========================== */

/* Tablet */
@media (max-width: 991px) {
    .rs-hero-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .rs-hero-section {
        padding: 18px 0 14px;
    }

    .rs-hero-home {
        padding: 0;
    }

    .rs-hero-bg {
        bottom: 30%;
    }

    .rs-hero-bg-overlay {
        bottom: 30%;
        background:
            linear-gradient(
                160deg,
                rgba(180, 20, 20, 0.80) 0%,
                rgba(220, 38, 38, 0.60) 40%,
                rgba(255, 255, 255, 0.55) 75%,
                rgba(248, 249, 250, 0.90) 100%
            );
    }

    .rs-hero-home .rs-hero-form-home .modern-search-container {
        padding: 20px 16px;
    }

    .rs-hero-home .rs-hero-form-home .modern-form-card {
        padding: 16px;
    }

    .rs-slide-img-wrap {
        padding-top: 50%;
    }

    .rs-slide-caption-text {
        font-size: 18px;
    }

    .rs-slide-caption {
        bottom: 18px;
        left: 18px;
        right: 18px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .rs-hero-section {
        padding: 12px 0 10px;
    }

    .rs-hero-home {
        padding: 0;
        overflow: visible;
    }

    .rs-hero-bg {
        bottom: 40%;
        background-position: center 30%;
    }

    .rs-hero-bg-overlay {
        bottom: 40%;
        background:
            linear-gradient(
                180deg,
                rgba(180, 20, 20, 0.75) 0%,
                rgba(220, 38, 38, 0.55) 50%,
                rgba(248, 249, 250, 0.95) 100%
            );
    }

    /* Decorative diagonal stripe on mobile */
    .rs-hero-bg-decor {
        display: block;
        position: absolute;
        top: -10%;
        left: -20%;
        width: 140%;
        height: 45%;
        background: linear-gradient(
            -8deg,
            transparent 40%,
            rgba(220, 38, 38, 0.06) 40%,
            rgba(220, 38, 38, 0.06) 42%,
            transparent 42%
        );
        z-index: 1;
        pointer-events: none;
    }

    .rs-hero-home .rs-hero-form-home {
        margin-bottom: 14px;
    }

    .rs-hero-home .rs-hero-form-home .modern-search-container {
        border-radius: 14px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

    .rs-hero-slider-home {
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .rs-slide-img-wrap {
        padding-top: 55%;
    }

    .rs-slide-caption-text {
        font-size: 15px;
    }

    .rs-slide-caption {
        bottom: 14px;
        left: 14px;
        right: 14px;
        gap: 4px;
    }

    .rs-slide-caption-cta {
        font-size: 11px;
    }
}

/* Legacy slider class aliases for backward compat */
.modern-home-slider { position: relative; margin-bottom: 0; overflow: hidden; }
.modern-slider-item { position: relative; overflow: hidden; }
.modern-slider-link { display: block; text-decoration: none; }
.modern-slider-image-wrapper { position: relative; width: 100%; height: 420px; overflow: hidden; }
.modern-slider-image { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Modern Popup Styles */
.modern-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: transparent;
    pointer-events: auto;
}

.modern-popup {
    position: relative;
    max-width: 600px;
    width: 100%;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 9999px rgba(0, 0, 0, 0.85);
    animation: popupScale 0.3s ease;
}

@keyframes popupScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modern-popup-content {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.modern-popup-image {
    width: 100%;
    height: auto;
    display: block;
}

.modern-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f82c23;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(248, 44, 35, 0.4);
    z-index: 10;
}

.modern-popup-close:hover {
    background: #e02318;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(248, 44, 35, 0.6);
}

/* Responsive Popup */
@media (max-width: 768px) {
    .modern-popup {
        max-width: 90%;
        width: 100%;
    }

    .modern-popup-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 16px;
        z-index: 10;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}