/* ------------------------- */
/* --- الإعدادات العامة --- */
/* ------------------------- */
:root {
    --main-bg: #202020;
    --accent-color: #dfc686;
    --accent-color-green: #326c5e;
    /* !! اللون الجديد !! */
    --text-color: #ffffff;
    --section-bg: #2a2a2a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--main-bg);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

/* (شاشة التحميل وشريط التنقل ... لم تتغير) */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--main-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader img {
    width: 250px;
    max-width: 80%;
    animation: pulse 1.5s infinite ease-in-out;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(32, 32, 32, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    border-bottom: 1px solid var(--accent-color);
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.navbar .nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover,
.navbar .nav-links a.active {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
}

/* (تنسيقات الأقسام العامة ... لم تتغير) */
.section {
    padding: 100px 10%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #333;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

h1,
h2,
h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
    margin-bottom: 40px;
}

p {
    font-size: 1.1rem;
    max-width: 800px;
    text-align: center;
    margin-bottom: 20px;
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--main-bg);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(223, 198, 134, 0.3);
}

/* (القسم 1 - Hero ... لم يتغير) */
#hero {
    min-height: 100vh;
    background: linear-gradient(rgba(32, 32, 32, 0.7), rgba(32, 32, 32, 0.7)), url('images/hero_background.jpg') no-repeat center center/cover;
    text-align: center;
    padding-top: 150px;
}
.details-header{
 background: linear-gradient(rgba(32, 32, 32, 0.7), rgba(32, 32, 32, 0.7)), url('images/project13.jpeg') no-repeat center center/cover;
}
.sahab3-header{
 background: linear-gradient(rgba(32, 32, 32, 0.7), rgba(32, 32, 32, 0.7)), url('images/project3.jpeg') no-repeat center center/cover;
}
#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

#hero p {
    font-size: 1.5rem;
    color: #eee;
    margin-bottom: 30px;
}


/* ------------------------- */
/* --- 2. قسم من نحن (مُعدّل) --- */
/* ------------------------- */
#about {
    background-color: var(--section-bg);
    width: 100%;
}

.about-alternating {
    width: 100%;
    max-width: 1200px;
    /* تحديد عرض أقصى */
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* مسافة بين كل صف */
}

.about-row {
    display: flex;
    gap: 40px;
    align-items: center;
}

/* الصف المعكوس */
.about-row.reverse {
    flex-direction: row-reverse;
}

.about-row .about-text {
    flex: 1;
    /* يأخذ نصف المساحة */
}

.about-row .about-text p {
    text-align: right;
    /* محاذاة النص لليمين */
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 20px;
}

.about-row .about-text h3 {
    font-size: 1.8rem;
    color: #fff;
    /* لون أبيض للعنوان الفرعي */
    text-align: right;
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

.about-row .about-image {
    flex: 1;
    /* يأخذ نصف المساحة */
    border-radius: 10px;
    overflow: hidden;
}

.about-row .about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: 3px solid var(--accent-color);
    border-radius: 10px;
}


/* (القسم 3 - المميزات ... لم يتغير) */
#features-warranties {
    background-color: var(--main-bg);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 30px;
}

.grid-item {
    background-color: var(--section-bg);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #444;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.grid-item .icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.grid-item h3 {
    font-size: 1.3rem;
    color: #fff;
}

.grid-item p {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 0;
}

.grid-item .duration {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-top: 10px;
}

/* ------------------------- */
/* --- 4. قسم المشاريع (مُعدّل) --- */
/* ------------------------- */
#projects {
    background-color: var(--section-bg);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    width: 100%;
}

.project-card {
    background-color: var(--main-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #444;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.project-status {
    position: absolute;
    width: 190px; /* عرض الشريط (أكبر) */
    padding: 10px 0; /* ارتفاع الشريط (أكبر) */
    top: 25px; /* المسافة من الأعلى */
    left: -45px; /* المسافة من اليسار (لإزاحته قبل التدوير) */

    /* التدوير المائل */
    transform: rotate(-45deg); 

    text-align: center;
    font-size: 1rem; /* خط أكبر */
    font-weight: bold;
    color: #fff;
    z-index: 5; /* للتأكد أنه فوق الصورة */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* ظل خفيف للجمالية */

    /* (لا نحتاج إلى border-radius هنا) */
}

/* !! تنسيقات الحالات الجديدة !! */
.status-available {
    /* (متاح للبيع - الذهبي) */
    background-color: var(--accent-color);
    color: var(--main-bg);
}

.status-ready {
    /* (جاهز - الأخضر الجديد) */
    background-color: var(--accent-color-green);
    color: var(--text-color);
}

.status-sold {
    /* (مباع - الرمادي) */
    background-color: #1c2b39;
    color: var(--text-color);
}

/* (نهاية التنسيقات الجديدة) */

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 1rem;
    color: #ccc;
    text-align: right;
    margin-bottom: 0;
}

.project-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* (القسم 5 - الخريطة ... لم يتغير) */
#map-location {
    background-color: var(--main-bg);
    width: 100%;
}

#map-container {
    width: 100%;
    max-width: 1200px;
    padding: 0;
    position: relative;
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 500px;
    background-color: #111;
    z-index: 1;
}

.custom-leaflet-popup .leaflet-popup-content-wrapper {
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.custom-leaflet-popup .leaflet-popup-content {
    padding: 0;
    margin: 0;
    width: 200px;
}

.custom-leaflet-popup img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin: 0;
}

.custom-leaflet-popup .popup-info {
    padding: 10px 15px;
    font-family: 'Cairo', sans-serif;
}

.custom-leaflet-popup h3 {
    font-size: 1.2rem;
    color: #202020;
    margin: 0 0 5px 0;
    padding: 0;
}

.custom-leaflet-popup p {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 10px 0;
    text-align: right;
}

.custom-leaflet-popup .details-button {
    background-color: var(--accent-color);
    color: var(--main-bg);
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
}

/* (القسم 6 - اتصل بنا والفورم ... لم يتغير) */
#contact {
    background-color: var(--section-bg);
    border-bottom: none;
    width: 100%;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    align-items: flex-start;
}

.contact-form-wrapper {
    background-color: var(--main-bg);
    padding: 30px;
    border-radius: 10px;
}

.contact-form-wrapper h3 {
    font-size: 1.8rem;
    color: #fff;
    text-align: right;
    border: none;
    padding: 0;
}

.contact-form-wrapper p {
    text-align: right;
    color: #ccc;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--accent-color);
    color: var(--main-bg);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit-btn:hover {
    background-color: #fff;
    color: var(--main-bg);
}

.contact-info-wrapper {
    background-color: var(--main-bg);
    padding: 30px;
    border-radius: 10px;
}

.contact-info-wrapper h3 {
    font-size: 1.8rem;
    color: #fff;
    text-align: right;
    border: none;
    padding: 0;
}

.contact-info-wrapper p {
    text-align: right;
    color: #ccc;
    margin-bottom: 30px;
}

.phone-number {
    display: block;
    text-align: center;
    background-color: var(--section-bg);
    border: 2px solid var(--accent-color);
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 2px;
}

.phone-number:hover {
    background-color: var(--accent-color);
    color: var(--main-bg);
    transform: scale(1.05);
}

/* (القسم 7 - صفحة التفاصيل ... لم يتغير) */
.project-details-page {
    padding-top: 100px;
}

.details-header {
    text-align: center;
    padding: 40px 10%;
    border-bottom: 1px solid #333;
}

.details-header h1 {
    font-size: 3rem;
    color: var(--accent-color);
}

.details-header .back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.details-header .back-link:hover {
    color: #fff;
}

.details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 50px 10%;
    align-items: start;
}

.carousel-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 2px solid var(--accent-color);
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    flex-shrink: 0;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.carousel-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 15px;
}

.carousel-btn {
    background-color: rgba(32, 32, 32, 0.7);
    color: var(--accent-color);
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    line-height: 1;
}

.carousel-btn:hover {
    background-color: var(--accent-color);
    color: var(--main-bg);
}

.details-content {
    background-color: var(--section-bg);
    padding: 30px;
    border-radius: 10px;
}

.details-content h2 {
    font-size: 2rem;
    text-align: right;
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

.details-content .status-badge {
    background-color: var(--accent-color);
    color: var(--main-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 20px;
}

.details-content p {
    text-align: right;
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 30px;
}

.details-content h3 {
    font-size: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.details-content ul {
    list-style: none;
    padding-right: 0;
}

.details-content ul li {
    font-size: 1.1rem;
    color: #ccc;
    padding-right: 25px;
    position: relative;
    margin-bottom: 15px;
}

.details-content ul li::before {
    content: '✓';
    color: var(--accent-color);
    position: absolute;
    right: 0;
    top: 0;
    font-weight: bold;
}

.project-links-container {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.project-link-btn {
    flex: 1;
    text-align: center;
    background-color: var(--main-bg);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
    min-width: 200px;
}

.project-link-btn:hover {
    background-color: var(--accent-color);
    color: var(--main-bg);
    transform: scale(1.03);
}

/* (القسم 8 - الفوتر ... لم يتغير) */
.main-footer {
    background-color: var(--section-bg);
    padding: 60px 10%;
    border-top: 2px solid var(--accent-color);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.3rem;
    color: var(--accent-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col .footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-col p {
    font-size: 1rem;
    color: #ccc;
    text-align: right;
    margin-bottom: 0;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
    padding-right: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-col ul li a:hover {
    color: var(--accent-color);
    padding-right: 8px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    /* !! تعديل بسيط لضمان التوسيط !! */
    align-items: center;
    /* !! تعديل بسيط لضمان التوسيط !! */
    justify-content: center;
    /* !! تعديل بسيط لضمان التوسيط !! */
    height: 40px;
    width: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: var(--main-bg);
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}

/* ------------------------- */
/* --- التجاوب (Responsive) --- */
/* ------------------------- */
@media (max-width: 992px) {

    /* (تعديل قسم اتصل بنا للشاشات المتوسطة) */
    .contact-container {
        grid-template-columns: 1fr;
    }

    /* !! جديد: تعديل قسم "من نحن" للشاشات المتوسطة !! */
    .about-row {
        flex-direction: column !important;
        /* !important لضمان تجاوز .reverse */
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--main-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .navbar .nav-links.active {
        transform: translateX(0);
    }

    .navbar .nav-links a {
        font-size: 1.5rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero p {
        font-size: 1.2rem;
    }

    /* (تعديلات الجوال السابقة) */
    #map-location {
        padding: 100px 10%;
    }

    .details-container {
        grid-template-columns: 1fr;
        padding: 30px 5%;
    }

    .carousel-slide img {
        height: 300px;
    }

    .details-header h1 {
        font-size: 2.2rem;
    }

    .project-links-container {
        flex-direction: column;
    }

    .project-link-btn {
        min-width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col h4::after {
        right: 50%;
        transform: translateX(50%);
    }

    .footer-col p {
        text-align: center;
    }

    .footer-col ul li a:hover {
        padding-right: 0;
    }

    .social-links {
        justify-content: center;
    }
}

/* (لضمان ظهور الأزرار فوق النقاط) */
.carousel-buttons {
    z-index: 11; 
}

/* (تنسيق نقاط التنقل الجديدة) */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.carousel-buttons {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 15px;
    box-sizing: border-box;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 0.9);
}
