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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav ul {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
}

.logo img {
    width: 40px;
    height: 40px;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #2563eb;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border-color: #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

.btn-outline {
    background: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.btn-outline:hover {
    background: #374151;
    color: white;
}

/* Sections */
section {
    padding: 3rem 0;
}

.page-header {
    background: #f8fafc;
    text-align: center;
    padding: 2rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.25rem;
    color: #64748b;
}

/* Features */
.features {
    background: #f8fafc;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-2px);
}

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.feature-card p {
    color: #64748b;
}

/* Courses */
.featured-courses {
    padding: 4rem 0;
}

.featured-courses h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.course-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.course-image {
    width: 100%;
    height: 200px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.course-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.course-difficulty {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.course-description {
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

.course-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #059669;
}

.course-duration {
    color: #64748b;
    font-size: 0.9rem;
}

.section-footer {
    text-align: center;
}

/* Trust Section */
.trust-section {
    background: #f8fafc;
}

.trust-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e293b;
}

.trust-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.trust-item {
    text-align: center;
    padding: 1.5rem;
}

.trust-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.trust-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.trust-item p {
    color: #64748b;
}

/* Course Catalog */
.courses-catalog {
    padding: 2rem 0 4rem;
}

.catalog-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
}

.filter-group input,
.filter-group select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Course Detail Page */
.course-detail {
    padding: 2rem 0;
}

.course-header {
    margin-bottom: 3rem;
}

.course-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.course-header-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.course-header p {
    font-size: 1.125rem;
    color: #64748b;
}

.course-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.course-main h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.course-main h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.course-main p {
    margin-bottom: 1rem;
    color: #374151;
}

.course-main ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.course-main li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.course-sidebar {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.course-sidebar h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.course-sidebar .course-price {
    font-size: 2rem;
    color: #059669;
    margin-bottom: 1rem;
}

.course-sidebar .btn {
    width: 100%;
    margin-bottom: 1rem;
}

.course-info {
    margin-bottom: 1.5rem;
}

.course-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.curriculum-list {
    list-style: none;
    padding: 0;
}

.curriculum-list li {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.faq-list {
    margin-top: 1rem;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.faq-question {
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-answer {
    padding: 0 1rem 1rem;
    color: #374151;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* Checkout */
.checkout-section {
    padding: 2rem 0 4rem;
}

.checkout-header {
    text-align: center;
    margin-bottom: 3rem;
}

.checkout-header h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
}

.step.active {
    background: #2563eb;
    color: white;
}

.step.completed {
    background: #059669;
    color: white;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: bold;
}

.checkout-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.checkout-form h2 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.order-summary {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.order-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.order-item h4 {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.order-item p {
    color: #64748b;
    font-size: 0.9rem;
}

.order-total {
    font-size: 1.5rem;
    font-weight: bold;
    color: #059669;
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid #e5e7eb;
}

.payment-security {
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.security-text {
    font-size: 0.875rem;
    color: #374151;
}

/* Success Page */
.success-section {
    padding: 4rem 0;
    text-align: center;
}

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-section h1 {
    font-size: 2.5rem;
    color: #059669;
    margin-bottom: 1rem;
}

.success-message {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 3rem;
}

.order-details {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    text-align: left;
}

.order-details h2 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.next-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.next-steps h3 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.next-steps ul {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* About & Content Pages */
.about-content,
.legal-content,
.contact-section {
    padding: 2rem 0 4rem;
}

.about-section,
.contact-content {
    margin-bottom: 3rem;
}

.about-section h2,
.contact-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.about-section p,
.legal-text p {
    margin-bottom: 1rem;
    color: #374151;
    line-height: 1.7;
}

.about-section ul,
.legal-text ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.about-section li,
.legal-text li {
    margin-bottom: 0.5rem;
    color: #374151;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.contact-info {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
}

.contact-method {
    margin-bottom: 2rem;
}

.contact-method h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.contact-method p {
    color: #374151;
}

.contact-method a {
    color: #2563eb;
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

/* Legal Pages */
.legal-text {
    max-width: 800px;
    margin: 0 auto;
}

.legal-text h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
    color: #1e293b;
}

.legal-text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    color: #1e293b;
}

.contact-details {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: #2563eb;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

/* FAQ Page */
.faq-section {
    padding: 2rem 0 4rem;
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-category {
    margin-bottom: 3rem;
}

.faq-category h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem;
    background: #f8fafc;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e293b;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background: #f1f5f9;
}

.faq-question[aria-expanded="true"] {
    background: #e0e7ff;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s;
}

.faq-question[aria-expanded="true"] .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1rem 1rem;
    color: #374151;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.faq-answer.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.faq-contact {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.faq-contact h2 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.faq-contact p {
    margin-bottom: 1.5rem;
    color: #64748b;
}

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

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

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.company-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #475569;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #475569;
    color: #cbd5e1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

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

    .nav {
        display: none;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .features-grid,
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .catalog-filters {
        flex-direction: column;
    }

    .course-layout,
    .checkout-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .course-sidebar,
    .order-summary {
        position: static;
    }

    .checkout-steps {
        flex-direction: column;
        align-items: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .success-actions {
        flex-direction: column;
        align-items: center;
    }

    .success-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .features h2,
    .featured-courses h2,
    .trust-section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }

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

    .course-card {
        margin: 0 10px;
    }

    .checkout-form,
    .contact-form,
    .contact-info,
    .order-summary {
        padding: 1rem;
    }

    .legal-text,
    .faq-content {
        padding: 0 10px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .container {
        max-width: none;
        padding: 0;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .course-card,
    .feature-card {
        border: 2px solid #000;
    }

    .btn-primary {
        background: #000;
        border-color: #000;
    }

    .btn-secondary {
        background: #fff;
        color: #000;
        border-color: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .faq-answer {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}