/* ============ FONTS ============ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============ TOKENS ============ */
:root {
  color-scheme: light;
  --navy: #001641;
  --navy-light: #0d2c66;
  --red: #ff0019;
  --red-dark: #c71d0c;
  --teal: #0a5f8a;
  --teal-light: #0e7cb0;

  --bg: #e5e0d8;
  --surface: #ffffff;
  --footer-bg: #f2f4f8;
  --chip-bg: rgba(9, 13, 22, 0.72);

  --text: #10131c;
  --muted: #5b6270;
  --border: rgba(0, 0, 0, 0.09);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.12);
  --radius: 10px;

  --font: 'Inter', 'Segoe UI', Helvetica, Arial, sans-serif;
}

/* ============ RESET / BASE ============ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  background-color: var(--bg);
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { max-width: 100%; }

#container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main-content {
  box-sizing: border-box;
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: auto;
  padding: 0 40px;
}

/* Section accent colours, keyed by rubrika slug */
.rubrika-hlavni-udalosti { --rubrika: var(--red-dark); }
.rubrika-domaci { --rubrika: var(--navy-light); }
.rubrika-svet { --rubrika: var(--teal); }

/* ============ NAVBAR ============ */
.navbar {
  width: 100%;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-image {
  height: 34px;
  width: auto;
  display: block;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 6px;
  border-bottom: 3px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover {
  background-color: rgba(0, 22, 65, 0.06);
}

.nav-links a.active {
  border-bottom-color: var(--red);
  color: var(--red-dark);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: #f4f4f2;
}

.nav-search input[type="search"] {
  border: none;
  background: transparent;
  padding: 9px 6px 9px 16px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  min-width: 190px;
  color: var(--text);
}

.nav-search button {
  background: transparent;
  border: none;
  color: var(--navy);
  padding: 9px 14px 9px 6px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
}

.nav-search button svg { width: 17px; height: 17px; }

.nav-search button:hover { color: var(--red); }

.nav-grid-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  user-select: none;
}

.nav-grid-badge .dots {
  display: grid;
  grid-template-columns: repeat(3, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 2px;
}
.nav-grid-badge .dots span {
  width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0.85;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span { width: 22px; height: 2px; background: var(--navy); border-radius: 2px; }

/* ============ BREADCRUMB ============ */
#breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 6px 0;
  font-size: 14px;
  color: var(--muted);
}

#breadcrumb a {
  text-decoration: none;
  color: var(--muted);
}

#breadcrumb a:hover { color: var(--red-dark); }

#breadcrumb img { width: 15px; height: 15px; vertical-align: -2px; opacity: 0.75; }

#breadcrumb span { color: #b7b2a8; }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px 24px 40px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 34px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.footer-logo { height: 30px; width: auto; }

.footer-social {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.social-icons { display: flex; gap: 10px; }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  cursor: default;
}
.social-icon svg { width: 16px; height: 16px; }

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 28px;
}

.footer-col-title {
  margin: 0 0 12px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.footer-col-title a {
  color: var(--navy);
  text-decoration: none;
}
.footer-col-title a:hover { text-decoration: underline; }

.footer-article-list { list-style: none; margin: 0; padding: 0; }
.footer-article-item { margin: 8px 0; }
.footer-article-item a {
  color: var(--navy);
  text-decoration: none;
  font-size: 14px;
}
.footer-article-item a:hover { text-decoration: underline; }

.footer-badges {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 18px 28px;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  color: var(--rubrika, var(--navy));
  white-space: nowrap;
}
.footer-badge .bracket {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: currentColor;
  position: relative;
  flex-shrink: 0;
}
.footer-badge .bracket::after {
  content: "";
  position: absolute;
  inset: 3px 3px 3px auto;
  width: 7px;
  background: var(--footer-bg);
  border-radius: 2px;
}

.footer-contact {
  font-size: 14px;
  color: var(--muted);
}
.footer-contact h3 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--navy);
}
.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  color: var(--navy);
  font-weight: 600;
}
.footer-contact-row svg { width: 16px; height: 16px; color: var(--navy); }

.footer-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 8px 0 16px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-bottom-links span {
  cursor: default;
}
.footer-bottom-links span:hover { text-decoration: underline; }

/* ============ HOME: HERO CLUSTER ============ */
.home-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  margin: 22px 0 24px 0;
}

.home-hero-link {
  position: relative;
  display: block;
  height: 100%;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
}

.home-hero-img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  display: block;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(to top, rgba(0, 5, 15, 0.88), rgba(0, 5, 15, 0.15) 55%, rgba(0, 5, 15, 0));
}

.home-hero-tag {
  align-self: flex-start;
  background: var(--chip-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.home-hero-title {
  margin: 0;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.home-hero-desc {
  margin: 8px 0 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.5;
  max-width: 46em;
}

.home-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-side-card {
  position: relative;
  display: block;
  flex: 1;
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
}

.home-side-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.home-side-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 5, 15, 0.85), rgba(0, 5, 15, 0.05) 60%, rgba(0, 5, 15, 0));
}

.home-side-tag {
  align-self: flex-start;
  background: var(--chip-bg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.home-side-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* ============ HOME: GRID ============ */
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 32px 0;
}

.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.home-card-media {
  position: relative;
  width: 100%;
  height: 170px;
  background: #eee;
}

.home-card-link { display: block; text-decoration: none; color: inherit; }

.home-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.home-card-section {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  background: var(--chip-bg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 4px;
  text-decoration: none;
}

.home-card-section:hover { background: var(--red-dark); }

.home-card-body { padding: 14px 16px 16px 16px; }

.home-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.home-card-body:hover .home-card-title,
.home-hero-link:hover .home-hero-title,
.home-side-card:hover .home-side-title { text-decoration: underline; }

/* ============ HOME: TICKER STRIP ============ */
.ticker-strip {
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 -40px 0 -40px;
  padding: 28px 40px;
}

.ticker-heading {
  max-width: 1400px;
  margin: 0 auto 16px auto;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

.ticker-row {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.ticker-item { text-decoration: none; color: inherit; display: flex; flex-direction: column; }

.ticker-thumb {
  position: relative;
  width: 100%;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  background: #ddd;
  margin-bottom: 8px;
}
.ticker-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ticker-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rubrika, var(--navy));
}

.ticker-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin: 4px 0 8px 0;
  color: var(--text);
}

.ticker-item:hover .ticker-title { text-decoration: underline; }

.ticker-bar {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--rubrika, var(--red)) 0 55%, #d8d6d0 55% 100%);
  position: relative;
  margin-top: auto;
}
.ticker-bar::before {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rubrika, var(--red));
}

.ticker-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--red-dark);
}
.ticker-cta svg { width: 12px; height: 12px; }

/* ============ LIST PAGE ============ */
.page-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0 40px 0;
}

.page-item {
  display: none;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  gap: 20px;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.page-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.page-image {
  width: 240px;
  height: 150px;
  overflow: hidden;
  border-radius: 6px;
  flex-shrink: 0;
}

.page-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-content { flex: 1; }

.page-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rubrika, var(--red-dark));
  margin-bottom: 6px;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.3;
  color: var(--navy);
}

.page-item:hover .page-title { text-decoration: underline; }

.page-description { margin: 0 0 10px 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.page-date { color: #9a9488; font-size: 13px; margin: 0; }

.button-container { display: flex; justify-content: center; margin: 8px auto 32px auto; }

#load-more {
  background-color: var(--red);
  color: #fff;
  border: none;
  display: none;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  border-radius: 24px;
  transition: background-color 0.2s ease;
}
#load-more:hover { background-color: var(--red-dark); }
#load-more:focus { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ============ AUTHORS LIST ============ */
.page-authors-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0 40px 0;
}

.page-authors-container .page-item { align-items: center; }

.page-authors-container .page-image {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex-shrink: 0;
}
.page-authors-container .page-image img { border-radius: 50%; }

/* ============ AUTHOR SINGLE ============ */
.single-author-profile {
  margin: 28px 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.single-author-box {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 900px;
  margin: 0 auto;
}

.single-author-icon { flex-shrink: 0; }
.single-author-icon img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}

.single-author-details h1 {
  margin: 0 0 8px 0;
  font-size: 28px;
  color: var(--navy);
}

.single-author-bio { color: var(--muted); line-height: 1.6; font-size: 15.5px; }

.author-posts {
  max-width: 1000px;
  margin: 36px auto 0 auto;
}
.author-posts h1 { font-size: 22px; color: var(--navy); margin-bottom: 16px; }

@media (max-width: 700px) {
  .single-author-box { flex-direction: column; text-align: center; }
}

/* ============ SINGLE ARTICLE ============ */
.post { max-width: 760px; margin: 0 auto; padding-bottom: 60px; }

.post-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rubrika, var(--red-dark));
  margin-bottom: 10px;
}

.post-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 14px 0;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.post-date { font-size: 14px; color: var(--muted); }

.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 14px;
}
.post-author:hover { text-decoration: underline; }

.author-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.post-share {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.post-share .share-label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0efe9;
  color: var(--navy);
  cursor: default;
}
.share-icon svg { width: 14px; height: 14px; }

.post-image { width: 100%; margin-bottom: 8px; }
.post-image-inner {
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: var(--radius);
}
.post-image-inner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-image .image-alt { margin-top: 8px; color: #9a9488; font-size: 13px; }

.post-description {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.6;
  margin: 22px 0;
  color: var(--text);
}

.post-content { font-size: 17px; line-height: 1.75; color: var(--text); }
.post-content p { margin: 0 0 20px 0; }

@media (max-width: 800px) {
  .post-image-inner { height: 260px; }
  .post-title { font-size: 26px; }
}

/* ============ SEARCH / LOADING ============ */
[id^="summary-"] { display: flex; align-items: center; justify-content: center; }

.loading-container { display: flex; justify-content: center; align-items: center; margin: 30px 0; }

.search-loading {
  border: 8px solid #eeeae2;
  border-radius: 50%;
  border-top: 8px solid var(--red);
  width: 56px;
  height: 56px;
  animation: spin 1.1s linear infinite;
  display: none;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.search-results-empty { text-align: center; color: var(--muted); margin: 40px 0; }

#search-results { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 40px 0; }

mark { background: #fde6aa; color: inherit; padding: 0 2px; border-radius: 2px; }

/* ============ 404 ============ */
.error-page {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
}
.error-page h1 { font-size: 32px; color: var(--navy); }
.error-page p { color: var(--muted); font-size: 16px; }
.error-page a { color: var(--red-dark); font-weight: 700; text-decoration: none; }
.error-page a:hover { text-decoration: underline; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticker-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .home-top { grid-template-columns: 1fr; }
  .home-hero-link, .home-hero-img { min-height: 320px; }
  .home-side { flex-direction: row; }
}

@media (max-width: 900px) {
  #main-content { padding: 0 20px; }
  .ticker-strip { margin: 0 -20px; padding: 24px 20px; }

  .navbar-inner { flex-wrap: wrap; padding: 12px 20px; }
  .nav-links {
    order: 3;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    gap: 2px;
  }
  .nav-links.active { display: flex; }
  .nav-links a { border-bottom: none; border-left: 3px solid transparent; border-radius: 0; }
  .nav-links a.active { border-left-color: var(--red); border-bottom-color: transparent; }
  .nav-burger { display: flex; }
  .nav-grid-badge span.label { display: none; }
}

@media (max-width: 700px) {
  .home-side { flex-direction: column; }
  .home-grid { grid-template-columns: 1fr; }
  .ticker-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-columns { grid-template-columns: 1fr; }
  .footer-badges { grid-template-columns: repeat(2, auto); }

  .page-item { flex-direction: column; }
  .page-image { width: 100%; height: 190px; }

  .footer-top { flex-direction: column; align-items: flex-start; }
}
