/* ========== CSS Variables - Professional Theme ========== */
:root {
    --primary: #0056D2;
    --primary-dark: #004BB5;
    --primary-light: #E8F0FE;
    --secondary: #1F1F1F;
    --text-primary: #1F1F1F;
    --text-secondary: #525252;
    --text-muted: #707070;
    --border-color: #E1E1E1;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --bg-dark: #1F1F1F;
    --success: #198754;
    --error: #DC3545;
    --warning: #FFC107;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-white);
}

.btn-white {
    background: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--bg-white);
}

.btn-white:hover {
    background: transparent;
    color: var(--bg-white);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    padding: 0;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ========== Navbar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--primary);
    font-size: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-secondary);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu .btn {
    margin-top: 8px;
}

/* ========== Hero Section ========== */
.hero {
    padding: 120px 24px 80px;
    background: var(--bg-light);
}

.hero-wrapper {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.stat h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat p {
    color: var(--text-muted);
    font-size: 14px;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 320px;
}

.hero-card .card-icon {
    width: 72px;
    height: 72px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.hero-card .card-icon i {
    font-size: 32px;
    color: var(--primary);
}

.hero-card h4 {
    font-size: 18px;
    margin-bottom: 8px;
}

.hero-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== Section Styles ========== */
section {
    padding: 80px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== Features Section ========== */
.features {
    background: var(--bg-white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px;
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon i {
    font-size: 20px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

/* ========== Courses Section ========== */
.courses {
    background: var(--bg-light);
}

.courses-wrapper {
    max-width: 1320px;
    margin: 0 auto;
}

.course-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
}

.category-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.category-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-white);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.course-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.course-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--primary-light);
}

.course-image i {
    font-size: 48px;
    color: var(--primary);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.course-content {
    padding: 20px;
}

.course-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.course-meta span {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-meta span i {
    font-size: 12px;
}

.course-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}

.course-content > p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.instructor {
    display: flex;
    align-items: center;
    gap: 8px;
}

.instructor-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.instructor span {
    font-size: 13px;
    color: var(--text-secondary);
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.course-rating i {
    color: var(--warning);
    font-size: 12px;
}

.courses-cta {
    text-align: center;
    margin-top: 40px;
}

/* ========== Testimonials Section ========== */
.testimonials {
    background: var(--bg-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 28px;
}

.testimonial-content {
    margin-bottom: 20px;
}

.quote-icon {
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 12px;
}

.testimonial-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.author-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.author-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========== CTA Section ========== */
.cta-section {
    background: var(--primary);
    text-align: center;
    padding: 80px 24px;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: var(--bg-white);
}

.cta-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 28px;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-dark);
    color: var(--bg-white);
    padding: 60px 24px 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-section .logo {
    margin-bottom: 16px;
    color: var(--bg-white);
}

.footer-section .logo i {
    color: var(--bg-white);
}

.footer-section > p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    transition: var(--transition);
    font-size: 14px;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--bg-white);
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* ========== Modal Styles ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.2s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========== Auth Form Styles ========== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.password-input {
    position: relative;
}

.password-input input {
    width: 100%;
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
}

.forgot-link {
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    color: var(--text-muted);
    font-size: 13px;
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-btn {
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.social-btn:hover {
    background: var(--bg-light);
    border-color: var(--text-muted);
}

.social-btn i {
    font-size: 16px;
}

.social-btn.google i { color: #DB4437; }
.social-btn.facebook i { color: #1877F2; }
.social-btn.github i { color: #333; }

.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-footer a {
    color: var(--primary);
    font-weight: 600;
}

.modal-footer a:hover {
    text-decoration: underline;
}

/* ========== Error Modal ========== */
.error-modal {
    text-align: center;
    max-width: 400px;
}

.error-icon {
    width: 64px;
    height: 64px;
    background: #FEE2E2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-icon i {
    font-size: 28px;
    color: var(--error);
}

.error-modal h2 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.error-modal > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.error-details {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 13px;
}

.error-details p {
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.error-details p:last-child {
    margin-bottom: 0;
}

.error-details strong {
    color: var(--text-primary);
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .features-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-buttons {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        padding: 100px 20px 60px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }

    .section-header h2 {
        font-size: 26px;
    }

    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .cta-content h2 {
        font-size: 26px;
    }
}
