/* 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;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }

p { margin-bottom: 1rem; }

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #2980b9;
    outline: 2px solid transparent;
}

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

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #2980b9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #3498db;
    color: white;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover, .btn-success:focus {
    background-color: #229954;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

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

.logo img {
    height: 40px;
    width: auto;
}

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

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
    color: #3498db;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3498db;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    min-height: 500px;
    display: flex;
    align-items: center;
}

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

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.hero-content p {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

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

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

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

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.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 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

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

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #6c757d;
    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.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.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;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.course-category {
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.course-title a {
    color: #2c3e50;
    text-decoration: none;
}

.course-title a:hover {
    color: #3498db;
}

.course-description {
    color: #6c757d;
    margin-bottom: 1rem;
    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: #27ae60;
}

.course-instructor {
    font-size: 0.9rem;
    color: #6c757d;
}

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

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

.trust-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

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

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

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

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

/* Course Catalog Styles */
.catalog-header {
    padding: 2rem 0;
    background-color: #f8f9fa;
}

.catalog-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box, .filter-select, .sort-select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background-color: white;
}

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

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

.search-box:focus, .filter-select:focus, .sort-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

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

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

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

.course-meta-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #6c757d;
}

.course-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.price-display {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 1.5rem;
}

.course-sections {
    display: grid;
    gap: 3rem;
}

.section-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-card h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.what-you-learn ul, .requirements ul {
    list-style: none;
    padding: 0;
}

.what-you-learn li, .requirements li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.what-you-learn li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.requirements li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

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

.curriculum-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
}

.lesson-number {
    font-weight: 600;
    color: #3498db;
    margin-bottom: 0.25rem;
}

.instructor-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.instructor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.instructor-info h3 {
    margin-bottom: 0.5rem;
}

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

.faq-item {
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    background: #f8f9fa;
    padding: 1rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

.faq-answer {
    padding: 1rem;
    margin: 0;
    border-top: 1px solid #e9ecef;
}

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

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

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

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e9ecef;
    color: #6c757d;
    border-radius: 20px;
    margin: 0 0.5rem;
}

.step.active {
    background: #3498db;
    color: white;
}

.step.completed {
    background: #27ae60;
    color: white;
}

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

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

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

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

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

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

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

.checkout-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.2rem;
    color: #2c3e50;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

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

.security-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #27ae60;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

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

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

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

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

.success-icon {
    font-size: 4rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.order-details {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 600px;
    text-align: left;
}

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

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

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

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

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

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-list {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .features-grid, .courses-grid, .trust-features {
        grid-template-columns: 1fr;
    }
    
    .course-header {
        grid-template-columns: 1fr;
    }
    
    .course-sidebar {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .catalog-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-card {
        min-width: auto;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Focus and Accessibility */
*:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

button:focus, input:focus, select:focus, textarea:focus, a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

[dir="rtl"] .hero .container {
    direction: rtl;
}

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

[dir="rtl"] .course-meta,
[dir="rtl"] .catalog-controls {
    flex-direction: row-reverse;
}