/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: hsl(297, 70%, 50%);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: hsl(297, 70%, 40%);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background-color: hsl(297, 70%, 50%);
    color: white;
    border-color: hsl(297, 70%, 50%);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: hsl(297, 70%, 40%);
    border-color: hsl(297, 70%, 40%);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: hsl(297, 70%, 50%);
    border-color: hsl(297, 70%, 50%);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: hsl(297, 70%, 50%);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #333;
    border-color: #ddd;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: #f8f9fa;
    border-color: #ccc;
    color: #333;
    text-decoration: none;
}

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

/* Header */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.logo:hover,
.logo:focus {
    color: hsl(297, 70%, 50%);
    text-decoration: none;
}

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

.nav-link {
    color: #666;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: hsl(297, 70%, 50%);
    text-decoration: none;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: hsl(297, 70%, 50%);
}

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

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/assets/bg-pattern.svg');
    background-repeat: no-repeat;
    background-position: top right;
    background-size: 50%;
    opacity: 0.05;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    color: #333;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 2rem;
}

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

.trust-indicators {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.trust-icon {
    color: #28a745;
    font-weight: bold;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-width: 500px;
}

/* Featured Courses Section */
.featured-courses {
    padding: 4rem 0;
    background-color: #fff;
}

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

.section-header h2 {
    color: #333;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 0;
}

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

.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.course-content {
    padding: 1.5rem;
}

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

.course-category {
    background-color: hsl(297, 70%, 95%);
    color: hsl(297, 70%, 40%);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.course-difficulty {
    color: #666;
    font-weight: 500;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.course-title a {
    color: inherit;
    text-decoration: none;
}

.course-title a:hover,
.course-title a:focus {
    color: hsl(297, 70%, 50%);
}

.course-description {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

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

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: hsl(297, 70%, 50%);
}

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

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

/* Features Section */
.features {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

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

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    margin-bottom: 0;
}

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

.course-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
}

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

.course-info h1 {
    margin-bottom: 1rem;
}

.course-info-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.course-purchase {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: hsl(297, 70%, 50%);
    margin-bottom: 1.5rem;
}

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

.course-main {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.course-sidebar {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

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

.content-section:last-child {
    margin-bottom: 0;
}

.content-section h2 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

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

.content-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 1.5rem;
}

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

.content-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.curriculum-list li::before {
    content: counter(lesson-counter);
    counter-increment: lesson-counter;
    background-color: hsl(297, 70%, 50%);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.curriculum-list {
    counter-reset: lesson-counter;
}

.instructor-bio {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

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

.faq-question {
    padding: 1rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border: none;
    width: 100%;
    text-align: left;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-answer {
    padding: 1rem;
    background: #fff;
    border-top: 1px solid #f0f0f0;
}

/* Catalog Styles */
.catalog-header {
    background: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

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

.search-box,
.filter-select,
.sort-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

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

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

/* Checkout Styles */
.checkout-header {
    background: #f8f9fa;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

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

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: #f0f0f0;
    color: #666;
    margin: 0 0.5rem;
}

.step.active {
    background: hsl(297, 70%, 50%);
    color: white;
}

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

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: hsl(297, 70%, 50%);
}

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

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

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

.checkout-summary {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

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

.summary-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.125rem;
}

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

.payment-icon {
    width: 40px;
    height: 24px;
    background: #f0f0f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #666;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

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

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    line-height: 1.4;
}

/* Order Success */
.order-success {
    padding: 4rem 0;
    text-align: center;
}

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

.order-details {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 2rem auto;
    text-align: left;
}

/* Footer */
.footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-contact {
    margin-top: 1rem;
}

.footer-contact p {
    margin-bottom: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
}

.footer-contact a {
    color: #fff;
}

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

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

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
    font-size: 0.9rem;
}

/* Content Pages */
.content-page {
    padding: 2rem 0;
}

.content-header {
    background: #f8f9fa;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.content-body {
    background: #fff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.content-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #333;
}

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

.content-body li {
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: hsl(297, 70%, 50%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .trust-indicators {
        justify-content: center;
    }

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

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

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

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

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

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

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

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

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

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .course-card {
        min-width: auto;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .trust-indicators {
        flex-direction: column;
        gap: 1rem;
    }

    .checkout-steps {
        flex-direction: column;
        align-items: center;
    }
}

/* Focus and Accessibility */
*:focus {
    outline: 2px solid hsl(297, 70%, 50%);
    outline-offset: 2px;
}

button:focus,
.btn:focus {
    outline: 2px solid hsl(297, 70%, 50%);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle {
        display: none;
    }

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

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