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

:root {
    --primary-color: hsl(240, 73%, 65%);
    --primary-dark: hsl(240, 73%, 55%);
    --secondary-color: hsl(197, 71%, 52%);
    --accent-color: hsl(297, 70%, 50%);
    --text-primary: hsl(220, 13%, 18%);
    --text-secondary: hsl(220, 9%, 46%);
    --text-light: hsl(220, 14%, 71%);
    --background: hsl(0, 0%, 100%);
    --background-alt: hsl(220, 14%, 96%);
    --border-color: hsl(220, 13%, 91%);
    --shadow: 0 4px 6px -1px hsla(220, 13%, 18%, 0.1);
    --shadow-lg: 0 10px 15px -3px hsla(220, 13%, 18%, 0.1);
    --radius: 8px;
    --radius-lg: 12px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --container-width: 1200px;
    --container-padding: 1rem;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

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

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem var(--container-padding);
    min-height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo {
    width: 40px;
    height: 40px;
}

.brand-text {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

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

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

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

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

.nav-toggle span {
    width: 24px;
    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;
    font-size: var(--font-size-base);
    font-weight: 500;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
    gap: 0.5rem;
}

.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-color: var(--primary-color);
}

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

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 4rem 0;
    background: linear-gradient(135deg, hsl(240, 73%, 97%) 0%, hsl(197, 71%, 97%) 100%);
    overflow: hidden;
}

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

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

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

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

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

/* Features Section */
.features {
    padding: 4rem 0;
    background: var(--background);
}

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

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
}

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

.feature-card h3 {
    font-size: var(--font-size-xl);
    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: 4rem 0;
    background: var(--background-alt);
}

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

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

.section-header p {
    font-size: var(--font-size-lg);
    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(--background);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

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

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

.course-label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.course-content {
    padding: 1.5rem;
}

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

.course-category {
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.course-difficulty {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

.course-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

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

.course-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.course-duration {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.course-price {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--primary-color);
}

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

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

.cta-content h2 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.cta-section .btn-primary:hover {
    background: var(--background-alt);
}

.cta-section .btn-secondary {
    border-color: white;
    color: white;
}

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

/* Footer */
.footer {
    background: var(--text-primary);
    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 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-brand-text {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.footer-description {
    color: var(--text-light);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

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

.contact-info p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-info a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.contact-info a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid hsl(220, 13%, 30%);
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-legal a {
    color: var(--text-light);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s;
}

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

.footer-copyright {
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* Search and Filter */
.search-filter {
    background: var(--background);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    background: var(--background);
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Course Detail Page */
.course-hero {
    padding: 2rem 0;
    background: var(--background-alt);
}

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

.course-info h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.course-info .course-meta {
    margin-bottom: 1.5rem;
}

.course-info .course-description {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
}

.course-sidebar {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.course-price-display {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

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

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

.course-content-section {
    padding: 3rem 0;
}

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

.learning-objectives {
    list-style: none;
    margin-bottom: 2rem;
}

.learning-objectives li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--background-alt);
    border-radius: var(--radius);
}

.learning-objectives li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    flex-shrink: 0;
}

.curriculum-list {
    list-style: none;
}

.curriculum-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: background 0.2s;
}

.curriculum-list li:hover {
    background: var(--background-alt);
}

.lesson-number {
    background: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    flex-shrink: 0;
}

.instructor-section {
    background: var(--background-alt);
    padding: 3rem 0;
}

.instructor-card {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.instructor-info h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.faq-section {
    padding: 3rem 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: var(--background);
    border: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background: var(--background-alt);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    background: var(--background-alt);
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer.hidden {
    display: none;
}

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

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

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: var(--font-size-base);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Page Specific */
.page-header {
    padding: 2rem 0;
    background: var(--background-alt);
    text-align: center;
}

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

.page-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
}

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

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

.content-section h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

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

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

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

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

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

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

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

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

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

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

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: var(--font-size-2xl);
    }

    .features,
    .featured-courses,
    .cta-section {
        padding: 2rem 0;
    }

    .course-card {
        margin: 0 -0.5rem;
    }

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

    .btn {
        padding: 0.75rem 1rem;
        font-size: var(--font-size-sm);
    }
}

/* 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 */
.btn:focus,
.nav-link:focus,
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}