/* =====================================================================
 * readability.css — zdieľaná typografia a vizuálne vylepšenia
 * Aplikuje sa NAD všetky témy (default, dark, cyber, neon, modern, ...).
 * Cieľ: čitateľné písmo, jasná hierarchia, jemné skrášlenie — bez toho,
 * aby sa prepisovali farby konkrétnych tém (funguje na svetlom aj tmavom).
 * Author: Yamiru (https://github.com/Yamiru)
 * ===================================================================== */

/* ---------- Základné vykresľovanie písma ---------- */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    letter-spacing: 0.001em;
}

/* ---------- Nadpisy — jasná hierarchia ---------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.012em;
    margin-top: 0;
    margin-bottom: 0.6em;
    text-wrap: balance;
}

h1, .h1 { font-size: clamp(1.85rem, 1.4rem + 1.6vw, 2.6rem); }
h2, .h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); }
h3, .h3 { font-size: clamp(1.25rem, 1.08rem + 0.7vw, 1.55rem); font-weight: 600; }
h4, .h4 { font-size: 1.2rem; font-weight: 600; }
h5, .h5 { font-size: 1.05rem; font-weight: 600; }

/* ---------- Odseky a text ---------- */
p { margin-top: 0; margin-bottom: 1rem; }
p, li { line-height: 1.7; }
strong, b { font-weight: 700; }
small, .small { font-size: 0.875em; }

/* ---------- Odkazy — čitateľné podčiarknutie ---------- */
a {
    text-underline-offset: 0.18em;
    text-decoration-thickness: 0.06em;
    transition: color 0.15s ease, opacity 0.15s ease;
}

/* ---------- Prístupnosť: viditeľný focus ---------- */
:focus-visible {
    outline: 2px solid var(--primary-color, #6366f1);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Prose / obsahové stránky (About, Rules, Privacy ...) ---------- */
.custom-page,
.page-content,
.recruitment-detail,
.static-content {
    font-size: 1.05rem;
    line-height: 1.75;
}

.page-content { max-width: 72ch; }
.page-content.full-width,
.custom-page.full-width .page-content { max-width: none; }

.page-content h2,
.page-content h3 {
    margin-top: 1.8em;
    padding-top: 0.2em;
}
.page-content h2:first-child,
.page-content h3:first-child { margin-top: 0; }

.page-content p { margin-bottom: 1.1em; }

.page-content ul,
.page-content ol {
    margin-bottom: 1.2em;
    padding-left: 1.4em;
}
.page-content li { margin-bottom: 0.5em; }

.page-content ul li::marker { color: var(--primary-color, #6366f1); }

.page-content a {
    font-weight: 600;
    text-decoration: underline;
}

/* Jemné oddelenie sekcií na obsahových stránkach */
.page-content hr {
    margin: 2rem 0;
    opacity: 0.25;
}

/* ---------- Jemné skrášlenie (nízka špecificita cez :where, téma môže prepísať) ---------- */
:where(.card) {
    border-radius: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
:where(.card:hover) {
    transform: translateY(-2px);
}

:where(.btn) {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
:where(.btn):hover { transform: translateY(-1px); }
:where(.btn):active { transform: translateY(0); }

:where(.btn-sm) { border-radius: 8px; }
:where(.btn-lg) { border-radius: 12px; }

:where(.badge) {
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.4em 0.65em;
}

:where(.form-control, .form-select) {
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:where(.form-control:focus, .form-select:focus) {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color, #6366f1) 25%, transparent);
    border-color: var(--primary-color, #6366f1);
}

:where(.navbar) .nav-link {
    font-weight: 500;
    letter-spacing: 0.01em;
}

:where(.dropdown-menu) { border-radius: 12px; }
:where(.dropdown-item) { border-radius: 8px; }

/* Tabuľky — vzdušnejšie a čitateľnejšie */
:where(.table) > :not(caption) > * > * {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    vertical-align: middle;
}

/* ---------- Tenký, nevtieravý scrollbar ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary-color, #6366f1) 55%, transparent) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary-color, #6366f1) 55%, transparent);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #6366f1);
    background-clip: padding-box;
}

/* ---------- Rešpektuj používateľov, ktorí nechcú animácie ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Mobil: o čosi väčší prose text ---------- */
@media (max-width: 575.98px) {
    .custom-page, .page-content { font-size: 1.02rem; }
    h1, .h1 { line-height: 1.25; }
}
