@import 'variables.css';

/* Global Resets & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
}

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

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.5rem; }

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 43, 91, 0.4);
}

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

.btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--text-light);
}

/* Header */
header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001; /* Ensure logo stays on top */
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1001;
}

/* Mobile Responsive Styles */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%; /* Side drawer width */
        max-width: 300px;
        height: 100vh;
        background-color: var(--bg-white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin-bottom: 20px;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Stagger animation for menu items */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    /* Mobile Dropdown */
    .dropdown-content {
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        display: none; /* Keep hidden by default */
        width: 100%;
        text-align: center;
        padding: 0;
    }
    
    .dropdown.active .dropdown-content {
        display: block;
        animation: fadeIn 0.3s;
    }

    .dropdown > a::after {
        transform: rotate(0deg);
        transition: transform 0.3s;
    }

    .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    /* Overlay when menu is open */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .menu-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 8px;
    top: 100%;
    right: 0;
    padding: 10px 0;
}

.dropdown-content li {
    width: 100%;
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Arrow indicator for dropdown */
.dropdown > a::after {
    content: '\f107'; /* FontAwesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 5px;
    font-size: 0.8rem;
}

.logo span { color: var(--secondary-color); }

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--primary-color);
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 85vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
}

.hero-content {
    z-index: 2;
    animation: fadeInUp 1s ease;
}

.hero h1 { color: var(--text-light); text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { color: #e0e0e0; font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px; }
.hero-buttons { display: flex; gap: 20px; justify-content: center; }

/* Services Grid */
.services { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--secondary-color); margin: 10px auto 0;
}

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

.card {
    background: var(--bg-white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-top-color: var(--secondary-color);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 30px 0 20px;
    text-align: center;
}

.card-body { padding: 0 30px 30px; text-align: center; }

/* Forms */
.form-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-gray);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary-color); }
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}
.file-upload {
    border: 2px dashed #ddd;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 60px 0 20px;
}

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

.footer-links a:hover { color: var(--secondary-color); }
.copyright {
    text-align: center;
    padding-top: 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
}

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

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
}
