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

html {
    font-size: 16px;
    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;
}

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

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

[dir="rtl"] .hero-content {
    text-align: right;
}

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

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

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;
    transition: color 0.3s ease;
}

a:hover {
    color: #4f46e5;
}

a:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

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

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

.btn-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

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

.btn-secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
    color: #374151;
}

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

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

.btn:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

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

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

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

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

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6366f1;
}

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

.nav-link {
    font-weight: 500;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background-color: #f3f4f6;
    color: #6366f1;
}

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 0;
    overflow: hidden;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

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

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #f8fafc;
}

.section-title {
    text-align: center;
    color: #1e293b;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

/* Featured Courses Section */
.featured-courses {
    padding: 80px 0;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 0;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 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.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

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

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

.course-image img {
    width: 100%;
    height: 200px;
    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: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.course-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

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

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

.course-description {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

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

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
}

.course-instructor {
    font-size: 0.875rem;
    color: #64748b;
}

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

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

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

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

.cta .btn-primary:hover {
    background-color: #f3f4f6;
    border-color: #f3f4f6;
}

/* Footer */
.footer {
    background-color: #1e293b;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h4 {
    color: #f1f5f9;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 32px;
    width: 32px;
    margin-right: 8px;
}

.footer-brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6366f1;
}

.footer-description {
    color: #cbd5e1;
    margin-bottom: 0;
}

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

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

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

.footer-links a:hover {
    color: #6366f1;
}

.contact-info p {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

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

.contact-info a:hover {
    color: #6366f1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Course Detail Page */
.course-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 60px 0;
}

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

.course-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.course-breadcrumb a {
    color: #cbd5e1;
}

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

.course-main-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.course-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
}

.course-sidebar img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.course-sidebar-price {
    font-size: 2rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 1.5rem;
}

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

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

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

.course-section h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

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

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

.course-section li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

.curriculum-list {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

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

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

.curriculum-item h4 {
    margin: 0;
    font-size: 1rem;
    color: #374151;
}

.curriculum-duration {
    color: #64748b;
    font-size: 0.875rem;
}

.instructor-card {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

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

.instructor-bio {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

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

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

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

.faq-answer {
    color: #64748b;
    margin: 0;
}

/* Courses Catalog Page */
.catalog-header {
    background: #f8fafc;
    padding: 40px 0;
}

.catalog-title {
    text-align: center;
    color: #1e293b;
    margin-bottom: 1rem;
}

.catalog-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.125rem;
    margin: 0;
}

.catalog-filters {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 80px;
    z-index: 50;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #6366f1;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #6366f1;
}

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

.results-info {
    margin-bottom: 2rem;
    color: #64748b;
}

/* Checkout Pages */
.checkout-header {
    background: #f8fafc;
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #64748b;
}

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

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

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

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

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

.form-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
}

.form-input.error {
    border-color: #ef4444;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 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;
}

.checkbox-label {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
}

.order-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 120px;
    height: fit-content;
}

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

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

.summary-course {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.summary-course img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.summary-course h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

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

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

/* Success Page */
.success-header {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

.success-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

/* Content Pages */
.content-header {
    background: #f8fafc;
    padding: 3rem 0;
    text-align: center;
}

.content-title {
    color: #1e293b;
    margin-bottom: 1rem;
}

.content-subtitle {
    color: #64748b;
    font-size: 1.125rem;
    margin: 0;
}

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

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

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

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

.content-section p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.content-section ul {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content-section li {
    color: #4b5563;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

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

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

.contact-icon {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    color: #1e293b;
}

.contact-details p {
    margin: 0;
    color: #64748b;
}

/* FAQ Page */
.faq-search {
    max-width: 600px;
    margin: 0 auto 3rem;
}

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

.faq-category {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.faq-category h3 {
    color: #1e293b;
    margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header-content {
        grid-template-columns: 1fr;
    }
    
    .course-details-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .course-main-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .checkout-progress {
        flex-direction: column;
        gap: 1rem;
    }
}