/* =========================================================================
   Nový layout ČFB – hlavička, navigace, patička, sdílené prvky
   Tokeny podle návrhu (cfb_detail_clanku.xml → <design>)
   ========================================================================= */

:root {
    --gold: #D6A15C;
    --gold-light: #F5DDA5;
    --gold-dark: #A87543;
    --gold-gradient: linear-gradient(180deg, #F7E3B4 0%, #E3BC82 45%, #B88452 100%);
    --navy: #102846;
    --navy-deep: #0B1D33;
    --red: #D71920;
    --white: #FFFFFF;

    --text: #16202C;
    --text-muted: #5E6773;
    --line: #E7E2DA;
    --surface: #FFFFFF;
    --surface-soft: #FAF7F2;

    --radius-card: 12px;
    --radius-btn: 8px;
    --radius-img: 12px;

    --wrap: 1360px;
    --gutter: 24px;
    --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --focus: 0 0 0 3px rgba(16, 40, 70, .35);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }
a { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
button { font-family: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; border-radius: var(--radius-btn);
    background: var(--navy); color: var(--white); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
    width: 100%;
    max-width: calc(var(--wrap) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- tlačítka, štítky ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 44px; padding: 0 20px;
    border-radius: var(--radius-btn); border: none;
    background: var(--navy); color: var(--white);
    font: 700 15px var(--font); text-decoration: none; cursor: pointer;
    transition: background-color .15s, color .15s;
}
.btn:hover { background: #1B3C66; }
.btn-outline { background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }

.badge {
    display: inline-flex; align-items: center;
    padding: 3px 9px; border-radius: 5px;
    font-size: 11px; font-weight: 700; line-height: 1.4;
    text-transform: uppercase; letter-spacing: .03em;
    color: var(--white); background: var(--gold);
    white-space: nowrap;
}
.badge-red { background: var(--red); }
.badge-navy { background: var(--navy); }
.badge-gold { background: var(--gold); color: #2B1D0C; }
.badge-blue { background: #1F5FA8; }
.badge-green { background: #2F7A3D; }
.badge-gray { background: #6B7280; }

/* ---------- horní lišta ---------- */

.topbar { font-size: 13px; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 30px; }
.topbar-social { display: flex; gap: 20px; }
.topbar a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--navy); font-weight: 500; }
.topbar a:hover { text-decoration: underline; }
.topbar-login { color: #8A9099 !important; }

/* ---------- hlavička ---------- */

.site-header { position: relative; z-index: 20; margin-bottom: 20px; }
.header-bar {
    display: flex; align-items: center; gap: 28px;
    min-height: 64px; padding: 6px 16px 6px 12px;
    border-radius: 14px;
    background: var(--gold-gradient);
    box-shadow: 0 6px 18px rgba(80, 52, 20, .18);
}
.header-logo { flex: none; display: flex; }
.header-logo img { height: 52px; width: auto; display: block; }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.main-nav a {
    position: relative;
    padding: 18px 16px;
    font-size: 16px; font-weight: 600;
    color: var(--navy-deep); text-decoration: none;
}
.main-nav a::after {
    content: '';
    position: absolute; left: 16px; right: 16px; bottom: 9px;
    height: 3px; border-radius: 2px;
    background: var(--red);
    transform: scaleX(0); transition: transform .2s;
}
.main-nav a:hover::after { transform: scaleX(.5); }
.main-nav a.is-active::after { transform: scaleX(1); }

.header-search { position: relative; flex: 0 1 240px; margin-left: auto; }
.header-search i {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--navy); font-size: 15px; pointer-events: none;
}
.header-search input {
    width: 100%; height: 40px; padding: 0 14px 0 40px;
    border: 1px solid rgba(255, 255, 255, .6); border-radius: var(--radius-btn);
    background: var(--white);
    font: 500 15px var(--font); color: var(--text);
}
.header-search input::placeholder { color: #9AA1AB; }
.header-search input:focus { outline: none; box-shadow: var(--focus); }

.nav-toggle {
    display: none;
    width: 44px; height: 44px; margin-left: auto;
    border: 0; border-radius: var(--radius-btn);
    background: rgba(255, 255, 255, .55);
    color: var(--navy-deep); font-size: 20px; cursor: pointer;
}

/* ---------- patička ---------- */

.site-footer { margin-top: 56px; }
.footer-main {
    display: grid;
    grid-template-columns: 170px repeat(4, minmax(0, 1fr)) minmax(0, 1.25fr) minmax(0, .9fr);
    gap: 0;
    padding: 26px 28px 30px;
    border-radius: 18px 18px 0 0;
    background: var(--gold-gradient);
}
.footer-logo img { height: 64px; width: auto; display: block; }
.footer-col { padding: 0 18px; border-left: 1px solid rgba(90, 60, 25, .18); }
.footer-col h2 { margin: 0 0 8px; font-size: 15px; color: var(--navy-deep); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 3px; font-size: 14px; }
.footer-col a { color: #2E2414; text-decoration: none; }
.footer-col a:hover { text-decoration: underline; }
.footer-contact li, .footer-social li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { width: 16px; margin-top: 4px; color: var(--navy-deep); text-align: center; }
.footer-social a { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--navy-deep); }
.footer-social i { width: 18px; text-align: center; }

.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
    padding: 12px 28px;
    background: var(--navy);
    color: var(--white);
}
.footer-bottom p { margin: 0; font-size: 14px; letter-spacing: .02em; }
.footer-bottom p:last-child { font-size: 12px; }
.footer-bottom a { color: var(--white); text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* ---------- nadpisy sekcí s akcentem ---------- */

.section-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px;
    font-size: 18px; font-weight: 800; color: var(--text);
}
.section-title::before {
    content: '';
    flex: none; width: 5px; height: 22px;
    border-radius: 3px;
    background: var(--gold);
}
.section-title small { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; }
.section-title i { color: var(--gold-dark); }

/* ---------- drobečková navigace (na tmavém hero) ---------- */

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0 0 16px; padding: 0; font-size: 13px; }
.breadcrumb li { display: flex; align-items: center; min-width: 0; }
.breadcrumb li + li::before { content: '›'; margin: 0 10px; opacity: .7; }
.breadcrumb a { color: var(--white); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current] { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }


/* ---------- stránkování ---------- */

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; }
.page-num, .page-step, .page-gap {
    min-width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0 12px;
    border-radius: var(--radius-btn);
    font-size: 14px; font-weight: 700; text-decoration: none; color: var(--navy);
}
.page-num, .page-step { border: 1px solid #E5E5E5; background: var(--white); }
.page-num:hover, .page-step:hover { border-color: var(--gold); }
.page-num.is-current { background: var(--navy); border-color: var(--navy); color: var(--white); }
.page-step.is-disabled { opacity: .4; }
.page-gap { min-width: 20px; padding: 0; color: var(--text-muted); }

@media (max-width: 760px) {
    .page-step span { display: none; }
    .page-step { padding: 0; min-width: 40px; }
}

/* ---------- 404 ---------- */

.not-found { padding: 80px var(--gutter) 40px; text-align: center; }
.not-found h1 { font-size: 32px; margin: 0 0 12px; }
.not-found p { color: var(--text-muted); }

/* =========================================================================
   Responzivita
   ========================================================================= */

@media (max-width: 1280px) {
    .main-nav a { padding: 18px 11px; font-size: 15px; }
    .main-nav a::after { left: 11px; right: 11px; }
    .footer-main { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 24px; }
    .footer-logo { grid-column: 1 / -1; }
    .footer-col { padding: 0 14px; }
    .footer-col:nth-child(4n + 2) { border-left: 0; padding-left: 0; }
}

@media (max-width: 1024px) {
    :root { --gutter: 18px; }
    .header-bar { gap: 12px; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-search { order: 3; flex-basis: 100%; margin: 0 0 6px; display: none; }
    .site-header.nav-open .header-search { display: block; }
    .header-bar { flex-wrap: wrap; }
    .main-nav {
        order: 4; flex-basis: 100%;
        display: none; flex-direction: column; align-items: stretch; gap: 0;
        padding: 4px 0 8px;
        border-top: 1px solid rgba(90, 60, 25, .2);
    }
    .site-header.nav-open .main-nav { display: flex; }
    .main-nav a { padding: 12px 6px; font-size: 17px; }
    .main-nav a::after { left: 6px; right: auto; width: 32px; bottom: 6px; }
}

@media (max-width: 720px) {
    :root { --gutter: 14px; }
    .topbar-social a span, .topbar-social { gap: 14px; }
    .header-bar { border-radius: 12px; }
    .header-logo img { height: 44px; }
    .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 22px 18px; border-radius: 14px 14px 0 0; }
    .footer-col, .footer-col:nth-child(4n + 2) { border-left: 0; padding: 0; }
    .footer-bottom { flex-direction: column; text-align: center; padding: 14px 18px; }
}

@media (max-width: 420px) {
    .topbar-social a { font-size: 0; gap: 0; }
    .topbar-social a i { font-size: 16px; }
    .topbar-social { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
