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

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Container */
.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: 100;
}

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

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

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

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

.nav-link {
    color: #6b7280;
    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: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

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

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

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

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

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

.btn-full {
    width: 100%;
}

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

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

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

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

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

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

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

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

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

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

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

/* Course Cards */
.featured-courses {
    padding: 4rem 0;
}

.featured-courses h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

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

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

.course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.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;
}

.course-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.course-difficulty {
    color: #6b7280;
    font-size: 0.875rem;
}

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

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

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

.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: 700;
    color: #059669;
}

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

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

.page-header h1 {
    font-size: 2.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

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

/* Catalog Filters */
.courses-catalog {
    padding: 3rem 0;
}

.catalog-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

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

.search-input,
.filter-select {
    width: 100%;
    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);
}

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

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

.course-detail-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.course-detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.meta-item {
    text-align: center;
}

.meta-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 600;
    color: #1f2937;
}

.course-description {
    margin-bottom: 3rem;
    line-height: 1.7;
}

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

.course-section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

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

.course-section ul {
    list-style: none;
    padding: 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-item {
    background: #f9fafb;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

.curriculum-item h4 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.curriculum-item p {
    color: #6b7280;
    font-size: 0.875rem;
}

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

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

.instructor-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

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

.instructor-bio {
    color: #6b7280;
    font-size: 0.875rem;
}

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

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

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

.faq-question h3 {
    margin: 0;
    color: #1f2937;
}

.faq-icon {
    font-size: 1.5rem;
    color: #6b7280;
    transition: transform 0.2s;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 0;
}

.faq-answer.active {
    max-height: 200px;
    padding: 0 0 1.5rem 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

/* Checkout */
.checkout {
    padding: 3rem 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;
    color: #6b7280;
}

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

.step.completed {
    color: #059669;
}

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

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

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

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

.checkout-form {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 1rem;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    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;
}

.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);
}

.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;
}

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

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

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

.summary-total {
    font-weight: 700;
    font-size: 1.125rem;
    color: #1f2937;
}

.payment-security {
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.security-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

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

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

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

.success-content h1 {
    font-size: 2.5rem;
    color: #059669;
    margin-bottom: 1rem;
}

.order-details {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 1rem;
    margin: 2rem 0;
    text-align: left;
}

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

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.next-steps li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: #2563eb;
    font-weight: bold;
}

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

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

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

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.about-section p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-section ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

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

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

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

.contact-form {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 1rem;
}

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

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

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.contact-item p {
    color: #6b7280;
}

.contact-item a {
    color: #2563eb;
}

.response-time {
    background: #f0f9ff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid #2563eb;
}

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

.legal-text {
    max-width: 800px;
    margin: 0 auto;
}

.legal-text h2 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem 0;
    color: #1f2937;
}

.legal-text h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem 0;
    color: #1f2937;
}

.legal-text p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.legal-text ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

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

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

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

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

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
}

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

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

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

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

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

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .catalog-filters {
        grid-template-columns: 1fr;
    }

    .course-detail-grid {
        grid-template-columns: 1fr;
    }

    .checkout-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .success-actions {
        flex-direction: column;
        align-items: center;
    }

    .checkout-steps {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .features,
    .featured-courses,
    .courses-catalog,
    .course-detail,
    .checkout,
    .order-success,
    .about-content,
    .contact-content,
    .faq-content,
    .legal-content {
        padding: 2rem 0;
    }

    .page-header {
        padding: 2rem 0;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Focus States for Accessibility */
.btn:focus,
.nav-link:focus,
.search-input:focus,
.filter-select:focus,
input:focus,
select:focus,
textarea:focus,
.faq-question:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .course-card {
        border: 2px solid #374151;
    }
    
    .feature-card {
        border: 2px solid #374151;
    }
    
    .btn-primary {
        border: 2px solid #1d4ed8;
    }
    
    .btn-secondary {
        border: 2px solid #374151;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .course-card:hover {
        transform: none;
    }
}