﻿.Projects {
    display: flex;
    padding: 64px 156px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 64px;
    align-self: stretch;
    background: var(--Primary-50, #F3F2F6);
}

.Title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 600px;
    align-self: stretch;
}

.layout-Title {
    display: flex;
    height: 64px;
    padding: 0 24px;
    justify-content: center;
    align-items: center;
}

.ContactUs {
    border-radius: 16px;
    background: var(--Primary-500, #6A5D8B);
}

.ContactUsText {
    color: var(--Colors-Gray-White, #FFF);
    text-align: right;
    leading-trim: both;
    text-edge: cap;
    font-family: "IBM Plex Sans Arabic";
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.ContactUsText2 {
    flex: 1 1 0;
    color: var(--Colors-Gray-Darkest, #111);
    text-align: right;
    leading-trim: both;
    text-edge: cap;
    font-family: "IBM Plex Sans Arabic";
    font-size: 48px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.Projects-Cards {
    align-self: stretch;
    justify-content: center;
    align-items: center;
    gap: 24px;
    display: inline-flex
}

.Card-Property {
    border-radius: 24px;
    background: var(--Colors-Gray-White, #FFF);
    /* Grey */
    box-shadow: 0 0 32px 8px rgba(102, 102, 102, 0.08);
}

/* Carousel Container - scoped to .Projects */
.Projects .slider-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}

.Projects .carousel-wrapper {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    touch-action: pan-x pan-y;
}

.Projects .carousel-page {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    gap: 24px;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100px);
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out, transform 0.4s ease-in-out;
    pointer-events: none;
}

    .Projects .carousel-page.active {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        pointer-events: auto;
        margin: 0 auto;
    }

    .Projects .carousel-page.hidden {
        position: absolute;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100px);
        pointer-events: none;
    }

    .Projects .carousel-page .Property {
        flex: 0 0 auto;
        margin: 0;
        flex-shrink: 0;
    }

.Cards {
    align-self: stretch;
    justify-content: center;
    align-items: center;
    gap: 24px;
    display: inline-flex
}

.Cards-Layout {
    display: flex;
    padding: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    flex: 1 0 0;
}

[dir="rtl"] .Cards-Layout {
    align-items: flex-end;
}

[dir="ltr"] .Cards-Layout {
    align-items: flex-start;
}

.Card-Property-Offer {
    color: var(--Colors-Gray-White, #FFF);
    text-align: inherit;
    leading-trim: both;
    text-edge: cap;
    font-family: "IBM Plex Sans Arabic";
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}

[dir="rtl"] .Card-Property-Offer {
    text-align: right;
}

[dir="ltr"] .Card-Property-Offer {
    text-align: left;
}

.Property-Badge-layout {
    display: flex;
    padding: 9.5px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.Property-Badge {
    border-radius: 12px;
    background: var(--Primary-50, #F3F2F6);
}

.location-layout {
    display: flex;
    padding: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    flex: 1 0 0;
}

[dir="rtl"] .location-layout {
    align-items: flex-end;
}

[dir="ltr"] .location-layout {
    align-items: flex-start;
}

.Property {
    min-width: 360px;
    max-width: 360px;
}

/* Ensure Property card respects direction for alignment */
[dir="ltr"] .Property {
    direction: ltr;
}

[dir="rtl"] .Property {
    direction: rtl;
}

/* RTL/LTR Support - Override inline text-align styles */
.Property [data-layer][style*="text-align: right"],
.Property [data-layer][style*="text-align:right"] {
    text-align: inherit !important;
}

[dir="rtl"] .Property [data-layer][style*="text-align: right"],
[dir="rtl"] .Property [data-layer][style*="text-align:right"] {
    text-align: right !important;
}

[dir="ltr"] .Property [data-layer][style*="text-align: right"],
[dir="ltr"] .Property [data-layer][style*="text-align:right"] {
    text-align: left !important;
}

/* Fix Amenities section - ensure proper wrapping */
.Property .Amenities {
    flex-wrap: wrap !important;
    width: 100%;
    box-sizing: border-box;
}

/* Fix Badge alignment for RTL/LTR */
.Property .Badge {
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

[dir="rtl"] .Property .Badge {
    text-align: center;
}

[dir="ltr"] .Property .Badge {
    text-align: center;
}

/* Fix Location section alignment */
.Property .Location {
    width: 100%;
    box-sizing: border-box;
}

[dir="rtl"] .Property .Location {
    justify-content: flex-start;
}

[dir="ltr"] .Property .Location {
    justify-content: flex-start;
}

/* Fix Property card alignment */
[dir="rtl"] .Property {
    align-items: flex-start;
}

[dir="ltr"] .Property {
    align-items: flex-start;
}

/* Fix top badge (first child) alignment - must align with title text */
/* The Property has inline align-items:flex-start which should work, but we need to ensure it respects direction */
.Property > div[data-layer="Badge"]:first-child {
    width: fit-content !important;
}

/* In RTL: flex-start in column = right side, so badge should be on right */
[dir="rtl"] .Property > div[data-layer="Badge"]:first-child {
    align-self: flex-start !important;
}

/* In LTR: flex-start in column = left side, so badge should be on left */
/* But if it's not working, force it with margin */
[dir="ltr"] .Property > div[data-layer="Badge"]:first-child {
    align-self: flex-start !important;
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Responsive font sizes for cards - override inline styles */
.Property [data-layer] {
    font-size: clamp(13px, 1.1vw, 16px) !important;
}

    .Property [data-layer][style*="font-size: 20px"] {
        font-size: clamp(16px, 1.4vw, 18px) !important;
    }

    .Property [data-layer][style*="font-size: 28px"],
    .Property span[style*="font-size:28px"],
    .Property span[style*="font-size: 28px"] {
        font-size: clamp(22px, 2vw, 26px) !important;
    }

.Property span[style*="font-size:20px"],
.Property span[style*="font-size: 20px"] {
    font-size: clamp(16px, 1.4vw, 18px) !important;
}

/* Desktop: 3 cards visible */
@@media (min-width: 1025px) {
    .Projects .slider-container {
        padding: 0;
    }

    .Projects .carousel-page {
        gap: 24px;
    }
}

/* Tablet */
@@media (max-width: 1024px) {
    .Projects {
        padding: 48px 80px;
        gap: 48px;
    }

    .ContactUsText2 {
        font-size: 40px;
    }

    .Title {
        gap: 200px;
    }

    .ContactUsText {
        font-size: 18px;
    }

    .Projects-Cards {
        flex-wrap: wrap;
        gap: 20px;
    }

    .Cards {
        gap: 20px;
    }

    .Projects .slider-container {
        padding: 0 50px;
        gap: 20px;
    }

    .Projects .carousel-page {
        gap: 16px;
    }

    .Property {
        min-width: 330px;
        max-width: 330px;
    }
        /* Smaller fonts for tablet */
        .Property [data-layer] {
            font-size: clamp(12px, 1vw, 15px) !important;
        }

            .Property [data-layer][style*="font-size: 20px"] {
                font-size: clamp(15px, 1.3vw, 17px) !important;
            }

            .Property [data-layer][style*="font-size: 28px"],
            .Property span[style*="font-size:28px"],
            .Property span[style*="font-size: 28px"] {
                font-size: clamp(20px, 1.8vw, 24px) !important;
            }

        .Property span[style*="font-size:20px"],
        .Property span[style*="font-size: 20px"] {
            font-size: clamp(15px, 1.3vw, 17px) !important;
        }

    .Projects .carousel-indicators {
        margin-top: 24px;
        gap: 6px;
    }

    .Projects .carousel-indicator {
        width: 7px;
        height: 7px;
    }

        .Projects .carousel-indicator.active {
            width: 20px;
            height: 7px;
        }
}

/* Page Indicators */
.Projects .carousel-indicators {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    z-index: 10;
    visibility: visible;
    opacity: 1;
}

.Projects .carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D1D1D1;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    flex-shrink: 0;
    outline: none;
}

    .Projects .carousel-indicator:hover {
        background: var(--Primary-300, #9B8DB8);
        transform: scale(1.3);
    }

    .Projects .carousel-indicator.active {
        width: 28px;
        height: 10px;
        border-radius: 5px;
        background: var(--Primary-500, #6A5D8B);
    }

/* Mobile */
@@media (max-width: 768px) {
    .Projects {
        padding: 40px 20px;
        gap: 40px;
    }

    .ContactUsText2 {
        font-size: 32px;
    }

    .Title {
        gap: 20px;
    }

    .ContactUsText {
        font-size: 16px;
    }

    .layout-Title {
        width: 100%;
    }

    .Projects-Cards {
        flex-direction: column;
    }

    .Projects .slider-container {
        padding: 0 20px;
    }

    .Property {
        min-width: 350px;
        max-width: 350px;
    }
        /* Fix content breaking on mobile - Amenities wrapping */
        .Property .Amenities {
            flex-wrap: wrap !important;
            gap: 8px !important;
            width: 100% !important;
        }

        .Property .Badge {
            flex: 0 0 auto !important;
            min-width: fit-content !important;
            max-width: 100% !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        /* Fix address/location text breaking */
        .Property .Location {
            width: 100% !important;
            flex-wrap: wrap !important;
        }

            .Property .Location [data-layer] {
                word-wrap: break-word !important;
                overflow-wrap: break-word !important;
                white-space: normal !important;
            }
        /* Fix price text breaking */
        .Property [data-layer][style*="font-size: 28px"],
        .Property span[style*="font-size:28px"],
        .Property span[style*="font-size: 28px"] {
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            white-space: normal !important;
        }
        /* Fix property title breaking */
        .Property [data-layer][style*="font-size: 20px"] {
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            white-space: normal !important;
        }
        /* Smaller fonts for mobile */
        .Property [data-layer] {
            font-size: clamp(11px, 0.9vw, 14px) !important;
            line-height: 1.4 !important;
        }

            .Property [data-layer][style*="font-size: 20px"] {
                font-size: clamp(14px, 1.2vw, 16px) !important;
                line-height: 1.4 !important;
            }

            .Property [data-layer][style*="font-size: 28px"],
            .Property span[style*="font-size:28px"],
            .Property span[style*="font-size: 28px"] {
                font-size: clamp(18px, 1.6vw, 22px) !important;
                line-height: 1.3 !important;
            }

        .Property span[style*="font-size:20px"],
        .Property span[style*="font-size: 20px"] {
            font-size: clamp(14px, 1.2vw, 16px) !important;
            line-height: 1.4 !important;
        }

    .Projects .carousel-page {
        gap: 16px;
    }

    .Projects .carousel-indicators {
        margin-top: 24px;
        gap: 6px;
    }

    .Projects .carousel-indicator {
        width: 7px;
        height: 7px;
    }

        .Projects .carousel-indicator.active {
            width: 20px;
            height: 7px;
        }
}

/* Small Mobile */
@@media (max-width: 480px) {
    .Projects {
        padding: 32px 16px;
        gap: 32px;
    }

    .ContactUsText2 {
        font-size: 28px;
    }

    .ContactUsText {
        font-size: 14px;
    }

    .layout-Title {
        height: 56px;
        padding: 0 16px;
    }

    .Projects .slider-container {
        padding: 0;
    }

    .Property {
        min-width: 320px;
        max-width: 320px;
        padding: 16px;
    }
        /* Enhanced content wrapping for small mobile */
        .Property .Amenities {
            gap: 6px !important;
        }

        .Property .Badge {
            padding: 8px 12px !important;
            font-size: 12px !important;
        }

        .Property .Location {
            gap: 6px !important;
        }

    .Projects .carousel-page {
        gap: 16px;
    }

    .Projects .carousel-indicators {
        margin-top: 20px;
        gap: 5px;
    }

    .Projects .carousel-indicator {
        width: 6px;
        height: 6px;
    }

        .Projects .carousel-indicator.active {
            width: 18px;
            height: 6px;
        }
}
