/* --- Roller/Carousel Styles for Properties --- */
.carousel-container {
    position: relative;
    padding: 0 50px; /* Space for buttons */
}

.projects-grid, .testimonials-grid {
    display: flex;
    overflow-x: auto;
    gap: 25px;
    padding: 20px 5px 40px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: var(--primary-color) #f0f0f0;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
    scroll-behavior: smooth;
}

/* Custom Scrollbar Styling */
.projects-grid::-webkit-scrollbar, .testimonials-grid::-webkit-scrollbar {
    height: 6px;
}

.projects-grid::-webkit-scrollbar-track, .testimonials-grid::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
    margin: 0 20px;
}

.testimonials-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1); /* Darker track for dark section */
}

.projects-grid::-webkit-scrollbar-thumb, .testimonials-grid::-webkit-scrollbar-thumb {
    background-color: rgba(198, 40, 40, 0.5);
    border-radius: 10px;
}

.testimonials-grid::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5);
}

.projects-grid::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}
.testimonials-grid::-webkit-scrollbar-thumb:hover {
    background-color: #fff;
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    color: var(--primary-color);
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 6px 16px rgba(198, 40, 40, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    right: 0; 
}

.carousel-btn.next {
    left: 0;
}

/* Light version for dark backgrounds (testimonials) */
.carousel-btn-light {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.carousel-btn-light:hover {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(255, 255, 255, 0.2);
}

/* Updated Property Card for Roller */
.project-card {
    min-width: 340px;
    max-width: 340px;
    flex: 0 0 auto;
    scroll-snap-align: start; 
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
    background: #fff;
    transform: none !important; 
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* Updated Testimonial Card for Roller */
.testimonial-card {
    min-width: 300px; /* Slightly smaller width */
    max-width: 300px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 25px; /* Reduced padding */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-card:hover {
    transform: translateY(-5px); /* Keep slight hover effect */
    background: rgba(255, 255, 255, 0.15);
}

/* Image Container - Full Image Visibility */
.card-img-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    background: transparent;
}

.card-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* Show full image without cropping */
    object-position: center;
    transition: transform 0.6s ease;
}

.project-card:hover .card-img-wrapper img {
    transform: scale(1.08); 
}

/* Sold Properties - Original Style (cover with fixed aspect ratio) */
#sold-properties-container .card-img-wrapper {
    aspect-ratio: 4 / 3;
    height: auto;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sold-properties-container .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fill container, may crop */
}

/* Sale Properties - Keep current style (contain, full image visible) */
#sale-properties-container .card-img-wrapper {
    height: auto;
    background: transparent;
}

#sale-properties-container .card-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain; /* Show full image without cropping */
}

/* Badge Updates */
.card-badge {
    top: 15px;
    right: 15px;
    font-size: 0.9rem;
    padding: 6px 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Card Content Spacing */
.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-location {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 12px;
}

.card-features {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-size: 1.5rem;
    margin-top: auto; 
    padding-bottom: 15px;
}

.project-card .btn {
    width: 100%;
    border-radius: 12px;
    padding: 10px;
    font-size: 1rem;
}

/* Mobile Adjustment for Roller */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0; 
    }

    .carousel-btn {
        display: none; 
    }

    .project-card {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: center; 
    }
    
    .testimonial-card {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: center;
    }
    
    .card-img-wrapper {
        min-height: 200px;
    }
    
    .projects-grid, .testimonials-grid {
        padding-left: 20px;
        padding-right: 20px;
        gap: 15px;
    }
}

/* --- Accessibility Button & Menu (Kept same) --- */
.a11y-toggle-btn {
    position: fixed;
    top: 100px; 
    left: 20px;
    width: 45px;
    height: 45px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.a11y-toggle-btn:hover {
    transform: scale(1.1);
}

.a11y-menu {
    display: none;
    position: fixed;
    top: 155px;
    left: 20px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1003;
    width: 200px;
    flex-direction: column;
    gap: 10px;
}

.a11y-menu.show {
    display: flex;
    animation: fadeIn 0.3s;
}

.a11y-menu h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    text-align: center;
}

.a11y-menu button, .a11y-menu-link {
    padding: 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.a11y-menu button:hover, .a11y-menu-link:hover {
    background: #e0e0e0;
}

/* --- Accessibility Modes --- */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast header,
body.high-contrast .hero,
body.high-contrast section,
body.high-contrast footer,
body.high-contrast .project-card,
body.high-contrast .service-card,
body.high-contrast .testimonial-card {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
    box-shadow: none !important;
}

body.high-contrast a,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast p,
body.high-contrast span,
body.high-contrast button {
    color: #ffff00 !important; 
}

body.high-contrast .btn {
    background: #ffff00 !important;
    color: #000 !important;
}

body.large-font {
    font-size: 125%;
}

body.large-font h1 { font-size: 3rem; }
body.large-font h2 { font-size: 2.5rem; }
body.large-font p { font-size: 1.5rem; }
