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

html {
    font-size: 16px;
    line-height: 1.6;
}

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

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

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

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

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

/* 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;
    text-decoration: none;
    color: #2563eb;
    font-weight: 700;
    font-size: 1.25rem;
    gap: 0.5rem;
}

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

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #2563eb;
}

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* 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 ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

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

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

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

.btn-outline {
    background: transparent;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.btn-outline:hover,
.btn-outline:focus {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

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

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

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

/* Features Section */
.features {
    padding: 4rem 0;
    background: #f8fafc;
}

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

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

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

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

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

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

.feature p {
    color: #6b7280;
}

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

.featured-courses h2 {
    text-align: center;
    font-size: 2rem;
    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: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.course-content {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    background: #dbeafe;
    color: #2563eb;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

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

.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.125rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 1rem;
}

.course-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

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

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

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

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

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

.course-main img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

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

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

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

.course-details p {
    margin-bottom: 0.5rem;
    color: #6b7280;
}

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

.what-you-learn,
.requirements,
.curriculum,
.instructor,
.course-faq {
    margin-bottom: 3rem;
}

.what-you-learn h3,
.requirements h3,
.curriculum h3,
.instructor h3,
.course-faq h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.what-you-learn ul,
.requirements ul {
    list-style: none;
    padding: 0;
}

.what-you-learn li,
.requirements li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.what-you-learn li:before {
    content: "✓ ";
    color: #059669;
    font-weight: bold;
}

.requirements li:before {
    content: "• ";
    color: #6b7280;
    font-weight: bold;
}

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

.curriculum-item {
    background: #f8fafc;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

.instructor-bio {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

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

.faq-question {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.faq-answer {
    color: #6b7280;
    padding-left: 1rem;
}

/* Courses Catalog */
.catalog-header {
    padding: 2rem 0;
    background: #f8fafc;
}

.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: 500;
    color: #374151;
}

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

/* Checkout Pages */
.checkout {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

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

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

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

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

.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: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.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-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkout-summary {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    border-top: 1px solid #d1d5db;
    padding-top: 1rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.payment-icons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.payment-icon {
    width: 40px;
    height: 25px;
    background: #f3f4f6;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #6b7280;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

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

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

.checkbox-group label {
    margin: 0;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #d1d5db;
    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 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

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

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

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

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

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

/* Content Pages */
.content-page {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.content-page h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.content-page h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: #1f2937;
}

.content-page h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem;
    color: #1f2937;
}

.content-page p {
    margin-bottom: 1rem;
    color: #4b5563;
}

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

.content-page li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

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

.faq-list .faq-item {
    background: #f8fafc;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

/* Contact Form */
.contact-form {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

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

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-info {
        grid-template-columns: 1fr;
    }
    
    .catalog-filters {
        flex-direction: column;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .features,
    .featured-courses {
        padding: 2rem 0;
    }
    
    .course-content {
        padding: 1rem;
    }
    
    .checkout,
    .content-page {
        padding: 1rem 0;
    }
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.error {
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.success {
    background: #f0fdf4;
    color: #059669;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Form Validation */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc2626;
}

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