/* --- General & Variables --- */
:root {
    --primary-color: #0d47a1; /* Deep Blue */
    --secondary-color: #1976d2; /* Bright Blue */
    --accent-color: #ffc107; /* Amber/Gold */
    --dark-color: #212121;
    --light-color: #f5f7fa;
    --white-color: #ffffff;
    --text-color: #5f6368;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--white-color);
}

html:lang(ar) body {
    font-family: 'Cairo', sans-serif;
}

html:lang(en) body {
    font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4 {
    color: var(--dark-color);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    overflow: hidden;
}
.section-header { margin-bottom: 60px; }
.section-title {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 900;
}
.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}
.bg-light { background-color: var(--light-color); }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1rem;
}
.btn-primary {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 102, 255, 0.4);
}
.btn-secondary {
    background-color: transparent;
    color: var(--dark-color);
    border-color: #e0e0e0;
}
.btn-secondary:hover {
    background-color: var(--white-color);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* --- Scroll Animation --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}
.card.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.card.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.card.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }
.card.animate-on-scroll:nth-child(5) { transition-delay: 0.4s; }
.card.animate-on-scroll:nth-child(6) { transition-delay: 0.5s; }

/* --- Header --- */
#header {
    background: var(--white-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.07);
    transition: background-color 0.3s;
}
#header nav { display: flex; justify-content: space-between; align-items: center; }
#header .logo { font-size: 1.8rem; font-weight: 900; color: var(--primary-color); }
#header nav ul { display: flex; gap: 35px; }
#header nav ul a { color: var(--dark-color); font-weight: 600; position: relative; padding-bottom: 5px; }
#header nav ul a::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; width: 0; height: 3px;
    background-color: var(--accent-color); border-radius: 2px; transition: width 0.3s ease;
}
html:lang(ar) #header nav ul a::after { right: 0; left: auto; }
#header nav ul a:hover::after, #header nav ul a.active::after { width: 100%; }
.lang-switcher button {
    background: none; border: 1px solid #ddd; padding: 8px 14px; cursor: pointer;
    border-radius: var(--border-radius); font-weight: 600; transition: all 0.3s ease;
}
.lang-switcher button.active {
    background-color: var(--primary-color); color: var(--white-color); border-color: var(--primary-color);
}

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 95vh;
    color: var(--white-color);
    display: flex;
    align-items: center;
    text-align: center;
    background: url(https://images.unsplash.com/photo-1580582932707-520aed937b7b?q=80&w=1932&auto=format&fit=crop) no-repeat center center/cover;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(45deg, rgba(13, 71, 161, 0.85), rgba(25, 118, 210, 0.7));
}
.hero-content { position: relative; z-index: 1; max-width: 850px; margin: 0 auto; }
.hero-content .badge {
    background: var(--accent-color); color: var(--dark-color); padding: 8px 20px;
    border-radius: 50px; font-size: 1rem; font-weight: 700; display: inline-block; margin-bottom: 25px;
}
.hero-content h1 { font-size: 4rem; color: var(--white-color); margin-bottom: 15px; font-weight: 900; }
.hero-content h2 { font-size: 1.8rem; color: var(--white-color); font-weight: 400; margin-bottom: 25px; }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; opacity: 0.9; }
.hero-buttons { display: flex; justify-content: center; gap: 20px; }
.hero-buttons .btn-primary { background: var(--accent-color); color: var(--dark-color); box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4); }
.hero-buttons .btn-primary:hover { box-shadow: 0 7px 20px rgba(255, 193, 7, 0.5); }
.hero-buttons .btn-secondary { color: var(--white-color); border-color: rgba(255,255,255,0.5); }
.hero-buttons .btn-secondary:hover { background-color: rgba(255,255,255,0.1); border-color: var(--white-color); }

/* --- Card Design --- */
.card {
    background: var(--white-color);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border-top: 4px solid var(--accent-color);
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    display: block;
}
.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.4rem;
}

/* --- About Section --- */
.about-content { display: flex; gap: 60px; align-items: center; }
.about-text { flex: 2; }
.about-stats { flex: 1; text-align: center; }
.stat-item { margin-bottom: 40px; }
.stat-item span {
    display: block; font-size: 3.5rem; font-weight: 900;
    background: -webkit-linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-item label { font-size: 1.1rem; color: var(--dark-color); }
.vision, .mission { margin-bottom: 25px; }

/* --- Contact Section --- */
 
/* --- Footer --- */
#footer {
    background: var(--dark-color); color: #ccc; padding: 70px 0 20px 0;
}
.footer-content {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 50px; padding-bottom: 50px; border-bottom: 1px solid #444;
}
.footer-about h3, .footer-links h4 { color: var(--white-color); margin-bottom: 20px; font-size: 1.2rem; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links a { color: #ccc; transition: color 0.3s ease, padding-left 0.3s ease; }
html:lang(en) .footer-links a:hover { padding-left: 5px; color: var(--accent-color); }
html:lang(ar) .footer-links a:hover { padding-right: 5px; color: var(--accent-color); }
.copyright { text-align: center; margin-top: 30px; font-size: 0.9rem; color: #888; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .about-content, .contact-wrapper { flex-direction: column; }
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .section-title { font-size: 2.2rem; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content h2 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    #header nav ul { display: none; }
}

/* --- Creative Form Input & Contact Section Styles --- */
#contact {
    background: linear-gradient(to top, var(--white-color) 0%, var(--light-color) 100%);
}
.contact-wrapper {
    display: flex;
    gap: 30px;
    background: var(--white-color);
    padding: 40px 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    align-items: stretch;
}
.contact-info {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
    padding-right: 30px;
}
html:lang(ar) .contact-info {
    border-right: none;
    border-left: 1px solid #e0e0e0;
    padding-right: 0;
    padding-left: 30px;
}
.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.info-item i {
    font-size: 1.5rem;
    color: var(--white-color);
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
}
.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 2px;
    font-size: 1.1rem;
}
.info-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--dark-color);
}
.contact-form {
    flex: 2;
    padding-left: 30px;
}
html:lang(ar) .contact-form {
    padding-left: 0;
    padding-right: 30px;
}
.contact-form h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 900;
}
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Increased gap */
}
.form-group {
    position: relative;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    background-color: var(--light-color);
    font-family: inherit;
    font-size: 1rem;
    color: var(--dark-color);
    outline: none;
    transition: all 0.3s ease;
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
/* Floating label styles */
.form-group label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    background: var(--light-color);
    padding: 0 5px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
html:lang(ar) .form-group label {
    left: auto;
    right: 15px;
}
/* State when the label should float up */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: var(--white-color); /* To cut through the border */
    font-weight: 600;
}
/* Input focus styles */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    background-color: var(--white-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}
/* To make the floating label work with our `required` attribute,
   we use `:not(:placeholder-shown)` instead of `:valid`.
   We must also add an empty placeholder to the HTML inputs. */
.contact-form button {
    align-self: flex-start;
    margin-top: 10px;
}
html:lang(ar) .contact-form button {
    align-self: flex-end;
}

/* Form status message styling */
#form-status {
    margin-top: 15px; padding: 10px; border-radius: var(--border-radius);
    text-align: center; font-weight: 600; display: none;
}
#form-status.success { background-color: #d4edda; color: #155724; display: block; }
#form-status.error { background-color: #f8d7da; color: #721c24; display: block; }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .contact-wrapper { flex-direction: column; padding: 30px; }
    .contact-info { border-right: none; padding-right: 0; border-bottom: 1px solid #e0e0e0; padding-bottom: 30px; }
    html:lang(ar) .contact-info { border-left: none; padding-left: 0; }
    .contact-form { padding-left: 0; padding-top: 30px; }
    html:lang(ar) .contact-form { padding-right: 0; }
}