/* CSS Custom Properties - Theme Colors - Educational/Professional */
:root {
    --primary-color: #1e3a5f;
    --primary-dark: #152d47;
    --primary-light: #2a4d75;
    --accent-color: #4a90a4;
    --accent-light: #6bb3c7;
    --secondary-color: #8b7355;
    --text-color: #2c3e50;
    --text-light: #555;
    --text-lighter: #777;
    --bg-color: #ffffff;
    --bg-light: #f5f7fa;
    --bg-section: #fafbfc;
    --border-color: #d0d7de;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 3px 12px rgba(0, 0, 0, 0.1);
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

/* RTL Support */
[dir="rtl"] {
    --spacing-direction: 0;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', 'Palatino', 'Book Antiqua', serif, 'Noto Sans Arabic', 'Arial Unicode MS';
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

/* Use sans-serif for headings and UI elements for better readability and modern look */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

.header, .logo, .section-title,
button, .language-toggle {
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* Arabic font support */
[dir="rtl"] body {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', 'Arabic Typesetting', 'Traditional Arabic', 'Simplified Arabic', sans-serif;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* Header */
.header {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--spacing-sm) 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    letter-spacing: 0.3px;
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

[dir="rtl"] .logo {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1.75rem;
    }
}

/* Language Toggle Button */
.language-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    min-width: 80px;
}

.language-toggle:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.language-toggle:active {
    transform: translateY(0);
}

.language-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--primary-light) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .hero {
        min-height: 600px;
        padding: var(--spacing-xl) 0;
    }
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}

/* YouTube Video Embed Background */
.hero-video-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-video-embed iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@media (min-aspect-ratio: 16/9) {
    .hero-video-embed iframe {
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .hero-video-embed iframe {
        width: 177.78vh;
    }
}

/* Background Image */
.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('../bg image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
}

@media (min-width: 768px) {
    .hero-background-image {
        background-attachment: fixed;
        opacity: 1;
    }
}

/* Overlay for text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.5) 0%, rgba(21, 45, 71, 0.55) 50%, rgba(42, 77, 117, 0.5) 100%);
    z-index: 1;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    position: relative;
    z-index: 2;
    letter-spacing: 0.5px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    color: white;
    text-align: center;
    width: 100%;
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

[dir="rtl"] .hero-title {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
        margin-bottom: var(--spacing-lg);
    }
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.3rem;
        line-height: 1.8;
    }
}

[dir="rtl"] .hero-subtitle {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

/* Sections */
.section {
    padding: var(--spacing-lg) 0;
}

.section:nth-child(even) {
    background-color: var(--bg-section);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-align: center;
    letter-spacing: 0.3px;
    position: relative;
    padding-bottom: var(--spacing-sm);
    width: 100%;
    display: block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 2px;
}

[dir="rtl"] .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

[dir="rtl"] .section-title {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

/* About Section */
.description {
    font-size: 1.15rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.2px;
}

@media (min-width: 768px) {
    .description {
        font-size: 1.25rem;
    }
}

[dir="rtl"] .description {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
    text-align: center;
}

/* Goals Section */
.goals-list {
    list-style: none;
    max-width: 850px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.goal-item {
    background-color: var(--bg-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    text-align: center;
}

.goal-item:hover {
    background-color: var(--bg-section);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-top-color: var(--accent-color);
}

.goal-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    box-shadow: 0 2px 6px rgba(30, 58, 95, 0.25);
}

.goal-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
    text-align: center;
}

[dir="rtl"] .goal-text {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

@media (min-width: 768px) {
    .goal-item {
        padding: var(--spacing-md) var(--spacing-xl);
    }
    
    .goal-number {
        width: 42px;
        height: 42px;
        min-width: 42px;
        font-size: 1.1rem;
    }
    
    .goal-text {
        font-size: 1.2rem;
    }
}

/* Courses Section */
.courses-list {
    list-style: none;
    max-width: 850px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.course-item {
    background-color: var(--bg-color);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    text-align: center;
}

[dir="rtl"] .course-item {
    border-left: none;
    border-right: 4px solid var(--accent-color);
}

.course-item:hover {
    background-color: var(--bg-section);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    border-left-color: var(--primary-color);
    transform: translateX(3px);
}

[dir="rtl"] .course-item:hover {
    border-right-color: var(--primary-color);
    transform: translateX(-3px);
}

[dir="rtl"] .course-item {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

@media (min-width: 768px) {
    .course-item {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: 1.2rem;
    }
}

/* Contact Section */
.contact-intro {
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-light);
    font-weight: 500;
}

[dir="rtl"] .contact-intro {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.contact-info {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .contact-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-card {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--bg-section) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

[dir="rtl"] .contact-card::before {
    left: 0;
    right: 0;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.contact-content {
    flex: 1;
    width: 100%;
}

.contact-content strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    letter-spacing: 0.5px;
}

[dir="rtl"] .contact-content strong {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.contact-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    display: inline-block;
    word-break: break-word;
}

.contact-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact-address {
    font-style: normal;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 0.95rem;
}

[dir="rtl"] .contact-address {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.contact-detail {
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.05rem;
    display: inline-block;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a3452 100%);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    margin-top: var(--spacing-xl);
    border-top: 4px solid var(--accent-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }
}

[dir="rtl"] .footer-content {
    text-align: center;
}

@media (min-width: 768px) {
    [dir="rtl"] .footer-content {
        text-align: right;
    }
}

.footer-main {
    flex: 1;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    margin: 0 0 var(--spacing-sm) 0;
}

[dir="rtl"] .footer-title {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.footer-contact-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
}

@media (min-width: 768px) {
    .footer-contact-section {
        align-items: flex-end;
    }
}

[dir="rtl"] .footer-contact-section {
    align-items: center;
}

@media (min-width: 768px) {
    [dir="rtl"] .footer-contact-section {
        align-items: flex-start;
    }
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    align-items: center;
}

@media (min-width: 768px) {
    .footer-contact-item {
        align-items: flex-end;
    }
}

[dir="rtl"] .footer-contact-item {
    align-items: center;
}

@media (min-width: 768px) {
    [dir="rtl"] .footer-contact-item {
        align-items: flex-start;
    }
}

.footer-contact-item strong {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

[dir="rtl"] .footer-contact-item strong {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.footer-link {
    color: var(--accent-light);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.footer-info {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

[dir="rtl"] .footer-link,
[dir="rtl"] .footer-info {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

[dir="rtl"] .footer-copyright {
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
}

.footer-org-number {
    font-size: 0.8rem;
    opacity: 0.75;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-family: 'Segoe UI', 'Tahoma', 'Arial Unicode MS', 'Noto Sans Arabic', sans-serif;
    font-weight: 400;
}

/* Print Styles */
@media print {
    .header {
        position: static;
        box-shadow: none;
    }

    .language-toggle {
        display: none;
    }

    .section {
        page-break-inside: avoid;
    }

    .hero {
        background: var(--primary-color);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .hero-video,
    .hero-video-embed,
    .hero-background-image,
    .hero-overlay {
        display: none;
    }
}

/* Accessibility - Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Smooth transitions for language switching */
body,
.header,
.hero,
.section,
.footer {
    transition: var(--transition);
}

/* Ensure text doesn't overflow on small screens */
h1, h2, h3, p, li {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Better line height for Arabic text */
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] .description,
[dir="rtl"] .contact-intro {
    line-height: 1.8;
}




