:root {
    --primary: #1a3c34;
    --bg-light: #fdfdfb;
    --text-dark: #1a1a1a;
    --placeholder: #e0e0e0;
}

* { margin:0; padding:0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-light); 
    color: var(--text-dark); 
    overflow-x: hidden; 
}

h1, h2, h3, .logo { 
    font-family: 'Playfair Display', serif; 
    color: var(--primary); 
}

header { 
    display: flex; 
    justify-content: space-between; 
    padding: 20px 5%; 
    align-items: center; 
    position: sticky; 
    top: 0;
    background: var(--bg-light);
    z-index: 1000;
}

nav a { 
    text-decoration: none; 
    color: #333; 
    margin-left: 25px; 
    font-size: 0.85rem; 
    font-weight: 500; 
}

.hero { 
    padding: 0 0 60px 0; 
}

.hero-text { 
    padding: 0 5%; 
    max-width: 800px; 
    margin-bottom: 40px; 
}

.hero h1 { 
    font-size: 3.5rem; 
    line-height: 1.1; 
    margin-bottom: 15px; 
}

.hero p { 
    color: #555; 
    width: 80%; 
}

.hero-banner { 
    position: relative; 
    width: 100%; 
    height: 80vh; 
    background-color: var(--placeholder); 
    overflow: hidden;
}

.hero-banner img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.stats-overlay {
    position: absolute; 
    bottom: 0; 
    left: 0;
    width: 100%; 
    background: rgba(26, 60, 52, 0.8); 
    backdrop-filter: blur(10px);
    display: flex; 
    justify-content: space-around; 
    padding: 40px 5%; 
    color: white;
}

.stat span { 
    font-size: 1.8rem; 
    font-weight: bold; 
    display: block; 
}

.stat p { 
    font-size: 0.9rem; 
    opacity: 0.9; 
}

.intro { 
    padding: 100px 5%; 
}

.intro-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px; 
    align-items: center; 
}

.intro-img { 
    height: 450px; 
    background-color: var(--placeholder); 
    border-radius: 4px; 
}

.intro-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.intro-content h2 { 
    font-size: 3rem; 
    margin-bottom: 25px; 
    line-height: 1.2; 
}

.pillars { 
    padding: 100px 5%; 
    background: #f9f9f7; 
}

.pillars-title { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 60px; 
    flex-wrap: wrap;
}

.pillars-title h2 { 
    flex: 1; 
    font-size: 2.8rem; 
}

.pillars-title p { 
    flex: 1; 
    color: #666; 
    padding-left: 60px; 
    font-size: 1.1rem; 
}

.pillars-main { 
    display: grid; 
    grid-template-columns: 1fr 1.2fr; 
    gap: 60px; 
}

.pillar-side-img { 
    height: 700px; 
    background-color: var(--placeholder); 
}

.pillar-side-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.pillar-box { 
    margin-bottom: 45px; 
    border-bottom: 1px solid #ddd; 
    padding-bottom: 30px; 
}

.pillar-box h3 { 
    font-size: 1.6rem; 
    margin-bottom: 15px; 
}

.pills { 
    margin-top: 20px; 
}

.pills span { 
    background: var(--primary); 
    color: white; 
    padding: 6px 15px; 
    font-size: 0.75rem; 
    margin-right: 10px; 
    border-radius: 2px; 
}

.work { 
    padding: 100px 5%; 
    text-align: center; 
}

.section-heading { 
    font-size: 2.5rem; 
    margin-bottom: 50px; 
}

.work-grid { 
    display: grid; 
    grid-template-columns: repeat(12, 1fr); /* نظام 12 عمود لمرونة أكتر */
    grid-auto-rows: 250px; 
    gap: 20px; 
}

.item { 
    background-size: cover; 
    background-position: center; 
    position: relative; 
    display: flex; 
    align-items: flex-end; 
    padding: 20px; 
    transition: 0.5s ease;
    overflow: hidden;
    cursor: pointer;
}


.item::before { 
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.item .label { position: relative; z-index: 2; font-size: 0.7rem; letter-spacing: 2px; }

.small-tall { grid-column: span 4; }
.medium-wide { grid-column: span 8; }
.full-wide { grid-column: span 12; height: 450px; }
.half { grid-column: span 6; }
.vertical { grid-column: span 4; grid-row: span 2; height: auto; }

.legacy { 
    background: #15191d; 
    color: white; 
    padding: 120px 5%; 
    text-align: center; 
}

.legacy h2 { 
    color: white; 
    font-size: 3.5rem; 
    margin-bottom: 20px; 
}

.legacy p { 
    opacity: 0.8; 
    margin-bottom: 40px; 
    font-size: 1.1rem; 
    max-width: 700px; 
    margin-inline: auto; 
}

.btn-inquiry { 
    background: #1a3c34; 
    border: 1px solid #1a3c34; 
    color: white; 
    padding: 18px 45px; 
    cursor: pointer; 
    font-weight: 600; 
    margin-right: 25px; 
    transition: 0.3s; 
}

.btn-inquiry:hover { 
    background: transparent; 
}

.footer {
  background: #f6f6ff;
  color: black;
  padding: 70px 5% 0;
  position: relative; 
  box-shadow: 0 -15px 30px rgba(108, 39, 145, 0.4);
  border-radius: 40px;
}

.footer-container{
  display:grid;
  grid-template-columns:2fr 1fr 1fr;
  gap:40px;
}

.footer-links a{
  display:block;
  color:black;
  margin:8px 0;
  text-decoration:none;
}

.footer-brand .mail {
  color : black;
}

.footer-brand p {
  color :#94A3B8;
}

.footer-links h4{
  color: #94A3B8;
}

.footer-bottom{
  text-align:center;
  padding:20px 0;
  margin-top:40px;
  border-top:1px solid #333;
  color:#aaa;
}

.footer-head{
  color: #6C2791;
}

@media (max-width: 1024px) {

    .hero h1 {
        font-size: 2.8rem;
    }

    .intro-grid {
        grid-template-columns: 1fr;
    }

    .pillars-main {
        grid-template-columns: 1fr;
    }

    .pillar-side-img {
        height: 400px;
    }

    .work-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .full-wide,
    .half,
    .vertical,
    .medium-wide,
    .small-tall {
        grid-column: span 2;
        grid-row: span 1;
        height: 300px;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    
    .stats-overlay {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .work-grid {
        grid-template-columns: 1fr; /* صورة واحدة في كل صف */
        grid-auto-rows: 300px;
    }
    
    .small-tall, .medium-wide, .full-wide, .half, .vertical {
        grid-column: span 1;
        grid-row: span 1;
        height: 300px !important;
    }

    .intro-grid, .pillars-main {
        grid-template-columns: 1fr;
    }
    
    .pillar-side-img { height: 300px; order: 2; }
}


.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    gap: 6px;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {

    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transition: 0.4s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    nav a {
        margin: 20px 0;
        font-size: 1rem;
    }

    nav.active {
        max-height: 400px;
        padding-bottom: 20px;
    }
}


/* ================= MOBILE MENU (COMPACT & CENTERED) ================= */
@media (max-width: 768px) {

    /* إظهار الهامبرجر */
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    /* تنسيق الصندوق الأبيض للمنيو */
    nav {
        display: none; /* مخفي في البداية */
        flex-direction: column;
        align-items: center;      /* توسيط أفقي */
        justify-content: center;   /* توسيط رأسي */
        
        position: absolute;
        top: 75px; 
        right: 5%;                /* تثبيت جهة اليمين */
        left: auto;               /* إلغاء الـ left */
        
        width: 190px;             /* العرض الثابت للصندوق */
        background: white;
        padding: 20px 0;
        border-radius: 15px;      /* زوايا دائرية */
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 9999;
        
        transition: all 0.4s ease;
    }

    /* كلاس التفعيل للـ JS */
    nav.active {
        display: flex;
        max-height: 400px; /* الارتفاع عند الفتح */
    }

    /* تنسيق الروابط لتكون في النص */
    nav a {
        display: block;
        width: 100%;
        text-align: center;       /* <<< الكلام في النص */
        margin: 0 !important;
        padding: 12px 0;
        color: var(--text-dark) !important;
        font-weight: 600;
        font-size: 16px;
    }

    /* إضافة تأثير Hover بسيط للينكات في الموبايل */
    nav a:hover {
        background-color: #f9f7f7;
        color: var(--primary) !important;
    }
}



