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

body {
    font-family: 'Tajawal', 'Cairo', 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
    background: rgba(255,255,255,0.95);
    padding: 8px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.5);
}

/* Floating Contact Icons */
.floating-contacts {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-contact {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.3);
}

.floating-contact:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0,0,0,0.3);
}

.floating-contact.whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.floating-contact.facebook {
    background: linear-gradient(135deg, #1877F2, #4267B2);
}

.contact-icon {
    width: 20px;
    height: 20px;
    color: white;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

/* RTL Support for floating contacts */
[dir="rtl"] .floating-contacts {
    right: auto;
    left: 20px;
}

[dir="ltr"] .floating-contacts {
    left: auto;
    right: 20px;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid transparent;
    background: transparent;
    color: #333;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background: rgba(102,126,234,0.1);
    transform: translateY(-1px);
    color: #667eea;
}

.lang-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255,107,107,0.3);
    transform: translateY(-1px);
}

/* RTL Support */
[dir="rtl"] {
    font-family: 'Tajawal', 'Cairo', sans-serif;
}

[dir="rtl"] .language-switcher {
    right: auto;
    left: 20px;
}

[dir="ltr"] {
    direction: ltr !important;
    text-align: left !important;
}

[dir="ltr"] body {
    font-family: 'Poppins', sans-serif;
    direction: ltr !important;
}

[dir="ltr"] * {
    direction: ltr !important;
}

[dir="ltr"] .hero-content {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .hero-title {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .hero-subtitle {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .section-title {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .course-title {
    justify-content: flex-start !important;
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .course-description {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .course-sessions {
    border-right: none;
    border-left: 4px solid #667eea;
    direction: ltr !important;
}

[dir="ltr"] .course-sessions h4 {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .sessions-list {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .sessions-list li {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .benefit {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .benefit h3 {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .benefit p {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .footer-section {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .footer-section h3 {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .footer-section p {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .footer-bottom {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .modal-content {
    direction: ltr !important;
}

[dir="ltr"] .modal-content h2 {
    text-align: center !important;
    direction: ltr !important;
}

[dir="ltr"] .form-group label {
    text-align: left !important;
    direction: ltr !important;
}

[dir="ltr"] .language-switcher {
    left: auto;
    right: 20px;
}

/* Language switcher responsive */
@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
        padding: 6px;
        border-radius: 20px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    [dir="rtl"] .language-switcher {
        right: auto;
        left: 15px;
    }
    
    /* Floating contacts responsive */
    .floating-contacts {
        right: 15px;
        gap: 12px;
    }
    
    .floating-contact {
        width: 40px;
        height: 40px;
    }
    
    .contact-icon {
        width: 18px;
        height: 18px;
    }
    
    [dir="rtl"] .floating-contacts {
        right: auto;
        left: 15px;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-button {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255,107,107,0.3);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255,107,107,0.4);
}

.hero-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-icons .icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-icons .icon:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icons .icon:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-icons .icon:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 3s;
}

.floating-icons .icon:nth-child(4) {
    top: 30%;
    right: 25%;
    animation-delay: 4.5s;
}

/* Courses Section */
.courses {
    padding: 5rem 2rem;
    background: white;
    min-height: 100vh;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-radius: 2px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.course-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    background-size: 300% 300%;
    animation: gradientMove 3s ease infinite;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: #ff6b6b;
}

.course-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.course-description {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 0 0.5rem;
}

.course-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.detail {
    text-align: center;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.course-sessions {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    border-right: 4px solid #667eea;
}

.course-sessions h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.sessions-list {
    margin: 0;
    padding-right: 1.5rem;
    padding-left: 0;
    list-style-type: disc;
}

.sessions-list li {
    margin-bottom: 0.7rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
    padding: 0.3rem 0;
    list-style-position: outside;
}

.sessions-list li:hover {
    color: #667eea;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sessions-list li::marker {
    color: #667eea;
}

.book-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
    margin-top: auto;
}

.book-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.4);
}

/* RTL Support for sessions */
[dir="rtl"] .sessions-list {
    padding-right: 1.5rem;
    padding-left: 0;
    list-style-type: disc;
    text-align: right;
}

[dir="rtl"] .sessions-list li {
    text-align: right;
}

[dir="rtl"] .course-sessions {
    border-left: none;
    border-right: 4px solid #667eea;
}

[dir="ltr"] .sessions-list {
    padding-left: 1.5rem;
    padding-right: 0;
    text-align: left;
}

[dir="ltr"] .sessions-list li {
    text-align: left;
}

/* RTL Support for course titles */
[dir="rtl"] .course-title {
    flex-direction: row-reverse;
    justify-content: center;
    text-align: center;
}

[dir="rtl"] .course-description {
    text-align: center;
}

[dir="rtl"] .course-sessions h4 {
    text-align: right;
}

[dir="ltr"] .course-title {
    flex-direction: row;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.benefit p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

.footer-section p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}


.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b6b;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6b6b;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255,107,107,0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,107,0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
/* Tablet responsive */
@media (max-width: 1024px) {
    .courses-grid {
        gap: 2rem;
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-card {
        padding: 1.5rem;
    }
    
    .sessions-list li {
        font-size: 0.85rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .course-card {
        padding: 1rem;
    }
    
    .course-sessions {
        padding: 0.8rem;
    }
    
    .sessions-list li {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
}