/* Theme CSS for the Bootstrap 5 default layout.
   Bootstrap 5 dropped .jumbotron and ties list indentation to the root
   font-size; both are patched here, together with the sticky footer,
   the footer and alert styles and their dark mode variants. */

body {
    font-size: 1.4rem;
}

/* ---------------------------------------------------------------------------
   Sticky footer
   Body je flex kontajner na celu vysku okna, <main> vyplni volny priestor
   a odtlaci footer nadol. Footer je tak vzdy na spodku obrazovky pri kratkom
   obsahu a plynulo sa posunie nizsie pri dlhom obsahu.
   --------------------------------------------------------------------------- */
html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 3.5rem; /* miesto pre .navbar.fixed-top */
}

main {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
}

/* obrazky v texte nesmu byt sirsie ako blok; obrazky v <figure> maju
   vlastne pravidla v _includes/lightbox.html */
main img {
    max-width: 100%;
    height: auto;
}

/* Bootstrap 5 removed .jumbotron; restored here */
.jumbotron {
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    background-color: #e9ecef;
    border-radius: 0.3rem;
}

@media (max-width: 575.98px) {
    .jumbotron {
        padding: 2rem 1rem;
    }
}

/* Bootstrap's list padding is a fixed 2rem tied to the root font-size;
   using em instead keeps it proportional to the local (larger) body text */
main ol,
main ul {
    padding-left: 2em;
}

.footer aside {
    font-size: 1rem;
}

.footer {
    width: 100%;
    font-size: 1rem;
    background-color: #f5f5f5;
}

.footer div.container {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.footer-copyright {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    text-align: center;
    background-color: #d5d5d5;
}

.footer-copyright p {
    margin-top: 0;
    margin-bottom: 0;
}

.license-icons img {
    height: 2.5rem;
    margin-bottom: 8px;
    margin-top: 12px;
}

.footer-title {
    font-size: 2.5rem;
    font-weight: bold;
}

.theme-alert-info {
    border-left: 5px solid #0c5460;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #0c5460;
}

.theme-alert-info p:first-of-type {
    color: #0c5460;
    margin-bottom: 13px;
}

.theme-alert-danger {
    border-left: 5px solid #d9534f;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #444;
}

.theme-alert-danger p:first-of-type {
    color: #d9534f;
    margin-bottom: 13px;
}

.theme-alert-lecturer {
    border-left: 5px solid #f0ad4e;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #444;
}

.theme-alert-lecturer p:first-of-type {
    color: #f0ad4e;
    margin-bottom: 13px;
}

/* ---------------------------------------------------------------------------
   Tmavy rezim
   Bootstrap 5.3 prepina cez atribut <html data-bs-theme="dark"> a sam
   upravi telo, karty, alerty atd. Tu dolaďujeme len vlastne prvky, ktore
   maju natvrdo zadane svetle farby.
   --------------------------------------------------------------------------- */
[data-bs-theme="dark"] .jumbotron {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .footer {
    background-color: #2b3035;
}

[data-bs-theme="dark"] .footer-copyright {
    background-color: #1b1e21;
}

[data-bs-theme="dark"] .theme-alert-info,
[data-bs-theme="dark"] .theme-alert-info p:first-of-type {
    color: #6edff6;
}

[data-bs-theme="dark"] .theme-alert-danger,
[data-bs-theme="dark"] .theme-alert-lecturer {
    color: #dee2e6;
}

/* CC/BY/NC/SA su cierne kresby – na tmavom footeri by boli neviditelne */
[data-bs-theme="dark"] .license-icons img {
    filter: invert(1);
}

/* ---------------------------------------------------------------------------
   Citacie (Markdown ">") – Bootstrap 5 nedava <blockquote> ziadny vzhlad,
   bez tychto pravidiel splynie s beznym textom.
   --------------------------------------------------------------------------- */
main blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 4px solid #adb5bd;
    background-color: #f8f9fa;
    color: #495057;
    font-style: italic;
}

main blockquote p:last-child {
    margin-bottom: 0;
}

main blockquote cite,
main blockquote footer {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-size: 0.9em;
    color: #6c757d;
}

[data-bs-theme="dark"] main blockquote {
    border-left-color: #6c757d;
    background-color: #2b3035;
    color: #ced4da;
}

[data-bs-theme="dark"] main blockquote cite,
[data-bs-theme="dark"] main blockquote footer {
    color: #adb5bd;
}

/* ---------------------------------------------------------------------------
   Nadpisy jednotlivych krokov v navode ("### Nazov {.step}")
   Podciarknutie vizualne oddeluje kazdy krok od predchadzajuceho obsahu,
   pocitadlo pred nazvom navyse ukazuje poradie krokov v ramci stranky.
   Farby su premenne Bootstrapu, takze funguju aj v tmavom rezime.
   --------------------------------------------------------------------------- */
main {
    counter-reset: step-counter;
}

main .step {
    margin-top: 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--bs-link-color);
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--bs-emphasis-color);
}

main .step::before {
    counter-increment: step-counter;
    content: "Krok " counter(step-counter);
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-link-color);
}
