:root {
    --primary: #4F81BD;
    --primary-dark: #3A6293;
    --black: #0D0D0D;
    --dark-gray: #1A1A1A;
    --white: #FFFFFF;
    --bg-color: #F8F9FA;
    --text-color: #333333;
    
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    --font-en: 'Inter', sans-serif;
    --font-ar: 'IBM Plex Sans Arabic', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html[dir="rtl"] {
    font-family: var(--font-ar);
}

html[dir="ltr"] {
    font-family: var(--font-en);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--black);
    margin-bottom: 1rem;
    font-weight: 700;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.pt-100 { padding-top: 100px; }
.pb-100 { padding-bottom: 100px; }
.bg-secondary { background-color: #f1f5f9; }
.bg-black { background-color: var(--black); }
.text-white { color: var(--white); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 129, 189, 0.3);
}

/* Glassmorphism Classes */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    padding: 2rem;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 100px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo img {
    height: 80px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    position: relative;
}

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

html[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

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

.btn-lang {
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    color: var(--primary);
    font-weight: 600;
}

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

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(79, 129, 189, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%), url('../images/banner.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
}

/* decorative blob */
.hero::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary);
    opacity: 0.1;
    filter: blur(100px);
    border-radius: 50%;
    top: -20%;
    left: -10%;
    z-index: -1;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: var(--black);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: var(--dark-gray);
    max-width: 800px;
    margin: 0 auto;
}

/* Common Grids */
.grid-2, .grid-3 {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    text-align: center;
    padding: 2.5rem 1.5rem;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

/* Company Card */
.company-card {
    display: block;
    background: var(--white);
    padding: 2rem;
    text-align: center;
    border: 1px solid transparent;
}

.company-card img {
    height: 80px;
    margin: 0 auto 1.5rem;
    object-fit: contain;
    transition: var(--transition);
}

.company-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.company-card .btn-readmore {
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    position: relative;
}

.company-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.company-card:hover img {
    transform: scale(1.1);
}

/* Partners Grid */
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0;
}

.partner-logo {
    font-size: 1.5rem;
    font-weight: 700;
    opacity: 0.6;
    transition: var(--transition);
}

.partner-logo:hover {
    opacity: 1;
    color: var(--primary);
}

/* Contact form */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    background: var(--white);
    padding: 3rem;
}

@media(max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 129, 189, 0.1);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

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

/* Company Page Internal */
.company-hero.shrink, .contact-hero.shrink {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(79, 129, 189, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%);
    color: var(--white);
    margin-top: 100px;
}

.company-info-box {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    background: var(--white);
    align-items: center;
}

.company-logo-large img {
    max-height: 200px;
    margin: 0 auto;
}

.lead-text {
    font-size: 1.1rem;
    color: #555;
}

@media(max-width: 768px) {
    .company-info-box {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Footer */
.main-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 4rem 0 0;
}

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

.footer-logo {
    max-width: 200px;
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-contact h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-contact ul li {
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
    }
    
    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .nav-links {
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        align-items: center;
    }
    
    .lang-switcher {
        margin-left: auto;
        margin-right: 1rem;
    }
    html[dir="rtl"] .lang-switcher {
        margin-left: 1rem;
        margin-right: auto;
    }
}
