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

:root {
    --primary-color: hsl(210, 100%, 50%);
    --primary-dark: hsl(210, 100%, 40%);
    --primary-light: hsl(210, 100%, 95%);
    --secondary-color: hsl(150, 60%, 45%);
    --accent-color: hsl(45, 80%, 50%);
    --text-primary: hsl(220, 15%, 15%);
    --text-secondary: hsl(220, 10%, 45%);
    --text-muted: hsl(220, 10%, 65%);
    --bg-primary: hsl(0, 0%, 100%);
    --bg-secondary: hsl(220, 20%, 98%);
    --bg-tertiary: hsl(220, 15%, 96%);
    --border-color: hsl(220, 15%, 90%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

/* Header & Navigation */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.125rem;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    line-height: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-secondary) 100%);
    padding: 4rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

/* Features Section */
.features {
    position: relative;
    padding: 5rem 0;
    background: var(--bg-secondary);
    overflow: hidden;
}

.features-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40%;
    height: 100%;
    opacity: 0.05;
    z-index: 1;
}

.features-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    z-index: 2;
}

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

.feature-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Course Sections */
.featured-courses {
    padding: 5rem 0;
    background: var(--bg-primary);
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

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

.course-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.course-image {
    width: 100%;
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    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: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.course-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.course-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.course-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

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

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.course-instructor {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

/* CTA Section */
.cta-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 5rem 0;
    color: white;
    text-align: center;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

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

.course-header {
    background: var(--bg-secondary);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

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

.course-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.course-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.course-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: sticky;
    top: 100px;
}

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

.course-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.course-info-list {
    list-style: none;
    margin-bottom: 2rem;
}

.course-info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.course-info-list li:last-child {
    border-bottom: none;
}

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

.course-main {
    background: var(--bg-primary);
}

.course-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.course-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

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

.course-section li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.curriculum-item {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.curriculum-item::before {
    content: "📚";
}

.instructor-section {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.instructor-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    flex-shrink: 0;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.faq-answer {
    color: var(--text-secondary);
    padding-left: 1rem;
}

/* Catalog Page */
.catalog-header {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.catalog-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-primary);
}

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

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

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

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin: 0 0.5rem;
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.step.completed {
    background: var(--secondary-color);
    color: white;
}

.checkout-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input.error {
    border-color: hsl(0, 70%, 50%);
}

.form-error {
    color: hsl(0, 70%, 50%);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

.checkout-summary {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-total {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    border-bottom: none;
}

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

.payment-icon {
    width: 40px;
    height: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

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

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2rem;
}

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

.content-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.content-page h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.content-page h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.content-page p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

.content-page li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Contact Form */
.contact-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.contact-info {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

/* FAQ Page */
.faq-list {
    margin: 2rem 0;
}

.faq-list .faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

.footer-contact {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    line-height: 1.6;
    opacity: 0.8;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.9);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.8;
}

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

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

    .nav-toggle {
        display: flex;
    }

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

    .hero p {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .features h2,
    .section-header h2 {
        font-size: 2rem;
    }

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

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

    .course-sidebar {
        position: static;
        order: -1;
    }

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

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

    .checkout-actions {
        flex-direction: column;
    }

    .catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }
}

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

    .hero {
        padding: 2rem 0;
    }

    .features,
    .featured-courses {
        padding: 3rem 0;
    }

    .course-content {
        padding: 1rem;
    }

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

/* Focus and accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Print styles */
@media print {
    .header,
    .footer,
    .nav,
    .btn {
        display: none !important;
    }

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

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