/* Base page style */
body {
    background-color: #e9ebee;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 5px;
}

/* Main frame, centered on the page */
.listings-frame {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Header Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.main-title {
    margin: 0;
    text-align: left;
    color: #1c3e5e;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 2.2em;
    font-weight: 600;
}

.learn-more-link {
    text-decoration: none;
    color: #1877f2;
    font-weight: 600;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.learn-more-link:hover {
    color: #145dbf;
}

.learn-more-link .arrow {
    font-size: 1.2em;
    transition: transform 0.2s;
}

.learn-more-link:hover .arrow {
    transform: translateX(3px);
}

/* Carousel container */
.carousel-container {
    position: relative;
}

/* Carousel viewport */
.carousel-viewport {
    overflow: hidden;
}

/* Carousel track */
.carousel-track {
    display: flex;
    gap: 15px;
    padding: 0;
    box-sizing: border-box;
    transition: transform 0.5s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Property card */
.property-card {
    width: 80%;
    min-width: 80%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #f0f2f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card image */
.card-image {
    width: 100%;
    height: 350px;
    display: block;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/* Card footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #ffffff;
}

.footer-text h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #1c1e21;
}

.footer-text p {
    margin: 2px 0 0;
    color: #65676b;
}

.cta-button {
    background-color: #e4e6eb;
    color: #1c1e21;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #d8dbdf;
}

/* === NAVIGATION CONTROLS CONTAINER === */
.carousel-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* === DOT INDICATORS === */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #c4c4c4;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background-color: #8e8e8e;
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: #1877f2;
    width: 10px;
    height: 10px;
}

/* === NAVIGATION BUTTONS === */
.carousel-buttons-container {
    display: flex;
    gap: 20px;
}

.carousel-button {
    position: static;
    transform: none;
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    color: #1c1e21;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    opacity: 1;
    pointer-events: all;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    background-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === RESPONSIVE STYLES FOR MOBILE === */
@media (max-width: 600px) {
    body {
        padding: 0;
    }

    .listings-frame {
        padding: 15px;
        margin: 10px;
        border-radius: 12px;
    }

    .main-title {
        font-size: 1.6em;
        margin-bottom: 10px;
    }

    /* Optimized for mobile touch */
    .carousel-viewport {
        padding: 2px 0;
    }

    .carousel-track {
        padding: 0;
        gap: 10px;
        transition: transform 0.35s ease-out;
    }

    .property-card {
        width: 80%;
        max-width: none;
    }

    .card-image {
        height: 280px;
    }

    .card-footer {
        padding: 12px;
    }

    .footer-text h3 {
        font-size: 1em;
    }

    .footer-text p {
        font-size: 0.9em;
    }

    .cta-button {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    /* Larger touch targets */
    .carousel-dot {
        width: 10px;
        height: 10px;
    }

    .carousel-dot.active {
        width: 12px;
        height: 12px;
    }
}

/* Extra small phones */
@media (max-width: 400px) {
    .card-image {
        height: 240px;
    }

    .main-title {
        font-size: 1.4em;
    }
}