/* ========================================
   الخوارزمي للحلول الذكية - Main Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #F4AB27;
    --primary-dark: #d9951f;
    --primary-light: #ffc857;
    --secondary-color: #24358A;
    --secondary-dark: #1a2866;
    --secondary-light: #3a4db3;
    --text-dark: #1a1a2e;
    --text-light: #6b7280;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --font-arabic: 'Tajawal', sans-serif;
    --font-english: 'Poppins', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-arabic);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

body.ltr {
    font-family: var(--font-english);
    direction: ltr;
}

body.rtl {
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ========================================
   Header Styles
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.header-top {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
}

.company-name h1 {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Navigation */
.main-nav {
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
}

.main-nav .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: 15px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    position: relative;
    transition: var(--transition-normal);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition-normal);
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    width: 80%;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white) !important;
    border-radius: var(--border-radius);
    padding: 10px 20px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-download::after {
    display: none !important;
}

.btn-lang {
    background: var(--secondary-color);
    color: var(--white) !important;
    border-radius: var(--border-radius);
    padding: 10px 20px !important;
    font-weight: 600;
}

.btn-lang:hover {
    background: var(--secondary-light);
}

.btn-lang::after {
    display: none !important;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition-normal);
    border-radius: 2px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    margin-top: 160px;
    min-height: calc(100vh - 400px);
}

/* ========================================
   Slider Styles
   ======================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(36, 53, 138, 0.7) 0%, rgba(244, 171, 39, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-content {
    text-align: center;
    color: var(--white);
    padding: 20px;
    animation: fadeInUp 0.8s ease;
}

.slide-content h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: var(--transition-normal);
}

.slider-dot.active,
.slider-dot:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.2);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--primary-color);
}

.slider-arrow.prev {
    left: 30px;
}

.slider-arrow.next {
    right: 30px;
}

/* ========================================
   Section Styles
   ======================================== */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 20px auto 0;
}

/* ========================================
   Saba Track Section
   ======================================== */
.sabatrack-section {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--gray-100) 100%);
}

.sabatrack-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.sabatrack-image {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.sabatrack-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.sabatrack-image:hover img {
    transform: scale(1.05);
}

.sabatrack-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    z-index: -1;
}

.sabatrack-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.sabatrack-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.9;
}

/* ========================================
   Projects Section
   ======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.project-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   Partners Section
   ======================================== */
.partners-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: var(--white);
}

.partners-section .section-title h2 {
    color: var(--white);
}

.partners-section .section-title h2::after {
    background: var(--primary-color);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.partner-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.partner-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.partner-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.partner-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* ========================================
   About Section
   ======================================== */
.about-section {
    background: linear-gradient(135deg, var(--off-white) 0%, var(--white) 100%);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.about-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.about-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.about-card h3 i {
    color: var(--primary-color);
    font-size: 1.8rem;
}

.about-card p {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.9;
}

/* ========================================
   Footer Styles
   ======================================== */
.main-footer {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 50px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary-color);
}

.footer-info p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-info p i {
    color: var(--primary-color);
    width: 20px;
}

.footer-info a {
    color: var(--white);
    transition: var(--transition-fast);
}

.footer-info a:hover {
    color: var(--primary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: var(--transition-normal);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.social-link:hover {
    transform: translateY(-5px);
}

.social-link.whatsapp:hover {
    background: #25D366;
}

.social-link.facebook:hover {
    background: #1877F2;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-link.maps:hover {
    background: #EA4335;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    background: var(--off-white);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(244, 171, 39, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-normal);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Partner Detail Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .sabatrack-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-grid {
        gap: 25px;
    }
    
    .about-card {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-top: 140px;
    }
    
    .company-name h1 {
        font-size: 1.3rem;
    }
    
    .logo {
        width: 50px;
        height: 50px;
    }
    
    .logo-placeholder {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 140px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition-normal);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu li a {
        display: block;
        padding: 15px 10px;
    }
    
    .hero-slider {
        height: 60vh;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-info p {
        justify-content: center;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
    
    .about-card {
        padding: 25px 20px;
    }
    
    .about-card h3 {
        font-size: 1.2rem;
    }
}

/* ========================================
   RTL Specific Styles
   ======================================== */
body.rtl .about-card::before {
    left: auto;
    right: 0;
}

body.rtl .slider-arrow.prev {
    left: auto;
    right: 30px;
}

body.rtl .slider-arrow.next {
    right: auto;
    left: 30px;
}

body.ltr .slider-arrow.prev {
    right: auto;
    left: 30px;
}

body.ltr .slider-arrow.next {
    left: auto;
    right: 30px;
}

@media (max-width: 768px) {
    body.rtl .slider-arrow.prev {
        right: 10px;
    }
    
    body.rtl .slider-arrow.next {
        left: 10px;
    }
}

