/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --logo-gray:       #4b5563;
    --logo-gray-hover: #374151;
    --logo-gray-light: #e5e7eb;
    --logo-black:      #000000;

    --bg-base:    #f1f5f9;
    --bg-surface: #ffffff;
    --bg-glass:   rgba(255, 255, 255, 0.92);

    --primary:       var(--logo-gray);
    --primary-color: var(--logo-gray);
    --primary-glow:  rgba(75, 85, 99, 0.2);

    --text-main:  #1e293b;
    --text-muted: #64748b;

    --border-light: #d1d5db;

    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;

    --transition-fast:   0.2s ease-in-out;
    --transition-smooth: 0.3s ease-out;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--logo-black);
    letter-spacing: -0.02em;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.main-header {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo { text-decoration: none; display: flex; align-items: center; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-fast);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-links { display: flex; gap: 16px; }

/* ── Hamburger ───────────────────────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
}

.btn-lg { padding: 14px 32px; font-size: 16px; }

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px var(--primary-glow);
}
.btn-primary:hover {
    background-color: var(--logo-gray-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(75,85,99,0.3);
}

.btn-secondary { background-color: var(--logo-black); color: #fff; }
.btn-secondary:hover { background-color: #333; transform: translateY(-2px); }

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover { background-color: var(--primary); color: #fff; }

/* ── Main Content ────────────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: 60px 0;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--logo-black);
    line-height: 1.2;
}

/* ── Hero Section ────────────────────────────────────────────────────────── */
.hero-section {
    background-color: #1e293b;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
    border-radius: var(--radius-lg);
    padding: 80px 60px;
    margin-bottom: 72px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(75,85,99,0.15);
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    max-width: 700px;
    margin-bottom: 24px;
}

.hero-sub {
    font-size: 18px;
    color: #94a3b8;
    max-width: 620px;
    line-height: 1.7;
    margin-bottom: 40px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-cta .btn-primary {
    background: #fff;
    color: var(--logo-black);
    border-color: #fff;
    box-shadow: none;
}
.hero-cta .btn-primary:hover { background: #e2e8f0; color: var(--logo-black); }

.hero-cta .btn-outline { border-color: rgba(255,255,255,0.65); color: #fff; }
.hero-cta .btn-outline:hover { background: rgba(255,255,255,0.15); border-color: #fff; }

/* ── Benefits / Feature Grid ─────────────────────────────────────────────── */
.section-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--logo-black);
    line-height: 1.25;
}

.benefits-section { margin-bottom: 64px; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.auth-container {
    max-width: 440px;
    margin: 0 auto;
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.10);
    position: relative;
    overflow: hidden;
}

.auth-container .page-title {
    font-size: 26px;
    margin-bottom: 20px;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 5px;
    background: var(--primary);
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-base);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 15px;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: var(--bg-surface);
}

.password-field-wrapper { position: relative; }
.password-field-wrapper .form-control { padding-right: 42px; }
.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    background: none;
    border: none;
    line-height: 0;
    color: var(--text-muted);
    cursor: pointer;
}
.password-toggle-btn:hover { color: var(--text-main); }
.password-toggle-btn svg { width: 18px; height: 18px; }

.error-msg {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

.success-msg {
    color: #047857;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 30px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(75,85,99,0.15);
}

.card-title   { font-size: 22px; font-weight: 700; margin-bottom: 12px; color: var(--logo-black); }
.card-content { color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

/* ── Templates & SOPs ────────────────────────────────────────────────────── */
.ts-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.ts-chip {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.ts-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ts-chip-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.ts-resource-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ts-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-base);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.ts-category-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow-x: auto;
    margin-top: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

table { width: 100%; border-collapse: collapse; }

th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid #e2e8f0; }

th {
    background: var(--bg-base);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr { transition: var(--transition-fast); }
tbody tr:hover { background: #f1f5f9; }

/* ── Advert Banner ────────────────────────────────────────────────────────── */
.advert-banner {
    width: 100%;
    text-align: center;
    background: var(--bg-surface, #f8fafc);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
}

.advert-banner img {
    max-height: 120px;
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* ── Newsletter Footer Band ──────────────────────────────────────────────── */
.newsletter-footer-band {
    background: #1e293b;
    padding: 48px 0;
}

.newsletter-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.newsletter-footer-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #fff;
}

.newsletter-footer-text strong { font-size: 20px; font-family: 'Outfit', sans-serif; }
.newsletter-footer-text span   { color: #94a3b8; font-size: 15px; }

.newsletter-footer-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
}

.newsletter-input {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
    flex: 1;
    min-width: 180px;
}

.newsletter-input::placeholder { color: #64748b; }
.newsletter-input:focus { border-color: rgba(255,255,255,0.4) !important; }

.newsletter-consent {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
}

.newsletter-consent input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

.newsletter-msg { font-size: 14px; width: 100%; }
.newsletter-msg.success { color: #6ee7b7; }
.newsletter-msg.error   { color: #fca5a5; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.main-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 30px 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
}

.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-muted); font-size: 14px; }

/* ── Course Player ───────────────────────────────────────────────────────── */
.course-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

.module-sidebar {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.module-sidebar-title {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.module-list { list-style: none; }

.module-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-fast);
}

.module-list li a:hover       { background: var(--bg-base); color: var(--primary); }
.module-list li a.active      { background: var(--primary); color: #fff; }
.module-list li a.active:hover { background: var(--logo-gray-hover); }

.module-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid currentColor;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
}

.module-check.done { background: #10b981; border-color: #10b981; color: #fff; }

.course-content-panel {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 40px;
    min-height: 400px;
}

.course-content-panel h1,
.course-content-panel h2,
.course-content-panel h3 { margin-bottom: 16px; }
.course-content-panel p  { margin-bottom: 16px; color: var(--text-main); line-height: 1.75; }
.course-content-panel ul,
.course-content-panel ol { padding-left: 24px; margin-bottom: 16px; }
.course-content-panel li { margin-bottom: 8px; }

.progress-bar-wrap {
    background: var(--logo-gray-light);
    border-radius: 100px;
    height: 8px;
    margin-bottom: 8px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #10b981;
    border-radius: 100px;
    transition: width 0.4s ease;
}

.progress-label { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

/* ── Module locked state (CR-002) ────────────────────────────────────────── */
.module-locked {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Module video / PDF embeds (CR-002) ──────────────────────────────────── */
.module-video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    margin-bottom: 24px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}
.module-video-wrap iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.module-pdf-wrap {
    width: 100%;
    height: 640px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}
.module-pdf-wrap iframe {
    width: 100%; height: 100%;
    border: 0;
}

/* ── Module quiz (CR-002) ────────────────────────────────────────────────── */
.module-quiz {
    margin-top: 32px;
    padding: 28px;
    background: var(--bg-base);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.quiz-question { margin-bottom: 20px; }
.quiz-question:last-of-type { margin-bottom: 0; }
.quiz-question-text { font-weight: 600; margin-bottom: 10px; }

.quiz-option {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 15px;
}
.quiz-option input[type="radio"] { width: auto; }

/* ── Certificate earned badge (CR-002) ───────────────────────────────────── */
.cert-earned-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 13px;
    font-weight: 700;
}

/* ── Payment Success ─────────────────────────────────────────────────────── */
.success-panel {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: #d1fae5;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px;
    font-size: 32px;
}

/* ── Responsive / Mobile ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .course-layout { grid-template-columns: 1fr; }
    .module-sidebar { position: static; }
}

@media (max-width: 768px) {
    .hamburger { display: flex; }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        position: absolute;
        top: 80px; left: 0; right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-light);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        z-index: 999;
        padding: 16px 0;
    }

    .main-nav.open { display: flex; }

    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0 24px;
    }

    .nav-links li a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-light);
        border-bottom-width: 1px;
    }

    .nav-links li:last-child a { border-bottom: none; }

    .auth-links {
        flex-direction: column;
        padding: 16px 24px 8px;
        gap: 10px;
    }

    .auth-links .btn { text-align: center; }

    .hero-section        { padding: 40px 24px; margin-bottom: 40px; }
    .hero-section::before { display: none; }
    .hero-title          { font-size: 28px; }
    .hero-sub            { font-size: 15px; margin-bottom: 28px; }
    .hero-badge          { font-size: 11px; margin-bottom: 16px; }
    .hero-cta            { flex-direction: column; }
    .hero-cta .btn       { width: 100%; justify-content: center; }

    .newsletter-footer-form { flex-direction: column; }
    .newsletter-input       { min-width: unset; width: 100%; }

    .page-title { font-size: 30px; }
    .section-title { font-size: 24px; }

    .course-content-panel { padding: 24px; }
}
