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

html {
    scroll-behavior: smooth;
}

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

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

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #6366f1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: #6366f1;
    color: white;
}

.btn-primary:hover {
    background-color: #5855eb;
    text-decoration: none;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-outline:hover {
    background-color: #6366f1;
    color: white;
    text-decoration: none;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
    text-decoration: none;
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.25rem;
    color: #1f2937;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

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

.nav-link {
    color: #6b7280;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #6366f1;
    text-decoration: none;
}

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

.nav-toggle span {
    width: 24px;
    height: 3px;
    background-color: #374151;
    margin: 2px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

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

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

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

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

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

.section-header p {
    font-size: 1.125rem;
    color: #6b7280;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

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

.feature-icon {
    color: #6366f1;
    margin-bottom: 1rem;
}

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

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

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

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

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.course-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #6366f1;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.course-content {
    padding: 1.5rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.course-title a {
    color: #1f2937;
    text-decoration: none;
}

.course-title a:hover {
    color: #6366f1;
}

.course-description {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

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

.course-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #059669;
}

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

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
}

.cta-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.cta-text h2 {
    margin-bottom: 1rem;
}

.cta-text p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Course Detail Styles */
.course-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
}

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

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

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

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.course-sidebar {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 12px;
}

.price-section {
    text-align: center;
    margin-bottom: 2rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

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

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

.detail-section h2 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.detail-section h3 {
    margin-bottom: 1rem;
    color: #374151;
}

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

.curriculum-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.lesson-number {
    background-color: #6366f1;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.requirements-list,
.learning-list {
    list-style: none;
}

.requirements-list li,
.learning-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.requirements-list li::before,
.learning-list li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

.instructor-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.instructor-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.instructor-bio {
    color: #6b7280;
    line-height: 1.6;
}

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

.faq-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.faq-answer {
    color: #6b7280;
    line-height: 1.6;
}

/* Courses Page Styles */
.page-header {
    background-color: #f9fafb;
    padding: 3rem 0;
    text-align: center;
}

.courses-controls {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.controls-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

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

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

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

.courses-section {
    padding: 2rem 0;
}

.courses-results {
    margin-bottom: 2rem;
    color: #6b7280;
}

/* Checkout Styles */
.checkout-header {
    background-color: #f9fafb;
    padding: 2rem 0;
    text-align: center;
}

.checkout-progress {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.progress-step.active {
    color: #6366f1;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.progress-step.active .step-number {
    background-color: #6366f1;
    color: white;
}

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

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

.form-section,
.order-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

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

.payment-icon {
    width: 40px;
    height: 24px;
    background-color: #f3f4f6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin: 1rem 0;
}

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

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem;
}

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

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

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

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

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.contact-info a {
    color: #d1d5db;
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
    color: #9ca3af;
}

/* Contact Form */
.contact-section {
    padding: 3rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.contact-info-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-icon {
    color: #6366f1;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* FAQ Styles */
.faq-section {
    padding: 3rem 0;
}

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

.faq-item-page {
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question-page {
    padding: 1.5rem;
    background-color: #f9fafb;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
}

.faq-answer-page {
    padding: 1.5rem;
    color: #6b7280;
    line-height: 1.6;
}

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

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

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

.legal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content,
    .cta-content,
    .course-hero-content,
    .course-details-content,
    .checkout-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .controls-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box,
    .filter-select,
    .sort-select {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-progress {
        gap: 1rem;
    }
    
    .progress-step span {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
    
    .course-card {
        margin-bottom: 1rem;
    }
    
    .course-content {
        padding: 1rem;
    }
    
    .checkout-progress {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

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

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

[dir="rtl"] .hero-content {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

[dir="rtl"] .hero-actions {
    justify-content: flex-start;
}

[dir="rtl"] .course-meta,
[dir="rtl"] .course-meta-detail {
    direction: rtl;
}

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

[dir="rtl"] .controls-row {
    direction: rtl;
}

[dir="rtl"] .checkout-grid {
    direction: rtl;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

/* Focus States for Accessibility */
.btn:focus,
.form-input:focus,
.nav-link:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav-toggle,
    .btn {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: #000 !important;
    }
    
    .cta {
        background: none !important;
        color: #000 !important;
    }
}