:root {
    --brand: #2BA2DB;
    --brand-hover: #1f95cc;
    --muted: #8a929a;
}

/* =========================================================
   GLOBAL / OGÓLNE
   ========================================================= */

body {
    font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
    background: #f5f6fa;
    color: #2b2f33;
}

.alert {
	font-size: 1.125em;
	text-align: center;
	margin: 1em auto;
}

/* Ograniczenie szerokości tekstu */
.limited-width {
    max-width: 600px;
    margin: 0 auto;
    word-wrap: break-word;
}

/* Lead (węższy) */
.lead-narrow {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
    font-weight: 100;
    text-align: center;
    font-size: 1.2rem; /* BYŁO 1.7rem */
}
.lead-narrow br {
    display: block;
}
.lead-narrow strong {
    font-weight: 700;
    display: inline-block;
    margin-top: 3px;
}

/* Mały opis */
.small-note {
    color: var(--muted);
    font-size: 13px;
}

/* =========================================================
   BUTTONS / PRZYCISKI
   ========================================================= */

.btn-brand {
    background: #2DAAE2 !important;
    color: #fff !important;
    border: 0;
    border-radius: 10px;
    padding: .7rem 1.2rem;
    font-weight: 700;
    transition: background-color .2s ease-in-out;
}
.btn-brand:hover {
    background: var(--brand-hover) !important;
}
.btn-wide {
    padding-left: 6rem;
    padding-right: 6rem;
}

.btn-outline-clean {
    border: 2px solid #2DAAE2 !important;
    color: #2DAAE2 !important;
    border-radius: 10px;
    padding: .65rem 1.4rem;
    font-weight: 600;
    line-height: 1.2;
    transition: all .2s ease-in-out;
}
.btn-outline-clean:hover {
    background: #2DAAE2 !important;
    color: #fff !important;
    border-color: #2DAAE2 !important;
    transform: translateY(-1px);
}

/* Dropdown organizacji */
.org-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ced4da;
    border-top: none;
    z-index: 2000;
}
.org-option {
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9rem;
}
.org-option:hover {
    background-color: #f8f9fa;
}

/* --- Delikatne breadcrumbsy --- */
.cc-breadcrumb {
    background: transparent !important;
    padding-left: 0;
}

.cc-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #adb5bd;
}

.cc-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.cc-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
    color: #495057;
}

.cc-breadcrumb .breadcrumb-item.active {
    color: #999;
    font-weight: 500;
}

/* --- Typografia treści strony --- */
.cc-page-content {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
}

.cc-page-content p {
    margin-top: 0;
    margin-bottom: 0rem;
}

.cc-page-content ul,
.cc-page-content ol {
    margin-bottom: 1.2rem;
    padding-left: 1.4rem;
}

.cc-page-content li {
    margin-bottom: 0.45rem;
}

.cc-page-content h1,
.cc-page-content h2,
.cc-page-content h3,
.cc-page-content h4 {
    margin-top:0; /* 1.4rem;*/
    margin-bottom: 0.8rem;
    font-weight: 600;
}
.cc-page-content h3 {
    font-size: 1.25em;
    margin: .25em 0 .25em;
}
.cc-page-content h4 {
    font-size: 1.15em;
    color: var(--muted);
    margin: .25em 0 .25em;
}
.cc-page-content p + h2,
.cc-page-content p + h3 {
	margin-top: 1rem;
}
.cc-page-content p + h4 {
	margin-top: 1rem;
}
.cc-page-content a {
    text-decoration: underline;
}

.cc-page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1rem 0;
}

/* Cytaty */
.cc-page-content blockquote {
    padding: 0.6rem 1rem;
    margin: 1.2rem 0;
    border-left: 4px solid #007bff;
    background: #f9f9f9;
    font-style: italic;
}

/* =========================================================
   KARTY / FORMULARZE
   ========================================================= */

.card {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(16,24,40,.06);
}

.form-control {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    font-size: 15px;
}
.form-control::placeholder {
    color: #b8bfc7 !important;
    opacity: 1;
}

/* =========================================================
   DROPZONE
   ========================================================= */

.dropzone {
    border: 2px dashed #c8d1dc;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #6b7785;
}
.dropzone.dragover {
    background: #f1f7ff;
    border-color: var(--brand);
    color: var(--brand);
}

/* =========================================================
   LAYOUT (HEADER / MAIN / FOOTER)
   ========================================================= */

.cc-header {
    background: #ffffff !important;
}

/* MAIN – żeby footer był na dole */
main {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* FOOTER */
.cc-footer {
    width: 100%;
    background: transparent !important;
    border-top: none !important;
    padding: 10px 0;
    backdrop-filter: none !important;
}

.logo-header {
    height: 42px !important;
    width: auto;
    object-fit: contain;
}

/* Tekst stopki */
.cc-footer,
.cc-footer a,
.cc-footer div {
    font-size: 14px;
    color: var(--muted) !important;
}
.cc-footer a {
    text-decoration: none;
}
.cc-footer a:hover {
	color: var(--brand) !important;
	text-decoration: underline;
}

/* Styl linków w headerze */
.header-link {
    color: #00364d !important;
    font-weight: 400;
    text-decoration: none;
    transition: color .18s ease, opacity .18s ease;
}
.header-link:hover {
    color: #00597a !important;
    opacity: 0.9;
}
.header-link img {
    transition: opacity .18s ease;
}
.header-link:hover img {
    opacity: 1;
}

@media (max-width: 480px) {
    .login-header {
        height: 20px !important;
    }

    .course-meta {
        max-width: 140px;
        line-height: 1.25;
        font-size: 11px;
    }
    .vr {
        margin-left: 6px;
        margin-right: 6px;
        height: 28px;
    }
    .logout-text {
        display: none;
    }
    .logo-header {
        height: 33px !important;
    }
    .cc-footer .d-flex {
        flex-direction: column;
        gap: 6px;
        text-align: center;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .cc-footer .d-flex > div {
        width: 100%;
    }
    .cc-footer {
        padding: 8px 0;
    }
    .cc-footer,
    .cc-footer a,
    .cc-footer div {
        font-size: 13px;
        line-height: 1.35;
    }
    .cc-footer span.mx-2 {
        margin: 0 6px !important;
    }
}

/* =========================================================
   LOGIN PAGE (tylko logowanie)
   ========================================================= */

body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 0;
}

body.login-page .login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-left: 20px;
    padding-right: 20px;
}

.login-hero {
    margin-top: 60px;
    margin-bottom: 20px;
    text-align: center;
}

.login-logo {
    width: 280px;
    max-width: 420px;
    height: auto;
    object-fit: contain;
    display: inline-block;
}

.login-tagline {
    color: var(--brand);
    font-size: 14px;
    letter-spacing: 1px;
    font-weight: 600;
    margin-top: .5rem;
}

.login-card { max-width: 600px; }
.login-btn  { margin-top: 30px; }

@media (max-width: 480px) {
    body.login-page .login-content {
        padding-left: 14px;
        padding-right: 14px;
    }
}

/* =========================================================
   NAGŁÓWKI / TEKSTY SPECJALNE
   ========================================================= */

.h2-narrow {
    font-weight: 100;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
    font-size: 1.5rem; /* mniejsze niż domyślne h2 */
}


.finish-title {
    font-weight: 500 !important;
}
.finish-text {
    font-size: 1.35rem;
    line-height: 1.55;
    font-weight: 400;
}

/* =========================================================
   SLAJDY / MEDIA
   ========================================================= */

.slide-image-clean {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.slide-image-margin {
    margin-top: 80px;
}

/* VIDEO PLAYER */
.cc-video-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
}
.cc-video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
}

.cc-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 78px;
    height: 78px;
    border-radius: 50%;
    border: none;
    background: #e22d2d !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px #e22d2d69 !important;
    cursor: pointer;
    transition: .2s;
}
.cc-video-play span {
    margin-left: 4px;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
}
.cc-video-play.cc-hidden {
    opacity: 0;
    pointer-events: none;
}

.cc-video-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 18px 14px;
    pointer-events: none;
}
.cc-video-track {
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: #e22d2d69 !important;
    overflow: hidden;
}
.cc-video-bar {
    height: 4px;
    width: 0;
    border-radius: 999px;
    background: #e22d2d!important;
    transition: width .12s linear;
}

.cc-pdf-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    /* stałe okno mieszczące się w kadrze */
    height: clamp(460px, 75vh, 880px);
    max-height: calc(100vh - 200px);
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    overflow: hidden;
    background: #f8f9fa;
}

.cc-pdf-container .cc-pdf-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 768px) {
    .cc-pdf-container {
        height: clamp(380px, 70vh, 720px);
        max-height: calc(100vh - 160px);
    }
}

/* Drobne poprawki do wideo */
.cc-video-wrapper {
    position: relative;
}

/* przycisk fullscreen – PRAWY DOLNY RÓG, trochę wyżej */
.cc-video-fs {
    position: absolute;
    bottom: 29px;
    right: 18px;
    z-index: 5;
    border: none;
    border-radius: 999px;
    padding: 6px 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cc-video-fs svg {
    width: 18px;
    height: 18px;
}
.cc-video-fs:hover {
    background: rgba(0,0,0,0.85);
}
.cc-video-fs.cc-video-fs-active {
    background: rgba(0, 123, 255, 0.9);
}

/* FULLSCREEN tryb – wrapper na cały ekran, wideo rozciągnięte */
.cc-video-wrapper.cc-video-fs-screen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    margin: 0 !important;
    background: #000;
    z-index: 1050;
}
.cc-video-wrapper.cc-video-fs-screen video {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: contain;
}

/* =========================================================
   TESTY
   ========================================================= */

/* Treść pytania */
.test-question-text {
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 1.2rem;
}

/* Layout odpowiedzi + większe odpowiedzi */
.test-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 1.15rem;
    padding: 10px 0;
}
.test-option strong {
    font-size: 1.2rem;
}

/* Ukryty radio */
.test-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Checkbox (większa finalna wersja) */
.checkmark {
    width: 26px;
    height: 26px;
    border: 2px solid #9aa3aa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .15s;
    font-size: 18px;
    font-weight: bold;
    color: black;
}

/* ZAZNACZENIE */
.test-option input[type="radio"]:checked + .checkmark {
    border-color: #2BA2DB;
    background-color: rgba(43, 162, 219, 0.25);
}

/* X wewnątrz checkmarka (większa finalna wersja) */
.test-option input[type="radio"]:checked + .checkmark::after {
    content: "✕";
    font-size: 20px;
    font-weight: bold;
    color: black;
}

/* Tekst odpowiedzi */
.opt-label {
    transition: .15s;
}

/* Zmiana koloru tekstu przy zaznaczeniu */
.test-option input[type="radio"]:checked ~ .opt-label {
    color: #2BA2DB;
    font-weight: 600;
}

/* Obrazek do pytania */
.test-image-wrap {
    text-align: center;
}
.test-image-clean {
    max-height: 500px;
    object-fit: contain;
}

/* =========================================================
   FINISH / THANK YOU PAGE
   ========================================================= */

.finish-image {
    max-width: 320px;
    height: auto;
    object-fit: contain;
}
.finish-score {
    font-size: 1.5rem;
    font-weight: 600;
}

/* =========================================================
   ADMIN COURSE – DROPZONES / PREVIEW
   ========================================================= */

.cc-dropzone-clickable {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cc-dropzone-h90 { min-height: 90px; }
.cc-dropzone-h80 { min-height: 80px; }
.cc-dropzone-h70 { min-height: 70px; }

.cc-minh-100 { min-height: 100px; }

.intro-preview-img {
    max-height: 140px;
    object-fit: contain;
}

/* =========================================================
   QUILL – richtext dla slajdów (ADMIN)
   ========================================================= */

.quill-wrapper {
    border: 1px solid #ced4da;
    border-radius: .25rem;
}
.quill-wrapper .ql-toolbar {
    border-radius: .25rem .25rem 0 0;
}
.quill-wrapper .ql-container {
    border-radius: 0 0 .25rem .25rem;
    min-height: 150px;
}

/* =========================================================
   ADMIN REPORTS – AUTOCOMPLETE + PROGRESS
   ========================================================= */

.nav-tabs .nav-link {
    font-weight: 600;
    font-size: 1.1em;
    padding: .5em 1.5em;
}

.ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    max-height: 260px;
    overflow: auto;
    margin-top: 4px;
}

.ac-item {
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.ac-item:hover,
.ac-item.active {
    background: #f3f5f7;
}

.ac-muted {
    color: #6c757d;
    font-size: 12px;
}

.report-progress-cell { min-width: 180px; }
.report-progress      { height: 10px; }


@media (max-width: 992px) {
	html, body {
		font-size: 13px;
	}
}