/* TESLA Owners SVK – svetlý dizajn, bez build krokov */
:root {
    --bg: #ffffff;
    --bg-soft: #f5f6f8;
    --surface: #ffffff;
    --ink: #15171c;
    --muted: #5f6672;
    --line: #e6e8ec;
    --accent: #d61f35;
    --accent-dark: #b3182b;
    --accent-ink: #ffffff;
    --accent-soft: #fdeef0;
    --ok: #137a3f;
    --ok-soft: #e6f4ec;
    --warn-soft: #fff4d6;
    --err: #b42318;
    --err-soft: #fdecea;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 28px rgba(16, 24, 40, .07);
    --shadow-lg: 0 24px 60px rgba(20, 23, 28, .16);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0; background: var(--bg); color: var(--ink);
    font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -.015em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.accent { color: var(--accent); }

/* Hlavička */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; flex-wrap: wrap; }
.brand { color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: .01em; font-size: 19px; display: inline-flex; align-items: center; gap: 8px; }
.brand small { font-weight: 800; color: var(--accent); margin-left: 2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--bg-soft); }
.nav a.active { color: var(--accent); }
.nav a.cta { background: var(--accent); color: #fff; font-weight: 700; margin-left: 6px; }
.nav a.cta:hover { background: var(--accent-dark); }
@media (max-width: 640px) {
    .site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
    .nav { width: 100%; overflow-x: auto; flex-wrap: nowrap; margin: 0 -4px; }
    .nav a { white-space: nowrap; padding: 7px 10px; font-size: 14px; }
}

/* Hero */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); padding: 48px 0 56px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 36px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } .hero { padding: 64px 0 72px; } }
.hero h1 { font-size: clamp(32px, 5.2vw, 56px); line-height: 1.07; margin: 0 0 18px; letter-spacing: -.025em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 620px; margin: 0 0 26px; }
.hero.compact { padding: 40px 0 44px; }
.hero.compact h1 { font-size: clamp(28px, 4.2vw, 44px); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 800; color: var(--accent); margin: 0 0 12px; }
.hero-media { position: relative; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4 / 3; background: #eef1f5; }
.hero-media img, .hero-media svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-stat { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 30px; max-width: 520px; }
.hero-stat .counter { flex: 1; min-width: 240px; }

/* Tlačidlá */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
    padding: 13px 22px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; line-height: 1.2;
    background: var(--accent); color: var(--accent-ink); transition: background .15s, transform .15s, box-shadow .15s; }
.btn:hover { background: var(--accent-dark); }
.btn.big { padding: 16px 28px; font-size: 17px; box-shadow: 0 10px 24px rgba(214, 31, 53, .28); }
.btn.big:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #c9ced6; }
.btn.ghost:hover { background: var(--bg-soft); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.danger { background: var(--err); }
.btn.block { width: 100%; }
.btn.fb { background: #1877f2; } .btn.fb:hover { background: #0f63d0; }
.btn.wa { background: #25d366; } .btn.wa:hover { background: #1da851; }
.btn.x { background: #111; } .btn.x:hover { background: #333; }
.btn.mail { background: #6b7280; } .btn.mail:hover { background: #4b5563; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0; }

/* Sekcie a karty */
main { padding: 44px 0 64px; }
.section { margin: 0 0 56px; }
.section:last-child { margin-bottom: 0; }
.section h2 { font-size: 26px; margin: 0 0 12px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid.two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 28px; } }
.split { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } }

.feature { position: relative; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature h3 { font-size: 20px; margin: 14px 0 8px; }
.feature p { color: var(--muted); margin: 0 0 14px; }
.feature a.more { font-weight: 700; text-decoration: none; }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.icon svg { width: 26px; height: 26px; }

/* Pás s výzvou */
.cta-band { background: linear-gradient(120deg, #e3354a 0%, #a9152a 100%); color: #fff; border-radius: 24px; padding: 36px 28px; display: grid; gap: 20px; align-items: center; grid-template-columns: 1fr; box-shadow: 0 20px 50px rgba(169, 21, 42, .25); }
@media (min-width: 800px) { .cta-band { grid-template-columns: 1fr auto; padding: 44px 48px; } }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .9; font-size: 17px; }
.cta-band .btn { background: #fff; color: var(--accent-dark); }
.cta-band .btn:hover { background: #ffecee; }

/* Počítadlo */
.counter { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.counter strong { font-size: 44px; line-height: 1; letter-spacing: -.03em; font-weight: 800; }
.counter span { color: var(--muted); }
.progress { height: 12px; background: #e7eaef; border-radius: 999px; overflow: hidden; margin: 12px 0 6px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #ef4458, var(--accent)); border-radius: 999px; min-width: 8px; }

/* Petícia – text */
.petition-text { font-size: 17px; }
.petition-text h2 { font-size: 22px; margin: 28px 0 8px; }
.petition-text ol { padding-left: 22px; }
.petition-text li { margin-bottom: 10px; }
.addressee { background: var(--bg-soft); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 12px 16px; font-size: 15px; }
.sticky { position: static; }
@media (min-width: 900px) { .sticky { position: sticky; top: 88px; } }
.sign-card { border-top: 5px solid var(--accent); }
.sign-card .counter strong { font-size: 38px; }

/* Formulár */
form .row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
form .row.one { grid-template-columns: 1fr; }
form .row.zip { grid-template-columns: 2fr 1fr; }
@media (max-width: 480px) { form .row, form .row.zip { grid-template-columns: 1fr; } }
label.field { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
label.field input, label.field textarea, label.field select {
    display: block; width: 100%; margin-top: 4px; padding: 12px 13px; font: inherit; font-weight: 400;
    border: 1px solid #cfd4dc; border-radius: 10px; background: #fff; color: var(--ink); }
label.field textarea { min-height: 110px; resize: vertical; }
label.field input:focus, label.field textarea:focus, label.field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 10px 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.error-text { color: var(--err); font-size: 13px; font-weight: 500; }
.alert { border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert.err { background: var(--err-soft); color: var(--err); }

/* Zoznamy */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.list li:last-child { border-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding: 0 0 12px 32px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 2px 0 14px 44px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }

/* Zdieľanie */
.share { display: flex; gap: 8px; flex-wrap: wrap; }
.copy { display: flex; gap: 8px; margin: 12px 0; }
.copy input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 10px; font: inherit; background: var(--bg-soft); }

/* Novinky */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1, .page-head h2 { margin: 0; }
.post-card { display: flex; flex-direction: column; padding: 0 0 22px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.post-card > *:not(.post-thumb) { margin-left: 22px; margin-right: 22px; }
.post-card > p:first-child { margin-top: 22px; }
.post-thumb { display: block; aspect-ratio: 1200 / 630; background: var(--accent-soft); margin-bottom: 16px; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb.placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(120deg, #fff1f2, #f5f6f8); color: var(--accent); }
.post-thumb.placeholder svg { width: 56px; height: 56px; opacity: .6; }
.post-title { font-size: 20px; line-height: 1.3; margin: 0 0 8px; }
.post-title a { color: var(--ink); text-decoration: none; }
.post-title a:hover { color: var(--accent); }
.post-card p:last-of-type { flex: 1; color: var(--muted); }
.post-card a.more { font-weight: 700; text-decoration: none; }
.post h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.15; margin: 8px 0 14px; }
.post-lead { font-size: 20px; color: var(--muted); margin: 0 0 22px; }
.post-cover { display: block; width: 100%; border-radius: 20px; margin: 0 0 28px; box-shadow: var(--shadow); }
.post-body { font-size: 18px; line-height: 1.75; }
.post-body h2 { font-size: 26px; margin: 36px 0 10px; }
.post-body h3 { font-size: 21px; margin: 26px 0 8px; }
.post-body img { border-radius: 12px; }
.post-body blockquote { margin: 22px 0; padding: 6px 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.post-body pre, .post-body code { background: #eef1f5; border-radius: 6px; font-size: 15px; }
.post-body code { padding: 1px 5px; }
.post-body pre { padding: 12px; overflow-x: auto; }
.post-body table { border-collapse: collapse; width: 100%; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }

/* Pätička */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding: 40px 0 32px; }
.site-footer .cols { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.disclaimer { margin-top: 24px; font-size: 13px; }

/* Admin */
.admin-bar { position: static; background: #1b2330; border-bottom: 0; backdrop-filter: none; }
.admin-bar .brand, .admin-bar .nav a { color: #fff; }
.admin-bar .nav a:hover, .admin-bar .nav a.active { background: rgba(255,255,255,.12); color: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat .num { font-size: 30px; font-weight: 800; }
a.card.stat:hover { border-color: var(--accent); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { padding: 8px 10px; border: 1px solid #cfd4dc; border-radius: 8px; font: inherit; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: #8a5a00; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 20px; }
.md-help { background: var(--bg-soft); border-radius: 8px; padding: 12px; font-size: 13px; white-space: pre-wrap; margin: 0; }
.slot-preview { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--bg-soft); margin-bottom: 12px; }
.slot-preview img, .slot-preview svg { width: 100%; height: 100%; object-fit: cover; display: block; }

#podpis { scroll-margin-top: 90px; }
@media (max-width: 640px) {
    .nav { scrollbar-width: none; }
    .nav::-webkit-scrollbar { display: none; }
    .nav a.home-link { display: none; }
    .nav a.cta { margin-left: auto; }
}

/* Členstvo v petícii, QR */
.join { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; margin: 12px 0 4px; }
.join-box { margin-top: 12px; }
[hidden] { display: none !important; }
.qr-box { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: var(--bg-soft); border-radius: 14px; padding: 16px; margin: 20px 0; }
.qr-box .qr { width: 168px; height: 168px; background: #fff; padding: 8px; border-radius: 12px; box-shadow: var(--shadow); flex: none; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.qr-box p { margin: 0 0 10px; }

/* Prihlásenie v hlavičke */
.nav a.login-link { border: 1.5px solid var(--line); }
.nav a.login-link:hover, .nav a.login-link.active { border-color: var(--accent); }
@media (max-width: 640px) { .nav a.about-link { display: none; } }
@media (max-width: 400px) {
    .nav { gap: 0; }
    .nav a { padding: 7px 8px; font-size: 13.5px; }
    .nav a.cta { margin-left: 4px; }
}

/* Komentáre k petícii */
.comments { display: grid; gap: 12px; margin: 8px 0 12px; }
.comment { margin: 0; padding: 14px 16px; background: var(--bg-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; }
.comment p { margin: 0 0 6px; white-space: pre-line; font-size: 16px; }
.comment footer { font-size: 13px; color: var(--muted); }

.share-note { margin: 8px 0 12px; }

/* ikonky v tabuľkách adminu */
.row-actions { display: flex; gap: 2px; align-items: center; white-space: nowrap; }
.row-actions form { margin: 0; display: inline; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn.danger:hover { background: var(--err-soft); color: var(--err); }
.icon-btn svg { width: 18px; height: 18px; }
