/* CSS Variables */
:root {
    --primary-color: #1CA0F2;
    --primary-dark: #1480c4;
    --primary-light: #4db8f7;
    --secondary-color: #0034A1;
    --secondary-dark: #002570;
    --secondary-light: #0044b8;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #6c757d;
    --dark: #1a1a2e;
    --text-dark: #333333;
    --shadow: 0 10px 40px rgba(0, 52, 161, 0.1);
    --transition: all 0.3s ease;
}

/* LTR Text in RTL mode */
.ltr-text {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: left;
    display: inline-block;
}

/* Phone input RTL styling */
[dir="rtl"] .phone-input {
    direction: rtl;
    text-align: right;
}

/* Language Switcher */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switch {
    display: flex;
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid var(--secondary-color);
}

.lang-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: var(--secondary-color);
    font-family: 'Tajawal', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:first-child {
    background: var(--secondary-color);
    color: var(--white);
}

.lang-btn:last-child {
    background: transparent;
}

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

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

.lang-btn:first-child:hover {
    background: var(--primary-color);
}

.lang-btn:last-child:hover {
    background: var(--secondary-color);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Extra space for fixed header */
}

body {
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo-img {
    height: 60px;
    width: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--secondary-color);
    z-index: 999;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.active {
    left: 0;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
}

.mobile-nav-link {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 24px;
    font-weight: 500;
    padding: 15px;
    transition: var(--transition);
}

.mobile-nav-link:hover {
    color: var(--primary-color);
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cpath fill="%23ffffff" fill-opacity="0.05" d="M50 0c0 0-20 16-20 32s20 28 20 28 20-16 20-28-20-32-20-32z"%3E%3C/path%3E%3C/svg%3E');
    background-size: 200px 200px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

.hero-overlay {
    display: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: center;
    color: var(--white);
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: 80px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.title-line {
    display: block;
    color: var(--primary-color);
    font-size: 90px;
}

.title-sub {
    display: block;
    font-size: 40px;
    font-weight: 400;
    letter-spacing: 5px;
    margin-top: 10px;
}

.hero-description {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 15px;
}

.hero-text {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
}

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

.btn {
    display: inline-block;
    padding: 15px 40px 10px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(28, 160, 242, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    display: block;
    font-size: 60px;
    font-weight: 800;
    color: var(--primary-color);
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* Sections Common Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    padding-top: 20px; /* Extra space at top */
}

.section-title {
    font-size: 38px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--gray);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

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

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 52, 161, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    color: var(--white);
}

.service-icon svg {
    width: 40px;
    height: 40px;
}

.service-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-description {
    font-size: 15px;
    color: var(--gray);
    line-height: 1.8;
}

/* Products Section */
.products {
    background: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 52, 161, 0.15);
}

/* View All Products Button Container */
.view-all-container {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 20px;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--light-gray);
}

.product-info {
    padding: 25px;
}

.product-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 15px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.product-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: var(--secondary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text p {
    font-size: 16px;
    color: var(--gray);
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--secondary-color);
}

.feature-icon {
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.about-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact {
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 15px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.contact-icon svg {
    width: 30px;
    height: 30px;
}

.contact-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 16px;
    color: var(--gray);
}

.contact-form {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid transparent;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 16px;
    background: var(--white);
    color: var(--text-dark);
    transition: var(--transition);
}

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

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-logo p {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 15px;
    line-height: 1.6;
}

.footer-logo img {
    height: 50px;
}

.footer h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

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

.footer-links a,
.footer-services a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-services a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 14px;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding: 140px 0 60px;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .title-line {
        font-size: 64px;
    }
    
    .title-sub {
        font-size: 32px;
    }
    
    .hero-stats {
        gap: 40px;
        padding: 30px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image img {
        height: 300px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .product-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .nav-list {
        display: none;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 120px 0 50px;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .title-line {
        font-size: 42px;
    }
    
    .title-sub {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .hero-text {
        font-size: 14px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 25px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .section-header {
        padding-top: 15px;
        margin-bottom: 35px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .services-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .service-title {
        font-size: 18px;
    }
    
    .service-description {
        font-size: 13px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-description {
        font-size: 12px;
    }
    
    .about-text p {
        font-size: 14px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .about-image img {
        height: 250px;
    }
    
    .contact-content {
        gap: 30px;
    }
    
    .contact-item {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon svg {
        width: 25px;
        height: 25px;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer h4 {
        margin-bottom: 15px;
    }
    
    .footer-links ul,
    .footer-services ul {
        padding: 0;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 110px 0 40px;
    }
    
    .hero-content {
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .title-line {
        font-size: 34px;
    }
    
    .title-sub {
        font-size: 16px;
    }
    
    .hero-description {
        font-size: 14px;
    }
    
    .hero-text {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .services-grid,
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .about-content {
        gap: 30px;
    }
    
    .about-image img {
        height: 200px;
    }
    
    .contact-form {
        padding: 20px;
        border-radius: 15px;
    }
    
    .footer-content {
        gap: 25px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1),
.product-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2),
.product-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3),
.product-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4),
.product-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5),
.product-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6),
.product-card:nth-child(6) { animation-delay: 0.6s; }