/* ملف style.css مع إصلاح الهيدر */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&display=swap');

:root {
    --primary-color: #2D765B;
    --secondary-color: #A19158;
    --dark-color: #1a1a1a;
    --light-color: #f1f8f5;
    --gray-color: #6c757d;
    --transition: all 0.3s ease;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --container-padding: 15px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    direction: rtl;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-top: var(--header-height);
    /* إضافة padding لتعويض الهيدر الثابت */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ====== إصلاح الهيدر والقائمة المتنقلة ====== */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    z-index: 1002;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    display: flex;

}

.logo-img img {
    display: flex;
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 2px;
}

.logo-text p {
    font-size: 14px;
    color: var(--secondary-color);
    font-weight: 500;

}

.logo-img-vision img {
    height: 45px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* زر القائمة المتنقلة */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 4px;
    transition: var(--transition);
    z-index: 1002;
}

.mobile-toggle:hover {
    background-color: var(--light-color);
}

.mobile-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* القائمة المتنقلة - تصميم ديسكتوب أولاً */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 4px;
    transition: var(--transition);
    display: block;
    font-size: 0.95rem;
    position: relative;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-color);
    /* border-bottom: 2px solid #333; */

}

.nav-link.active {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 15px;
    left: 15px;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* ====== إصلاحات للشاشات الصغيرة ====== */
@media (max-width: 992px) {
    .header-container {
        justify-content: space-between;
    }

    .logo-img-vision {
        display: none;
        /* إخفاء شعار الرؤية على الشاشات الصغيرة */
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    body {
        padding-top: var(--header-height);
    }

    header {
        height: var(--header-height);
        padding: 0 10px;
    }

    .logo {
        gap: 8px;
    }

    .logo-img img {
        height: 40px;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }

    /* إظهار زر القائمة المتنقلة */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 3;
    }

    /* إخفاء القائمة المتنقلة بشكل افتراضي على الهواتف */
    .main-nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        overflow-y: auto;
        z-index: 1001;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px 0;
    }

    .main-nav.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
        padding: 0;
    }

    .nav-item {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 18px 25px;
        width: 100%;
        border-radius: 0;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-link.active {
        background-color: var(--light-color);
        color: var(--primary-color);
        border-right: 4px solid var(--primary-color);
    }

    /* إضافة سهم للعناصر الفرعية (للمستقبل) */
    .nav-link.has-dropdown::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.9rem;
        transition: transform 0.3s;
    }

    .nav-item.active>.nav-link.has-dropdown::after {
        transform: rotate(180deg);
    }

    /* منع التمرير عند فتح القائمة */
    body.no-scroll {
        overflow: hidden;
    }

    /* زر العودة للأعلى على الهواتف */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* تحسينات للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    :root {
        --header-height: 65px;
    }

    .logo {
        gap: 5px;
    }

    .logo-img img {
        height: 35px;
    }

    .logo-text h1 {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .logo-text p {
        font-size: 0.7rem;
    }

    .mobile-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .nav-link {
        padding: 16px 20px;
    }
}

/* تحسينات للشاشات المتوسطة (تابلت) */
@media (min-width: 769px) and (max-width: 992px) {
    .nav-menu {
        gap: 3px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 1200px) {
    .nav-menu {
        gap: 10px;
    }

    .nav-link {
        padding: 12px 18px;
        font-size: 1rem;
    }
}

/* ====== باقي الأنماط تبقى كما هي مع تعديلات طفيفة ====== */

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('/images/RAMADAN_KAREEM.webp') 
         /* url('/images/project/image_nassernahdi_1 (25).jpeg')  */
        no-repeat center center/cover;
    /* url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80') no-repeat center center/cover; */
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 100px 0 60px;
    margin-top: calc(-1 * var(--header-height));
    /* تعويض padding body */
}

/* Sections */
section {
    padding: 60px 0;
    scroll-margin-top: var(--header-height);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    min-height: 44px;
    min-width: 44px;
    text-align: center;
}

.btn:hover {
    background-color: #246048;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #8a7a4a;
}



.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: white;
    line-height: 1.3;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}


.btn:active {
    transform: translateY(-1px);
}



.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    min-height: 36px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Sections Common Styling */
section {
    padding: 60px 0;
    scroll-margin-top: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-title p {
    color: var(--gray-color);
    max-width: 700px;
    margin: 20px auto 0;
    line-height: 1.6;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h3 {
    font-size: 1.6rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-text p {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.7;
}

.about-image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

/* Services Section */
.services {
    background-color: var(--light-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.service-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    line-height: 1.3;
}

.service-content p {
    color: var(--gray-color);
    margin-bottom: 20px;
    flex: 1;
    line-height: 1.6;
}

/* Values Section */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.value-item {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
    height: 100%;
}

.value-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    border-top: 4px solid var(--secondary-color);
}

.value-item:hover h4,
.value-item:hover p {
    color: white;
}

.value-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.value-item:hover .value-icon {
    color: white;
}

.value-item h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.value-item p {
    color: var(--gray-color);
    transition: var(--transition);
    line-height: 1.5;
}

/* Projects Section */
.projects {
    background-color: #f8f9fa;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.project-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-content p {
    color: var(--gray-color);
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

/* FAQ Section */
.faq-section {
    background-color: var(--light-color);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-color);
    transition: var(--transition);
    -webkit-user-select: none;
    user-select: none;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s;
    font-size: 0.9rem;
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--gray-color);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 0 25px 25px;
    max-height: 500px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Contact Section */
.contact-hero {
    background: linear-gradient(rgba(45, 118, 91, 0.9), rgba(45, 118, 91, 0.9)),
        url('https://images.unsplash.com/photo-1521791136064-7986c2920216?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1169&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 60px 0;
}

.contact-hero h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.contact-hero p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-info {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

.contact-details {
    margin-top: 25px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.contact-icon i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.contact-content h4,
.contact-content-social h4 {
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.contact-content p {
    color: var(--gray-color);
    margin-bottom: 5px;
    line-height: 1.5;
}

.footer-contact a,
.contact-content a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
}

.footer-contact a:hover,
.contact-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-content-social .social-links {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: #f1f1f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form-container {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-form-container h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-color);
}

.contact-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #f9f9f9;
    font-family: 'Cairo', sans-serif;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(45, 118, 91, 0.1);
}

.form-group textarea {
    min-height: 120px;
}

.form-group .error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #246149;
}

.form-response {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-weight: 600;
    text-align: center;
}

.form-response.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-response.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Map Section */
.map-section {
    margin-top: 40px;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    height: 400px;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

.map-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.logo-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 30px;

}

.footer-logo-description p {
    font-size: 14px;

    font-weight: 500;

}

.logo-text-footer h1 {
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 2px;
}

.logo-text-footer p {
    font-size: 15.7px;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 2px;
}

.footer-logo-description p {
    color: #aaa;
    line-height: 1.6;
}




.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 2px 0;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-right: 5px;
}

.footer-contact p {
    color: #aaa;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.footer-contact i {
    margin-left: 10px;
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    color: white;
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.back-to-top.show {
    display: flex;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    background-color: #1ebe5b;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.whatsapp-float i {
    pointer-events: none;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 80px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Media Queries for Responsive Design */

/* Tablets and Small Desktops */
@media (min-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .section-title h2 {
        font-size: 2.2rem;
    }

    .about-content {
        grid-template-columns: 1fr 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .logo-text h1 {
        font-size: 18px;
    }

    #mainNav ul {
        gap: 15px;
    }

    #mainNav ul li a {
        font-size: 1rem;
        padding: 10px 15px;
    }

}

/* Medium Desktops */
@media (min-width: 992px) {
    .hero h2 {
        font-size: 3rem;
    }

    .section-title h2 {
        font-size: 2.5rem;
    }

    .about-text h3 {
        font-size: 1.8rem;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    /* .logo-text h1 {
        font-size: 1.5rem;
    } */
}

/* Large Desktops */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-content {
        padding: 40px;
    }
}

/* Mobile Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 150vh;
        padding: 120px 0 80px;
    }

    .logo-img img,
    .logo-img-vision img {
        height: 40px;
    }

    .mobile-toggle {
        width: 35px;
        height: 35px;
    }
}

/* High Resolution Screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
           url('/images/RAMADAN.jpg') 
        /* url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2200&q=80'); */
    }
}

/* Print Styles */
@media print {

    header,
    .hero-buttons,
    .contact-form-container,
    .map-section,
    footer,
    .back-to-top {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .btn {
        display: none;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}


/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {

    .btn:hover,
    .service-card:hover,
    .project-card:hover,
    .value-item:hover,
    .social-links a:hover {
        transform: none;
    }

    .service-card:active,
    .project-card:active {
        transform: scale(0.98);
    }

    .btn:active {
        transform: scale(0.95);
    }

    .faq-question {
        padding: 25px;
    }

    #mainNav ul li a {
        padding: 15px 20px;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .services-grid,
    .projects-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .logo-text-footer h1 {
        font-size: 15px;
        color: var(--primary-color);
        line-height: 1.3;
        margin-bottom: 2px;
    }

    .logo-text-footer p {
        font-size: 12px;

        margin: 0;
        font-weight: 400;
    }

    .modal-dialog {
        width: 94%;
        padding: 20px 18px 16px;
    }

    .modal-dialog h3 {
        font-size: 1.2rem;
    }

    .modal-dialog p {
        font-size: 0.9rem;
    }
}

/* Service Modal */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1100;
}

.modal.show {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
}

.modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 600px;
    width: 90%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 24px 22px 20px;
    box-sizing: border-box;
}

.modal-close {
    position: absolute;
    top: 10px;
    left: 10px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #000;
}

.modal-dialog h3 {
    margin: 0 0 12px;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.modal-dialog p {
    margin: 0;
    line-height: 1.7;
    color: #555;
    font-size: 0.98rem;
}

@media (max-width: 480px) {
    .modal-dialog {
        width: 94%;
        padding: 20px 18px 16px;
    }

    .modal-dialog h3 {
        font-size: 1.2rem;
    }

    .modal-dialog p {
        font-size: 0.9rem;
    }

    .logo-text-footer h1 {
        font-size: 17px;
        color: var(--primary-color);
        line-height: 1.3;
        margin-bottom: 2px;
    }

    .logo-text-footer p {
        font-size: 13.5px;

        margin: 0;
        font-weight: 400;
    }
}