/* =========================================
   1. VARIABLES & GLOBAL SETTINGS
   ========================================= */
:root {
    --primary-color: #0A2647;
    /* Dark Blue */
    --secondary-color: #D4AF37;
    /* Gold */
    --light-color: #FFFFFF;
    /* White */
    --text-color: #333;
    /* Dark Gray */
    --light-text-color: #E0E0E0;
    /* Light Gray */

    /* Glass Effect Variables */
    --glass-bg-color: rgba(255, 255, 255, 0.05);
    --glass-border-color: rgba(255, 255, 255, 0.2);

    /* Typography & Effects */
    --font-family-ar: 'Tajawal', sans-serif;
    --font-family-en: 'Roboto', sans-serif;
    --transition-speed: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family-ar);
    color: var(--text-color);
    background-color: var(--primary-color);
    line-height: 1.6;
    overflow-x: hidden;
}

body.en {
    font-family: var(--font-family-en);
}

main {
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        url("src/images/designs/design13.jpg") no-repeat center center fixed;
    background-size: cover;
    color: var(--light-color);
    padding: 15px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
   ========================================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.section-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    color: var(--light-text-color);
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    transition: var(--transition-speed);
    border: 2px solid transparent;
    margin: 10px;
}

.btn i {
    margin-right: 8px;
}

html[dir="ltr"] .btn i {
    margin-right: 0;
    margin-left: 8px;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c8a030;
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--light-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* =========================================
   3. LAYOUT COMPONENTS (Glassmorphism)
   ========================================= */
.section-padding {
    padding: 80px 0;
    border-radius: 15px;
    margin: 25px;
    background: var(--glass-bg-color);
    border: 1px solid var(--glass-border-color);
    backdrop-filter: blur(2px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
}

/* Remove duplicate backgrounds for inner sections */
.about-section,
.services-section,
.gallery-section,
.testimonials-section,
.faq-section {
    background: none;
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
.header {
    background: rgba(255, 255, 255, 0.9);
    /* Fallback */
    background-color: var(--light-color);
    backdrop-filter: blur(25px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition-speed);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-container img {
    height: 45px;
    width: auto;
}

.logo-container .logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
}

.nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    padding: 0 10px;
    font-weight: 700;
    transition: var(--transition-speed);
}

.nav ul li a:hover {
    color: var(--secondary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icons a {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0 8px;
    transition: var(--transition-speed);
}

.contact-icons a:hover {
    color: var(--secondary-color);
}

.lang-switcher {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition-speed);
}

.lang-switcher:hover {
    background: var(--secondary-color);
    color: var(--light-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    height: 100vh;
    background: url("src/images/designs/design32.jpg") no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* =========================================
   6. CARDS & GRIDS (Features, Services, Gallery)
   ========================================= */
.features-grid,
.services-grid,
.gallery-grid,
.testimonials-grid,
.blog-grid {
    display: grid;
    gap: 30px;
    margin-top: 50px;
}

.features-grid,
.services-grid,
.gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.testimonials-grid,
.blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gallery-grid {
    gap: 15px;
}

/* Common Card Styles */
.feature-item,
.service-card,
.testimonial-card,
.article-card {
    background: var(--light-color);
    color: var(--text-color);
    border-radius: 10px;
    transition: var(--transition-speed);
}

/* Features */
.feature-item {
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature-item .feature-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Services */
.service-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.service-card .service-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.service-card h3 {
    color: var(--primary-color);
    padding: 15px 0;
}

/* Gallery */
.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Testimonials */
.testimonial-card {
    padding: 30px;
    border-left: 5px solid var(--secondary-color);
}

.testimonial-rating {
    color: #f39c12;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

html[dir="ltr"] .testimonial-author img {
    margin-right: 0;
    margin-left: 15px;
}

.testimonial-author span {
    font-weight: bold;
    color: var(--primary-color);
}

/* =========================================
   7. SPECIFIC SECTIONS (FAQ, Contact)
   ========================================= */
/* FAQ */
.faq-accordion {
    max-width: 700px;
    margin: 0 auto;
}

.faq-accordion details {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px 20px;
    border: 1px solid #eee;
}

.faq-accordion details[open] {
    border-color: var(--secondary-color);
}

.faq-accordion summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-accordion details[open] summary i {
    transform: rotate(180deg);
}

.faq-accordion summary i {
    transition: transform 0.3s;
}

.faq-accordion p {
    margin-top: 15px;
    color: #666;
    padding-left: 10px;
    border-left: 3px solid var(--secondary-color);
}

html[dir="ltr"] .faq-accordion p {
    padding-left: 0;
    padding-right: 10px;
    border-left: none;
    border-right: 3px solid var(--secondary-color);
}

/* Contact Section */
.contact-section {
    background: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    border: none;
    backdrop-filter: none;
}

.contact-section .section-title,
.contact-section .section-intro {
    color: var(--light-color);
}

.contact-buttons .btn {
    margin: 10px;
}

/* =========================================
   8. FOOTER & DEV CREDIT
   ========================================= */
.footer {
    background: var(--primary-color);
    color: #ccc;
    padding: 50px 0 20px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3,
.footer-col h4 {
    color: var(--light-color);
    margin-bottom: 15px;
}

.footer-col p,
.footer-col ul li a {
    margin-bottom: 10px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    display: block;
    transition: var(--transition-speed);
}

.footer-col ul li a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
}

html[dir="ltr"] .footer-col ul li a:hover {
    padding-right: 0;
    padding-left: 5px;
}

.footer-contact-info a {
    display: flex;
    align-items: center;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 10px;
    gap: 10px;
    transition: var(--transition-speed);
}

.footer-contact-info a:hover {
    color: var(--secondary-color);
}

.footer-contact-info i {
    color: var(--secondary-color);
    margin-right: 10px;
}

html[dir="ltr"] .footer-contact-info i {
    margin-right: 0;
    margin-left: 10px;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 20px;
    font-size: 0.9rem;
}

.developer-credit {
    border-radius: 12px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.developer-credit span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.developer-credit .dev-logo {
    padding: 3px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    vertical-align: middle;
}

.developer-credit a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-speed);
    font-weight: bold;
}

.developer-credit a:hover {
    color: blue;
}

/* =========================================
   9. BLOG & ARTICLE STYLES
   ========================================= */
/* Blog Page */
.blog-page-section h1 {
    color: var(--secondary-color);
}

.article-card {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-content {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-category {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    align-self: flex-start;
    margin-bottom: 15px;
}

.article-content h3 {
    color: var(--primary-color);
    margin: 0 0 10px;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-content p {
    color: #666;
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: bold;
    margin-top: 15px;
    align-self: flex-start;
    transition: color 0.3s ease;
}

.article-card:hover .read-more {
    color: var(--secondary-color);
}

/* Article Page (Single) */
.article-page-container {
    padding: 60px 0;
}

.article-body {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    color: var(--text-color);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
}

/* Font Fixes */
.article-body h1,
.article-body h2,
.article-body p,
.article-body ul li,
.article-body blockquote,
.article-meta span {
    font-family: var(--font-family-ar) !important;
}

body.en .article-body h1,
body.en .article-body h2,
body.en .article-body p,
body.en .article-body ul li,
body.en .article-body blockquote,
body.en .article-meta span {
    font-family: var(--font-family-en) !important;
}

.article-body h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 15px;
}

.article-body h2 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 50px 0 20px;
    padding-right: 20px;
    border-right: 4px solid var(--secondary-color);
}

.article-body p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #444;
    margin-bottom: 25px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-meta i {
    color: var(--secondary-color);
}

.article-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 40px;
}

.article-body ul {
    list-style: none;
    padding-right: 0;
    margin-bottom: 30px;
}

.article-body ul li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    padding-right: 35px;
    position: relative;
    margin-bottom: 15px;
}

.article-body ul li::before {
    content: '\f058';
    /* Check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    top: 5px;
    right: 0;
    font-size: 1.1rem;
}

.article-body blockquote {
    margin: 50px 0;
    padding: 25px;
    background: #f9f9f9;
    border-right: 5px solid var(--secondary-color);
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    line-height: 1.7;
}

/* Article LTR Overrides */
html[dir="ltr"] .article-body h2 {
    padding-right: 0;
    padding-left: 20px;
    border-right: none;
    border-left: 4px solid var(--secondary-color);
}

html[dir="ltr"] .article-body ul li {
    padding-right: 0;
    padding-left: 35px;
}

html[dir="ltr"] .article-body ul li::before {
    right: auto;
    left: 0;
}

html[dir="ltr"] .article-body blockquote {
    border-right: none;
    border-left: 5px solid var(--secondary-color);
}

/* =========================================
   10. INTERACTIVE & MODALS
   ========================================= */
/* Floating Icons */
.contacts-icons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.contacts-icons a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.contacts-icons a:hover {
    transform: scale(1.1);
}

.phone-btns {
    background: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.whatsapp-btns {
    background: #25d366;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 80%;
    max-height: 90vh;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-modal:hover {
    color: var(--secondary-color);
}

/* =========================================
   11. RESPONSIVE DESIGN (Media Queries)
   ========================================= */
@media (max-width: 990px) {
    .section-padding {
        padding: 40px 15px;
        margin: 15px 5px;
    }

    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        text-align: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        display: flex;
    }

    .nav ul {
        flex-direction: column;
        width: 100%;
    }

    .nav ul li {
        width: 100%;
    }

    .nav ul li a {
        padding: 15px;
        border-bottom: 1px solid #f0f0f0;
    }

    .menu-toggle {
        display: block;
    }

    .header .container {
        padding: 0 15px;
    }

    .header-actions .contact-icons {
        display: none;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Article responsive */
    .article-body {
        padding: 25px;
    }

    .article-body h1 {
        font-size: 2.1rem;
    }

    .article-body h2 {
        font-size: 1.6rem;
    }
}






/* --- تنسيق العنوان الفرعي --- */
.subsection-header {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* خط فاصل خفيف */
    padding-top: 40px;
}

.subsection-title {
    font-size: 2rem;
    color: var(--secondary-color);
    /* اللون الذهبي */
    margin-bottom: 10px;
}

.subsection-desc {
    color: var(--light-text-color);
    font-size: 1rem;
}

/* --- تنسيق بطاقات المشاريع الجديدة --- */
.project-card {
    background: var(--light-color);
    /* خلفية بيضاء */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-speed);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.project-img-wrapper {
    width: 100%;
    height: 220px;
    /* ارتفاع ثابت للصور */
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image {
    transform: scale(1.1);
    /* تكبير الصورة عند التحويم */
}

.project-info {
    padding: 15px;
    text-align: center;
    border-top: 4px solid var(--secondary-color);
    /* خط ذهبي فوق النص */
}

.project-info h4 {
    margin: 0;
    color: var(--primary-color);
    /* اللون الأزرق الداكن */
    font-size: 1.2rem;
    font-weight: 700;
}




/* --- تعديل شبكة المشاريع لتكون 3 أعمدة --- */
.projects-grid {
    /* هذا السطر يجبر المتصفح على عرض 3 أعمدة متساوية */
    grid-template-columns: repeat(3, 1fr) !important;
}

/* --- تنسيق للتجاوب مع الشاشات الأصغر (مهم جداً) --- */

/* على التابلت والشاشات المتوسطة: نعرض 2 في الصف */
@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* على الجوال: نعرض 1 في الصف (عمود كامل) */
@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr !important;
    }
}