/* =============================================================
   EXPOSE OTHER OFFERS – shared wrapper
   ============================================================= */
.roark-other-offers {
    width: 100%;
}

/* Clear separation from whatever precedes this
   block in the footer (e.g. the map / Suchauftrag), via the widget's own
   "Show Top Divider" switcher. */
.roark-other-offers--divider {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.roark-other-offers__title {
    margin: 0 0 1.25rem;
    font-family: inherit;
}

/* =============================================================
   GRID LAYOUT
   ============================================================= */
.roark-other-offers-grid {
    display: grid;
    gap: 20px;
}

.roark-other-offers-grid-2 { grid-template-columns: repeat(2, 1fr); }
.roark-other-offers-grid-3 { grid-template-columns: repeat(3, 1fr); }
.roark-other-offers-grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .roark-other-offers-grid-3,
    .roark-other-offers-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .roark-other-offers-grid-2,
    .roark-other-offers-grid-3,
    .roark-other-offers-grid-4 { grid-template-columns: 1fr; }
}

/* =============================================================
   SLIDER LAYOUT
   ============================================================= */
.roark-other-offers-slider-wrap {
    position: relative;
    overflow: hidden;
    padding-bottom: 44px; /* room for pagination */
}

/* Desktop/tablet: reserve a side gutter for the nav arrows so they sit next to
   the row of cards instead of overlapping the first/last card's image. The
   nav/pagination markup sits OUTSIDE `.roark-other-offers-swiper` (a sibling,
   not a child — see renderSlider()) specifically so they're positioned
   against THIS wrap (position:relative) rather than the swiper element,
   which Swiper's own base CSS makes position:relative in its own right. */
@media (min-width: 768px) {
    .roark-other-offers-slider-wrap {
        padding-left: 56px;
        padding-right: 56px;
    }
}

/* Mobile: the peeking-card layout plus swipe gesture makes overlapping arrows
   redundant, so hide them rather than trying to fit a 40px button in a 16px
   gutter. */
@media (max-width: 767px) {
    .roark-other-offers-nav {
        display: none;
    }
}

.roark-other-offers-swiper {
    /* Must clip at the swiper's own box (inset by the gutter padding above),
       not just at the outer wrap — otherwise, with slidesPerView an exact
       divisor of the track width, the next slide sits flush past this edge
       and (since the wrap's overflow:hidden boundary is 56px further out,
       reserved for the nav gutter) peeks through hard-clipped mid-card
       instead of being hidden entirely. */
    overflow: hidden;
    width: 100%;
}

.roark-other-offers-swiper .swiper-wrapper {
    align-items: stretch;
}

.roark-other-offers-swiper .swiper-slide {
    height: auto;
    display: flex;
    flex-shrink: 0;
    width: auto;
}

/* Pagination */
.roark-other-offers-pagination {
    position: absolute !important;
    bottom: 8px !important;
    left: 50%;
    transform: translateX(-50%);
    width: auto !important;
}

/* Navigation arrows */
.roark-other-offers-nav__button {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.15s;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.roark-other-offers-nav__button:hover {
    background-color: #f0f4ff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-50%) scale(1.06);
}

.roark-other-offers-nav__button:focus-visible {
    outline: 2px solid var(--roark-btn-bg, #2563eb);
    outline-offset: 2px;
}

.roark-other-offers-nav__prev,
.roark-other-offers-nav__next {
    position: absolute;
    /* Center on the CARD row, not the full wrap height — the wrap's own
       44px padding-bottom (reserved for pagination, above) would otherwise
       pull a plain "50%" down below the cards' actual vertical center now
       that these buttons are positioned against the wrap instead of the
       (shorter, padding-free) swiper element they used to sit inside. */
    top: calc((100% - 44px) / 2);
    transform: translateY(-50%);
    z-index: 2;
}

.roark-other-offers-nav__prev { left: 8px; }
.roark-other-offers-nav__next { right: 8px; }

.roark-other-offers-nav .swiper-button-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* =============================================================
   PROPERTY CARD
   ============================================================= */
.roark-other-offers-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: var(--roark-radius-card, 12px);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--roark-shadow-card, 0 4px 18px rgba(15, 23, 42, 0.07));
    cursor: pointer;
    /* The "Card Styling" style section (CardStylingTrait) no longer registers
       an outer Padding control for this widget (includePadding=false) so the
       image below is full-bleed by default; this is that default, expressed
       here since there is no longer a control to provide it. Note: a page
       whose `_elementor_data` still has a leftover `card_padding` value from
       before this change won't see it applied either way — Elementor only
       generates CSS for currently-registered controls — so this rule and the
       PHP change are equivalent, not layered. */
    padding: 0;
}

.roark-other-offers-card:hover {
    color: inherit;
    text-decoration: none;
}

/* Image */
.roark-other-offers-card__image {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.roark-other-offers-card__image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Price badge over image */
.roark-other-offers-card__price-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    line-height: 1.2;
    padding: 5px 11px;
    border-radius: var(--roark-radius-pill, 999px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Body */
.roark-other-offers-card__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

/* Category + trade badge (e.g. "Etagenwohnung · Kauf") */
.roark-other-offers-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 3px 8px;
    border-radius: var(--roark-radius-pill, 999px);
    background: #f1f5f9;
    color: #475569;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Title */
.roark-other-offers-card__title {
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* City */
.roark-other-offers-card__city {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Details (rooms / area) */
.roark-other-offers-card__details {
    margin-top: auto;
    padding-top: 6px;
    border-top: 1px solid #f1f5f9;
}

