:root {
    /* Light theme variables */
    --primary-bg: #ffffff;
    --secondary-bg: #1f2833;
    --text-color: #1f2833;
    --gradient-start: #00edff;
    --gradient-end: #3a8ee7;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
    --primary-bg: #1f2833;
    --secondary-bg: #ffffff;
    --text-color: #ffffff;
    --gradient-start: #00edff;
    --gradient-end: #3a8ee7;
    --card-bg: #2c3e50;
    --header-bg: rgba(31, 40, 51, 0.95);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--primary-bg);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* تأثير انتقالي سلس للوجو */
#site-logo {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo img {
    width: auto; /* يجعل العرض متناسبًا مع الارتفاع */
    height: 100px; /* يحدد ارتفاعًا ثابتًا لضمان تناسب الحجم */
    max-width: 100%; /* يمنع تجاوز الحجم الطبيعي */
    object-fit: contain; /* يمنع التشوه ويحافظ على الجودة */
}


.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.client-logo {
    width: 100px; /* عرض الشعار */
    height: auto; /* الارتفاع يتكيف تلقائيًا */
    margin-bottom: 1rem; /* مسافة بين الشعار والنص */
    object-fit: contain; /* الحفاظ على نسبة الشعار دون تشويه */
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: var(--secondary-bg);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: var(--gradient-end);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(45deg, rgba(0, 237, 255, 0.1), rgba(58, 142, 231, 0.1));
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tagline {
    font-size: 1.5rem;
    color: var(--secondary-bg);
    padding: 0 1.5rem; /* مسافة 1.5rem من اليمين واليسار */
    max-width: 800px; /* عرض أقصى للنص */
    margin: 0 auto; /* توسيط النص */
    text-align: center; /* توسيط النص */
}

/* About Us Section */
.about {
    padding: 5rem 5%;
    background-color: var(--primary-bg);
    text-align: center;
}

.about h2 {
    color: var(--secondary-bg);
    margin-bottom: 2rem;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-content p {
    margin-bottom: 1.5rem;
}

/* ############ */

.portfolio, .clients {
    padding: 5rem 5%; /* مسافة 5rem من الأعلى والأسفل، و5% من اليمين واليسار */
}


h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-bg);
}

h3 {
    margin: 2rem 0; /* مسافة 2rem من الأعلى والأسفل */
/*     text-align: center; /* توسيط النص */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

/* نسبة 1:1 لقسم "Advertising Posters" */
.portfolio-item img {
    width: 800px;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 237, 255, 0.8), rgba(58, 142, 231, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.client-item {
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.client-item:hover {
    transform: translateY(-5px);
}

.client-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* تأكد من أن العنصر الأب (section.contact) يعرض الزر في المنتصف */
.contact {
    padding: 5rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center; /* توسيط أفقيًا */
    text-align: center; /* توسيط النص */
}

/* تعديل تنسيق زر واتساب */
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    margin: 0 auto; /* توسيط الزر أفقيًا */
    margin-bottom: 2rem; /* إضافة مسافة أسفل الزر */
    transition: transform 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.05); /* تأثير التكبير عند التمرير */
}

.whatsapp-button i {
    margin-right: 0.5rem;
}

.footer {
    background: var(--secondary-bg);
    color: var(--primary-bg);
    padding: 2rem;
    text-align: center;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--primary-bg);
    font-size: 1.5rem;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--gradient-start);
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1001;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 1rem;
    }

    .nav ul {
        margin-top: 1rem;
        gap: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 2px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}
