/* =========================================
   Devart Premium Redesign 
   ========================================= */

   :root {
    --bg-main: #F9F8F6; /* Warm off-white */
    --bg-alt: #F0EFEA;  /* Secondary subtle background */
    --text-main: #121212; /* Charcoal black */
    --text-muted: #6B6B6B; /* Soft gray */
    --accent: #C2A878;  /* Subtle bronze/sand */
    --accent-hover: #A88F61;
    --white: #FFFFFF;
    --border: rgba(0, 0, 0, 0.08); /* Minimalist border */
    
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'General Sans', sans-serif;
    --font-arabic: 'IBM Plex Sans Arabic', sans-serif;
    
    --border-radius: 0px; /* Modern architectural block style */
    --transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

html[dir="rtl"] {
    --font-heading: var(--font-arabic);
    --font-body: var(--font-arabic);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 500;
}

.bg-main { background-color: var(--bg-main); }
.bg-alt { background-color: var(--bg-alt); }

/* =========================================
   Typography & Reusables
   ========================================= */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 5%;
}

.section-header {
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    background-color: var(--text-main);
    color: var(--white);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--text-main);
}

.btn:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--white);
}

/* =========================================
   Navbar
   ========================================= */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(249, 248, 246, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.navbar {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-main);
    letter-spacing: 0.05em;
}

.logo img {
    height: 30px;
    margin-right: 15px;
}
html[dir="rtl"] .logo img { margin-right: 0; margin-left: 15px; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.lang-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-toggle:hover {
    color: var(--text-main);
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}
.hamburger span {
    width: 30px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* =========================================
   1. Hero Section
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: url('../images/image17.jpeg') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
    color: var(--white);
    z-index: 10;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    font-weight: 400;
    margin-bottom: 30px;
    max-width: 800px;
    color: var(--white);
}

.hero p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 50px;
    max-width: 500px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-actions {
    display: flex;
    gap: 20px;
}
.hero-actions .btn-outline {
    border-color: var(--white);
    color: var(--white);
}
.hero-actions .btn-outline:hover {
    background-color: var(--white);
    color: var(--text-main);
}

/* =========================================
   2. Featured Projects (Minimal Grid)
   ========================================= */
.projects-grid-minimal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.project-card-minimal {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

.project-card-minimal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.9;
}

.project-card-minimal:hover img {
    transform: scale(1.05);
    opacity: 0.7;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.status-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    color: var(--accent);
}

.project-overlay h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.view-project-btn {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.project-card-minimal:hover .view-project-btn {
    opacity: 1;
    transform: translateY(0);
    text-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* =========================================
   Fullscreen Project Modal
   ========================================= */
#project-modals {
    /* Container for modals */
}

.project-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1800px;
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 5%;
    background: none;
    border: none;
    font-size: 3rem;
    color: var(--white);
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}
html[dir="rtl"] .close-modal { right: auto; left: 5%; }
.close-modal:hover { color: var(--accent); }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    height: 100%;
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
}

.status-label {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
    width: max-content;
}

.modal-info h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    line-height: 1.2;
    color: var(--white);
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.detail-block strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 5px;
}

.detail-block span {
    font-size: 1rem;
    font-weight: 500;
}

.project-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.project-contributions h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.project-contributions ul {
    list-style-type: none;
}

.project-contributions li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}
html[dir="rtl"] .project-contributions li { padding-left: 0; padding-right: 20px; }

.project-contributions li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}
html[dir="rtl"] .project-contributions li::before { left: auto; right: 0; }

.modal-gallery {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 500px;
}

/* Fullscreen Carousel overrides */
.carousel-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}
.carousel-container {
    height: calc(100% - 60px);
    overflow: hidden;
    position: relative;
}
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}
.carousel-btn:hover { background: var(--accent); border-color: var(--accent); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    height: 60px;
    align-items: center;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
}
.carousel-dot.active { background: var(--white); }


/* =========================================
   3. About / Text Grids
   ========================================= */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.info-card h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.info-card p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* =========================================
   4. Services Grid
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.service-card {
    background: var(--bg-alt);
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 400;
}

.service-card:hover {
    background: var(--white);
}

/* =========================================
   5. Process Timeline
   ========================================= */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.process-step {
    position: relative;
}

.step-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--accent);
    opacity: 0.3;
    margin-bottom: 10px;
}

.process-step h4 {
    font-size: 1.5rem;
}

/* =========================================
   6. Stats Grid
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.stat-item .counter {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 10px;
    color: var(--text-main);
}

.stat-item p {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* =========================================
   7. Contact & Footer
   ========================================= */
.impact-text {
    font-size: 2rem;
    line-height: 1.4;
    max-width: 1000px;
    margin-bottom: 80px;
}

.contact-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 60px;
    border-top: 1px solid var(--border);
}

.contact-row {
    display: flex;
    gap: 40px;
}

.contact-row a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    transition: var(--transition);
}

.contact-row a:hover {
    color: var(--accent);
}

footer {
    background: var(--text-main);
    color: var(--white);
    padding: 60px 5%;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

footer p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

/* =========================================
   Animations & Reveals
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Mobile Hamburger
   ========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001; /* Above nav-links */
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0px, -2px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0px, 2px);
}

/* =========================================
   Responsive Breakpoints
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .modal-grid { grid-template-columns: 1fr; }
    .modal-gallery { min-height: 400px; }
    .process-timeline { grid-template-columns: repeat(2, 1fr); gap: 60px; }
    .contact-card { flex-direction: column; align-items: flex-start; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
    }
    html[dir="rtl"] .nav-links { right: auto; left: -100%; transition: left 0.4s ease; }
    
    .nav-links.active { right: 0; }
    html[dir="rtl"] .nav-links.active { left: 0; }
    
    .hamburger { display: flex; }
    
    .hero h1 { font-size: 2.5rem; }
    .hero-actions { flex-direction: column; }
    
    .projects-grid-minimal { grid-template-columns: 1fr; }
    
    .two-col-grid { grid-template-columns: 1fr; gap: 40px; }
    
    .stats-grid { grid-template-columns: 1fr; }
    .stat-item .counter { font-size: 3.5rem; }
    
    .impact-text { font-size: 1.5rem; }
    .contact-row { flex-direction: column; gap: 20px; }
    .contact-row a { font-size: 1.2rem; }
    
    .footer-container { flex-direction: column; gap: 20px; text-align: center; }

    .modal-content { padding: 80px 20px 40px; }
    .close-modal { top: 20px; right: 20px; }
}
