/* تأكد أن الرأس يعمل كعمود بسيط يحتوي على صفين: logo-row ثم main-nav */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 12px 11px;
  background: rgba(255, 255, 255, 0.9);
  /* تبقى بقية الخصائص كما هي عندك إذا أردت الاحتفاظ بها */
}

/* الصف الأول: الشعار + اسم الشركة في سطر واحد أفقي */
.logo-row {
  display: flex;
  align-items: center;
  gap: 2px; /* المسافة بين النص والصورة */
  justify-content: flex-start;
  padding: 6px 0;
}

.brand-name {
  font-size: 1.6rem;
  margin: 0;
  line-height: 1;

}

.logo {
  height: 80px; /* عدّل الحجم حسب ما يناسبك */
  width: auto;
}

/* الصف الثاني: التنقل في سطر واحد كما هو لديك الآن */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
  justify-content: flex-start;
}

/* الأساسيات */
body {
    font-family: 'Cairo', Tahoma, sans-serif;
    background: linear-gradient(135deg, #e4e6f1 0%, #e5c0f3 100%);
    color: #333;
    margin: 0;
    padding: 0;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
}

body.dark-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
}

/* رأس الصفحة */
header {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 35px;
    border-bottom-right-radius: 45px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

body.dark-mode header {
    background-color: rgba(44, 62, 80, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    height: 70px;
    margin-left: 20px;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.1);
}

.header-content {
    text-align: right;
    flex-grow: 1;
    margin-right: 20px;
}

.header-content h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
}

body.dark-mode .header-content h1 {
    color: #ecf0f1;
}

body.dark-mode .header-content h1 {
    color: #ecf0f1;
}

/* التنقل */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
}

nav a:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

body.dark-mode nav a {
    color: #ecf0f1;
}

body.dark-mode nav a:hover {
    background-color: #f093fb;
}

/* زر الوضع الليلي */
#themeToggle {
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s;
    margin-inline-start: auto;
    animation: none;
}

#themeToggle.rotating {
    animation: rotate 0.5s ease-in-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#themeToggle:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

body.dark-mode #themeToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* المحتوى */
main {
    padding: 40px 20px;
    text-align: right;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* العناوين */
h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2c3e50;
    position: relative;
}

body.dark-mode h2 {
    color: #ecf0f1;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to left, #667eea, #f093fb);
    border-radius: 2px;
}

p {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

body.dark-mode p {
    color: #bdc3c7;
}

.showcase h2 {
    margin-bottom: 30px;
}

/* البطاقات */
.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 30px;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 300px;
    padding: 20px;
    text-align: right;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to left, #667eea, #f093fb);
}

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

body.dark-mode .project-card {
    background-color: rgba(52, 73, 94, 0.95);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.dark-mode .project-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.project-card img {
    width: 100%;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s;
}

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

.project-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .project-card h3 {
    color: #ecf0f1;
}

/* زر الدعوة للعمل */
.cta-button {
    display: block;
    margin: 60px auto 40px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #495175 0%, #f093fb 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    width: fit-content;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* النماذج */
form {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 30px auto;
    text-align: right;
}

body.dark-mode form {
    background-color: rgba(52, 73, 94, 0.95);
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

body.dark-mode label {
    color: #ecf0f1;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 16px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

input:focus, select:focus, textarea:focus {
    border-color: #667eea;
    outline: none;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* النوافذ المنبثقة */
.dialog {
    display: none;
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -30%);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
    max-width: 400px;
}

body.dark-mode .dialog {
    background-color: rgba(52, 73, 94, 0.95);
    color: #ecf0f1;
}

.dialog h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

body.dark-mode .dialog h3 {
    color: #ecf0f1;
}

.dialog p {
    font-size: 16px;
    margin-bottom: 10px;
    color: #555;
}

body.dark-mode .dialog p {
    color: #bdc3c7;
}

.dialog button {
    margin-top: 10px;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.dialog button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* مميزات التطبيق */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.feature {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    text-align: center;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.dark-mode .feature {
    background-color: rgba(52, 73, 94, 0.95);
    border-color: #555;
}

/* أزرار التحميل */
.download-buttons a {
    display: inline-block;
    margin: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.download-buttons a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

/* صناديق التواصل */
.card {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.contact-box {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 320px;
    text-align: right;
    transition: all 0.3s;
}

.contact-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

body.dark-mode .contact-box {
    background-color: rgba(52, 73, 94, 0.95);
}

.contact-box h3 {
    margin-top: 0;
    font-size: 20px;
    color: #2c3e50;
}

body.dark-mode .contact-box h3 {
    color: #ecf0f1;
}

.contact-box p {
    margin: 8px 0;
    font-size: 16px;
    color: #555;
}

body.dark-mode .contact-box p {
    color: #bdc3c7;
}

.contact-box span {
    font-size: 14px;
    color: #666;
}

body.dark-mode .contact-box span {
    color: #ccc;
}

/* التذييل */
footer {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    text-align: center;
    border-top-left-radius: 35px;
    border-top-right-radius: 45px;
    margin-top: 40px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

body.dark-mode footer {
    background-color: rgba(44, 62, 80, 0.9);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

footer p {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

body.dark-mode footer p {
    color: #ecf0f1;
}

/* الاستجابة */
@media (max-width: 1024px) {
    .projects {
        gap: 20px;
    }

    .project-card {
        width: calc(50% - 10px);
    }

    main {
        padding: 30px 15px;
    }

    h2 {
        font-size: 26px;
    }

    p {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .project-card {
        width: 100%;
    }

    .logo {
        height: 50px;
    }

    nav a {
        margin: 5px 0;
        padding: 10px 15px;
        font-size: 14px;
    }

    .header-content h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 24px;
    }

    p {
        font-size: 16px;
    }

    main {
        padding: 20px 10px;
    }

    .cta-button {
        padding: 14px 28px;
        font-size: 18px;
    }

    .contact-box {
        width: calc(50% - 10px);
    }

    .feature {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 40px;
    }

    .header-content h1 {
        font-size: 24px;
    }

    nav a {
        font-size: 14px;
        padding: 8px 12px;
    }

    h2 {
        font-size: 22px;
    }

    p {
        font-size: 15px;
    }

    .project-card {
        padding: 15px;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 16px;
    }

    footer {
        padding: 15px;
    }

    .contact-box {
        width: 100%;
    }
}