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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #3B82F6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

.btn-primary {
    background-color: #3B82F6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563EB;
    text-decoration: none;
}

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

.btn-secondary:hover {
    background-color: #4B5563;
    text-decoration: none;
}

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

.btn-outline:hover {
    background-color: #3B82F6;
    color: white;
    text-decoration: none;
}

.btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

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

.nav {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

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

.nav-link {
    color: #4B5563;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #3B82F6;
    text-decoration: none;
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #4B5563;
    margin: 2px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    padding: 80px 0;
}

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

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

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

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

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

/* Trust Indicators */
.trust-indicators {
    padding: 60px 0;
    background-color: #F9FAFB;
}

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

.trust-item h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.trust-item p {
    color: #6B7280;
}

/* Featured Courses */
.featured-courses {
    padding: 80px 0;
}

.featured-courses h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1F2937;
}

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

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

.course-card:hover {
    transform: translateY(-4px);
    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-category {
    display: inline-block;
    background-color: #EFF6FF;
    color: #3B82F6;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

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

.course-title a {
    color: inherit;
    text-decoration: none;
}

.course-title a:hover {
    color: #3B82F6;
    text-decoration: none;
}

.course-description {
    color: #6B7280;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
}

.course-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
}

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

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

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1F2937;
}

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

.feature {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.feature p {
    color: #6B7280;
}

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

.page-header h1 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: #4B5563;
    max-width: 600px;
    margin: 0 auto;
}

/* Catalog Filters */
.courses-catalog {
    padding: 60px 0;
}

.catalog-filters {
    background-color: #F9FAFB;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

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

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 1rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.results-count {
    margin-bottom: 2rem;
    color: #6B7280;
    font-weight: 500;
}

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

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

.course-info h1 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.course-meta-detail {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    font-size: 0.95rem;
}

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

.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 1.5rem;
}

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

.course-main h2 {
    color: #1F2937;
    margin: 2rem 0 1rem 0;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.course-main h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

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

.curriculum-list li {
    padding: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background-color: #FAFAFA;
}

.instructor-info {
    background-color: #F9FAFB;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.instructor-info h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.course-faq {
    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;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* Checkout Styles */
.checkout {
    padding: 60px 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.75rem 1.5rem;
    border-radius: 25px;
    background-color: #F3F4F6;
    color: #6B7280;
}

.step.active {
    background-color: #3B82F6;
    color: white;
}

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

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    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 h2 {
    margin-bottom: 2rem;
    color: #1F2937;
}

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.error-message {
    color: #DC2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

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

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

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    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"] {
    display: none;
}

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

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

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

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

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

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

.payment-security {
    background-color: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.payment-security p {
    font-size: 0.875rem;
    color: #059669;
    margin: 0;
}

/* Order Success */
.order-success {
    padding: 60px 0;
    text-align: center;
}

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

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

.success-header h1 {
    color: #059669;
    margin-bottom: 1rem;
}

.order-details {
    background-color: #F9FAFB;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.next-steps {
    margin-bottom: 3rem;
}

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

.step-item {
    text-align: center;
    padding: 2rem;
}

.step-item .step-number {
    width: 40px;
    height: 40px;
    background-color: #3B82F6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 auto 1rem auto;
}

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

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

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

.about-text h2 {
    color: #1F2937;
    margin: 2rem 0 1rem 0;
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text ul {
    list-style: none;
    padding: 0;
}

.about-text li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F3F4F6;
}

.about-text li:last-child {
    border-bottom: none;
}

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

.values {
    padding: 60px 0;
    background-color: #F9FAFB;
}

.values h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1F2937;
}

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

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

.value-item h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.value-item p {
    color: #6B7280;
}

.cta-section {
    padding: 60px 0;
    text-align: center;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background-color: white;
    color: #3B82F6;
}

.cta-section .btn-primary:hover {
    background-color: #F3F4F6;
}

/* Contact Page */
.contact-content {
    padding: 60px 0;
}

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

.contact-info h2 {
    color: #1F2937;
    margin-bottom: 1.5rem;
}

.contact-methods {
    margin: 2rem 0;
}

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

.contact-method h3 {
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.contact-method p {
    color: #6B7280;
    margin: 0;
}

.support-hours {
    background-color: #F9FAFB;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.support-hours h3 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.contact-form h2 {
    color: #1F2937;
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: #D1FAE5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.faq-preview {
    padding: 60px 0;
    background-color: #F9FAFB;
    text-align: center;
}

.faq-preview h2 {
    color: #1F2937;
    margin-bottom: 1rem;
}

.faq-preview p {
    color: #6B7280;
    margin-bottom: 2rem;
}

/* FAQ Page */
.faq-content {
    padding: 60px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.faq-contact {
    text-align: center;
    padding: 3rem 0;
    background-color: #F9FAFB;
    border-radius: 12px;
}

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

.faq-contact p {
    color: #6B7280;
    margin-bottom: 2rem;
}

/* Legal Pages */
.legal-page {
    padding: 60px 0;
}

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

.legal-content section {
    margin-bottom: 2.5rem;
}

.legal-content h2 {
    color: #1F2937;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.legal-content h2:first-child {
    border-top: none;
    padding-top: 0;
}

.legal-content h3 {
    color: #374151;
    margin: 1.5rem 0 0.75rem 0;
}

.legal-content ul {
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.last-updated {
    color: #6B7280;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background-color: #1F2937;
    color: #D1D5DB;
    padding: 60px 0 20px 0;
}

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

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

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

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

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

.footer-section a:hover {
    color: #3B82F6;
    text-decoration: none;
}

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

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

    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

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

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

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

    .catalog-filters {
        grid-template-columns: 1fr;
    }

    .course-header {
        grid-template-columns: 1fr;
    }

    .course-sections {
        grid-template-columns: 1fr;
    }

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

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

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

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

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

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

    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.95rem;
    }

    .course-card {
        margin-bottom: 1rem;
    }

    .checkout-steps {
        gap: 1rem;
    }

    .step {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Focus States for Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

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