/* 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"] {
    text-align: right;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    color: #1a1a1a;
}

h2 {
    font-size: 2rem;
    color: #1a1a1a;
}

h3 {
    font-size: 1.5rem;
    color: #1a1a1a;
}

p {
    margin-bottom: 1rem;
    color: #666;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1d4ed8;
}

a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

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

.btn-primary:hover {
    background-color: #1d4ed8;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background-color: #4b5563;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

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

.btn:focus {
    outline: 3px solid rgba(37, 99, 235, 0.3);
    outline-offset: 2px;
}

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

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1a1a1a;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #4b5563;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 0;
    min-height: 600px;
    display: flex;
    align-items: center;
}

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #4b5563;
}

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

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #f8fafc;
}

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

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

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

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

.feature-card h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

/* Courses Section */
.featured-courses,
.courses-catalog {
    padding: 80px 0;
}

.featured-courses h2,
.courses-catalog h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

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

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

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

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

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

.course-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.course-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2563eb;
}

.course-tag {
    background-color: #dbeafe;
    color: #1d4ed8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0;
    text-align: center;
}

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

.page-header p {
    font-size: 1.25rem;
    color: #6b7280;
}

/* Catalog Filters */
.catalog-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

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

.filter-group input,
.filter-group select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    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);
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* Course Detail */
.course-detail {
    padding: 40px 0;
}

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

.course-detail-content h1 {
    margin-bottom: 1rem;
}

.course-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.meta-value {
    font-weight: 600;
    color: #1a1a1a;
}

.course-description {
    margin-bottom: 2rem;
}

.course-section {
    margin-bottom: 2rem;
}

.course-section h3 {
    margin-bottom: 1rem;
    color: #2563eb;
}

.course-section ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

.course-section li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.curriculum-item {
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.curriculum-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.curriculum-description {
    color: #6b7280;
    font-size: 0.875rem;
}

.instructor-section {
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.instructor-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.instructor-bio {
    color: #4b5563;
}

.faq-section {
    margin-top: 2rem;
}

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

.faq-question {
    width: 100%;
    padding: 1rem;
    background-color: #f9fafb;
    border: none;
    text-align: left;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f3f4f6;
}

.faq-answer {
    padding: 1rem;
    background-color: white;
    display: none;
}

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

.course-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.course-card-sidebar {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-price {
    font-size: 2rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 1rem;
}

.sidebar-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.sidebar-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.sidebar-features li:last-child {
    border-bottom: none;
}

/* Checkout Styles */
.checkout-section {
    padding: 40px 0;
}

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

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

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

.step.active {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.step.completed {
    background-color: #d1fae5;
    color: #047857;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: currentColor;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

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

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

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

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

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

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

.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);
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

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

.form-group.error .error-message {
    display: block;
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

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

.checkout-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.order-summary {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.125rem;
    color: #2563eb;
}

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

.summary-course-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

.summary-course-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.trust-indicators {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #047857;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.checkout-note {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fef3cd;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    color: #92400e;
}

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

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

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

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

.order-details {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.next-steps {
    margin-top: 3rem;
    text-align: left;
}

.next-steps ul {
    list-style-type: disc;
    padding-left: 1.5rem;
}

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

/* About Page */
.about-content {
    padding: 80px 0;
}

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

.about-text ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-text li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.stats-section {
    padding: 80px 0;
    background-color: #f8fafc;
}

.stats-section h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.stat-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

.team-section {
    padding: 80px 0;
    text-align: center;
}

/* Contact Page */
.contact-section {
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

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

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

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

.contact-item h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #4b5563;
    margin-bottom: 0;
}

.success-message {
    background-color: #d1fae5;
    color: #047857;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

/* FAQ Page */
.faq-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-category {
    padding: 0.75rem 1.5rem;
    background-color: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-category.active,
.faq-category:hover {
    background-color: #2563eb;
    color: white;
}

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

.faq-category-content {
    display: none;
}

.faq-category-content.active {
    display: block;
}

.faq-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8fafc;
    border-radius: 12px;
}

/* Legal Pages */
.legal-content {
    padding: 40px 0;
}

.legal-text {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.legal-text h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.legal-text ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.disclaimer-notice {
    background-color: #fef3cd;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

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

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

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

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

.footer-section a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

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

    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    .hero-actions {
        justify-content: center;
    }

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

    .catalog-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        min-width: auto;
    }

    .course-detail-grid,
    .checkout-content,
    .contact-grid,
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .course-sidebar,
    .checkout-sidebar {
        position: static;
    }

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

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        flex: 1;
    }

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

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

    .faq-categories {
        flex-direction: column;
        align-items: stretch;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

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

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

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

    .checkout-form,
    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }
}

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

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        color: #fff;
        border: 2px solid #000;
    }

    .btn-outline {
        border-width: 3px;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .nav,
    .btn,
    .checkout-sidebar {
        display: none;
    }

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

    h1, h2, h3 {
        page-break-after: avoid;
    }

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