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

body {
    font-family: 'Cairo', sans-serif;
}


html {
    scroll-behavior: smooth;
}
/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: background 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: #0f172a;
}

#navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 12px 40px;
}

/* الروابط العادية */
#navbar nav {
    display: flex;
    gap: 15px;
}

#navbar a {
    color: #fff;
    text-decoration: none;
}

#navbar a:hover {
    color: #0fb9b1; /* لون الهوية */
}

/* أيقونة الهامبورجر للهواتف */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
}

/* عند الشاشات الصغيرة */
@media (max-width: 768px) {
    #navbar .container {
        padding: 12px 20px;
    }

    #navbar nav {
        position: absolute;
        top: 100%;
        right: 0;
        background: #0f172a;
        flex-direction: column;
        width: 200px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0 0 10px 10px;
    }

    #navbar nav.active {
        max-height: 500px; /* يكفي لإظهار كل الروابط */
    }
    
    .hamburger {
        display: flex;
    }

    #navbar a {
        margin: 10px;
    }
}

/* Hero */
#hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: 1s;
}

.slide.active {
    opacity: 1;
}

.overlay {
    background: rgba(0,0,0,0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

/* Services */
#services{
  padding-bottom: 20px  
}

.service {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    margin-bottom: 10px;
}

.service img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: 0.4s;
}

.service h3 {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 8px 15px;
    border-radius: 20px;
}

.service:hover img {
    transform: scale(1.1);
}


/* Projects */
#projects {
    padding: 60px 20px;
    background: #0f172a;
    color: white;
    text-align: center;
}

.logos {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.logos img {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.3s;
}

.logos img:hover {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.1);
}


/* Portfolio */
#portfolio {
    padding: 80px 20px;
    text-align: center;
}

.filters button {
    margin: 5px;
    padding: 8px 20px;
    border: none;
    cursor: pointer;
}

.filters .active {
    background: #0fb9b1;
    color: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}


.portfolio-grid .item {
    background: #e5e7eb;
    border-radius: 14px;
    padding: 60px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portfolio-grid .item img {
    max-width: 250px;   /* لا تتجاوز عرض العنصر */
    max-height: 250px; /* أقصى ارتفاع تريده */
    object-fit: cover; /* لتعبئة المساحة بشكل جميل */
    border-radius: 10px; /* إن أردت زوايا مستديرة مثل العنصر */
    display: block;
    margin: 0 auto;    /* توسيط الصورة */
}

.portfolio-grid .item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
}


.item {
    padding: 60px;
    background: #e5e7eb;
    border-radius: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;

}

/* Footer */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 60px 20px 30px;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    text-align: center;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 14px;
    opacity: 0.8;
}

/* Social Icons */
.footer-social {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social a {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #0fb9b1;
    transform: translateY(-4px);
}

/* Copy */
.footer-copy {
    margin-top: 25px;
    font-size: 13px;
    opacity: 0.6;
}

/* Mobile */
@media (max-width: 768px) {
    .footer-social {
        gap: 12px;
    }
}
/* فواصل الروابط في الشاشات الكبيرة فقط */
@media (min-width: 769px) {
    .nav-links a {
        position: relative;
        padding: 0 14px;
    }

    .nav-links a:not(:last-child)::after {
        content: "|";
        position: absolute;
        left: -2px;
        color: rgba(255,255,255,0.4);
        font-size: 14px;
    }
}


/* Contact */
#contact {
    padding: 80px 20px;
    background: #f8fafc;
    text-align: center;
}

#contact p {
    margin: 10px 0 40px;
    color: #64748b;
}

.contact-form {
    max-width: 600px;
    margin: auto;
    display: grid;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #cbd5f5;
    border-radius: 8px;
    font-family: 'Cairo';
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form button {
    background: #0fb9b1;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.contact-form button:hover {
    background: #0f172a;
}



.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: #0f172a;
}

/* Works Grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 300px)); /* حد أقصى للعرض */
  justify-content: center; /* لجعل البطاقات تتوسط الصفحة */
  gap: 20px;
}


/* Card */
.work-card {
  background: #f5f5f5;
  padding: 20px;
  text-align: center;
    position: relative;
    height: 320px;
    overflow: hidden;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.4s ease;
}

.work-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

/* Overlay */
.work-card .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(15,23,42,0.9),
        rgba(15,23,42,0.2)
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 30px;
    opacity: 0;
    transition: 0.4s;
}

.work-card h3 {
    color: #fff;
    font-size: 22px;
    margin-top: 10px;
}

/* Icon */
.work-card .icon {
    width: 55px;
    height: 55px;
    background: #0fb9b1;
    color: white;
    font-size: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
    transition: 0.4s;
}

/* Hover Effects */
.work-card:hover img {
    transform: scale(1.1);
}

.work-card:hover .overlay {
    opacity: 1;
}

.work-card:hover .icon {
    transform: translateY(0);
}

.work-card:hover {
    transform: translateY(-8px);
}


/* Team Section */
#team {
    padding: 80px 20px;
    text-align: center;
    background: #f8fafc; /* نفس لون قسم الاتصال */
}

#team h2 {
    font-size: 36px;
    margin-bottom: 50px;
    color: #0f172a; /* نفس لون العناوين */
}

/* Grid for team members */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    justify-items: center;
    margin-top: 30px;
}

/* Team Member Card */
.team-member {
    background: #ffffff;
    padding: 20px;
    border-radius: 18px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.team-member:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(15,23,42,0.15);
}

.team-member img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.4s ease;
}

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

.team-member h3 {
    margin-top: 15px;
    font-size: 20px;
    color: #0f172a;
}

.team-member p {
    font-size: 14px;
    color: #64748b;
    margin: 8px 0;
}

/* Social Links */
.team-member .social {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.team-member .social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(15,23,42,0.05);
    color: #0f172a;
    font-size: 18px;
    transition: all 0.3s ease;
}

.team-member .social a:hover {
    background: #0fb9b1;
    color: #fff;
    transform: translateY(-3px);
}



/* Grid الوظائف */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    justify-items: center;
}

/* بطاقة الوظيفة */
.job-card {
    background: #f5f5f5;
    border-radius: 18px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.job-title {
    font-size: 22px;
    color: #0f172a;
    margin-bottom: 10px;
}

.job-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 15px;
    display: block;
}

.job-description {
    font-size: 0.95rem;
    color: #334155;
    flex-grow: 1;
    margin-bottom: 20px;
}

.job-card .btn {
    background: #0fb9b1;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.job-card .btn:hover {
    background: #0f172a;
}

/* No jobs message */
.no-jobs {
    text-align: center;
    color: #64748b;
    font-size: 1rem;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .job-card {
        height: auto;
        padding: 20px;
    }
}



