:root {
    --primary-color: #0d47a1;
    /* Deep Blue */
    --secondary-color: #fdd835;
    /* Gold/Yellow */
    --accent-color: #1976d2;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --font-family: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    direction: rtl;
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #eebb00;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 20px;
}

.btn-secondary:hover {
    background-color: #eebb00;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-right: 15px;
    /* RTL margin */
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-subtitle {
    color: var(--light-text);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.text-center {
    text-align: center;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-color);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
/* Hero Section */
.hero {
    /* Background handled by slider */
    background-color: var(--primary-color);
    position: relative;
    color: var(--white);
    padding: 100px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.9), rgba(25, 118, 210, 0.7));
    z-index: 1;
}

.hero::before {
    display: none;
    /* Remove old overlay */
}

.hero>.container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 25px;
}

.hero-image-container {
    flex: 1;
    display: none;
    /* Hidden on mobile, shown on desktop */
}

@media (min-width: 992px) {
    .hero-image-container {
        display: block;
    }

    .hero-img {
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        border: 5px solid rgba(255, 255, 255, 0.2);
    }
}


/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
    align-items: center;
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.about-img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.section-text {
    margin-bottom: 20px;
    color: var(--light-text);
}

.about-list {
    margin-bottom: 30px;
}

.about-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-list i {
    color: var(--secondary-color);
}

/* Features Section */
.features {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-bottom-color: var(--secondary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(13, 71, 161, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Programs Section */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.program-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.program-card:hover {
    transform: translateY(-5px);
}

.program-img-wrapper {
    height: 200px;
    overflow: hidden;
}

.program-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.program-card:hover .program-img-wrapper img {
    transform: scale(1.1);
}

.program-content {
    padding: 25px;
    text-align: center;
}

.program-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.program-content p {
    color: var(--light-text);
}

/* Footer */
.footer {
    background-color: #0a2c66;
    /* Darker Blue */
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-info p {
    opacity: 0.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    /* RTL alignment */
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.footer-links ul li {
    margin-bottom: 15px;
}

.footer-links ul li a {
    opacity: 0.8;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--secondary-color);
    padding-right: 5px;
    /* RTL visual cue */
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-contact i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        transition: 0.4s;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .btn-outline {
        margin-right: 0;
    }
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-img-wrapper {
    height: 200px;
    overflow: hidden;
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-img-wrapper img {
    transform: scale(1.05);
}

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 10px;
    display: block;
}

.news-title {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.news-excerpt {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Registration Form Styles */
.form-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 600px;
    margin: 50px auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(253, 216, 53, 0.2);
}

.btn-block {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
}