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

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, a:focus {
    color: #4f46e5;
    outline: none;
}

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

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

.btn-primary:hover, .btn-primary:focus {
    background-color: #4f46e5;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

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

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #6366f1;
    color: white;
    transform: translateY(-1px);
}

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

.btn-outline:hover, .btn-outline:focus {
    background-color: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

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

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

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

.nav-logo {
    height: 32px;
    margin-right: 0.5rem;
}

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

.nav-link {
    color: #6b7280;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

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

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

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

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

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

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

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

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

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

.hero-image {
    text-align: center;
}

.hero-bg {
    max-width: 100%;
    height: auto;
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #1f2937;
}

.features, .featured-courses, .trust-section {
    padding: 4rem 0;
}

.features {
    background-color: #f9fafb;
}

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

.feature-card, .trust-item {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover, .trust-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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

.course-card {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e5e7eb;
}

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

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

.course-content {
    padding: 1.5rem;
}

.course-category {
    display: inline-block;
    background-color: #ede9fe;
    color: #6366f1;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

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

.course-description {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

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

.course-actions {
    display: flex;
    gap: 0.5rem;
}

.course-actions .btn {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9rem;
}

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

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

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

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

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

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

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

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

/* Filters and Search */
.filters {
    background-color: #f9fafb;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.search-input {
    position: relative;
}

.search-input input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

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

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

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

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

.course-detail-meta span {
    color: #6b7280;
    font-size: 0.9rem;
}

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

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

.course-sidebar .btn {
    width: 100%;
    margin-bottom: 1rem;
}

.course-includes {
    list-style: none;
    margin-top: 1.5rem;
}

.course-includes li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.course-includes li::before {
    content: "✓";
    color: #059669;
    font-weight: bold;
    margin-right: 0.5rem;
}

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

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

.learning-objectives, .requirements-list, .curriculum-list {
    list-style: none;
    margin-left: 0;
}

.learning-objectives li, .requirements-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.learning-objectives li::before {
    content: "→";
    color: #6366f1;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.requirements-list li::before {
    content: "•";
    color: #6b7280;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.curriculum-item {
    background-color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid #6366f1;
}

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

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

.instructor-card {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.instructor-name {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.instructor-bio {
    color: #6b7280;
    margin: 0;
}

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

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

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

.faq-answer {
    color: #6b7280;
    margin: 0;
}

/* Checkout */
.checkout-header {
    background-color: #f9fafb;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

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

.checkout-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
    color: #6b7280;
    font-weight: 500;
}

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

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

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

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

.checkout-form {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.checkout-summary {
    background-color: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

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

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

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

.payment-icon {
    width: 40px;
    height: 25px;
    background-color: #374151;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 1rem;
}

.lock-icon {
    color: #059669;
}

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

.success-icon {
    font-size: 4rem;
    color: #059669;
    margin-bottom: 2rem;
}

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

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

.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 ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    transition: color 0.2s ease;
}

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

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

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

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

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

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

    .course-sidebar {
        position: static;
        order: -1;
    }

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

    .checkout-summary {
        position: static;
        order: -1;
    }

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

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

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

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

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .course-actions {
        flex-direction: column;
    }

    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

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

/* Focus styles */
*:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.btn:focus {
    outline-color: rgba(99, 102, 241, 0.5);
}

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