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

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

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

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

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

/* Header */
.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 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

.nav-link {
    font-weight: 500;
    color: #4b5563;
    transition: color 0.3s ease;
    position: relative;
}

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

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

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

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

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

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

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

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

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

.btn-outline {
    background: transparent;
    color: #4b5563;
    border-color: #d1d5db;
}

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

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

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

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

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

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

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

.feature-card {
    background: white;
    padding: 2rem;
    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.15);
}

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

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

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

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

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

.course-image {
    height: 200px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

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

.course-difficulty {
    background: #f0f9ff;
    color: #0284c7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.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-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

.course-header {
    background: #f9fafb;
    padding: 40px 0;
    margin-bottom: 40px;
}

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

.course-title-main {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

.course-instructor {
    color: #6b7280;
    margin-bottom: 1rem;
}

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

.course-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.course-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.course-stat-value {
    font-weight: 600;
    color: #1f2937;
}

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

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

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

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

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

.course-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1f2937;
}

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

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

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

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

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

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

.faq-question {
    padding: 1rem;
    background: #f9fafb;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 1rem;
    display: none;
    border-top: 1px solid #e5e7eb;
}

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

.faq-toggle {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

/* Course Catalog */
.courses-header {
    padding: 40px 0;
    background: #f9fafb;
}

.courses-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: 600;
    color: #374151;
    font-size: 0.875rem;
}

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

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

.courses-results {
    margin-bottom: 2rem;
    color: #6b7280;
}

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

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

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

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

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-checkbox input {
    margin-top: 0.25rem;
}

/* Checkout */
.checkout {
    padding: 40px 0;
}

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

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2rem;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: #d1d5db;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #d1d5db;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

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

.step.completed .step-number {
    background: #10b981;
}

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

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

.checkout-summary {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
}

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

.summary-total {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1f2937;
}

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

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

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* Success Page */
.success {
    padding: 80px 0;
    text-align: center;
}

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

.success h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

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

.order-details {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 500px;
    text-align: left;
}

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

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
}

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

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

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

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

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

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

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

.content-page h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: #374151;
}

.content-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: #4b5563;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header-content,
    .course-sections,
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .courses-filters {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 20px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .course-card {
        margin: 0 10px;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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