@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #1a1a1a;
    --accent-color: #c5a059;
    --accent-light: #e6c88a;
    --bg-light: #f9f9f9;
    --text-color: #333;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Header */
header {
    background-color: var(--white);
    padding: 0.2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 110px;
    width: auto;
}

.nav-links {
    display: flex;
}

.nav-links a {
    margin-right: 1.5rem; /* RTL margin */
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero */
#hero {
    background: linear-gradient(rgba(26, 26, 26, 0.75), rgba(44, 62, 80, 0.75)), url('Diva_Assets/Project%20Picture/A%20&%20B.png');
    background-size: cover, 100% auto;
    background-repeat: no-repeat;
    background-position: center;
    color: var(--white);
    padding: 15rem 5% 15rem;
    text-align: center;
    position: relative;
    border-bottom: 5px solid var(--accent-color);
}

#hero h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

#hero p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

.cta-button:hover {
    background-color: #b08d4b;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

/* Offerings & Equation */
.offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.offering-card {
    background: var(--white);
    padding: 2.5rem;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-top: 5px solid var(--accent-color);
}

.equation-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
}

.equation-section h3 {
    color: var(--accent-color);
    margin-bottom: 3rem;
    font-size: 2rem;
}

.equation-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 3rem;
}

.equation-item {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
}

.equation-item h4 {
    color: var(--accent-light);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.equation-item p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Values */
#values {
    background-color: #f0f0f0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.value-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-card h3 {
    color: var(--primary-color);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.project-image-container {
    height: 280px;
    background-color: #f4f4f4;
    overflow: hidden;
}

.project-img-real {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-real {
    transform: scale(1.05);
}

.project-details {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-units-badge {
    background: var(--primary-color);
    color: var(--accent-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.project-meta {
    margin-bottom: 2rem;
    color: #666;
}

.project-actions {
    margin-top: auto;
    display: flex;
    gap: 0.5rem;
}

.project-actions .btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-actions .icon-only {
    flex: 0 0 50px; /* Fixed width */
    padding: 0;
    font-size: 1.2rem;
}

.project-actions .btn-primary {
    flex: 1; /* Takes remaining space */
}

.btn {
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #b08d4b;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.total-units-wrapper {
    text-align: center;
    margin-top: 4rem;
}

.total-units-banner {
    display: inline-block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(90deg, transparent, rgba(197, 160, 89, 0.2), transparent);
    padding: 1rem 3rem;
    border-radius: 8px;
}

/* Contact */
#contact {
    background: linear-gradient(135deg, #1f1f1f 0%, #2c2c2c 100%);
    color: var(--white);
    padding: 6rem 5%;
    position: relative;
    overflow: hidden;
}

#contact::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: var(--accent-color);
    filter: blur(80px);
    opacity: 0.1;
    border-radius: 50%;
}

.contact-container {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

#contact .section-title {
    color: var(--white);
    margin-bottom: 1.5rem;
}

#contact p {
    color: #ccc;
}

/* ... previous styles ... */

.contact-methods {
    display: grid;
    /* Mobile first: wider min-width to ensure email fits on one line (stacks vertically on phones) */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 4rem;
}

.contact-btn {
    display: flex;
    flex-direction: column; /* Mobile: Stack vertically */
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    padding: 1.5rem 1rem;
    border-radius: 16px;
    font-size: 0.95rem; /* Slightly smaller for mobile */
    font-weight: 600;
    transition: var(--transition);
    border: none;
    text-align: center;
    background: rgba(255, 255, 255, 0.05); 
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    box-shadow: none;
    min-width: auto;
    width: 100%;
    word-break: break-all; /* Force break even in middle of word/email */
    font-size: 0.9rem;
    padding: 1.5rem 0.5rem; /* Reduce horizontal padding */
}

.contact-btn i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.contact-btn:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.contact-btn:hover i {
    transform: scale(1.1);
    color: var(--white);
}

/* Desktop View Enhancements */
@media (min-width: 768px) {
    .contact-container {
        max-width: 1000px;
    }

    .contact-methods {
        /* Desktop: 2 large columns or 4 in one row? 
           Let's go for 2 rows of 2, or 1 row of 4 if space permits.
           'repeat(auto-fit, minmax(220px, 1fr))' works, but let's constrain width 
        */
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid is very balanced */
        gap: 2rem;
    }

    .contact-btn {
        flex-direction: row; /* Horizontal on Desktop */
        text-align: right; /* RTL alignment */
        padding: 2rem 3rem;
        justify-content: flex-start; /* Align start for RTL */
        gap: 1.5rem;
        font-size: 1.1rem; /* Restore desktop font size */
    }

    .contact-btn i {
        margin-bottom: 0;
        font-size: 2.2rem;
        order: -1; /* Ensure icon stays at start */
    }
}

/* Removed 4-column layout to ensure buttons remain wide enough for long emails */

/* Specific button overrides not needed with new uniform style */
.contact-btn.whatsapp, 
.contact-btn.phone {
    background-color: transparent; 
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.contact-btn.whatsapp:hover,
.contact-btn.phone:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: #ccc;
    text-align: center;
    padding: 3rem 5%;
    font-size: 0.95rem;
}

footer strong {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    #hero { 
        padding: 8rem 5% 6rem;
        background-size: cover;
        background-position: center;
    }
    #hero h1 { font-size: 2.2rem; }
    .nav-links { display: none; } /* Simplified for MVP */
    .project-actions { grid-template-columns: 1fr; }
    section { padding: 4rem 5%; }
    .equation-section { padding: 2rem 1.5rem; }
    .equation-list { flex-direction: column; align-items: center; gap: 2.5rem; }
    .equation-item { max-width: 100%; text-align: center; }
}
