.houses {
    overflow: hidden;
    position: relative;
}

.houses__viewport {
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    max-width: 700px;
    overflow: visible;
    position: relative;
}

.houses__wrapper {
    overflow: visible;
    width: 100%;
}

.houses__track {
    display: flex;
    transition: transform 1500ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

@media (max-width: 767px) {
    .houses__viewport {
        padding: 0 20px;
    }

    .houses__navigation {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .houses__navigation {
        padding: 0 50px;
    }
}

.houses__slide {
    list-style: none;
    height: auto !important;
    flex: 0 0 100%;
    margin-right: 30px;
}

.houses__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    position: relative;
}

.houses__image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.houses__image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: opacity 0.8s ease;
    z-index: 1;
}

.houses__slide--active .houses__image-wrapper::after,
.houses__slide--active .houses__content::after {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 767px) {
    .houses__image-wrapper {
        aspect-ratio: 16/9;
        height: auto;
    }
}

.houses__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

.houses__content {
    position: relative;
    background: white;
    padding: 24px;
}

.houses__content::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.4);
    transition: opacity 0.8s ease;
    z-index: 1;
}

@media (max-width: 767px) {
    .houses__content {
        padding: 20px;
    }
}

.houses__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
}

.houses__title {
    font-family: "The Seasons", serif;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 400;
    color: var(--e-global-color-primary);
    margin: 0;
}

.houses__button {
    background: #1a365d;
    color: white;
    padding: 10px 18px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

@media (max-width: 767px) {
    .houses__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .houses__button {
        font-size: 14px;
    }
}

/* Ensure cursor is a pointer, even with drag events */
.houses__slide .houses__button {
    cursor: pointer;
}

.houses__button:hover {
    background: #2c5282;
    color: white;
    text-decoration: none;
}

/* Navigation Section */
.houses__navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 10;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    pointer-events: none;
}

.houses__nav--prev {
    transform: translateX(-35px);
    pointer-events: auto;
}

.houses__nav--next {
    transform: translateX(35px);
    pointer-events: auto;
}

.houses__nav,
.houses .houses__navigation .houses__nav,
.houses .houses__nav {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    color: white !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: visible !important;
}

.houses__nav:hover {
    border-color: white !important;
    background: rgba(255, 255, 255, 1) !important;
    color: white !important;
}

.houses__nav:hover svg path {
    stroke: var(--e-global-color-primary) !important;
}

.houses__nav:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Hide default Swiper button styles */
.houses__nav::after {
    display: none !important;
}

/* Custom arrow styles using SVG */
.houses .houses__navigation .houses__nav svg,
.houses__nav svg,
.houses .houses__nav svg {
    width: 20px !important;
    height: 20px !important;
    stroke: white;
    stroke-width: 1.5 !important;
    fill: none !important;
    display: block !important;
    margin: 0 auto !important;
    transition: all 0.3s ease;
}

.houses .houses__navigation .houses__nav svg path,
.houses__nav svg path,
.houses .houses__nav svg path {
    stroke: white;
    stroke-width: 1.5 !important;
    fill: none !important;
    transition: all 0.3s ease;
}

@media (max-width: 767px) {

    /* Stacked cards on mobile */
    .houses.houses--stacked .houses__track {
        display: block;
    }

    .houses.houses--stacked .houses__slide {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .houses.houses--stacked .houses__slide:last-child {
        margin-bottom: 0;
    }

    /* On mobile stacked view, all cards are "active", so no overlay */
    .houses.houses--stacked .houses__image-wrapper::after,
    .houses.houses--stacked .houses__content::after {
        display: none;
    }
}