/* Global Styles */
:root {
    --primary-color: #005E9E;
    --secondary-color: #004e85; /* Slightly darker shade for hover effects */
    --dark-color: #1e293b;
    --light-color: #f0f5fa;
    --white-color: #ffffff;
    --gray-color: #adb6be;
    --accent-color: #e84118;
    --accent-hover: #c23616;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    color: var(--white-color);
    background-color: var(--primary-color);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 18px;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 94, 158, 0.3);
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: var(--secondary-color);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 94, 158, 0.4);
}

.btn:hover:before {
    width: 100%;
}

.cta-btn {
    animation: pulse 1.5s infinite;
    font-size: 20px;
    padding: 18px 35px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    margin-top: 20px;
    font-weight: 700;
}

.cta-btn:hover {
    animation: none;
    background-color: var(--accent-hover);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(232, 65, 24, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(232, 65, 24, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(232, 65, 24, 0);
    }
}

/* Direction-specific styles */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* Header Styles */
header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: auto;
    max-width: 200px;
}

.nav-menu {
    display: flex;
    list-style-type: none;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.language-switch {
    display: flex;
    align-items: center;
}

.language-switch button {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-switch button:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--dark-color);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 94, 158, 0.9), rgba(0, 94, 158, 0.8)), url('/api/placeholder/1920/800') center/cover no-repeat;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: 70px;
    padding: 150px 0 100px;
    box-sizing: border-box;
    position: relative;
    left: 0;
    right: 0;
    color: var(--white-color);
}

.hero-section .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

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

.hero-text {
    flex: 1;
    padding-right: 50px;
}

.hero-text.en {
    padding-right: 0;
    padding-left: 50px;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* About Instructor Section */
.instructor-section {
    background-color: var(--light-color);
}

.instructor-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.instructor-image {
    flex: 1;
    overflow: hidden;
}

.instructor-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.instructor-info {
    flex: 1;
}

.instructor-info h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.instructor-info p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--dark-color);
}

.instructor-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.stat-item .number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-item .label {
    font-size: 1rem;
    color: var(--dark-color);
}

/* Course Details Section */
.course-details {
    background-color: var(--white-color);
}

.details-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.detail-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.detail-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.detail-card ul {
    list-style-position: inside;
    margin-bottom: 20px;
}

.detail-card li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    background-color: var(--light-color);
    padding: 100px 0;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-item {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: none;
    position: relative;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-item.active {
    display: block;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
}

.testimonial-nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    background-color: var(--gray-color);
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background-color: var(--primary-color);
}

/* Registration Form Section */
.registration {
    background-color: var(--white-color);
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-color);
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 94, 158, 0.2);
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-logo img {
    height: auto;
    max-width: 180px;
    margin-bottom: 15px;
}

.footer-about p {
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.footer-links ul {
    list-style-type: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    text-decoration: none;
    color: var(--gray-color);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: var(--white-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
    position: relative;
}

.social-links a i {
    color: var(--white-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Make sure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .mobile-menu-button {
        display: block;
    }

    .hero-content {
        flex-direction: column;
        padding: 0 15px;
    }

    .hero-section {
        padding: 120px 0 80px;
    }

    .hero-text {
        padding-right: 0;
        margin-bottom: 50px;
        text-align: center;
    }

    .hero-text.en {
        padding-left: 0;
    }

    .instructor-container {
        flex-direction: column;
    }

    .details-container {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.rtl .hero-text,
    body.rtl .instructor-info,
    body.rtl .detail-card {
        text-align: right;
    }

    body.ltr .hero-text,
    body.ltr .instructor-info,
    body.ltr .detail-card {
        text-align: left;
    }

    /* Smaller testimonial avatars on mobile */
    .testimonial-avatar {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }

    /* Adjust testimonial padding for smaller screens */
    .testimonial-item {
        padding: 20px 15px;
    }

    /* Smaller text in testimonials */
    .testimonial-text {
        font-size: 0.95rem;
    }

    /* Registration form responsiveness */
    .form-container {
        padding: 25px 20px;
    }

    /* Adjust CTA button size on mobile */
    .cta-btn {
        font-size: 16px;
        padding: 15px 25px;
    }

    /* Make instructor stats more compact */
    .stat-item {
        padding: 15px 10px;
    }

    .stat-item .number {
        font-size: 2rem;
    }

    /* Better spacing in the hero section */
    .hero-section {
        padding: 120px 0 70px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 100px 0 60px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .instructor-stats {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Even smaller testimonial avatars */
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }

    /* Further reduce padding */
    .section {
        padding: 60px 0;
    }

    /* Ensure buttons are properly sized for tap targets */
    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* Make sure the nav toggle is easily tappable */
    .mobile-menu-button {
        font-size: 28px;
        padding: 5px 10px;
    }

    /* Smaller course detail cards */
    .detail-card {
        padding: 20px 15px;
    }

    .detail-card h3 {
        font-size: 1.3rem;
    }
}
