@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e5e7eb;
    --color-primary: #3b82f6;
    --color-primary-hover: #2563eb;
    --color-accent: #22c55e;
    --text-main: #0f172a;
    --text-secondary: #64748b;
    --font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    --max-width: 1200px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 1rem;
    font-weight: 700;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.section-title span {
    color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-family);
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

/* Header */
.header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: 1px;
}

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

.nav-link {
    font-weight: 600;
    color: var(--text-main);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Sections Base */
.section {
    padding: 5rem 0;
}

.bg-light {
    background-color: var(--bg-secondary);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--color-primary);
}

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

/* Features / Why Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-check {
    color: var(--color-accent);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.feature-check svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-list {
    margin-top: 2rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.contact-info-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.info-text h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.info-text p {
    margin-bottom: 0;
}

.contact-form {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--bg-secondary);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Page Headers (for inner pages) */
.page-header {
    background: var(--bg-secondary);
    padding: 4rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

/* Legal Pages (Terms & Privacy) */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.legal-content p, .legal-content ul {
    margin-bottom: 1.5rem;
}

.legal-content ul {
    padding-inline-start: 1.5rem;
    list-style-type: disc;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Footer (Strict Rules) */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.footer-desc {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-secondary);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.footer-nav a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

.footer-nav a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.3s ease;
        gap: 1.5rem;
    }
    
    .nav-menu.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-menu .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 1rem;
    }
}