/* 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,
[dir="rtl"] .features-grid,
[dir="rtl"] .courses-grid {
    direction: rtl;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #0056b3;
    text-decoration: underline;
}

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

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

.nav {
    padding: 1rem 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

.nav-link {
    color: #666;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
    color: #007bff;
    text-decoration: none;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.btn-primary {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #0056b3;
    border-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: #007bff;
    border-color: #007bff;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #007bff;
    color: #fff;
    text-decoration: none;
}

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

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

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

.hero-content h1 {
    color: #333;
    margin-bottom: 1rem;
}

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

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

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

/* Page Header */
.page-header {
    background: #f8f9fa;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.125rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

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

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

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

.feature-card {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 10px;
    background: #f8f9fa;
    transition: transform 0.3s ease;
}

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

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

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

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

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

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

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

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

.course-content {
    padding: 1.5rem;
}

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

.course-category {
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-weight: 500;
}

.course-difficulty {
    color: #666;
}

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

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

.course-title a:hover {
    color: #007bff;
}

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

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

.course-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007bff;
}

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

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

.featured-courses h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Trust Section */
.trust-section {
    padding: 4rem 0;
    background: #fff;
}

.trust-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

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

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

.trust-item h3 {
    color: #333;
    margin-bottom: 1rem;
}

.trust-item p {
    color: #666;
    margin-bottom: 0;
}

/* Course Catalog */
.courses-catalog {
    padding: 2rem 0 4rem;
}

.catalog-filters {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #333;
}

.search-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background: #fff;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

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

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

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

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

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

.course-meta-detail span {
    color: #666;
    font-size: 0.875rem;
}

.course-description {
    color: #666;
    font-size: 1.125rem;
    line-height: 1.6;
}

.course-sidebar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: sticky;
    top: 100px;
}

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

.course-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 1.5rem;
}

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

.course-section {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.course-section h3 {
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

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

.course-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    position: relative;
    padding-left: 1.5rem;
}

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

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

.instructor-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

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

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

.faq-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

/* Checkout Styles */
.checkout-section {
    padding: 2rem 0 4rem;
}

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

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

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
}

.step.active,
.step.completed {
    opacity: 1;
}

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

.step.active .step-number {
    background: #007bff;
    color: #fff;
}

.step.completed .step-number {
    background: #28a745;
    color: #fff;
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #666;
}

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

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

.order-summary {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    margin-bottom: 1.5rem;
    color: #333;
}

.order-item {
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

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

.order-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.order-item-price {
    font-weight: 600;
    color: #007bff;
}

.order-total {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 2px solid #dee2e6;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    display: flex;
    justify-content: space-between;
}

/* Form Styles */
.form {
    max-width: none;
}

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

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

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545;
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    line-height: 1.4;
    font-size: 0.9rem;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Payment Security */
.payment-security {
    margin-bottom: 2rem;
}

.security-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #28a745;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
}

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

.success-content {
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-message {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 2rem;
}

.order-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.next-steps {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.next-steps h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.next-steps ul {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

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

/* Contact Page */
.contact-section {
    padding: 2rem 0 4rem;
}

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

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

.contact-info-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

.contact-method {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

.contact-method:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-method h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-method p {
    margin-bottom: 0.25rem;
}

.contact-hours {
    font-size: 0.875rem;
    color: #666;
}

.company-info {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #666;
}

.company-info p {
    margin-bottom: 0.25rem;
}

/* About Page */
.about-content {
    padding: 2rem 0 4rem;
}

.about-intro,
.about-approach,
.about-commitment,
.about-contact {
    max-width: 800px;
    margin: 0 auto 3rem;
}

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

.about-values h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.value-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
}

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

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

/* FAQ Page */
.faq-section {
    padding: 2rem 0 4rem;
}

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

.faq-category {
    margin-bottom: 3rem;
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.faq-category h2 {
    color: #333;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.faq-contact {
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
}

.faq-contact h2 {
    margin-bottom: 1rem;
}

.faq-contact-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Legal Pages */
.legal-content {
    padding: 2rem 0 4rem;
}

.legal-text {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.legal-text h2:first-child {
    margin-top: 0;
}

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

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

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

.contact-details {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-details p {
    margin-bottom: 0.25rem;
}

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

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

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

.footer-section p {
    color: #ccc;
    margin-bottom: 0.5rem;
}

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

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

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .catalog-filters {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .course-header .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .course-details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .hero-actions,
    .success-actions,
    .faq-contact-actions {
        flex-direction: column;
        align-items: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        gap: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .legal-text {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

/* Focus and Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .nav,
    .btn,
    .checkout-steps {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}