﻿body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f7fa;
}

/* NAVBAR */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* HERO */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    color: #fff;
    background-image: url('/assets/img/login-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

    /* Grey overlay (soft, not dark) */
    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        /* Light grey overlay */
        background: rgba(40, 40, 40, 0.45);
    }

    /* Make content appear above overlay */
    .hero .container {
        position: relative;
        z-index: 2;
    }

/* Feature cards */
.feature-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: 0.25s;
    background: white;
}

    .feature-card:hover {
        transform: translateY(-4px);
    }

/* Icon circle */
.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    font-size: 26px;
    color: white;
}

/* Maritime CTA */
.cta {
    background: #0c2d6b;
    color: white;
    padding: 60px 0;
}

/* Footer */
footer {
    background: white;
    border-top: 1px solid #ddd;
    color: #666;
    padding: 25px;
}

/* Tabs */
.nav-tabs .nav-link {
    color: #444;
}

    .nav-tabs .nav-link.active {
        border-bottom: 3px solid #e60000;
    }

/* Footer */
footer {
    background: white;
    border-top: 1px solid #ddd;
    color: #555;
    padding: 15px;
}
/* Mega menu base */
.mega-dropdown {
    position: static;
}

.mega-menu {
    width: 500px;
    left: 50%;
    transform: translateX(-10%);
    padding: 24px 30px;
    border-radius: 16px;
}

/* Mobile friendly */
@@media (max-width: 991px) {
    .mega-menu {
        width: 100%;
        transform: none;
        left: 0;
        border-radius: 10px;
    }
}

/* Disable Bootstrap arrow */
.dropdown-toggle::after {
    display: none;
}

/* Progress Container */
.course-progress {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

    /* Progress Line */
    .course-progress::before {
        content: "";
        position: absolute;
        top: 18px;
        left: 0;
        width: 100%;
        height: 4px;
        background: #e9ecef;
        z-index: 0;
        border-radius: 10px;
    }

/* Step */
.step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

/* Circle */
.step-circle {
    width: 36px;
    height: 36px;
    margin: auto;
    border-radius: 50%;
    background: #dee2e6;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid #dee2e6;
}

/* Label */
.step-label {
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
}

/* Completed Step */
.step.completed .step-circle {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.step.completed .step-label {
    color: #198754;
    font-weight: 500;
}

/* Active Step */
.step.active .step-circle {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.step.active .step-label {
    color: #0d6efd;
    font-weight: 600;
}


/* START COURSE CSS*/
.content-loading {
    position: absolute;
    inset: 0;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
/* ===============================
       SHARED CONTENT FRAME
    =============================== */

/*.viewer-frame {
    background: black;
    border-radius: 10px;
    overflow: hidden;
    height: 550px;
    position: relative;
}*/

/* ===============================
    VIDEO
=============================== */

.viewer-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* keep aspect ratio */
    background: black;
}
    /* ===============================
   PDF CONTAINER
=============================== */

.viewer-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #e9edf2;
    height: 80vh; /* NOT 100vh */
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* Scroll area */
.pdf-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: auto;
    padding: 90px 40px 40px 40px;
    background: #dfe3e8;
    text-align: center;
}
#pdfPagesContainer {
    display: inline-block;
}

/* ===============================
   TOP CONTROL BAR
=============================== */

.pdf-player-controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    height: 70px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 30px;

    border-bottom: 1px solid #e6e9ed;
    z-index: 10;
}

/* Groups */
.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Navigation buttons */
.player-btn {
    background: #1f6feb;
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.player-btn:hover {
    background: #1558c0;
}
.pdf-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 24px;
}

/* IMPORTANT */
.pdf-page canvas {
    display: block;
    transition: transform .15s ease;
}
/* Zoom buttons */
.icon-btn {
    background: #f5f6f8;
    border: 1px solid #dde2e6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.icon-btn:hover {
    background: #e7eaee;
}

/* Text styling */
.page-info {
    font-size: 15px;
    font-weight: 500;
    color: #344054;
}

.zoom-level {
    font-weight: 600;
    font-size: 14px;
    color: #344054;
    min-width: 45px;
    text-align: center;
}

/* ===============================
       PLACEHOLDER
    =============================== */
/* ===============================
   CORPORATE CONTENT PLACEHOLDER
=============================== */

.content-placeholder {
    height: 65vh;
    border-radius: 16px;
    background: linear-gradient( 180deg, #f8fafc 0%, #eef2f6 100% );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 1px solid #e6e9ef;
}

.placeholder-inner {
    text-align: center;
    max-width: 420px;
}

.placeholder-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    background: #e9f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f6feb;
    font-size: 28px;
}

.placeholder-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
}

.placeholder-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

/* Section title */
.section-title {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    letter-spacing: 0.04em;
}

/* Lesson item */
.lesson {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: background 0.2s, box-shadow 0.2s;
}

    .lesson i {
        font-size: 1.1rem;
        color: #0d6efd;
    }

    /* Hover */
    .lesson:hover {
        background: #f5f8ff;
    }

    /* Active lesson */
    .lesson.active {
        background: #eaf1ff;
        font-weight: 600;
        box-shadow: inset 3px 0 0 #0d6efd;
    }

    /* Disabled / locked lesson (future-ready) */
    .lesson.locked {
        opacity: 0.5;
        cursor: not-allowed;
    }

        .lesson.locked i {
            color: #adb5bd;
        }

/* Tabs */
.nav-tabs .nav-link {
    color: #444;
}

    .nav-tabs .nav-link.active {
        border-bottom: 3px solid #e60000;
    }

.lesson-check {
    padding: 6px 0;
}

.lesson-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

    /* Hide default checkbox */
    .lesson-inline input {
        display: none;
    }

    /* Custom checkbox */
    .lesson-inline .checkmark {
        width: 18px;
        height: 18px;
        border: 2px solid #ced4da;
        border-radius: 5px;
        margin-left: 7px;
        position: relative;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }

    /* Checked state */
    .lesson-inline input:checked + .checkmark {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

        /* Check icon */
        .lesson-inline input:checked + .checkmark::after {
            content: "✓";
            color: #fff;
            font-size: 13px;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

    /* Icon spacing */
    .lesson-inline i {
        font-size: 1.1rem;
        color: #495057;
    }

/* Title */
.lesson-title {
    margin-left: 2px;
}

/* Mobile friendly */
@@media (max-width: 991px) {
    .add-mt-4 {
        margin-top: 1.5rem !important;
    }
}

/* Card */
.builder-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 30px 25px 25px 25px;
    margin-bottom: 25px;
    position: relative;
    border: 1px solid #e5e7eb;
}


/* Floating Title — Rounded + Shadow */
.card-title-floating {
    position: absolute;
    top: -14px; /* slightly higher for balance */
    left: 20px;
    background: #ffffff; /* use card color for clean cut */
    padding: 6px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #374151;
    border-radius: 999px; /* pill rounded */
    /* soft corporate shadow */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb; /* subtle outline */
}

/* ===============================
       RIGHT PANE COLLAPSE SYSTEM
    =============================== */

/* Make right column relative */
.col-lg-4 {
    position: relative;
    transition: all .35s ease;
}

/* Viewer column transition */
.col-lg-8 {
    transition: all .35s ease;
}


/* ===== COLLAPSED STATE ===== */

.right-collapsed .col-lg-4 {
    flex: 0 0 0%;
    max-width: 0%;
    padding: 0;
}

    .right-collapsed .col-lg-4 .builder-card {
        display: none;
    }

/* Viewer expands */
.right-collapsed .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
}


/* ===============================
       FLOATING TOGGLE BUTTON
    =============================== */

.panel-toggle {
    position: absolute;
    top: 18px;
    left: -14px; /* sits between viewer & panel */

    width: 30px;
    height: 30px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    z-index: 50;
}

/* When collapsed, move button to edge */

.right-collapsed .panel-toggle {
    left: -40px;
}
/* ===============================
       GLOBAL FLOATING TOGGLE
    =============================== */

.panel-toggle-global {
    position: fixed;
    top: 50%;
    right: 12px; /* stick to screen edge */

    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    z-index: 9999;
    transition: all .25s ease;
}

    /* Hover */

    .panel-toggle-global:hover {
        background: #f9fafb;
    }

/* Collapse right column */

.right-collapsed .col-lg-4 {
    display: none;
}

/* Viewer full width */

.right-collapsed .col-lg-8 {
    flex: 0 0 100%;
    max-width: 100%;
}

@@media (max-width: 1000px) {
    .panel-toggle-global {
        display: none !important;
    }
}

/* ===============================
       SYNC MODAL CORPORATE STYLE
    ================================= */

.sync-modal {
    border-radius: 18px;
    padding: 10px 5px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    border: none;
}

/* Info grid */
.sync-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
}

    .sync-info-grid label {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: #6b7280;
        margin-bottom: 4px;
        display: block;
    }

    .sync-info-grid div div {
        font-weight: 600;
        color: #111827;
    }

/* Instruction box */
.sync-instruction-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 14px;
    font-size: 0.95rem;
    color: #374151;
    border: 1px solid #e5e7eb;
}

/* Join button */
#syncJoinBtn {
    border-radius: 999px;
    font-weight: 600;
    padding: 10px 22px;
    box-shadow: 0 4px 12px rgba(13,110,253,.25);
    transition: .2s;
}

    #syncJoinBtn:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(13,110,253,.35);
    }
/* ===============================
       CHAT WRAPPER
    ================================= */

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 520px;
    overflow: hidden;
}


/* ===============================
       CHAT BODY
    ================================= */

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: transparent;
}


/* Row layout */
.chat-row {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-end;
}

    /* Left / Right positioning */
    .chat-row.left {
        justify-content: flex-start;
    }

    .chat-row.right {
        justify-content: flex-end;
    }


/* ===============================
       AVATAR
    ================================= */

.chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
    font-size: 0.85rem;
}


/* ===============================
       BUBBLE
    ================================= */

.chat-bubble {
    max-width: 65%;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

    /* My bubble */
    .chat-bubble.mine {
        background: linear-gradient(135deg,#0d6efd,#0b5ed7);
        color: white;
        border: none;
    }


/* ===============================
       TEXT ELEMENTS
    ================================= */

.chat-user {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #6b7280;
}

.chat-bubble.mine .chat-user {
    color: rgba(255,255,255,0.85);
}

.chat-message {
    font-size: 0.95rem;
    line-height: 1.4;
}

.chat-time {
    font-size: 0.7rem;
    margin-top: 6px;
    text-align: right;
    opacity: 0.7;
}


/* ===============================
       INPUT BOX
    ================================= */

.chat-input-box {
    border-top: 1px solid #e5e7eb;
    padding: 12px;
    display: flex;
    gap: 10px;
    background: #fff;
}

    .chat-input-box textarea {
        resize: none;
        border-radius: 12px;
        padding: 10px 12px;
    }

    .chat-input-box button {
        border-radius: 12px;
        padding: 0 20px;
        font-weight: 600;
    }


/*MY COURSE */

.course-card {
    background: white;
    border: none;
    border-radius: 14px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
    transition: 0.25s;
}

    .course-card:hover {
        transform: translateY(-5px);
    }

.course-desc {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#loadingIndicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Greyed-out background */
    z-index: 9999; /* Ensure it's above all content */
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    color: white; /* Spinner color */
}
.content-loader {
    position: absolute;
    inset: 0;
    z-index: 9999;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-loader-card {
    width: 320px;
    background: white;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    animation: fadeInUp .25s ease;
}

.loader-spinner {
    margin-bottom: 20px;
}

.content-loader-card h5 {
    font-weight: 700;
    margin-bottom: 10px;
}

.content-loader-card p {
    color: #6c757d;
    margin-bottom: 0;
}

.pdf-loading-state,
.pdf-error-state {
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-page-wrapper {
    margin-bottom: 4px;
    background: white;
    border: 1px solid #eef1f5;
}

.pdf-page-loader {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}