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

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 4px 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 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #4b5563;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

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

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

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    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-size: 1rem;
    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;
}

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

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

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

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

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

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

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

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

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

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

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

/* Course Sections */
.featured-courses {
    padding: 4rem 0;
    background: #f9fafb;
}

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

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 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.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

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

.course-card-content {
    padding: 1.5rem;
}

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

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

.course-card p {
    color: #4b5563;
    margin-bottom: 1rem;
}

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

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

.course-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

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

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

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

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

.catalog-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

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

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

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

.breadcrumb {
    padding: 1rem 0;
    color: #6b7280;
}

.breadcrumb a {
    color: #2563eb;
}

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

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

.course-instructor {
    margin: 1rem 0;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
}

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

.course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

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

.course-main h2 {
    font-size: 2rem;
    color: #1f2937;
    margin: 2rem 0 1rem 0;
}

.course-main h3 {
    font-size: 1.5rem;
    color: #374151;
    margin: 1.5rem 0 0.5rem 0;
}

.course-main ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.course-main li {
    margin: 0.5rem 0;
    color: #4b5563;
}

.curriculum-item {
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 500;
}

.faq-answer {
    padding: 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    display: none;
}

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

.course-not-found {
    padding: 4rem 0;
    text-align: center;
}

.not-found-content h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

/* Checkout Styles */
.checkout-header {
    text-align: center;
    margin-bottom: 2rem;
}

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

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

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

.step.completed {
    color: #059669;
}

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

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

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

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

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

.form-section {
    margin-bottom: 2rem;
}

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

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

.form-group {
    margin-bottom: 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.375rem;
    font-size: 1rem;
    transition: border-color 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);
}

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

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

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

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

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

.checkout-sidebar {
    height: fit-content;
    position: sticky;
    top: 100px;
}

.order-summary {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

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

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

.summary-total {
    font-weight: 700;
    font-size: 1.25rem;
    color: #1f2937;
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Payment Security */
.payment-security {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.security-icons {
    display: flex;
    gap: 0.5rem;
}

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

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

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

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

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

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

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

.next-steps {
    background: #f9fafb;
    border-radius: 1rem;
    padding: 2rem;
    text-align: left;
    margin-top: 2rem;
}

.next-steps h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

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

.next-steps li {
    margin: 0.5rem 0;
    color: #4b5563;
}

/* About and Content Pages */
.about-content,
.contact-content,
.legal-content,
.faq-content {
    padding: 3rem 0;
}

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

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

.about-section p {
    color: #4b5563;
    margin-bottom: 1rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

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

.about-section li {
    margin: 0.5rem 0;
    color: #4b5563;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-methods {
    margin-top: 2rem;
}

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

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

.contact-method p {
    color: #4b5563;
    margin-bottom: 0.25rem;
}

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

.contact-form h2 {
    color: #1f2937;
    margin-bottom: 1.5rem;
}

.contact-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
}

.contact-success h3 {
    color: #059669;
    margin-bottom: 0.5rem;
}

.contact-success p {
    color: #047857;
}

/* FAQ Page */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 500;
    color: #1f2937;
    transition: background-color 0.2s;
}

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

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

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

.faq-answer {
    padding: 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    display: none;
}

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

.faq-answer p {
    color: #4b5563;
    line-height: 1.7;
}

.faq-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 1rem;
}

.faq-footer h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.faq-footer p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Legal Pages */
.legal-document {
    max-width: 800px;
    margin: 0 auto;
}

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

.legal-document h3 {
    font-size: 1.25rem;
    color: #374151;
    margin: 1.5rem 0 0.5rem 0;
}

.legal-document p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

.legal-document li {
    margin: 0.5rem 0;
    color: #4b5563;
}

/* Footer */
.footer {
    background: #1f2937;
    color: #d1d5db;
    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 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

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

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

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

.footer-section ul li a:hover {
    color: white;
    text-decoration: none;
}

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

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

.footer-section .logo img {
    filter: brightness(0) invert(1);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .course-header,
    .course-content {
        grid-template-columns: 1fr;
    }
    
    .course-sidebar {
        position: static;
    }
    
    .checkout-content {
        grid-template-columns: 1fr;
    }
    
    .checkout-sidebar {
        position: static;
        order: -1;
    }
    
    .catalog-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .success-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .payment-security {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .features,
    .featured-courses,
    .about-content,
    .contact-content,
    .legal-content,
    .faq-content {
        padding: 2rem 0;
    }
    
    .checkout-form,
    .contact-form,
    .order-summary {
        padding: 1.5rem;
    }
    
    .course-card-content {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .security-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Focus and Accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #2563eb;
    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;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .btn,
    .checkout-sidebar,
    .course-sidebar {
        display: none;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 24pt; }
    h2 { font-size: 20pt; }
    h3 { font-size: 16pt; }
}