/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Cairo", sans-serif;
    scroll-behavior: smooth;
}

body {
    background: #fff;
    color: #000;
}

body[data-theme="dark"] {
    background: #111;
    color: #fff;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 40px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
}

.logo {
    font-size: 26px;
    font-weight: bold;
    color: #FF7A00;
}

/* nav-links default (desktop) */
.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin-left: auto;
}

.nav-links li a {
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    transition: 0.3s;
}

.nav-links li a:hover {
    color: #FF7A00;
}

/* hamburger */
.hamburger {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
}

/* MOBILE */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    /* hide desktop menu */
    .nav-links {
        position: absolute;
        top: 65px;
        right: 0;
        width: 100%;
        background: #000;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 18px;

        display: none;
        /* default hidden */
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }
}

/* DARK MODE */
body[data-theme="dark"] .navbar {
    background: #0d0d0d;
}


/* Theme Button */
.theme-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    margin-left: 20px;
}

/* orange line hidden because navbar is fixed */
.orange-line {
    display: none;
}

/* ===== HERO SECTION ===== */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* مساحة فوق بسبب الـ navbar الثابت */
    padding: 140px 7% 80px;

    background: linear-gradient(to bottom, #f7f7f7, #ffffff);
}

body[data-theme="dark"] .hero {
    background: #1a1a1a;
}

/* hero text */
.greeting {
    font-size: 20px;
    color: #FF7A00;
    margin-bottom: 10px;
}

.name {
    font-size: 50px;
    font-weight: 700;
}

.title {
    font-size: 22px;
    color: #333;
    margin: 12px 0;
}

body[data-theme="dark"] .title {
    color: #ddd;
}

.bio {
    max-width: 550px;
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

body[data-theme="dark"] .bio {
    color: #ccc;
}

/* hero buttons */
/* Default (Desktop) */
.buttons {
    display: flex;
    gap: 15px;
}

/* Tablet */
@media (max-width: 900px) {
    .buttons {
        gap: 12px;
        justify-content: center;
        flex-wrap: wrap;
        /* لو مفيش مساحة يكسر سطر */
    }
}

/* Mobile */
@media (max-width: 600px) {
    .buttons {
        flex-direction: column;
        /* أزرار تحت بعض */
        gap: 12px;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 0;
        font-size: 15px;
    }
}


.btn {
    background: #000;
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s ease;
}

.btn:hover {
    background: #FF7A00;
    color: #fff;
    /* خلي النص أبيض على اللون البرتقالي */
}


/* hero image */
.image-wrapper img {
    width: 360px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .image-wrapper img {
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15);
}

/* ===== GLOBAL SECTIONS ===== */
section {
    padding: 80px 7%;
}

.section-title {
    font-size: 32px;
    text-align: center;
    margin-bottom: 25px;
}

/* ===== ABOUT ===== */
.about-text {
    max-width: 750px;
    margin: auto;
    text-align: center;
    line-height: 1.9;
    font-size: 18px;
}

/* ===== SERVICES ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.service-card {
    background: #f2f2f2;
    padding: 20px;
    border-radius: 12px;
}

body[data-theme="dark"] .service-card {
    background: #222;
    color: #fff;
}

/* ===== CONTACT ===== */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

body[data-theme="dark"] .contact-form input,
body[data-theme="dark"] .contact-form textarea {
    background: #222;
    color: #fff;
    border-color: #444;
}

.submit-btn {
    background: #000;
    color: #fff;
    cursor: pointer;
    border: none;
}

.submit-btn:hover {
    background: #FF7A00;
    color: #000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {

    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 160px 5% 80px;
    }

    .image-wrapper img {
        width: 280px;
        margin-bottom: 20px;
    }

    .name {
        font-size: 40px;
    }

    .nav-links {
        gap: 12px;
    }
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 100px 7%;
    text-align: center;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 auto 50px;
    max-width: 550px;
}

body[data-theme="dark"] .section-subtitle {
    color: #bbb;
}

/* Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

/* Service Cards */
.service-card {
    background: #fff;
    padding: 35px 25px;
    border-radius: 20px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    transition: 0.35s ease;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

body[data-theme="dark"] .service-card {
    background: #1c1c1c;
    border-color: #333;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.05);
}

/* Hover Effect */
.service-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

/* Icon Wrapper */
.icon-wrapper {
    width: 70px;
    height: 70px;
    background: #FF7A00;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.4);
}

/* Titles & Text */
.service-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
}

body[data-theme="dark"] .service-desc {
    color: #ccc;
}

/* Responsive */
@media (max-width: 600px) {
    .section-title {
        font-size: 28px;
    }

    .services-section {
        padding: 70px 6%;
    }
}



.project-card img {
    width: 400px;
    /* الصورة تمتد لعرض البطاقة بالكامل */
    height: 400px;
    object-fit: contain;
    /* يحافظ على نسبة العرض/الارتفاع ويقص الأجزاء الزائدة */
    border-radius: 20px 20px 0 0;
    /* يجعل أعلى البطاقة مستدير */
}

.projects-section {
    padding: 80px 7%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.project-card {
    background: #f2f2f2;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: center;
}

body[data-theme="dark"] .project-card {
    background: #222;
    color: #fff;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.project-title {
    font-size: 20px;
    margin: 15px 0 5px;
    font-weight: 700;
}

.project-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.project-btn {
    padding: 8px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s ease;
}

.project-btn:hover {
    background: #FF7A00;
    color: #000;
}

.project-btn.disabled {
    background: #777;
    color: #ccc;
    cursor: not-allowed;
}

body[data-theme="dark"] .project-btn.disabled {
    background: #555;
    color: #ccc;
}

.project-desc {
    font-size: 15px;
    color: #555;
    padding: 0 10px 15px;
}

body[data-theme="dark"] .project-desc {
    color: #ccc;
}

/* Responsive */
@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}


.contact-section {
    padding: 80px 7%;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

body[data-theme="dark"] .contact-form input,
body[data-theme="dark"] .contact-form textarea {
    background: #222;
    color: #fff;
    border-color: #444;
}

.submit-btn {
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.submit-btn:hover {
    background: #FF7A00;
    color: #000;
}

.contactSection {
    width: 100%;
    height: 60px;
    padding: 15px 40px;
    background: #000;
    color: #fff;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    /* توسيط أفقي */

    font-size: 25px;

}


.contactSection p:hover {
    color: #FF7A00;
    transition: 0.3s;

}


.footer {
    background: #000;
    color: #fff;
    padding: 20px 7%;
    text-align: center;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.footer-links a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #FF7A00;
}

body[data-theme="dark"] .footer {
    background: #111;
    color: #ccc;
}

body[data-theme="dark"] .footer-links a {
    color: #ccc;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.social-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.2);
}

body[data-theme="dark"] .social-icon {
    filter: brightness(0.8);
}

.contact-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.contact-card a {
    display: inline-block;
    color: #000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-card a:hover {
    color: white;
    transform: scale(1.05);

}


.contact-card {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    width: 250px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(145deg, #FF7A00, #ffd699);

}

body[data-theme="dark"] .contact-card:hover {
    background: linear-gradient(145deg, #FF7A00, #ffb84d);
}

body[data-theme="dark"] .contact-card p,
body[data-theme="dark"] .contact-card a {
    color: #fff;
}
body[data-theme="dark"] .contact-card  {
    background-color: #222;
    color: #fff;
}
.contact-card .icon {
    width: 40px;
    margin-bottom: 10px;
}

#scrollTopBtn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    border: none;
    border-radius: 50%;
    padding: 10px 10px;
    cursor: pointer;
    display: none;
    /* يختفي في البداية */
    transition: background 0.3s, transform 0.3s;
}

#scrollTopBtn img {
    width: 30px;
    height: 30px;
}


#scrollTopBtn:hover {
    transform: scale(1.1);
}

body[data-theme="dark"] #scrollTopBtn {
    background-color: #222;
    color: #fff;
}

body[data-theme="dark"] #scrollTopBtn:hover {
    background-color: #FF7A00;
    color: #fff;
}

