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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

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

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: #5048e5;
    border-color: #5048e5;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

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

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

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

/* Header */
.header {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #6366f1;
}

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

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #6366f1;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-toggle span {
    width: 1.5rem;
    height: 2px;
    background-color: #374151;
    transition: all 0.3s ease;
}

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

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

.hero-text h1 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 2rem;
}

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

.hero-image {
    display: flex;
    justify-content: center;
}

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

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

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background-color: #f8fafc;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-0.25rem);
}

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

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

.feature-card p {
    color: #64748b;
    margin-bottom: 0;
}

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

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

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

.section-header p {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 0;
}

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

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

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

.course-image {
    height: 200px;
    overflow: hidden;
}

.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;
    font-size: 0.875rem;
    color: #64748b;
}

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

.course-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6366f1;
}

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

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

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

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

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

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

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

.cta-content .btn-primary:hover {
    background-color: #f3f4f6;
}

/* Course Detail Page */
.course-hero {
    padding: 2rem 0;
    background-color: #f8fafc;
}

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

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

.course-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background-color: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.course-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.course-purchase {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.price-section {
    text-align: center;
    margin-bottom: 2rem;
}

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

.price-note {
    color: #64748b;
    font-size: 0.875rem;
}

.purchase-btn {
    width: 100%;
    margin-bottom: 1rem;
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.course-details {
    padding: 3rem 0;
}

.detail-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.learn-list, .requirements-list {
    list-style: none;
}

.learn-list li, .requirements-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.learn-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.requirements-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #6366f1;
    font-weight: bold;
}

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

.instructor-card {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

.instructor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

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

.instructor-bio {
    color: #64748b;
    margin-bottom: 0;
}

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

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

.faq-answer {
    color: #64748b;
    margin-bottom: 0;
}

/* Courses Page */
.page-header {
    padding: 2rem 0;
    background-color: #f8fafc;
    text-align: center;
}

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

.page-header p {
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 0;
}

.courses-filters {
    padding: 2rem 0;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
}

.filters-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #374151;
}

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

.filter-input:focus, .filter-select:focus {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
    border-color: #6366f1;
}

.courses-content {
    padding: 3rem 0;
}

/* Checkout Pages */
.checkout-header {
    padding: 2rem 0;
    background-color: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background-color: #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

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

.progress-step.completed {
    background-color: #10b981;
    color: white;
}

.checkout-content {
    padding: 3rem 0;
}

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

.checkout-form {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px 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-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.form-input:focus {
    outline: 2px solid #6366f1;
    outline-offset: -2px;
    border-color: #6366f1;
}

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

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

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

.checkout-summary {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

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

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

.payment-icon {
    width: 40px;
    height: 25px;
    background-color: #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;
    justify-content: center;
    gap: 0.5rem;
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 1rem;
}

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

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

.checkbox-group label {
    font-size: 0.875rem;
    line-height: 1.5;
}

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

.success-icon {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.order-details {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    text-align: left;
}

/* Contact Page */
.contact-content {
    padding: 3rem 0;
}

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

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* About Page */
.about-content {
    padding: 3rem 0;
}

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

.about-section h2 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.about-section p {
    color: #64748b;
    font-size: 1.125rem;
}

/* Legal Pages */
.legal-content {
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

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

.legal-content p {
    color: #64748b;
    margin-bottom: 1rem;
}

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

.legal-content li {
    color: #64748b;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    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;
}

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

.footer-section p {
    color: #cbd5e1;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        border-top: 1px solid #e5e7eb;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

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

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

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

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

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

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

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .instructor-card {
        flex-direction: column;
        text-align: center;
    }
}

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

    .hero {
        padding: 2rem 0;
    }

    .features {
        padding: 2rem 0;
    }

    .featured-courses {
        padding: 2rem 0;
    }

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

    .checkout-form,
    .checkout-summary {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
    }
}

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

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

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

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

[dir="rtl"] .checkout-layout {
    direction: rtl;
}

[dir="rtl"] .form-row {
    direction: rtl;
}

/* Accessibility */
.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;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

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

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

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