* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', monospace;
    --max-width: 1200px;
    --header-height: 80px;
}

[dir="rtl"] {
    --text-align: right;
    --text-align-opposite: left;
}

[dir="ltr"], :root {
    --text-align: left;
    --text-align-opposite: right;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 16px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

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

h1 {
    font-size: 2.25rem;
    font-weight: 800;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 44px;
    gap: 0.5rem;
}

.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-accent);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

/* Header */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary-color);
}

.nav {
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: block;
    }
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.2s ease;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-accent) 100%);
}

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

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.hero-text h1 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-text p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

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

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

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

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--bg-primary);
}

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

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

.section-header p {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--radius-lg);
    background-color: var(--bg-secondary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Featured Courses Section */
.featured-courses {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

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

@media (min-width: 640px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.course-card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.course-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--bg-accent);
    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;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.course-category {
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.course-difficulty {
    color: var(--text-light);
    font-size: 0.875rem;
}

.course-title {
    margin-bottom: 0.5rem;
}

.course-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.course-title a:hover {
    color: var(--primary-color);
}

.course-description {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-duration {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

/* Trust Section */
.trust-section {
    padding: 3rem 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.trust-content {
    text-align: center;
}

.trust-content h2 {
    margin-bottom: 2rem;
}

.trust-features {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
}

.trust-item svg {
    color: var(--success-color);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--bg-primary);
}

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

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

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-section ul li a:hover {
    color: var(--bg-primary);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
}

.footer-section p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-info a {
    color: var(--text-light);
}

.contact-info a:hover {
    color: var(--bg-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--text-light);
    font-size: 0.875rem;
}

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

.footer-bottom p {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

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

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

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

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    list-style: none;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--primary-color);
}

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

@media (min-width: 1024px) {
    .course-main {
        grid-template-columns: 2fr 1fr;
    }
}

.course-sidebar {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.course-sidebar .course-image {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

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

.course-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.course-info-item:last-child {
    border-bottom: none;
}

.course-content-section {
    margin-bottom: 3rem;
}

.course-content-section h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.what-you-learn {
    background-color: var(--bg-accent);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.what-you-learn ul {
    list-style: none;
    display: grid;
    gap: 0.75rem;
}

.what-you-learn li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.what-you-learn li::before {
    content: '✓';
    color: var(--success-color);
    font-weight: bold;
    margin-top: 0.1rem;
}

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

.curriculum-item {
    background-color: var(--bg-secondary);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.curriculum-item summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    background-color: var(--bg-secondary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.curriculum-item summary:hover {
    background-color: var(--bg-accent);
}

.curriculum-content {
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
}

.instructor-card {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.instructor-avatar {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.faq-list {
    list-style: none;
}

.faq-item {
    background-color: var(--bg-secondary);
    margin-bottom: 0.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-weight: 500;
    background-color: var(--bg-secondary);
}

.faq-item summary:hover {
    background-color: var(--bg-accent);
}

.faq-content {
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
}

/* Courses Page */
.courses-page {
    padding: 2rem 0;
}

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

.courses-filters {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 3rem;
}

.filters-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    align-items: end;
}

@media (min-width: 768px) {
    .filters-row {
        grid-template-columns: 2fr 1fr 1fr auto;
    }
}

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

.filter-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    font-size: 1rem;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: 2px solid var(--primary-color);
    border-color: var(--primary-color);
}

.courses-results {
    margin-bottom: 2rem;
}

.results-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Checkout Pages */
.checkout-page {
    padding: 2rem 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

.checkout-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-light);
    font-size: 0.875rem;
}

.step.active {
    background-color: var(--primary-color);
    color: white;
}

.step.completed {
    background-color: var(--success-color);
    color: white;
}

.step:not(:last-child)::after {
    content: '→';
    margin-left: 1rem;
    color: var(--text-light);
}

.checkout-form {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

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

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

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

@media (min-width: 640px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--primary-color);
    border-color: var(--primary-color);
}

.form-group input.error,
.form-group select.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
}

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

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

.checkout-summary {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.125rem;
}

.course-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.course-summary img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.payment-methods {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: var(--bg-accent);
    border-radius: var(--radius-md);
}

.payment-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
}

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

.order-details {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    text-align: left;
}

/* Content Pages */
.content-page {
    padding: 2rem 0;
    min-height: calc(100vh - var(--header-height) - 200px);
}

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

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

.content-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-body ul,
.content-body ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-body li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-form {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.contact-info {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    margin-bottom: 1rem;
}

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

.faq-page .faq-item {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 767px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-actions .btn {
        text-align: center;
    }
    
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .features,
    .featured-courses {
        padding: 3rem 0;
    }
    
    .trust-features {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .checkout-actions .btn {
        width: 100%;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: var(--text-align);
}

[dir="rtl"] .hero-content,
[dir="rtl"] .course-main {
    direction: rtl;
}

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

[dir="rtl"] .hero-actions,
[dir="rtl"] .trust-features,
[dir="rtl"] .checkout-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .course-meta,
[dir="rtl"] .course-footer,
[dir="rtl"] .summary-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb li:not(:last-child)::after {
    content: '\\';
    margin-right: 0.5rem;
    margin-left: 0;
}

[dir="rtl"] .what-you-learn li {
    flex-direction: row-reverse;
}

/* Loading and Error States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.error-state h3 {
    margin-bottom: 1rem;
    color: var(--error-color);
}

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

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

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
.btn:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}