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

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

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

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

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #333;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: #6366f1;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 16px;
}

.btn-primary {
    background: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: #5855eb;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: #6366f1;
    border-color: #6366f1;
}

.btn-secondary:hover {
    background: #6366f1;
    color: white;
}

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

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

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

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

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

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

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

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

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

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

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

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

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

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

.course-card {
    background: white;
    border-radius: 12px;
    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: 25px;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #64748b;
}

.course-tag {
    background: #e0e7ff;
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.course-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

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

.course-title a:hover {
    color: #6366f1;
}

.course-description {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
}

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

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

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

/* Course Filters */
.course-filters {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #6366f1;
}

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

.course-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.course-header-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.course-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.course-sidebar {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.course-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.course-section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.course-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1e293b;
}

.course-section ul {
    list-style: none;
    padding-left: 0;
}

.course-section li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    padding-left: 25px;
}

.course-section li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

.curriculum-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.lesson-title {
    font-weight: 600;
    color: #374151;
}

.lesson-duration {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Checkout Pages */
.checkout {
    padding: 40px 0;
    background: #f8fafc;
    min-height: calc(100vh - 200px);
}

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

.checkout-header {
    text-align: center;
    margin-bottom: 40px;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 0 10px;
    font-weight: 600;
}

.step.active {
    background: #6366f1;
    color: white;
}

.step.inactive {
    background: #e5e7eb;
    color: #6b7280;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

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

.error-message {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 5px;
}

.order-summary {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    border-top: 2px solid #6366f1;
    margin-top: 15px;
}

.payment-icons {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 20px 0;
}

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

.security-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #059669;
    font-size: 0.9rem;
    margin: 15px 0;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
}

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

.checkbox-group label {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* FAQ Page */
.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #374151;
}

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

.faq-answer {
    padding: 0 20px 20px;
    color: #6b7280;
    line-height: 1.6;
    display: none;
}

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

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

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

/* Contact Form */
.contact-info {
    background: #f8fafc;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

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

.contact-item {
    text-align: center;
}

.contact-item h3 {
    margin-bottom: 15px;
    color: #374151;
}

.contact-item p {
    color: #6b7280;
}

.contact-item a {
    color: #6366f1;
    text-decoration: none;
}

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

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: #f1f5f9;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

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

.footer-section a:hover {
    color: #6366f1;
}

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

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

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

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

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

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

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .hero {
        padding: 40px 0;
    }

    .hero-content {
        padding: 0 15px;
    }

    .features,
    .featured-courses {
        padding: 40px 0;
    }

    .checkout-form {
        padding: 20px;
    }

    .course-section {
        padding: 20px;
    }
}

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

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

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

[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .course-section li {
    padding-left: 0;
    padding-right: 25px;
}

[dir="rtl"] .course-section li:before {
    left: auto;
    right: 0;
}

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

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.nav-toggle:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

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

.btn.loading {
    position: relative;
}

.btn.loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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