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

:root {
    --primary-color: hsl(220, 90%, 56%);
    --primary-dark: hsl(220, 90%, 45%);
    --secondary-color: hsl(45, 100%, 60%);
    --accent-color: hsl(297, 70%, 50%);
    --text-dark: hsl(220, 20%, 20%);
    --text-medium: hsl(220, 10%, 40%);
    --text-light: hsl(220, 5%, 60%);
    --bg-white: hsl(0, 0%, 100%);
    --bg-light: hsl(220, 20%, 98%);
    --bg-section: hsl(220, 20%, 96%);
    --border-light: hsl(220, 10%, 90%);
    --border-medium: hsl(220, 10%, 80%);
    --success-color: hsl(120, 60%, 50%);
    --error-color: hsl(0, 70%, 55%);
    --warning-color: hsl(35, 90%, 55%);
    --shadow-sm: 0 1px 3px hsla(220, 20%, 20%, 0.1);
    --shadow-md: 0 4px 12px hsla(220, 20%, 20%, 0.1);
    --shadow-lg: 0 8px 25px hsla(220, 20%, 20%, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

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

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

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.25rem;
}

.logo {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    line-height: 1.5;
}

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

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

.hero-bg {
    max-width: 100%;
    height: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
}

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

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

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

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

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

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

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

.btn-success:hover {
    background: hsl(120, 60%, 45%);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Trust Section */
.trust-section {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.trust-item {
    text-align: center;
    padding: 2rem;
}

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

.trust-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.trust-item p {
    color: var(--text-medium);
}

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

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

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

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

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

.course-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

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

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

.course-content {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.course-description {
    color: var(--text-medium);
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

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

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

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(220, 90%, 56%, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

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

/* Filters and Search */
.filters-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-light);
}

.filters-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: white;
    font-size: 1rem;
    min-width: 150px;
}

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

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

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

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

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

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

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

.order-summary {
    background: var(--bg-section);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

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

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

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

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

.footer-section p,
.footer-section li {
    color: hsla(0, 0%, 100%, 0.8);
    margin-bottom: 0.5rem;
}

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

.footer-section a {
    color: hsla(0, 0%, 100%, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid hsla(0, 0%, 100%, 0.1);
    color: hsla(0, 0%, 100%, 0.6);
}

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

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

.course-main-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.course-main-info .course-meta {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

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

.course-sidebar .course-image {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.course-details {
    padding: 3rem 0;
}

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

.course-section {
    margin-bottom: 3rem;
}

.course-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

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

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

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

.faq-item {
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
}

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

.instructor-info {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.instructor-info h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .course-hero-content,
    .course-details-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-sidebar {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container,
    .nav-container,
    .hero-container,
    .footer-container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .featured-courses,
    .trust-section {
        padding: 40px 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .course-card {
        margin: 0 -5px;
    }
    
    .checkout-container {
        padding: 1rem 15px;
    }
    
    .checkout-form {
        padding: 1.5rem;
    }
}

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

button:focus,
.btn:focus {
    outline-offset: 4px;
}

/* Loading and empty states */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-medium);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-medium);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }
.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;
}