/* ===== Project Carousel ===== */

.project-carousel {
    padding: 3rem 0;
    background: var(--color-light);
}

.rentals-showcase {
    padding: 5rem 0;
}

.slide-description {
    font-size: 1.125rem;
    opacity: 0.95;
    margin: 0;
    max-width: 500px;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 100%);
    transition: transform 0.5s ease;
}

.carousel-slide {
    position: relative;
    min-height: 360px;
    color: var(--color-light);
    background-size: cover;
    background-position: center;
    display: grid;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 91, 70, 0.65), rgba(17, 91, 70, 0.25));
}

.slide-content {
    z-index: 1;
    display: grid;
    align-content: center;
    justify-items: start;
    padding: 6.5rem;
    gap: 1rem;
}

    .slide-content h3 {
        font-size: clamp(1.6rem, 3vw, 2rem);
        margin: 0;
        color: var(--color-light);
    }

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-secondary);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

    .carousel-control:hover {
        transform: translateY(-50%) scale(1.05);
    }

    .carousel-control.prev {
        left: 1rem;
    }

    .carousel-control.next {
        right: 1rem;
    }

.carousel-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

    .carousel-dots button {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: none;
        background: rgba(255, 255, 255, 0.7);
        cursor: pointer;
    }

        .carousel-dots button.active {
            background: var(--color-primary);
        }

/* ===== Properties Showcase (Property Cards) ===== */

.properties-showcase {
    padding: 5rem 0;
    background: var(--color-light);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.property-card {
    background: var(--color-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 0.35rem 0.85rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-content {
    padding: 1.5rem;
}

.property-content h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-secondary);
    margin: 0 0 0.75rem;
}

.property-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.property-details span {
    font-size: 0.9rem;
    color: var(--color-text);
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.property-units::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
}

.property-beds::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: 50%;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
    opacity: 0.7;
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}

.property-location svg {
    color: var(--color-primary);
    flex-shrink: 0;
}

.property-content .btn {
    width: 100%;
}

.properties-cta {
    margin-top: 3rem;
}

/* Responsive Carousel */
@media (max-width: 1000px) {
    .carousel-track {
        grid-template-columns: repeat(3, 100%);
    }
}

@media (max-width: 768px) {
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .carousel-control {
        display: none;
    }

    .carousel-track {
        grid-template-columns: repeat(3, 100%);
    }

    .slide-content {
        padding: 2rem;
    }
}

/* ===== Featured Rentals Carousel ===== */

.featured-carousel-wrapper {
    position: relative;
    margin-top: 2.5rem;
    padding: 0 3rem;
}

.featured-carousel {
    overflow: hidden;
    width: 100%;
}

.featured-carousel-track {
    display: flex;
    gap: 2rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.featured-card {
    flex: 0 0 calc(33.333% - 1.333rem);
    min-width: 320px;
}

.rental-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: var(--color-light);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(17, 91, 70, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-nav:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(17, 91, 70, 0.4);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav--prev {
    left: 0;
}

.carousel-nav--next {
    right: 0;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

/* Carousel dots for featured section */
.properties-showcase .carousel-dots {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50px;
    width: fit-content;
    /* Phones show one building per slide, so one dot each: wrap them inside the page. A row wider than
       the screen widened the whole page and pushed the home-page statement letter off screen. */
    max-width: 100%;
    flex-wrap: wrap;
    margin-left: auto;
    margin-right: auto;
}

.properties-showcase .carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(17, 91, 70, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.properties-showcase .carousel-dot:hover {
    background: rgba(17, 91, 70, 0.5);
}

.properties-showcase .carousel-dot.active {
    width: 14px;
    height: 14px;
    background: var(--color-primary);
}

/* Responsive adjustments for featured carousel */
@media (max-width: 1200px) {
    .featured-card {
        flex: 0 0 calc(50% - 1rem);
    }
}

@media (max-width: 768px) {
    .featured-carousel-wrapper {
        padding: 0 2.5rem;
    }

    .featured-card {
        flex: 0 0 100%;
        min-width: 280px;
    }

    .properties-showcase .carousel-dots {
        gap: 0.5rem;
        padding: 0.6rem 1rem;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 600px) {
    .featured-carousel-wrapper {
        padding: 0 2rem;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }
}
