* {
    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(200, 100%, 50%);
    --accent-color: hsl(45, 100%, 60%);
    --text-dark: hsl(220, 20%, 20%);
    --text-medium: hsl(220, 15%, 40%);
    --text-light: hsl(220, 10%, 60%);
    --bg-white: hsl(0, 0%, 100%);
    --bg-light: hsl(220, 20%, 98%);
    --bg-section: hsl(220, 15%, 96%);
    --border-color: hsl(220, 15%, 90%);
    --shadow-light: 0 2px 8px hsla(220, 20%, 20%, 0.08);
    --shadow-medium: 0 4px 16px hsla(220, 20%, 20%, 0.12);
    --shadow-heavy: 0 8px 32px hsla(220, 20%, 20%, 0.16);
    --border-radius: 8px;
    --border-radius-large: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 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);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 20px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
}

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

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    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: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 2px 0;
    border-radius: 2px;
    transition: var(--transition);
}

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

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

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

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

.btn-outline:hover {
    background: var(--bg-section);
    border-color: var(--text-medium);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-section) 100%);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

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

/* Sections */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.section-actions {
    text-align: center;
    margin-top: 3rem;
}

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

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

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

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

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

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

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

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

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

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

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

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-section);
}

.course-content {
    padding: 1.5rem;
}

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

.course-category {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

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

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

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

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

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

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

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

.course-header .course-meta {
    margin-bottom: 1rem;
}

.course-header .course-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.course-header .course-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.course-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.course-main-content {
    background: var(--bg-white);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-light);
}

.course-sidebar {
    background: var(--bg-white);
    border-radius: var(--border-radius-large);
    padding: 2rem;
    box-shadow: var(--shadow-light);
    height: fit-content;
    position: sticky;
    top: 100px;
}

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

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

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

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

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

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

.curriculum-item h4 {
    font-weight: 600;
    color: var(--text-dark);
}

.instructor-info {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

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

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

.faq-question {
    padding: 1rem;
    background: var(--bg-light);
    font-weight: 600;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-dark);
}

.faq-answer {
    padding: 1rem;
    background: var(--bg-white);
    color: var(--text-medium);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Courses Page */
.courses-header {
    padding: 2rem 0;
    background: var(--bg-section);
    text-align: center;
}

.courses-filters {
    padding: 2rem 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

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

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-dark);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-width: 150px;
}

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

.courses-results {
    margin-bottom: 2rem;
    color: var(--text-medium);
}

/* Checkout Pages */
.checkout {
    padding: 2rem 0;
    background: var(--bg-light);
}

.checkout-container {
    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;
    padding: 0.5rem 1rem;
    background: var(--bg-section);
    color: var(--text-medium);
    border-radius: 20px;
    margin: 0 0.5rem;
}

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

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(297, 70%, 50%, 0.1);
}

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

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

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

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

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

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

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.summary-total {
    font-weight: 700;
    font-size: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    margin-top: 1rem;
}

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

.payment-icon {
    width: 40px;
    height: 24px;
}

/* Footer */
.footer {
    background: var(--text-dark);
    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 h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

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

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

.footer-section a {
    color: hsl(220, 10%, 80%);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: hsl(220, 10%, 80%);
    text-decoration: none;
}

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

/* Contact Page */
.contact-info {
    background: var(--bg-section);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    margin-bottom: 2rem;
}

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

.contact-item h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* About Page */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

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

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

.about-section p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* FAQ Page */
.faq-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

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

.legal-section {
    margin-bottom: 2rem;
}

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

.legal-section p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-card {
        margin: 0;
    }
    
    .checkout-form {
        padding: 1rem;
    }
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .nav-container {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo-link {
    flex-direction: row-reverse;
}

[dir="rtl"] .logo {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .content-section li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .content-section li::before {
    left: auto;
    right: 0;
}