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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Header Styles */
.header {
    background: #fff;
    box-shadow: 0 2px 10px 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;
}

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

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

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

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

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

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

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

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

.btn-outline {
    background: transparent;
    color: #333;
    border-color: #ddd;
}

.btn-outline:hover {
    background: #f8f9fa;
    border-color: #6366f1;
    color: #6366f1;
}

.btn-success {
    background: #10b981;
    color: white;
}

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

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.hero-text p {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

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

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

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

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

.feature {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: #f8fafc;
    transition: transform 0.3s;
}

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

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

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

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

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

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

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

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

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

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

.course-content {
    padding: 1.5rem;
}

.course-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #6366f1;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

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

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

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

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

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

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 1rem;
}

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

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

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    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: 8px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
}

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

/* Course Detail Page */
.course-header {
    padding: 40px 0;
    background: #f8fafc;
}

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

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

.course-instructor {
    margin: 1rem 0;
    color: #64748b;
}

.course-purchase {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.course-purchase-price {
    font-size: 2rem;
    font-weight: 700;
    color: #6366f1;
    margin-bottom: 1rem;
}

.course-details {
    padding: 60px 0;
}

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

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

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

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

.course-section li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

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

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

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

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

.faq-answer {
    color: #64748b;
    line-height: 1.6;
}

/* Checkout Styles */
.checkout-header {
    padding: 40px 0;
    background: #f8fafc;
    text-align: center;
}

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

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

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

.checkout-content {
    padding: 40px 0;
}

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

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

.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 {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
}

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

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

.checkout-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

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

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

.payment-icons {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

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

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

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

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

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

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

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

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

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

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

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

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-legal a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
}

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

/* Page Content Styles */
.page-header {
    padding: 60px 0;
    background: #f8fafc;
    text-align: center;
}

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

.page-content {
    padding: 60px 0;
}

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

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

.content-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #374151;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: #4b5563;
}

.content-section ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #4b5563;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

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

/* Error States */
.error {
    border-color: #ef4444 !important;
}

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

/* Success States */
.success-message {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #a7f3d0;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

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

    .nav-toggle {
        display: flex;
    }

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

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

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

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

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

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

    .hero {
        padding: 40px 0;
    }

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

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

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

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

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

[dir="rtl"] .hero-content {
    grid-template-columns: 1fr 1fr;
}

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

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

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