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

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #06b6d4;
    --secondary-color: #3b82f6;
    --dark-bg: #0f172a;
    --dark-secondary: #1e293b;
    --text-light: rgba(255, 255, 255, 0.8);
    --text-lighter: rgba(255, 255, 255, 0.6);
    --border-light: rgba(255, 255, 255, 0.2);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #4c1d95 100%);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
    direction: rtl;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 5%;
}

@media (max-width: 1920px) {
    .container {
        padding: 0 4%;
    }
}

@media (max-width: 1440px) {
    .container {
        padding: 0 3%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to left, rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.95), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    width: 100%;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .header-container {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 60px;
    }
}

.logo {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
    filter: brightness(1.1);
}

.logo:hover {
    transform: scale(1.05);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(5px, 1vw, 15px);
}

.nav-link {
    position: relative;
    padding: 10px clamp(10px, 1.5vw, 20px);
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: clamp(13px, 1.2vw, 15px);
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .nav-link {
        padding: 8px 15px;
        font-size: 13px;
    }
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 12px;
}

.nav-link:hover::before {
    transform: scale(1);
}

.nav-link:hover {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 20px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    color: var(--text-light);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

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

.lang-separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

@media (max-width: 1200px) {
    .language-switcher {
        margin-right: 10px;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav.mobile-active {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(15, 23, 42, 0.98);
        padding: 20px;
        border-top: 1px solid var(--border-light);
        animation: slideDown 0.3s ease;
    }
    
    .nav.mobile-active .nav-link {
        width: 100%;
        text-align: center;
        padding: 15px;
        margin: 5px 0;
    }
    
    .nav.mobile-active .language-switcher {
        margin: 15px auto;
        width: fit-content;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-section {
    padding: clamp(120px, 15vh, 180px) 0 clamp(60px, 10vh, 120px);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: min(90%, 1200px);
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 100px 0 60px;
    }
    
    .hero-content {
        max-width: 100%;
        padding: 0 15px;
    }
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
}

.hero-title {
    font-size: clamp(2rem, 5vw + 1rem, 5rem);
    font-weight: 700;
    margin-bottom: clamp(20px, 4vh, 40px);
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--primary-color);
    display: block;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: clamp(30px, 5vh, 50px);
    line-height: 1.6;
    max-width: min(90%, 900px);
    margin-left: auto;
    margin-right: auto;
}

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

.floating-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
}

.floating-1 {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--primary-color);
}

.floating-2 {
    bottom: 20%;
    right: 10%;
    width: 120px;
    height: 120px;
    background: var(--secondary-color);
}

/* Section Styles */
.section {
    padding: clamp(60px, 10vh, 120px) 0;
    position: relative;
    width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 8vh, 80px);
    padding: 0 20px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: var(--text-lighter);
    max-width: min(90%, 800px);
    margin: 0 auto;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
}

/* About Section */
.about-section {
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.2));
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 500px), 1fr));
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
    width: 100%;
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.info-item {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.info-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.icon-building {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
}

.icon-location {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.icon-award {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.info-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.info-content p {
    color: var(--text-lighter);
    line-height: 1.6;
}

.vision-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.vision-card h3 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.vision-card p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 32px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-lighter);
}

/* Services Section */
.services-section {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
}

@media (min-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.icon-code {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.icon-zap {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.icon-database {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.icon-globe {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
}

@media (min-width: 1400px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.project-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.02);
}

.project-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--text-lighter);
    margin-bottom: 20px;
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    font-size: 12px;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 3vw, 40px);
    width: 100%;
}

@media (min-width: 1400px) {
    .team-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1399px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.team-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.3s ease;
}

.team-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.02);
}

.team-avatar {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.team-card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.team-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 16px;
}

.team-desc {
    color: var(--text-lighter);
    line-height: 1.6;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: clamp(30px, 5vw, 80px);
    width: 100%;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.contact-item {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
}

.contact-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.icon-phone {
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.icon-mail {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.contact-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-item p {
    color: var(--text-lighter);
    line-height: 1.6;
}

.license-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
}

.license-info h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.license-details p {
    color: var(--text-lighter);
    margin-bottom: 12px;
}

.license-details strong {
    color: white;
}

/* Contact Form */
.contact-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border-light);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-button {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-button:hover {
    background: #0891b2;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-light);
    padding: clamp(40px, 6vh, 80px) 0 20px;
    width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: clamp(30px, 4vw, 60px);
    margin-bottom: clamp(30px, 4vh, 60px);
    width: 100%;
}

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-logo {
    height: 70px;
    width: auto;
    margin-bottom: 20px;
    filter: brightness(1.1);
}

.footer-description {
    color: var(--text-lighter);
    line-height: 1.8;
}

.footer h4 {
    font-size: 1.25rem;
    margin-bottom: 24px;
}


.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-lighter);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

/* Footer Contact Styles */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
}

.footer-contact .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    transition: color 0.3s ease;
    margin-bottom: 12px;
}

[dir="rtl"] .footer-contact .contact-item {
    flex-direction: row-reverse;
    text-align: right;
    justify-content: flex-end;
}

[dir="rtl"] .footer-contact {
    text-align: right;
}

[dir="rtl"] .footer-contact .contact-icon {
    transform: scaleX(-1) !important;
    direction: rtl;
}

html[dir="rtl"] .footer-contact .contact-item .contact-icon {
    transform: scaleX(-1) !important;
    -webkit-transform: scaleX(-1) !important;
    -moz-transform: scaleX(-1) !important;
}

.footer-contact .contact-icon {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.8;
    width: 16px;
    height: 16px;
}

.footer-contact .contact-item span {
    font-size: 0.95rem;
    line-height: 1.5;
}

[dir="rtl"] .footer-contact .contact-item span[dir="ltr"] {
    direction: ltr;
    text-align: left;
    unicode-bidi: embed;
}

.footer-contact .contact-item:hover {
    color: white;
}

.footer-contact .contact-item:hover .contact-icon {
    opacity: 1;
}

.social-links {
    margin-top: 24px;
}

.social-links h5 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.social-icons {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-whatsapp {
    background: #25d366;
}

.social-instagram {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding-top: 32px;
    text-align: center;
    color: var(--text-lighter);
}

/* Additional Responsive Improvements */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 1920px) {
    .hero-content {
        max-width: 1400px;
    }
    
    .container {
        padding: 0 8%;
    }
}

/* Ultra-wide screens */
@media (min-width: 2560px) {
    .container {
        max-width: 2200px;
        margin: 0 auto;
        padding: 0 80px;
    }
    
    .hero-content {
        max-width: 1600px;
    }
}