/* Novinky — green tech portal. Svetlá téma (default) + dark cez [data-theme="dark"]. */
:root {
    --bg: #F7FAF8;
    --surface: #FFFFFF;
    --surface-soft: #EEF8F2;
    --text: #0F172A;
    --text-2: #475569;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --primary: #0F9D58;
    --primary-dark: #04743E;
    --primary-soft: #E6F7EE;
    --teal: #14B8A6;
    --blue: #0EA5E9;
    --purple: #6D5DF6;
    --orange: #F97316;
    --warning: #F59E0B;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --shadow-card: 0 10px 30px rgba(15, 23, 42, .06);
    --shadow-elev: 0 20px 60px rgba(15, 23, 42, .10);
    --container: 1280px;
    --pad-x: 64px;
}

[data-theme="dark"] {
    --bg: #0B1220;
    --surface: #131c2b;
    --surface-soft: #16241c;
    --text: #E7ECF3;
    --text-2: #AEB8C7;
    --text-muted: #8b97a8;
    --border: #243044;
    --primary-soft: #10271c;
    --shadow-card: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-elev: 0 20px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

.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; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; border: 0; cursor: pointer;
    font: inherit; font-weight: 600; white-space: nowrap; transition: transform .12s, box-shadow .15s, background .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 157, 88, .3); }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--surface); color: var(--text-2); cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.brand-logo { color: var(--primary); display: inline-flex; line-height: 0; }
.brand-logo svg { width: 30px; height: 30px; }
.brand-logo img { width: 32px; height: 32px; display: block; }
.main-nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.main-nav a { padding: 8px 12px; border-radius: 999px; color: var(--text-2); font-weight: 500; font-size: .94rem; transition: color .15s, background .15s; }
.main-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; background: var(--surface-soft); border: 1px solid var(--border); border-radius: 999px; padding: 2px 4px 2px 2px; }
.search .icon-btn { border: 0; background: transparent; width: 36px; height: 36px; }
.search input { border: 0; background: transparent; color: var(--text); font: inherit; font-size: .9rem; width: 150px; outline: none; padding-right: 8px; }
.theme-toggle .icon:last-child, .theme-toggle svg:last-child { display: none; }
[data-theme="dark"] .theme-toggle svg:first-child { display: none; }
[data-theme="dark"] .theme-toggle svg:last-child { display: block; }
.menu-toggle { display: none; }

/* Page layout */
.page { padding-top: 32px; padding-bottom: 56px; }
.hero-row { display: grid; grid-template-columns: 2fr .95fr; gap: 24px; margin-bottom: 32px; }

/* Hero */
.hero { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.hero-visual { height: 220px; background: linear-gradient(135deg, #0F9D58, #14B8A6 60%, #0EA5E9); position: relative; overflow: hidden; }
.hero-cube { position: absolute; border-radius: 14px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(2px); transform: rotate(25deg); }
.hero-cube:nth-child(1) { width: 120px; height: 120px; right: 8%; top: 18%; }
.hero-cube:nth-child(2) { width: 70px; height: 70px; right: 26%; top: 48%; background: rgba(255,255,255,.28); }
.hero-cube:nth-child(3) { width: 90px; height: 90px; right: 2%; bottom: -20px; background: rgba(255,255,255,.12); }
.hero-body { padding: 28px 32px 32px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 4px 12px; border-radius: 999px; }
.hero-title { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; margin: 16px 0 12px; }
.hero-title a:hover { color: var(--primary); }
.hero-summary { color: var(--text-2); font-size: 1.05rem; margin: 0 0 18px; }
.hero-meta, .card-meta, .hero-meta span { color: var(--text-muted); font-size: .86rem; }
.hero-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; }
.dot-sep { opacity: .5; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-card); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.panel-head h2 { font-size: 1.1rem; font-weight: 700; margin: 0; }
.panel-link { color: var(--primary); font-size: .82rem; font-weight: 600; }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.latest-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-cat, .card-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); }
.latest-title { font-weight: 600; font-size: .96rem; line-height: 1.35; }
.latest-title:hover { color: var(--primary); }
.latest-date { color: var(--text-muted); font-size: .78rem; }

/* Newsletter */
.newsletter { background: linear-gradient(160deg, var(--primary-soft), var(--surface)); text-align: center; }
.news-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary); color: #fff; margin-bottom: 6px; }
.news-icon svg { width: 26px; height: 26px; }
.newsletter h2 { font-size: 1.15rem; margin: 6px 0; }
.newsletter p { color: var(--text-2); font-size: .9rem; margin: 0 0 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input { padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.newsletter-form .btn { justify-content: center; }
.privacy-note { font-size: .76rem !important; color: var(--text-muted) !important; margin-top: 12px !important; }
.rss-line a { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .82rem; }
.rss-line svg { width: 15px; height: 15px; }
.form-msg { font-size: .85rem; font-weight: 600; padding: 8px 12px; border-radius: var(--radius-sm); }
.form-msg.ok { background: var(--primary-soft); color: var(--primary-dark); }
.form-msg.err { background: #FEE2E2; color: #B91C1C; }

/* Category nav */
.cat-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 36px; }
.cat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; box-shadow: var(--shadow-card); transition: transform .12s, box-shadow .15s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elev); }
.cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; }
.cat-icon svg { width: 22px; height: 22px; color: #fff; }
.cat-label { font-weight: 600; font-size: .9rem; }
.cat-count { font-size: .76rem; color: var(--text-muted); }
.accent-primary .cat-icon { background: var(--primary); }
.accent-blue .cat-icon { background: var(--blue); }
.accent-purple .cat-icon { background: var(--purple); }
.accent-orange .cat-icon { background: var(--orange); }
.accent-teal .cat-icon { background: var(--teal); }
.accent-warning .cat-icon { background: var(--warning); }

/* Blocks + article grid */
.block { margin-bottom: 40px; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.block-head h2 { font-size: 26px; font-weight: 750; letter-spacing: -.01em; margin: 0; position: relative; padding-left: 14px; }
.block-head h2::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: var(--primary); }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.day-block { margin-bottom: 26px; }
.day-title { font-size: 1rem; font-weight: 700; color: var(--text-2); margin: 0 0 14px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 8px; transition: transform .12s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-elev); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.card-cat { align-self: flex-start; }
.card-title { font-size: 18px; font-weight: 700; line-height: 1.3; margin: 0; }
.card-title a:hover { color: var(--primary); }
.card-summary { color: var(--text-2); font-size: .92rem; margin: 0; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; }

/* Results / misc */
.results-head { margin-bottom: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: .9rem; }
.back-link svg { width: 16px; height: 16px; transform: rotate(180deg); }
.page-h1 { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 4px; }
.results-count { color: var(--text-muted); margin: 0; }
.empty { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 32px; padding-top: 44px; padding-bottom: 28px; }
.footer-brand { display: flex; gap: 12px; }
.footer-brand .brand-logo svg,
.footer-brand .brand-logo img { width: 40px; height: 40px; }
.footer-brand strong { font-size: 1.1rem; }
.footer-brand p { color: var(--text-muted); font-size: .88rem; margin: 4px 0 0; max-width: 280px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--text-2); font-size: .9rem; padding: 4px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 18px; padding-bottom: 24px; color: var(--text-muted); font-size: .84rem; }

/* Tablet */
@media (max-width: 1199px) {
    :root { --pad-x: 32px; }
    .hero-row { grid-template-columns: 1fr; }
    .hero-title { font-size: 40px; }
    .cat-nav { grid-template-columns: repeat(3, 1fr); }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 767px) {
    :root { --pad-x: 20px; }
    .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px var(--pad-x); gap: 2px; box-shadow: var(--shadow-card); }
    .main-nav.open { display: flex; }
    .menu-toggle { display: inline-flex; }
    .nav-cta, .search input { display: none; }
    .search:focus-within input { display: block; }
    .header-actions { gap: 8px; margin-left: auto; }
    .hero-title { font-size: 34px; }
    .hero-visual { height: 160px; }
    .hero-body { padding: 22px 20px 24px; }
    .cat-nav { grid-template-columns: repeat(2, 1fr); }
    .article-grid { grid-template-columns: 1fr; }
    .block-head h2 { font-size: 22px; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
}
