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

:root {
    --primary-color: hsl(297, 70%, 50%);
    --primary-light: hsl(297, 70%, 60%);
    --primary-dark: hsl(297, 70%, 40%);
    --secondary-color: hsl(220, 15%, 20%);
    --accent-color: hsl(45, 100%, 60%);
    --text-color: hsl(220, 15%, 20%);
    --text-light: hsl(220, 10%, 50%);
    --bg-color: hsl(0, 0%, 100%);
    --bg-light: hsl(220, 15%, 98%);
    --border-color: hsl(220, 15%, 90%);
    --shadow: 0 2px 10px hsla(220, 15%, 20%, 0.1);
    --shadow-hover: 0 4px 20px hsla(220, 15%, 20%, 0.15);
    --border-radius: 8px;
    --max-width: 1200px;
    --header-height: 70px;
}

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

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

/* Header */
.header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    height: var(--header-height);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    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);
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

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

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

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

.btn-secondary:hover {
    background: hsl(220, 15%, 15%);
    transform: translateY(-2px);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    padding: 80px 0 120px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-color) 100%);
    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;
    margin-bottom: 24px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-color);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

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

.feature-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: var(--border-radius);
    background: var(--bg-light);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-light);
}

/* Featured Courses Section */
.featured-courses {
    padding: 80px 0;
    background: var(--bg-light);
}

.featured-courses h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

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

.course-card {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

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

.course-label {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.course-content {
    padding: 24px;
}

.course-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.course-category,
.course-difficulty {
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.course-category {
    background: var(--accent-color);
    color: var(--text-color);
}

.course-difficulty {
    background: var(--border-color);
    color: var(--text-color);
}

.course-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.course-card h3 a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s;
}

.course-card h3 a:hover {
    color: var(--primary-color);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

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

.course-duration {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

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

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: hsl(0, 0%, 80%);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid hsl(220, 15%, 30%);
    color: hsl(0, 0%, 70%);
}

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

.search-filter-form {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s;
}

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

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

.filter-select {
    min-width: 150px;
}

/* Course Detail Page */
.course-header {
    padding: 40px 0;
    background: var(--bg-light);
}

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

.course-info h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.course-instructor {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
}

.course-sidebar {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.course-sidebar img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.course-body {
    padding: 60px 0;
}

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

.course-main {
    max-width: none;
}

.course-section {
    margin-bottom: 40px;
}

.course-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

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

.course-section li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
}

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

.curriculum-item {
    background: var(--bg-light);
    padding: 16px 20px;
    margin-bottom: 8px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

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

.faq-question {
    background: var(--bg-light);
    padding: 16px 20px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.faq-answer {
    padding: 16px 20px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

/* Contact Form */
.contact-form {
    background: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s;
}

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

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

/* Page Headers */
.page-header {
    background: var(--bg-light);
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.page-content {
    padding: 60px 0;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    color: var(--text-color);
}

.content-section h3 {
    font-size: 1.4rem;
    margin: 24px 0 12px;
    color: var(--text-color);
}

.content-section p {
    margin-bottom: 16px;
    line-height: 1.7;
}

.content-section ul,
.content-section ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.content-section li {
    margin-bottom: 8px;
}

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

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

    .nav-toggle {
        display: flex;
    }

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

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

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

    .features h2,
    .featured-courses h2 {
        font-size: 2rem;
    }

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

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

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

    .course-header-content,
    .course-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

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

    .contact-form {
        padding: 20px;
    }
}

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

    .hero {
        padding: 40px 0 60px;
    }

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

    .features,
    .featured-courses,
    .page-content {
        padding: 40px 0;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .course-card {
        margin: 0 -16px;
        border-radius: 0;
    }
}

/* Focus and Accessibility */
.btn:focus,
.nav-link:focus,
.search-input:focus,
.filter-select:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    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 Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.error {
    background: hsl(0, 70%, 95%);
    color: hsl(0, 70%, 40%);
    padding: 16px;
    border-radius: var(--border-radius);
    border-left: 4px solid hsl(0, 70%, 50%);
    margin-bottom: 20px;
}

.success {
    background: hsl(120, 70%, 95%);
    color: hsl(120, 70%, 30%);
    padding: 16px;
    border-radius: var(--border-radius);
    border-left: 4px solid hsl(120, 70%, 50%);
    margin-bottom: 20px;
}