/* CSS Reset وخصائص عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #063a66;
    --secondary-color: #3f9d99;
    --accent-color: #107658;
    --price-btn-color: #107658; /* لون زر طلب السعر */
    --light-color: #f8f9fa;
    --dark-color: #333;
    --gray-color: #6c757d;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --header-height: 64px;
    --header-bg-alpha: rgba(6, 58, 102, 0.85);
    
    /* ألوان الوضع الليلي */
    --bg-color: #fff;
    --text-color: #333;
    --card-bg: #fff;
    --section-bg: #f8f9fa;
    --footer-bg: #063a66;
    --header-bg: #063a66;
    --input-bg: #fff;
    --input-border: #ddd;
    --social-bg: rgba(0, 0, 0, 0.12);
}

/* الوضع الليلي */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --card-bg: #1e1e1e;
    --section-bg: #1a1a1a;
    --footer-bg: #0a1929;
    --header-bg: #0a1929;
    --header-bg-alpha: rgba(10, 25, 41, 0.85);
    --input-bg: #2d2d2d;
    --input-border: #444;
    --social-bg: rgba(255, 255, 255, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    background-color: var(--section-bg);
    transition: background-color 0.3s ease;
}

section:not(.services):not(.form-section):not(.partners) {
    background-color: var(--bg-color);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    font-size: 2.2rem;
    position: relative;
    font-weight: 700;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    bottom: -12px;
    right: 50%;
    transform: translateX(50%);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1rem;
    text-align: center;
}

.btn:hover {
    background-color: #0e654a;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #052a4a;
}

.btn-price {
    background-color: var(--price-btn-color);
}

.btn-price:hover {
    background-color: #0e654a;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

/* زر الواتساب العائم - مطابق لإرشادات واتساب */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 40px;
    left: 40px;
    background-color: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
    text-decoration: none !important;
    overflow: hidden;
}

.whatsapp-float:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    text-decoration: none;
}

.whatsapp-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
    width: 28px;
    height: 28px;
}

.whatsapp-float:hover .whatsapp-icon {
    transform: scale(1.1);
}

.whatsapp-float.hidden {
    opacity: 0;
    transform: translateY(120%);
    pointer-events: none;
}

/* Navbar */
header {
    background-color: var(--header-bg-alpha);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    min-height: var(--header-height);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--secondary-color);
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
    filter: none;
    transition: transform 0.2s ease;
}

.logo:hover .brand-logo {
    transform: scale(1.03);
}

.brand-text {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    display: inline-block;
}

@media (max-width: 992px) {
    :root { --header-height: 60px; }
    .brand-logo { height: 32px; }
    .brand-text { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    :root { --header-height: 56px; }
    .brand-logo { height: 32px; }
    .brand-text { font-size: 1.4rem; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* زر الوضع الليلي */
.theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: rotate(30deg);
}

.theme-toggle .icon-sun {
    display: none;
}

body.dark-mode .theme-toggle .icon-moon {
    display: none;
}

body.dark-mode .theme-toggle .icon-sun {
    display: block;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    position: relative;
    z-index: 1100;
}

.mobile-menu-btn .icon-close { display: none; }
.mobile-menu-btn.open .icon-menu { display: none; }
.mobile-menu-btn.open .icon-close { display: inline-block; }

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(6, 58, 102, 0.85), rgba(6, 58, 102, 0.9)), 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');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: var(--header-height);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--gray-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.value-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background-color: var(--card-bg);
}

.value-item:hover {
    transform: translateY(-10px);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.value-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Services Section */
.services {
    background-color: var(--section-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.service-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-content p {
    color: var(--gray-color);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    height: 250px;
    cursor: pointer;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    background: linear-gradient(transparent, rgba(6, 58, 102, 0.9));
    color: white;
    padding: 20px;
    transform: translateY(10px);
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* Modal لعرض تفاصيل المشروع */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.project-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 25px 30px;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.project-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.project-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .project-details {
        grid-template-columns: 1fr;
    }
}

.project-info h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.project-info p {
    color: var(--gray-color);
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-specs {
    background-color: var(--section-bg);
    padding: 20px;
    border-radius: 8px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--input-border);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 600;
    color: var(--primary-color);
}

.spec-value {
    color: var(--gray-color);
}

.modal-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--input-border);
}

.nav-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background-color: #052a4a;
    transform: translateY(-3px);
}

.nav-btn.prev i {
    order: 1;
}

.nav-btn.next i {
    order: 2;
}

/* شركائنا Section */
.partners {
    background-color: var(--section-bg);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    justify-items: center;
}

.partner-item {
    width: 150px;
    height: 100px;
    background-color: var(--card-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    padding: 15px;
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.partner-logo {
    max-width: 100%;
    max-height: 70px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.partner-item:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* WhatsApp Form */
.form-section {
    background-color: var(--section-bg);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 5px solid var(--secondary-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--input-border);
    border-radius: 4px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--input-bg);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(63, 157, 153, 0.2);
}

.form-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 60px 0 30px;
    transition: background-color 0.3s ease;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.footer-logo span {
    color: var(--secondary-color);
}

.footer-about p {
    margin-bottom: 20px;
    opacity: 0.8;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after, .footer-contact h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: 0;
    right: 0;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-right: 8px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--social-bg);
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.social-links a.facebook:hover { background-color: #1877F2; }
.social-links a.twitter:hover { background-color: #000000; }
.social-links a.instagram:hover { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
.social-links a.linkedin:hover { background-color: #0077B5; }

.social-links a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.social-icon {
    width: 22px;
    height: 22px;
    display: block;
    filter: none;
    opacity: 0.95;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-links a:hover .social-icon {
    transform: scale(1.08);
    opacity: 1;
}

@media (max-width: 768px) {
    .social-links {
        gap: 12px;
    }
    .social-links a {
        width: 40px;
        height: 40px;
    }
    .social-icon {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .social-links a,
    .social-icon {
        transition: none !important;
    }
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1055px) {
    .navbar {
        padding: 8px 0;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        flex-direction: column;
        background-color: var(--header-bg);
        width: 100%;
        text-align: center;
        padding: 20px;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        gap: 0;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        z-index: 1050;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links li {
        margin-bottom: 15px;
    }
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
    }
    .theme-toggle {
        margin-left: 10px;
    }
}
@media (max-width: 768px) {
    .navbar {
        padding: 8px 0;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        flex-direction: column;
        background-color: var(--header-bg);
        width: 100%;
        text-align: center;
        padding: 20px;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        gap: 0;
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
        z-index: 1050;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin-bottom: 15px;
    }
    .nav-links a {
        display: block;
        padding: 12px 0;
        font-size: 1.1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-title {
        font-size: 1.8rem;
    }

    section {
        padding: 60px 0;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 30px;
        left: 20px;
    }
    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }
    .brand-logo {
        height: 36px;
    }
    
    .theme-toggle {
        margin-left: 10px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .project-image {
        height: 300px;
    }
}

header.shrink {
    --header-height: 56px;
}
@media (max-width: 576px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .partner-item {
        width: 130px;
        height: 90px;
    }
    
    .nav-links {
        gap: 5px;
    }
    
    .project-image {
        height: 200px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

.char-f-boost {
    display: inline-block;
    font-size: 1.12em;
    line-height: 1;
    vertical-align: -0.02em;
}
