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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    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;
}

/* 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: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.logo {
    width: 32px;
    height: 32px;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2563eb;
}

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

.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

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

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    text-decoration: none;
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

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

.hero-description {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
}

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

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

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

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

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

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

/* Courses Grid */
.featured-courses,
.courses-catalog {
    padding: 4rem 0;
}

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

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

.course-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.course-content {
    padding: 1.5rem;
}

.course-tag {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

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

.course-title a:hover {
    color: #2563eb;
}

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

.course-description {
    color: #4b5563;
    margin-bottom: 1.5rem;
}

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

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

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

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

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

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

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

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

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

.current-price {
    font-size: 2rem;
    font-weight: 600;
    color: #059669;
}

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

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

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

.course-section h2 {
    color: #1e293b;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.course-section ul {
    padding-left: 1.5rem;
}

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

.curriculum-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #2563eb;
}

.instructor-info {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.instructor-info h3 {
    color: #2563eb;
    margin-bottom: 1rem;
}

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

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

.faq-answer {
    padding: 0 0 1rem 0;
    color: #4b5563;
}

.faq-icon {
    font-size: 1.25rem;
    color: #2563eb;
}

/* Filters */
.catalog-filters {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

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

.filter-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

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

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.page-header h1 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    color: #64748b;
}

/* Section Footer */
.section-footer {
    text-align: center;
}

/* Checkout */
.checkout {
    padding: 2rem 0;
}

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

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

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: #f3f4f6;
    color: #6b7280;
}

.step.active {
    background: #2563eb;
    color: white;
}

.step.completed {
    background: #059669;
    color: white;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: currentColor;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.step.active .step-number,
.step.completed .step-number {
    background: white;
    color: inherit;
}

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

.checkout-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.checkout-summary {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

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

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

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

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.5;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

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

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '✓';
    color: white;
    font-size: 0.875rem;
}

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

/* Security Notice */
.security-notice {
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

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

.security-notice p {
    margin: 0;
    color: #0c4a6e;
    font-weight: 500;
}

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

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

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

.success-message {
    font-size: 1.25rem;
    color: #4b5563;
    margin-bottom: 2rem;
}

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

.next-steps {
    text-align: left;
    margin-bottom: 2rem;
}

.next-steps ul {
    padding-left: 1.5rem;
}

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

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

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

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: start;
}

.about-text ul {
    padding-left: 1.5rem;
}

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

.about-image img {
    width: 100%;
    border-radius: 0.5rem;
}

.values-section {
    margin-top: 4rem;
}

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

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

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

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

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

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

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

.contact-method {
    margin-bottom: 2rem;
}

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

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

.faq-list {
    max-width: 800px;
    margin: 0 auto 3rem;
}

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

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

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

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    display: none;
}

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

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-footer {
    text-align: center;
    background: #f8fafc;
    padding: 3rem 2rem;
    border-radius: 0.5rem;
}

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

.legal-document {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.legal-document h2 {
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.legal-document h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

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

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

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

.contact-details {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

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

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    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 a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

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

.contact-info p {
    margin-bottom: 0.5rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .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;
    }
    
    .catalog-filters {
        grid-template-columns: 1fr;
    }
    
    .course-header-content {
        grid-template-columns: 1fr;
    }
    
    .course-details-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .checkout-form,
    .checkout-summary {
        padding: 1.5rem;
    }
    
    .legal-document {
        padding: 2rem 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .course-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .btn,
    .nav {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .legal-document {
        box-shadow: none;
        padding: 0;
    }
}