/* --- Global Styles & Variables --- */
:root {
    --primary-color: #256ba8; /* New Professional Blue */
    --secondary-color: #373fff; /* Vibrant blue */
    --dark-bg: #111827;
    --light-bg: #1f2937;
    --text-color: #f9fafb;
    --text-muted: #9ca3af;
    --border-color: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- RTL (Right-to-Left) Styles for Arabic --- */
body.rtl {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Poppins', sans-serif; /* Use Cairo font for Arabic */
}
body.rtl .logo {
    margin-left: auto;
}
body.rtl .nav-links {
    margin-right: auto;
    margin-left: 0;
}
body.rtl .testimonial-card {
    border-left: none;
    border-right: 5px solid var(--primary-color);
}
body.rtl .contact-container {
    text-align: right;
}
body.rtl .social-media a {
    margin-right: 0;
    margin-left: 2rem;
}


/* --- Dynamic Gradient Background --- */
.gradient-bg {
    width: 100vw;
    height: 100vh;
    position: fixed;
    overflow: hidden;
    z-index: -1;
    top: 0;
    left: 0;
    background: linear-gradient(45deg, #111827, #1f2937, #256ba8, #373fff);
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
    font-weight: 400;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    margin-left: auto; /* Pushes nav links to the right */
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    transition: color 0.3s ease, transform 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* --- Language Switcher --- */
.language-switcher {
    position: relative;
    margin-left: 2rem;
}
.language-button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}
.language-button:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.language-dropdown {
    display: none;
    position: absolute;
    top: 120%;
    right: 0;
    background: var(--light-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    z-index: 1001;
}
.language-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
}
.language-option:hover {
    background: var(--primary-color);
}
.language-option img {
    width: 24px;
    height: auto;
    border-radius: 3px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
}


/* --- General Section Styling --- */
section {
    padding: 6rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

/* --- Home/Hero Section --- */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero-content .subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.cta-button, .calendly-button, .submit-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover, .calendly-button:hover, .submit-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(37, 107, 168, 0.4);
}

/* --- Statistics Section --- */
#stats {
    background: var(--light-bg);
    padding: 4rem 2rem;
    border-radius: 15px;
    margin-top: -5rem;
    margin-bottom: 4rem;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: center;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.stat-item .number-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}
.stat-item .label {
    font-size: 1rem;
    color: var(--text-muted);
}
.progress-ring-container {
    position: relative;
    width: 140px;
    height: 140px;
}
.progress-ring-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}
.progress-ring {
    transform: rotate(-90deg);
}
.progress-ring__circle {
    stroke: var(--primary-color);
    transition: stroke-dashoffset 1.5s ease-out;
}


/* --- Courses Section --- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}
.course-card {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}
.course-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    border-radius: 50%;
    background-color: var(--dark-bg);
    padding: 15px;
}
.course-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* --- Student Projects Gallery Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 5rem;
}
.project-card {
    text-align: center;
}
.project-card-info {
    margin-top: 1rem;
}
.project-card-info h3 {
    font-size: 1.5rem;
}
.project-card-info p {
    color: var(--text-muted);
}
.mockup-stack {
    position: relative;
    width: 300px;
    height: 620px; /* Increased height to show the stack */
    margin: 0 auto;
    cursor: pointer;
}
.mobile-mockup {
    width: 300px;
    height: 600px;
    background: #111;
    border-radius: 40px;
    padding: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3), inset 0 0 0 2px #444;
    position: absolute;
    left: 0;
    top: 0;
    transition: transform 0.5s ease, z-index 0s 0.25s; /* Delay z-index change */
}
.mobile-mockup-screen {
    width: 100%;
    height: 100%;
    background: #333;
    border-radius: 25px;
    overflow: hidden;
}
.mobile-mockup-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Stacking Positions */
.stack-pos-1 { /* Front */
    transform: translateY(0) scale(1);
    z-index: 3;
}
.stack-pos-2 { /* Middle */
    transform: translateY(20px) scale(0.95);
    z-index: 2;
}
.stack-pos-3 { /* Back */
    transform: translateY(40px) scale(0.9);
    z-index: 1;
}


/* --- Testimonials Section --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}
.testimonial-card {
    background: rgba(31, 41, 55, 0.7);
    padding: 2rem;
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
}
.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.testimonial-card cite {
    font-weight: 700;
    color: var(--text-color);
}

/* --- Contact Section --- */
#contact .contact-subtitle {
    margin-bottom: 3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
}
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 15px;
}
.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.social-media {
    margin: 2rem 0;
}
.social-media a {
    color: var(--text-muted);
    font-size: 2rem;
    margin-right: 2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-media a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}
.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-color);
    font-size: 1rem;
}
#form-status {
    margin-top: 1rem;
    font-weight: 600;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* --- Responsive Design --- */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    section h2 { font-size: 2.2rem; }
    .hero-content h1 { font-size: 2.8rem; }
    nav { flex-direction: column; gap: 1rem; }
}
