/* =========================================================
   /2 — Realtor.com clean hero (match reference screenshot)
   Compact: 1 large + 3 equal side tiles, ~75/25, thin gutters
   ========================================================= */

.rdc-hero {
    max-width: 1330px;
    margin: 0 auto;
    padding: 16px 16px 12px;
}

.rdc-hero__grid {
    display: grid !important;
    /* Always: main left, thumbs right (even in RTL pages) */
    direction: ltr;
    grid-template-columns: 3fr 1fr !important; /* ~75% / 25% */
    gap: 3px !important;
    height: 420px !important;
    max-height: 420px !important;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

/* Keep logical inline arrows/labels correct inside RTL pages */
.rdc-hero[dir="rtl"] .rdc-hero__main,
.rdc-hero[dir="rtl"] .rdc-hero__side {
    direction: rtl;
}

.rdc-hero__main {
    position: relative !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    background: #111;
    overflow: hidden !important;
}

.rdc-hero__main-btn {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    cursor: pointer;
    position: relative !important;
    overflow: hidden !important;
}

.rdc-hero__main-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-position: center center !important;
    opacity: 0 !important;
    transition: opacity 0.25s ease;
    display: block !important;
}

.rdc-hero__main-img.is-active {
    opacity: 1 !important;
}

.rdc-hero__arrow {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0 !important;
    background: rgb(18 69 139) !important;
    color: #fff !important;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.rdc-hero__arrow:hover {
    background: rgb(18 69 139) !important;
}

.rdc-hero__arrow--prev {
    inset-inline-start: 12px;
}

.rdc-hero__arrow--next {
    inset-inline-end: 12px;
}

.rdc-hero__count {
    position: absolute;
    bottom: 12px;
    inset-inline-end: 12px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    direction: ltr;
    unicode-bidi: isolate;
}

.rdc-hero__side {
    display: grid !important;
    grid-template-rows: repeat(3, minmax(0, 1fr)) !important;
    gap: 3px !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

.rdc-hero__tile {
    position: relative !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    cursor: pointer;
    background: #1a1a1a !important;
    min-height: 0 !important;
    height: 100% !important;
}

.rdc-hero__tile img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-position: center center !important;
    display: block !important;
}

.rdc-mfp-gallery {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Dark fullscreen slider */
.rdc-lb {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
}

.rdc-lb[hidden] {
    display: none !important;
}

.rdc-lb__top {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.rdc-lb__close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    margin-inline-start: auto;
}

.rdc-lb__close span {
    font-size: 26px;
    line-height: 1;
}

.rdc-lb__tabs {
    display: flex;
    gap: 20px;
    overflow-x: auto;
}

.rdc-lb__tabs button {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.rdc-lb__tabs button.is-active {
    color: #fff;
    border-bottom-color: #fff;
}

.rdc-lb__body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
    padding: 24px 72px 16px;
}

.rdc-lb__stage {
    text-align: center;
    max-width: min(1100px, 100%);
}

.rdc-lb__img {
    max-width: 100% !important;
    max-height: calc(100vh - 180px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: inline-block !important;
}

.rdc-lb__count {
    margin-top: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: isolate;
}

.rdc-lb__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 28px;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}

.rdc-lb__nav:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.rdc-lb__nav--prev {
    inset-inline-start: 18px;
}

.rdc-lb__nav--next {
    inset-inline-end: 18px;
}

@media (max-width: 991px) {
    .rdc-hero__grid {
        height: 340px !important;
        max-height: 340px !important;
    }
}

@media (max-width: 767px) {
    .rdc-hero {
        padding: 10px;
    }

    .rdc-hero__grid {
        grid-template-columns: 1fr !important;
        height: auto !important;
        max-height: none !important;
        gap: 3px !important;
    }

    .rdc-hero__main {
        height: 240px !important;
    }

    .rdc-hero__side {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: 96px !important;
        height: 96px !important;
    }

    .rdc-lb__body {
        padding: 16px 52px;
    }
}
