/* style.css — design systém platbykartou.cz (tokeny, dark mode, komponenty) */

/* === TOKENY === */
:root {
    color-scheme: light; /* nativni prvky (select, scrollbar) sleduji tema webu */
    --color-primary: #0d3b66;
    --color-primary-dark: #092a4a;
    --color-primary-light: #1d5a8f;
    --color-accent: #15803d;
    --color-accent-hover: #166534;
    --color-accent-bright: #16a34a;

    --color-bg: #ffffff;
    --color-surface: #f5f8fc;
    --color-surface-2: #eef3f9;
    --color-text: #14181f;
    --color-text-light: #5a6473;
    --color-border: #e2e6ec;
    --color-on-primary: #ffffff;

    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-info: #2563eb;

    --font-main: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-heading: var(--font-main);

    --max-width: 1100px;
    --measure: 72ch;
    --spacing: 1rem;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(13, 59, 102, .08), 0 1px 2px rgba(13, 59, 102, .06);
    --shadow-lg: 0 10px 30px rgba(13, 59, 102, .12);
}

[data-theme="dark"] {
    color-scheme: dark;
    --color-primary: #1d5a8f;
    --color-primary-dark: #14416b;
    --color-primary-light: #3b7bb5;
    --color-accent: #22c55e;
    --color-accent-hover: #16a34a;

    --color-bg: #0f1115;
    --color-surface: #171a21;
    --color-surface-2: #1f242d;
    --color-text: #e8ebf0;
    --color-text-light: #a4adba;
    --color-border: #2b313b;
    --shadow: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .5);
}

/* === BASE === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.25; color: var(--color-text); }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin: .2em 0 .5em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
p, ul, ol { max-width: var(--measure); }
a { color: var(--color-primary-light); }
a:hover { color: var(--color-primary); }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid var(--color-border); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* === PŘÍSTUPNOST === */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--color-primary); color: #fff;
    padding: .5rem 1rem; z-index: 1000;
}
.skip-link:focus { left: 0; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* === LAYOUT === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--spacing); }
.page { padding-top: 1.5rem; padding-bottom: 3rem; }

/* === HLAVIČKA === */
.site-header {
    background: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 100;
}
.site-header__inner { display: flex; align-items: center; gap: 1rem; padding: .6rem var(--spacing); }
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo img { display: block; height: 32px; width: auto; }
.site-nav { margin-left: auto; }
.nav-menu { list-style: none; display: flex; gap: 1.1rem; margin: 0; padding: 0; max-width: none; }
.nav-menu a {
    color: var(--color-on-primary); text-decoration: none; font-weight: 500;
    padding: .35rem .15rem; border-bottom: 2px solid transparent; display: inline-block;
}
.nav-menu a:hover { border-bottom-color: rgba(255, 255, 255, .6); color: #fff; }
.nav-menu a.is-active { border-bottom-color: var(--color-accent-bright); }
.theme-toggle {
    background: transparent; border: 1px solid rgba(255, 255, 255, .45);
    color: #fff; border-radius: var(--radius-sm); padding: .35rem .55rem;
    cursor: pointer; font-size: 1rem; line-height: 1;
}
.nav-toggle {
    display: none; flex-direction: column; gap: 4px; background: transparent;
    border: 0; cursor: pointer; padding: .4rem; margin-left: auto;
}
.nav-toggle span { width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* === DROBEČKOVÁ NAVIGACE === */
.breadcrumb { padding: .85rem var(--spacing) 0; font-size: .9rem; color: var(--color-text-light); }
.breadcrumb a { color: var(--color-text-light); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb__sep { color: var(--color-border); }

/* === PATIČKA === */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); margin-top: 3rem; }
.site-footer__grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem;
    padding: 2.5rem var(--spacing) 1.5rem;
}
.site-footer__col p { color: var(--color-text-light); font-size: .92rem; }
.site-footer__title { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-text-light); margin: 0 0 .6rem; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.site-footer__col li { margin-bottom: .4rem; }
.site-footer__col a { color: var(--color-text); text-decoration: none; font-size: .95rem; }
.site-footer__col a:hover { color: var(--color-primary-light); text-decoration: underline; }
.logo--footer img { filter: none; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.linklike:hover { text-decoration: none; }
[data-theme="dark"] .logo--footer img,
.site-footer .logo--footer img { background: var(--color-primary); border-radius: var(--radius-sm); padding: 3px 6px; }
.site-footer__badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.badge {
    display: inline-block; font-size: .75rem; padding: .2rem .5rem;
    background: var(--color-surface-2); border: 1px solid var(--color-border);
    border-radius: 999px; color: var(--color-text-light);
}
.site-footer__bottom { border-top: 1px solid var(--color-border); padding: 1.25rem var(--spacing); }
.site-footer__disclaimer { font-size: .82rem; color: var(--color-text-light); max-width: none; margin: 0 0 .75rem; }
.site-footer__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--color-text-light); max-width: none; margin: 0; }

/* === TLAČÍTKA === */
.btn {
    display: inline-block; padding: .7rem 1.4rem; border: 2px solid transparent;
    border-radius: var(--radius-sm); cursor: pointer; text-decoration: none;
    font-weight: 600; font-size: 1rem; line-height: 1.2; transition: background .15s, opacity .15s;
}
.btn--primary { background: var(--color-accent); color: #fff; }
.btn--primary:hover { background: var(--color-accent-hover); color: #fff; }
.btn--secondary { background: var(--color-primary); color: #fff; }
.btn--secondary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--color-text); border-color: var(--color-border); }
.btn--ghost:hover { background: var(--color-surface-2); color: var(--color-text); }

/* === HERO / ROZCESTNÍK === */
.hero { padding: 1rem 0 1.5rem; }
.hero p.lead { font-size: 1.1rem; color: var(--color-text-light); max-width: var(--measure); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 1.5rem 0; }
.card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card a { font-weight: 600; text-decoration: none; }

/* === TL;DR / ANSWER BOX === */
.tldr {
    background: var(--color-surface); border-left: 4px solid var(--color-accent);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1rem 1.25rem; margin: 1.5rem 0; max-width: var(--measure);
}
.tldr strong { color: var(--color-primary); }

/* === CALLOUT === */
.callout {
    border-radius: var(--radius); padding: .85rem 1.1rem; margin: 1.25rem 0;
    border-left: 4px solid var(--color-info); background: var(--color-surface); max-width: var(--measure);
}
.callout--tip { border-left-color: var(--color-success); }
.callout--warning { border-left-color: var(--color-warning); }
.callout--danger { border-left-color: var(--color-error); }

/* === SROVNÁVACÍ TABULKA === */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; max-width: 100%; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.comparison-table caption { text-align: left; font-weight: 600; margin-bottom: .5rem; color: var(--color-text); }
.comparison-table th, .comparison-table td { border: 1px solid var(--color-border); padding: .55rem .7rem; text-align: left; }
.comparison-table thead th { background: var(--color-primary); color: #fff; position: sticky; top: 0; }
.comparison-table tbody th[scope="row"] { background: var(--color-surface); font-weight: 600; }
.comparison-table tbody tr:nth-child(even) td { background: var(--color-surface); }

/* === SKÓRE BADGE === */
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 50%; font-weight: 700; color: #fff;
    background: var(--color-text-light);
}
.score-badge--high { background: var(--color-success); }
.score-badge--mid { background: var(--color-warning); }
.score-badge--low { background: var(--color-error); }
.score-badge--pending { background: var(--color-text-light); font-size: .8rem; }

/* === VERDIKT === */
.verdict-box { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.25rem; margin: 1.5rem 0; box-shadow: var(--shadow); }
.verdict-box dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.verdict-box dt { font-weight: 600; color: var(--color-text-light); }
.verdict-box dd { margin: 0; }

/* === PICK CARD (doporučení) === */
.pick-card { display: flex; gap: 1rem; align-items: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.1rem; margin: 1rem 0; }
.pick-card__body { flex: 1; }
.pick-card h3 { margin: 0 0 .35rem; }

/* === AUTOR / RECENZENT === */
.author-box { display: flex; gap: 1rem; align-items: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem; margin: 1.5rem 0; }
.author-box__avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--color-surface-2); flex: 0 0 auto; }
.reviewer-badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; padding: .3rem .7rem; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-light); }

/* === DISCLOSURE === */
.disclosure { font-size: .85rem; color: var(--color-text-light); background: var(--color-surface); border: 1px dashed var(--color-border); border-radius: var(--radius-sm); padding: .6rem .9rem; margin: 1rem 0; }

/* === FAQ === */
.faq details { border: 1px solid var(--color-border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .75rem; background: var(--color-surface); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▸ "; color: var(--color-accent); }
.faq details[open] summary::before { content: "▾ "; }
.faq details > p { margin: .6rem 0 0; }

/* === FRESHNESS === */
.freshness { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--color-text-light); }
.freshness::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--color-success); display: inline-block; }
.freshness--mid::before { background: var(--color-warning); }
.freshness--old::before { background: var(--color-error); }

/* === OBSAH (TOC) === */
.toc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; max-width: var(--measure); }
.toc ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.toc li { margin-bottom: .3rem; }

/* === RELATED WIDGET === */
.related { margin: 2.5rem 0 0; }
.related .card-grid { margin-top: 1rem; }

/* === KALKULAČKA === */
.calc { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow); }
.calc__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.calc__field { display: flex; flex-direction: column; gap: .3rem; }
.calc__field label { font-weight: 600; font-size: .9rem; }
.calc__field input, .calc__field select {
    padding: .55rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
    background: var(--color-bg); color: var(--color-text); font-size: 1rem;
}
.calc__results { margin-top: 1.5rem; }
.calc__results .comparison-table tbody tr.is-best th[scope="row"],
.calc__results .comparison-table tbody tr.is-best td { background: rgba(22, 163, 74, .12); }
.calc__note { font-size: .85rem; color: var(--color-text-light); margin-top: 1rem; }

/* === COOKIE CONSENT === */
.cookie-consent {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
    max-width: 720px; margin: 0 auto; background: var(--color-bg);
    border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 1rem 1.25rem;
    display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
}
.cookie-consent__text { flex: 1 1 260px; margin: 0; font-size: .88rem; max-width: none; }
.cookie-consent__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie-consent .btn { padding: .5rem 1rem; font-size: .9rem; }

/* === UTILITY === */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.lead { font-size: 1.1rem; }

/* === RESPONSIVE === */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .site-nav { order: 4; flex-basis: 100%; margin-left: 0; display: none; }
    .site-nav.is-open { display: block; }
    .nav-menu { flex-direction: column; gap: .25rem; padding: .5rem 0; }
    .nav-menu a { display: block; padding: .5rem 0; }
    .site-header__inner { flex-wrap: wrap; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 560px) {
    .site-footer__grid { grid-template-columns: 1fr; }
    .comparison-table { font-size: .85rem; }
}

/* === KOMPONENTY OBSAHU (recenze, segmenty, slovník, návody) === */
.review-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.review-head h1 { margin: 0; }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1rem 0; }
.proscons h3 { margin-top: 0; }
.list-pros, .list-cons { list-style: none; padding-left: 0; }
.list-pros li, .list-cons li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; }
.list-pros li::before { content: "✓"; position: absolute; left: 0; color: var(--color-success); font-weight: 700; }
.list-cons li::before { content: "✕"; position: absolute; left: 0; color: var(--color-error); font-weight: 700; }

.verdict-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .75rem; }
.verdict-cols__h { font-weight: 600; color: var(--color-text-light); margin: 0 0 .35rem; }

.check-list { list-style: none; padding-left: 0; }
.check-list li { padding-left: 1.5rem; position: relative; margin-bottom: .3rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

.link-list { line-height: 1.9; }
.link-list--cols { columns: 2; column-gap: 2rem; }

.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .6rem; }

.meta-list { list-style: none; padding-left: 0; font-size: .95rem; color: var(--color-text-light); }
.meta-list li { margin-bottom: .3rem; }

.sources-box { margin: 1rem 0; font-size: .9rem; }
.sources-box summary { cursor: pointer; font-weight: 600; color: var(--color-text-light); }
.sources-box ul { margin: .6rem 0 0; }

.table-note { color: var(--color-text-light); margin-top: -.5rem; }

@media (max-width: 640px) {
    .proscons, .verdict-cols { grid-template-columns: 1fr; }
    .link-list--cols { columns: 1; }
}

/* === PRINT === */
@media print {
    .site-header, .site-footer, .theme-toggle, .nav-toggle, .skip-link, .cookie-consent, .sticky-cta { display: none; }
    .page { padding: 0; }
    a { color: #000; text-decoration: underline; }
}
