/* استيراد خط IBM Plex Sans Arabic من جوجل */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* انتقال سلس للروابط الداخلية */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
    text-align: right;
}

/* متغيرات الألوان */
:root {
    --primary-color: #0a4b78;
    --secondary-color: #1e6091;
    --accent-color: #2980b9;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

/* تحسينات SEO وإمكانية الوصول */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* الحاوي الرئيسي */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* الهيدر والتنقل */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 82px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05) rotateY(15deg);
    filter: drop-shadow(0 5px 15px rgba(10, 75, 120, 0.4));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-menu a:hover {
    color: var(--primary-color);
    background-color: rgba(10, 75, 120, 0.1);
}

/* القائمة المحمولة */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="70" r="1" fill="rgba(255,255,255,0.08)"/><circle cx="60" cy="20" r="1.2" fill="rgba(255,255,255,0.06)"/><circle cx="30" cy="80" r="0.8" fill="rgba(255,255,255,0.1)"/></svg>'),
        url('../qtoofapps_charucter .png') no-repeat center right;
    background-size: 300px 300px, contain;
    opacity: 0.7;
    z-index: 1;
    animation: gentleFloat 25s ease-in-out infinite;
}

@keyframes gentleFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        background-position: 0 0, center right;
    }
    50% { 
        transform: translateY(-15px) rotate(180deg);
        background-position: 20px 10px, center right;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 60%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--white);
    line-height: 1.2;
    text-shadow: 
        0 2px 10px rgba(0,0,0,0.3),
        0 0 20px rgba(255,255,255,0.1),
        0 0 40px rgba(41,128,185,0.1);
    animation: textGlow 4s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { 
        text-shadow: 
            0 2px 10px rgba(0,0,0,0.3),
            0 0 20px rgba(255,255,255,0.1),
            0 0 40px rgba(41,128,185,0.1);
    }
    50% { 
        text-shadow: 
            0 2px 10px rgba(0,0,0,0.3),
            0 0 30px rgba(255,255,255,0.2),
            0 0 60px rgba(41,128,185,0.2);
    }
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* الأقسام */
.section {
    padding: 80px 0;
}

/* قسم مع pattern اللوجو */
.section-with-pattern {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.section-with-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/logo-large.png') no-repeat;
    background-size: 200px 200px;
    background-position: 85% 15%;
    opacity: 0.03;
    filter: brightness(0);
    z-index: 1;
    pointer-events: none;
    animation: subtleMove 30s ease-in-out infinite;
}

@keyframes subtleMove {
    0%, 100% { 
        background-position: 85% 15%;
        transform: rotate(0deg);
    }
    25% { 
        background-position: 90% 20%;
        transform: rotate(5deg);
    }
    50% { 
        background-position: 80% 25%;
        transform: rotate(0deg);
    }
    75% { 
        background-position: 88% 18%;
        transform: rotate(-3deg);
    }
}

/* pattern للأقسام الملونة */
.section-with-pattern[style*="background"] {
    position: relative;
    overflow: hidden;
}

.section-with-pattern[style*="background"]::before {
    filter: brightness(0) invert(1);
    opacity: 0.08;
    background-size: 180px 180px;
    background-position: 80% 20%;
}

.section-with-pattern > * {
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* شبكة الخدمات */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* نموذج الاتصال */
.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

/* تأثير عند الوصول للنموذج */
#booking-form:target {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    border: 2px solid var(--primary-color);
    animation: highlightForm 2s ease-in-out;
}

@keyframes highlightForm {
    0% { 
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
        transform: scale(1.02);
    }
    50% { 
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.4);
        transform: scale(1.03);
    }
    100% { 
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
        transform: scale(1);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

/* الفوتر */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/logo-large.png') no-repeat;
    background-size: 150px 150px;
    background-position: 90% 10%;
    opacity: 0.04;
    filter: brightness(0) invert(1);
    z-index: 1;
    pointer-events: none;
    animation: footerGlow 20s ease-in-out infinite;
}

@keyframes footerGlow {
    0%, 100% { 
        background-position: 90% 10%;
        opacity: 0.04;
    }
    50% { 
        background-position: 85% 15%;
        opacity: 0.06;
    }
}

footer > * {
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

/* تنسيق شعار الفوتر */
.footer-section img {
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

.footer-section img:hover {
    transform: scale(1.05);
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    color: #95a5a6;
}

/* التجاوب مع الأجهزة المحمولة */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    /* تنسيق الشعار للأجهزة المحمولة */
    .logo {
        font-size: 1.4rem;
    }
    
    .logo img {
        height: 60px;
    }
    
    .logo span {
        margin-right: 8px !important;
        font-size: 1.4rem !important;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 2rem;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

/* تحسينات إضافية للأداء */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

/* رسائل التأكيد */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* تحسين صفحة نظام المحادثة */
.feature-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 4rem 0;
    margin: 4rem 0;
    border-radius: var(--border-radius);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.feature-item h4 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.feature-item p {
    opacity: 0.9;
}

/* تحسينات الهيدر */
.hero {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.hero-content {
    transform: translateZ(50px);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
