/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Beige tones */
    --beige-light: #F5F1EB;
    --beige-medium: #E8DFD3;
    --beige-dark: #D4C4B0;
    
    /* Brown tones */
    --brown-light: #A0826D;
    --brown-medium: #7A5F4A;
    --brown-dark: #5C4634;
    --brown-darker: #3D2F23;
    
    /* Text colors */
    --text-primary: #2C2418;
    --text-secondary: #5C4634;
    --text-light: #7A5F4A;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(60, 47, 35, 0.08);
    --shadow-md: 0 4px 12px rgba(60, 47, 35, 0.12);
    --shadow-lg: 0 8px 24px rgba(60, 47, 35, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--beige-light);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 1rem;
    direction: rtl;
    direction: rtl;
    padding-top: 0; /* Removed fixed padding to allow hero to extend up */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: var(--shadow-sm);
    position: fixed; /* Changed from sticky to fixed to prevent scroll loop */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0; /* Reduced padding for cleaner, thinner header */
    transition: transform 0.3s ease, padding 0.3s ease, background-color 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header.header-scrolled {
    padding: 0;
    box-shadow: var(--shadow-md);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.header.header-scrolled .logo-img {
    height: 80px; /* Shrinks on desktop */
}

@media (max-width: 768px) {
    .header.header-scrolled .logo-img {
        height: 60px; /* Shrinks significantly on mobile to save space */
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo-img {
    height: 120px;
    width: auto;
    display: block;
    transition: transform 0.3s ease, height 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--brown-medium);
    background-color: var(--beige-medium);
    outline: 2px solid var(--brown-light);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    /* Cinematic Multi-Stop Gradient + Blur */
    /* Stronger Gradient to hide pixelation of source image */
    background: 
        linear-gradient(to bottom, 
            rgba(60, 47, 35, 0.7) 0%,    /* Darker Top */
            rgba(60, 47, 35, 0.5) 40%,   /* Semi-transparent center */
            rgba(60, 47, 35, 0.9) 100%   /* Very Dark Bottom */
        ), 
        url('Diva_Assets/Project Picture/A & B.png');
    background-size: cover;
    background-position: center;
    /* backdrop-filter: blur(3px); REPLACED: Removed to prevent rendering artifacts */
    position: relative; /* For scroll hint positioning */
    padding-top: 180px; /* Increased to account for fixed header (136px) + extra spacing */
    padding-bottom: var(--spacing-2xl);
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Increased size dominance */
    font-weight: 700;
    color: #fff; /* Changed to white for contrast against dark bg */
    margin-bottom: var(--spacing-lg); /* Increased spacing */
    line-height: 1.2;
    letter-spacing: -1px; /* Tighter letter spacing for premium look */
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: rgba(255, 255, 255, 0.9); /* White with slight transparency */
    margin-bottom: var(--spacing-2xl); /* Increased breathing room */
    font-weight: 300; /* Lighter weight */
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Increased vertical gap (approx 20px) */
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg); /* Space for trust signal */
}

/* Buttons */

.btn {
    display: inline-flex; /* Better for centering icons */
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    gap: 10px; /* Space between icon and text */
}

/* Hero specific button styles */
.hero-ctas .btn {
    padding: 16px 32px; /* Generous padding (Luxury feel) */
    min-width: 200px; /* Wider buttons */
    font-weight: 700; /* Slightly bolder */
    font-size: 1.05rem;
}

.btn-primary {
    background-color: var(--brown-medium);
    color: #fff;
    border-color: var(--brown-medium);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--brown-dark);
    border-color: var(--brown-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Secondary Button (Outline/Ghost) */
/* Secondary Button (Outline/Ghost) */
.btn-secondary {
    background-color: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8); /* Slightly softer border */
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}


.btn-outline {
    background-color: transparent;
    color: var(--brown-medium);
    border-color: var(--brown-medium);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.9rem;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--brown-medium);
    color: #fff;
    outline: 2px solid var(--brown-medium);
    outline-offset: 2px;
}

/* Sections */
section {
    padding: var(--spacing-2xl) 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--brown-darker);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.subsection-title {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 600;
    color: var(--brown-dark);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
}

/* About Section */
.about {
    background-color: #fff;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-paragraph {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.offerings-section,
.values-section {
    margin-top: var(--spacing-xl);
}

.offerings-list,
.values-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

/* Offerings & Values Items */
.offerings-item,
.values-item {
    background-color: var(--beige-light);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: var(--radius-md);
    border-right: 4px solid var(--brown-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.item-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brown-medium);
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.item-content {
    flex-grow: 1;
}

.offerings-item:hover,
.values-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--shadow-md);
}

.offerings-item-title {
    font-weight: 600;
    color: var(--brown-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 1.1rem;
}

.offerings-item-desc,
.values-item-desc {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Projects Section */
.projects {
    background-color: var(--beige-medium);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.project-card {
    background-color: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    background-color: var(--beige-medium);
}

.project-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brown-darker);
    margin-bottom: var(--spacing-xs);
}

.project-units {
    font-size: 1.1rem;
    color: var(--brown-medium);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    flex-grow: 1;
}

/* Button Icons */
.btn i {
    /* valid for buttons with text */
    margin-left: 8px;
}

.btn-icon-only {
    padding: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; 
    height: 48px;
    border-radius: 50%; /* Make them circular */
}

.btn-icon-only i {
    margin-left: 0; /* Remove margin for icon-only buttons */
    font-size: 1.2rem;
}

.project-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-top: auto;
    justify-content: center; /* Center buttons */
}

.total-units {
    text-align: center;
    background-color: var(--brown-medium);
    color: #fff;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: var(--spacing-lg);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact {
    background-color: #fff;
}

.contact-content {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.contact-item {
    background-color: var(--beige-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.contact-icon {
    font-size: 2rem;
    color: var(--brown-medium);
    margin-bottom: var(--spacing-sm);
    display: block;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--brown-light);
}

.contact-item-title {
    font-weight: 600;
    color: var(--brown-dark);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.contact-item-link {
    color: var(--brown-medium);
    text-decoration: none;
    font-size: 1rem;
    display: block;
    transition: color 0.3s ease;
}

.contact-item-link:hover,
.contact-item-link:focus {
    color: var(--brown-dark);
    text-decoration: underline;
    outline: 2px solid var(--brown-medium);
    outline-offset: 2px;
}

.contact-map {
    margin-top: var(--spacing-xl);
    width: 100%;
    height: 450px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* Soft, luxurious shadow */
    box-shadow: 0 20px 40px -10px rgba(60, 47, 35, 0.15);
    /* Thick white frame (Matte effect) */
    border: 12px solid #fff;
    position: relative;
    z-index: 1; /* Ensure Leaflet controls stack correctly */
}

.contact-map::after {
    /* Delicate inner gold trim */
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid var(--brown-light);
    border-radius: calc(var(--radius-lg) - 8px);
    pointer-events: none;
    z-index: 10;
    opacity: 0.6;
}

/* Leaflet Map Styling */
.leaflet-container {
    background-color: #ededed; /* Match Esri base color */
    font-family: 'Cairo', sans-serif;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    /* 
       Refined architectural look:
       - Cleaner grayscale with subtle warmth and brightness
    */
    filter: grayscale(100%) sepia(15%) contrast(1.05) brightness(1.02);
}

/* Map Overlay Message */
.map-overlay-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    pointer-events: none; /* Let clicks pass through */
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

/* Footer */
.footer {
    background-color: var(--brown-darker);
    color: #fff;
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.footer-text {
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.footer-domain {
    color: var(--beige-medium);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        padding-bottom: var(--spacing-sm);
        gap: var(--spacing-xs); /* Reduce gap between logo and nav */
    }

    .logo-img {
        height: 100px; /* Adjusted based on user feedback */
    }

    .nav-list {
        justify-content: center;
        gap: var(--spacing-sm);
    }

    .hero {
        min-height: auto; /* Let content dictate height to avoid centering overlap */
        padding-top: 220px; /* Aggressive spacing to clear the 100px+ header */
        padding-bottom: var(--spacing-2xl);
        align-items: flex-start; /* Ensure content starts from the padded top, not vertically centered */
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .btn:not(.btn-icon-only) {
        width: 100%;
        text-align: center;
    }
    
    .project-actions {
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    section {
        padding: var(--spacing-xl) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Mobile Menu Toggle Button (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--brown-dark);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* Mobile Navigation Layout */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row; /* Horizontal row: Logo --- Toggle */
        justify-content: space-between;
        align-items: center;
        padding-bottom: 0;
        gap: 0;
    }

    .logo-img {
        height: 90px; /* Increased size for better visibility */
    }

    .mobile-menu-toggle {
        display: block; /* Show hamburger on mobile */
    }

    .nav {
        position: fixed;
        top: 105px; /* Matches fixed header height */
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 0;
        max-height: 0; /* Hidden by default */
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        z-index: 999;
    }

    .nav.active {
        max-height: 300px; /* Expanded height */
        border-top: 1px solid var(--beige-medium);
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md);
        align-items: flex-start;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid var(--beige-light);
    }

    .nav-list li:last-child {
        border-bottom: none;
    }

    .nav-link {
        display: block;
        padding: var(--spacing-md) 0;
        width: 100%;
        text-align: right;
    }
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--brown-medium);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--brown-medium);
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Print Styles */
@media print {
    .header,
    .hero-ctas,
    .project-actions,
    .footer {
        display: none;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

/* Trust Signal */
.trust-signal {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 300;
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}
