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

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

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 1rem;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: #4f46e5;
    outline: none;
}

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

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

.btn-primary:hover, .btn-primary:focus {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

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

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

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

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #e5e7eb;
    color: #374151;
}

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1f2937;
}

.logo:hover, .logo:focus {
    color: #6366f1;
}

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

.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

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

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

.nav-toggle span {
    width: 20px;
    height: 2px;
    background-color: #4b5563;
    transition: all 0.3s ease;
}

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

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

.hero-content h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

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

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

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

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

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

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

.feature-card p {
    color: #6b7280;
    margin-bottom: 0;
}

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

.featured-courses h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

.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: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
}

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.course-tag {
    background-color: #ddd6fe;
    color: #5b21b6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

.course-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
}

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

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

.course-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

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

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

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

.course-info-meta span {
    color: #6b7280;
    font-size: 0.875rem;
}

.course-purchase-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: sticky;
    top: 100px;
}

.course-purchase-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

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

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

.course-main-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.content-section {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.content-section h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.content-section ul {
    list-style-type: none;
    padding: 0;
}

.content-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    padding-left: 1.5rem;
}

.content-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: 1rem;
    background-color: #f9fafb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.curriculum-item:before {
    display: none;
}

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

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

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.faq-answer {
    color: #6b7280;
    margin-bottom: 0;
}

.instructor-card {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1rem;
}

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

.instructor-bio {
    color: #6b7280;
    margin-bottom: 0;
}

/* Courses Catalog Page */
.courses-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0 2rem;
    margin-bottom: 2rem;
}

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

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

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

.filter-group label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.courses-results {
    padding-bottom: 4rem;
}

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

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

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

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

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

.step.completed {
    background-color: #059669;
    color: white;
}

.checkout-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

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

.order-summary {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e5e7eb;
}

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

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

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #4b5563;
}

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

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

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

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

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

/* Success Page */
.success-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 4rem 1rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #059669;
    margin-bottom: 2rem;
}

.success-container h1 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.success-container p {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Content Pages */
.content-page {
    padding: 2rem 0 4rem;
}

.content-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.content-body {
    background-color: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    line-height: 1.7;
}

.content-body h2 {
    color: #1f2937;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.content-body h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

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

.content-body li {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.contact-info {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.contact-info h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1rem;
    color: #6b7280;
}

.contact-info a {
    color: #6366f1;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

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

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

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

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

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: #6366f1;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-sections {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-purchase-card {
        position: static;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .checkout-steps {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .content-body {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-card {
        min-width: unset;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

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

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

/* Loading and Animation States */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .header, .footer, .nav, .btn {
        display: none !important;
    }
    
    .content-body {
        box-shadow: none;
        border: none;
    }
}