:root {
    --primary-color: #102E50;
    --secondary-color: #F5C45E;
    --accent-color-1: #E78B48;
    --accent-color-2: #BE3D2A;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Add Tajawal font for Arabic */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

/* تنسيقات عامة لمنع ظهور شريط التمرير الأفقي */
.container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

.row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-left: 0;
    margin-right: 0;
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color);
    padding: 15px 0;
    transition: all 0.3s ease;
    width: 100%;
    right: 0;
    left: 0;
    position: fixed;
    top: 0;
    box-sizing: border-box;
}

.navbar.scrolled {
    padding: 8px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 50px;
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    font-weight: 500;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--secondary-color);
}

/* Hero Section styles moved to hero-slider.css */

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--accent-color-1);
    border-color: var(--accent-color-1);
    color: white;
}

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

.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

/* Services Section */
.services-section {
    background-color: white;
}

.service-card {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    background-color: white;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    font-size: 2rem;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Projects Section - محسن للأداء */
.projects-section {
    background-color: var(--light-color);
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
    contain: layout style paint;
    transform: translateZ(0);
}

.project-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.2s ease-out;
    backface-visibility: hidden;
    transform: translateZ(0);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* تم حذف جميع CSS المتعلق بـ lazy loading */

/* Modal image loading state */
.project-modal-image.loading {
    background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='%23007bff'%3E%3Ccircle cx='20' cy='20' r='3'%3E%3Canimate attributeName='opacity' values='1;0;1' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='12' cy='20' r='3' opacity='0.5'%3E%3Canimate attributeName='opacity' values='1;0;1' dur='1s' begin='0.33s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='28' cy='20' r='3' opacity='0.5'%3E%3Canimate attributeName='opacity' values='1;0;1' dur='1s' begin='0.66s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E") no-repeat center;
    background-size: 40px 40px;
    min-height: 200px;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 46, 80, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-out;
    pointer-events: none;
    transform: translateZ(0);
    will-change: opacity;
}

.project-card:hover .project-overlay {
    opacity: 1;
    pointer-events: auto;
}

.project-card:hover .project-img {
    transform: scale(1.03) translateZ(0);
}

/* تحسينات الأداء العامة */
.project-card * {
    box-sizing: border-box;
}

/* تحسين الرسم للمتصفحات */
@media (prefers-reduced-motion: reduce) {
    .project-img,
    .project-overlay {
        transition: none !important;
    }

    .project-card:hover .project-img {
        transform: none !important;
    }
}

/* تحسين الأداء للتصفية */
.project-card {
    display: block !important; /* عرض جميع المشاريع افتراض<|im_start|> */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.project-card.d-none {
    display: none !important;
    opacity: 0;
}

.project-card.d-block {
    display: block !important;
    opacity: 1;
}

/* Filter Buttons Horizontal Scroll - Mobile Responsive */
.filter-container {
    position: relative;
    width: 100%;
}

.filter-scroll-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-buttons-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 5px 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.filter-buttons-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.filter-buttons-scroll .filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: fit-content;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    /* الألوان ستأتي من dynamic-theme.php */
}

.filter-buttons-scroll .filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.filter-buttons-scroll .filter-btn:hover::before {
    left: 100%;
}

.filter-buttons-scroll .filter-btn:hover {
    transform: translateY(-2px);
    /* الألوان والتأثيرات ستأتي من dynamic-theme.php */
}

.filter-buttons-scroll .filter-btn.active {
    transform: translateY(-1px);
    /* الألوان والتأثيرات ستأتي من dynamic-theme.php */
}

.filter-buttons-scroll .filter-btn.active:hover {
    transform: translateY(-3px);
    /* الألوان والتأثيرات ستأتي من dynamic-theme.php */
}

.filter-buttons-scroll .filter-btn i {
    font-size: 12px;
    margin-left: 5px;
}

/* Scroll Indicators */
.scroll-indicators {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    z-index: 10;
}

.scroll-indicator {
    position: absolute;
    top: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    /* الألوان ستأتي من dynamic-theme.php */
}

.scroll-indicator.show {
    opacity: 1;
    visibility: visible;
}

.scroll-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* الألوان ستأتي من dynamic-theme.php */
}

.scroll-indicator.left {
    left: 5px;
}

.scroll-indicator.right {
    right: 5px;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .filter-scroll-wrapper {
        background: transparent;
        backdrop-filter: none;
        padding: 0;
        box-shadow: none;
    }

    .filter-buttons-scroll {
        justify-content: center;
        flex-wrap: wrap;
        overflow: visible;
        gap: 15px;
    }

    .filter-buttons-scroll .filter-btn {
        padding: 10px 20px;
        font-size: 15px;
        min-width: auto;
    }

    .scroll-indicators {
        display: none !important;
    }
}

/* Mobile Enhancements */
@media (max-width: 767px) {
    .filter-container {
        margin: 0 -15px;
        padding: 0 15px;
    }

    .filter-scroll-wrapper {
        margin: 0 10px;
    }

    .filter-buttons-scroll {
        padding: 10px 15px;
    }

    .filter-buttons-scroll .filter-btn {
        padding: 10px 15px;
        font-size: 13px;
        border-radius: 20px;
    }

    .filter-buttons-scroll .filter-btn i {
        font-size: 11px;
    }
}

/* Touch Scroll Enhancement */
@media (hover: none) and (pointer: coarse) {
    .filter-buttons-scroll {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }

    .filter-buttons-scroll .filter-btn {
        scroll-snap-align: center;
    }
}

.project-overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
}

.project-overlay-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Videos Section */
.videos-section {
    background-color: white;
}

.video-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 30px;
}

.video-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-play-btn:hover {
    background-color: var(--accent-color-1);
    color: white;
}

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

.testimonial-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.testimonial-content {
    position: relative;
    padding: 20px 0;
}

.testimonial-content::before {
    content: '\201C';
    font-size: 4rem;
    position: absolute;
    top: -20px;
    left: -10px;
    color: var(--secondary-color);
    opacity: 0.3;
}

.client-info {
    display: flex;
    align-items: center;
    margin-top: 20px;
}

.client-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.client-details h5 {
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.client-details p {
    margin-bottom: 0;
    color: #777;
}

/* Contact Section */
.contact-section {
    background-color: white;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
}

.contact-details h5 {
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.contact-form .form-control {
    height: 50px;
    border-radius: 8px;
    margin-bottom: 0;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.contact-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 46, 80, 0.15);
    outline: none;
}

.contact-form textarea.form-control {
    height: 150px;
    resize: none;
}

.contact-form .btn-primary {
    height: 50px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 25px;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    width: 100%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: white;
}

.contact-form .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
}

.footer h5 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

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

.footer ul li a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-info li i {
    margin-right: 10px;
    color: var(--secondary-color);
}

.social-icons {
    margin-top: 20px;
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Feature Icon */
.feature-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    border-radius: 50%;
    margin-right: 15px;
    transition: all 0.3s ease;
}

/* Filter Buttons */
.filter-buttons {
    margin-bottom: 30px;
}

.filter-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    margin: 0 5px;
    border-radius: 30px;
    padding: 8px 20px;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Video Info */
.video-info {
    background-color: white;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.video-info h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

/* Project Modal */
.project-modal-image {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-modal-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 10px;
}

.project-modal-category {
    background-color: var(--primary-color);
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 30px;
}

/* Video Modal */
.modal-content {
    border-radius: 15px;
    overflow: hidden;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

.modal-header .btn-close {
    color: white;
    opacity: 1;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Effects */
.service-icon {
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: rotateY(180deg);
}

.video-container:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-container:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.2);
    background-color: var(--accent-color-1);
    color: white;
}

.testimonial-card {
    transition: all 0.3s ease;
}

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

.contact-info-item {
    transition: all 0.3s ease;
}

.contact-info-item:hover .contact-icon {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* تصحيح مشكلة الهيدر في الجوالات الصغيرة */
@media (max-width: 576px) {
    .navbar {
        width: 100%;
        right: 0;
        left: 0;
        margin: 0;
        padding: 8px 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-toggler {
        margin-left: 0;
    }

    .navbar-brand img {
        height: 40px !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

/* Active Nav Link */
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .service-card {
        margin-bottom: 30px;
    }

    .project-card {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .section-title h2 {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .feature-icon {
        margin-bottom: 15px;
    }

    .contact-info-item {
        margin-bottom: 20px;
    }

    .contact-form .form-control {
        height: 45px;
        font-size: 14px;
        padding: 10px 12px;
    }

    .contact-form textarea.form-control {
        height: 120px;
    }

    .contact-form .btn-primary {
        height: 45px;
        font-size: 14px;
        padding: 10px 20px;
    }

    .navbar {
        width: 100%;
        right: 0;
        left: 0;
        margin: 0;
        padding: 10px 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-toggler {
        margin-left: 0;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
    

}
