/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #5b7c99;
    --primary-dark: #4a6a85;
    --secondary-color: #7a9bb8;
    --accent-color: #3d6b8a;
    --bg-dark: #f8f9fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f4f8;
    --text-color: #3a4a5c;
    --text-muted: #6b7d8f;
    --text-bright: #1a2a3a;
    --border-color: #d0dae4;
    --shadow: 0 4px 20px rgba(91, 124, 153, 0.1);
    --shadow-lg: 0 10px 40px rgba(91, 124, 153, 0.15);
    --glow: 0 0 20px rgba(91, 124, 153, 0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-dark);
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

body.sidebar-visible {
    margin-left: 250px;
}

/* Semester Sidebar */
.semester-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 2px solid var(--border-color);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.sidebar-header h3 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    gap: 0.5rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    text-align: left;
}

.sidebar-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
}

.sidebar-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary-color);
}

.sidebar-icon {
    font-size: 1.5rem;
}

.sidebar-text {
    flex: 1;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo-icon-img {
    height: 35px;
    width: 35px;
}

.logo h1 {
    color: #D9A5B3;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--bg-dark);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #eef2f7 50%, var(--bg-dark) 100%);
    color: var(--text-bright);
    padding: 6rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(91, 124, 153, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(122, 155, 184, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.nwu-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.nwu-hero-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 1.5rem;
    position: relative;
}

.nwu-logo-inline {
    height: 18px;
    width: auto;
    flex-shrink: 0;
}

.university-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.university-badge .nwu-logo {
    height: 32px;
    width: auto;
}

.university-badge span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(91, 124, 153, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .hero-badge {
        white-space: normal;
        text-align: center;
        justify-content: center;
        font-size: 0.75rem;
    }
    .nwu-logo-inline {
        height: 14px;
    }
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-bright) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Circuit animation background */
.hero-graphic {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image:
        linear-gradient(var(--primary-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--primary-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Sections */
section {
    padding: 5rem 5%;
}

section h2 {
    text-align: center;
    font-size: 2.25rem;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Modules Grid */
.modules-section {
    background: var(--bg-dark);
}

.semester-header {
    max-width: 1200px;
    margin: 3rem auto 1.5rem;
    padding: 0 1rem;
}

.semester-header h3 {
    color: var(--text-bright);
    font-size: 1.75rem;
    font-weight: 700;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.75rem;
    display: inline-block;
}

.semester-header:first-of-type {
    margin-top: 1.5rem;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.module-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}

.module-card:hover::before {
    opacity: 1;
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #D9A5B3;
    border: 2px solid #D9A5B3;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(217, 165, 179, 0.3);
    z-index: 10;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.badge-icon {
    height: 1rem;
    width: 1rem;
    flex-shrink: 0;
}

.module-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.module-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-color);
    background: rgba(91, 124, 153, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.module-card h3 {
    color: var(--text-bright);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.module-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.module-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 1.25rem;
    padding: 0.5rem 1rem;
    background: rgba(91, 124, 153, 0.08);
    border-radius: 8px;
}

.module-card .btn {
    margin-top: auto;
}

/* Pricing Section */
.pricing-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #eef2f7 100%);
}

.pricing-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.bundle-card {
    border-color: var(--primary-color);
}

.bundle-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 22px;
    z-index: -1;
    opacity: 0.3;
}

.best-value {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bundle-savings {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modules-instruction {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.module-checkboxes {
    text-align: left;
    margin-bottom: 1.5rem;
}

.checkbox-semester-label {
    font-weight: 600;
    color: var(--text-bright);
    font-size: 0.95rem;
    padding: 0.75rem;
    background: var(--bg-card-hover);
    border-top: 2px solid var(--primary-color);
    margin-top: 0.5rem;
}

.checkbox-semester-label:first-of-type {
    margin-top: 0;
    border-top: none;
}

.module-checkbox {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.module-checkbox:hover {
    background: var(--bg-card-hover);
}

.module-checkbox:last-child {
    border-bottom: none;
}

.module-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    accent-color: var(--primary-color);
}

.checkbox-label {
    flex: 1;
    color: var(--text-color);
    font-size: 0.9rem;
}

.checkbox-price {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-color);
    font-weight: 500;
}

.payment-form-container {
    max-width: 450px;
    margin: 0 auto;
}

.payment-card {
    border-color: var(--primary-color);
}

.selected-items {
    text-align: left;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-card-hover);
    border-radius: 8px;
}

.selected-items p {
    margin: 0.25rem 0;
    color: var(--text-color);
    font-size: 0.9rem;
}

#selectModulesBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.price-tag {
    margin-bottom: 1rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    vertical-align: top;
}

.amount {
    font-size: 4rem;
    font-weight: 700;
    color: var(--text-bright);
    font-family: 'JetBrains Mono', monospace;
}

.pricing-card h3 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list .check {
    color: var(--accent-color);
    font-weight: bold;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: var(--bg-dark);
    color: var(--text-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(91, 124, 153, 0.15);
}

.secure-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* FAQ Section */
.faq-section {
    background: var(--bg-dark);
}

.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-item h4 {
    color: var(--text-bright);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
}

/* About Section */
.about-section {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-dark);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.about-content p {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.about-content p:first-child {
    color: var(--text-bright);
    font-weight: 600;
    font-size: 1.15rem;
}

.about-content p:last-child {
    margin-bottom: 0;
    color: var(--primary-color);
    font-style: italic;
}

/* Contact Section */
.contact-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #e8eef4 100%);
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 42, 58, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 900px;
    height: 80vh;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    z-index: 10;
    background: var(--bg-card);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--primary-color);
    color: var(--bg-dark);
    border-color: var(--primary-color);
}

#pdfViewer {
    width: 100%;
    height: 100%;
    background: #fff;
}

/* Footer */
footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

/* Success/Cancel Pages */
.result-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
    background: var(--bg-dark);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
}

.result-page h1 {
    color: var(--text-bright);
    margin-bottom: 1rem;
}

.result-page p {
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 2rem;
}

/* Semester visibility classes */
[data-semester-section],
[data-semester-pricing] {
    transition: all 0.3s ease;
}

.semester-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    body.sidebar-visible {
        margin-left: 0;
    }

    .semester-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .semester-sidebar.mobile-open {
        transform: translateX(0);
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 3rem 5%;
    }

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

    .pricing-card {
        padding: 2rem;
    }

    .amount {
        font-size: 3rem;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
