/* --- 1. Variables & Reset (Light Clean Theme) --- */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-body: #ffffff;
    --bg-card: #f8fafc;
    --text-main: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --font-en: 'Inter', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-en);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { font-family: var(--font-ar); }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- 2. Header --- */
.header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.nav { display: flex; align-items: center; gap: 25px; }
.nav a { color: var(--text-light); font-weight: 500; transition: color 0.2s; }
.nav a:hover, .nav a.active { color: var(--primary); }
.lang-switch a {
    background: var(--bg-body); color: var(--text-main); padding: 8px 16px;
    border-radius: 8px; font-size: 0.9rem; border: 1px solid var(--border); transition: all 0.2s;
}
.lang-switch a:hover { border-color: var(--primary); color: var(--primary); }

/* --- 3. Hero Section --- */
.hero {
    text-align: center; padding: 80px 20px;
    background: linear-gradient(180deg, #e0e7ff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2.8rem; margin-bottom: 20px; color: var(--text-main); font-weight: 800; letter-spacing: -0.5px; }
.hero p { font-size: 1.2rem; color: var(--text-light); max-width: 650px; margin: 0 auto; }

/* --- 4. Generators Grid --- */
.generators-section { padding: 60px 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px; transition: all 0.3s ease; display: block; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.02);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.card-icon { font-size: 2.5rem; margin-bottom: 20px; display: inline-block; }
.card h3 { font-size: 1.3rem; margin-bottom: 12px; color: var(--text-main); font-weight: 700; }
.card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* --- 5. NEW PROFESSIONAL FOOTER --- */
.footer {
    background: #0f172a; /* Dark slate for contrast */
    color: #cbd5e1;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    display: inline-block;
    margin-bottom: 15px;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 350px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #1e293b;
    border-radius: 50%;
    color: #94a3b8;
    transition: all 0.2s;
}

.social-icons a:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.social-icons svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
    color: #64748b;
}

/* --- 6. Responsive / Mobile View (FORCED COLORS) --- */
@media (max-width: 768px) {
    body { background-color: #ffffff !important; }
    .header { background: #e6ecfe !important; border-bottom: 1px solid #e2e8f0 !important; }
    .hero { background: linear-gradient(180deg, #e0e7ff 0%, #f8fafc 100%) !important; }
    .card { 
        background: #ffffff !important; 
        border: 1px solid #cbd5e1 !important; 
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important; 
    }
    .lang-switch a { background: #f8fafc !important; border: 1px solid #cbd5e1 !important; }
    
    .header-flex { flex-direction: column; gap: 15px; text-align: center; }
    .nav { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 50px 20px; }
    .hero p { font-size: 1.05rem; }
    .card { padding: 25px; }

    /* Footer Mobile Adjustments */
    .footer-grid {
        grid-template-columns: 1fr; /* Stack columns on mobile */
        gap: 30px;
        text-align: center;
    }
    .footer-desc {
        max-width: 100%;
        margin: 0 auto 20px;
    }
    .social-icons {
        justify-content: center;
    }
}