/* ==========================================================================
   Blog & Static Page Styles — ip-kamery-tech
   Covers: home.php (blog index), single.php (article), page.php (static)
   ========================================================================== */

/* ==========================================================================
   SHARED: Post meta (kategória · dátum · čítanie)
   ========================================================================== */

.blog-post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 0;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--c-steel);
  text-transform: uppercase;
}

.blog-post-meta__cat {
  color: var(--c-lime-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s;
}
.blog-post-meta__cat:hover { color: var(--c-anthracite); }

.blog-post-meta__sep {
  margin: 0 6px;
  color: var(--c-border);
}

.blog-post-meta__date,
.blog-post-meta__read {
  color: var(--c-steel);
}

/* ==========================================================================
   BLOG INDEX: Hero
   ========================================================================== */

.blog-hero {
  background: var(--c-anthracite);
  padding: 56px 0 52px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.blog-hero__eyebrow {
  margin-bottom: 14px;
}

.blog-hero__tag {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-lime);
  border: 1px solid rgba(157, 201, 60, 0.4);
  padding: 4px 10px;
  border-radius: 999px;
}

.blog-hero__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 16px;
}

.blog-hero__lead {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.55);
  max-width: 580px;
  margin: 0;
}

/* ==========================================================================
   BLOG INDEX: Kategórie filter bar
   ========================================================================== */

.blog-cats-bar {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.blog-cats-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.blog-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c-graphite);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.blog-cat-pill:hover {
  background: var(--c-anthracite);
  color: #fff;
  border-color: var(--c-anthracite);
}

.blog-cat-pill.is-active {
  background: var(--c-anthracite);
  color: #fff;
  border-color: var(--c-anthracite);
}

.blog-cat-pill__count {
  font-size: 10px;
  opacity: 0.55;
  font-weight: 400;
}

/* ==========================================================================
   BLOG INDEX: Wrapper + featured post
   ========================================================================== */

.blog-index-wrap {
  padding: 40px 0 64px;
}

/* Featured (prvý) článok — wide card */
.blog-post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl, 16px);
  overflow: hidden;
  background: #fff;
  margin-bottom: 32px;
  transition: box-shadow 0.2s ease;
}

.blog-post-featured:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.blog-post-featured__img {
  display: block;
  overflow: hidden;
  background: var(--c-bg-cool);
  aspect-ratio: 16/10;
}

.blog-post-featured__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-post-featured:hover .blog-post-featured__img img {
  transform: scale(1.03);
}

.blog-post-featured__img--placeholder {
  background: linear-gradient(135deg, var(--c-bg-soft) 0%, var(--c-bg-cool) 100%);
}

.blog-post-featured__body {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.blog-post-featured__title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--c-anthracite);
  margin: 0;
}

.blog-post-featured__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.blog-post-featured__title a:hover {
  color: var(--c-lime-dark);
}

.blog-post-featured__excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-graphite);
  margin: 0;
}

/* "Čítať článok" link */
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-anthracite);
  text-decoration: none;
  padding: 10px 18px;
  background: var(--c-anthracite);
  color: #fff;
  border-radius: var(--r-md, 8px);
  align-self: flex-start;
  margin-top: 4px;
  transition: background 0.15s ease;
}

.blog-read-more:hover {
  background: var(--c-ink);
  color: #fff;
}

/* ==========================================================================
   BLOG GRID — karty článkov (3 stĺpce)
   ========================================================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.blog-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

/* Karta */
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg, 12px);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transform: translateY(-2px);
}

.blog-card__img-link {
  display: block;
  overflow: hidden;
  background: var(--c-bg-cool);
  aspect-ratio: 16/9;
  flex-shrink: 0;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__img {
  transform: scale(1.04);
}

.blog-card__img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-bg-soft) 0%, var(--c-bg-cool) 100%);
}

.blog-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.blog-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--c-anthracite);
  margin: 0;
  flex: 1;
}

.blog-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.blog-card__title a:hover {
  color: var(--c-lime-dark);
}

.blog-card__excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-steel);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}

.blog-card__read {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c-silver);
  letter-spacing: 0.04em;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-lime-dark);
  text-decoration: none;
  transition: color 0.15s;
}

.blog-card__link:hover {
  color: var(--c-anthracite);
}

/* ==========================================================================
   BLOG INDEX: Pagination
   ========================================================================== */

.blog-pagination {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border-radius: var(--r-md, 8px);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-graphite);
  text-decoration: none;
  border: 1px solid var(--c-border);
  background: #fff;
  transition: all 0.15s;
}

.blog-pagination .page-numbers:hover {
  background: var(--c-anthracite);
  color: #fff;
  border-color: var(--c-anthracite);
}

.blog-pagination .page-numbers.current {
  background: var(--c-anthracite);
  color: #fff;
  border-color: var(--c-anthracite);
}

.blog-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
}

/* ==========================================================================
   BLOG INDEX: Empty state
   ========================================================================== */

.blog-empty {
  text-align: center;
  padding: 80px 0;
  color: var(--c-steel);
}

.blog-empty__icon {
  margin-bottom: 16px;
  opacity: 0.35;
}

.blog-empty h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--c-anthracite);
  margin-bottom: 8px;
}

/* ==========================================================================
   SINGLE ARTICLE: Hero
   ========================================================================== */

.article-hero {
  background: var(--c-anthracite);
  padding: 48px 0 44px;
}

.article-hero__inner {
  max-width: 760px;
}

.blog-post-meta--hero .blog-post-meta__cat,
.blog-post-meta--hero .blog-post-meta__date,
.blog-post-meta--hero .blog-post-meta__read {
  color: rgba(255,255,255,0.5);
}

.blog-post-meta--hero .blog-post-meta__cat {
  color: var(--c-lime);
}

.blog-post-meta--hero .blog-post-meta__sep {
  color: rgba(255,255,255,0.2);
}

.article-hero__title {
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 14px 0 16px;
}

.article-hero__lead {
  font-size: 17px;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  margin: 0;
  max-width: 680px;
}

/* ==========================================================================
   SINGLE ARTICLE: Titulný obrázok
   ========================================================================== */

.article-thumbnail {
  background: var(--c-anthracite);
  padding-bottom: 0;
}

.article-thumbnail__img {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--r-xl, 16px) var(--r-xl, 16px) 0 0;
}

/* ==========================================================================
   SINGLE ARTICLE: Layout (obsah + sidebar)
   ========================================================================== */

.article-body-wrap {
  padding: 48px 0 40px;
}

.article-layout {
  display: block;
}

/* Override page-prose na article */
.article-content.page-prose {
  max-width: none;
  font-size: 16px;
}

/* ==========================================================================
   SINGLE ARTICLE: Sidebar — TOC + zdieľanie
   ========================================================================== */

.article-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Table of Contents */
.article-toc {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg, 12px);
  overflow: hidden;
}

.article-toc__header {
  padding: 12px 16px;
  background: var(--c-bg-soft);
  border-bottom: 1px solid var(--c-border);
}

.article-toc__label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-steel);
}

.article-toc__nav {
  padding: 12px 0;
}

/* TOC linky — generované JS */
.article-toc__nav a {
  display: block;
  padding: 5px 16px;
  font-size: 13px;
  color: var(--c-graphite);
  text-decoration: none;
  line-height: 1.4;
  transition: all 0.12s;
  border-left: 2px solid transparent;
}

.article-toc__nav a:hover {
  color: var(--c-anthracite);
  background: var(--c-bg-soft);
  border-left-color: var(--c-border);
}

.article-toc__nav a.is-active {
  color: var(--c-lime-dark);
  font-weight: 600;
  border-left-color: var(--c-lime);
}

/* H3 = odsadené */
.article-toc__nav a[data-level="3"] {
  padding-left: 28px;
  font-size: 12px;
}

/* Zdieľanie inline pod článkom */
.article-share--inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}

.article-share__label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-steel);
}

.article-share__links {
  display: flex;
  gap: 8px;
}

.article-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  color: var(--c-graphite);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.article-share__btn:hover {
  background: var(--c-anthracite);
  border-color: var(--c-anthracite);
  color: #fff;
}

.article-share__btn--copy.is-copied {
  background: var(--c-lime);
  border-color: var(--c-lime);
  color: var(--c-anthracite);
}

/* ==========================================================================
   SINGLE ARTICLE: Autor box
   ========================================================================== */

.article-author-wrap {
  padding: 0 0 40px;
}

.article-author {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg, 12px);
  padding: 24px 28px;
  background: var(--c-bg-soft);
  max-width: 760px;
}

.article-author__avatar {
  flex-shrink: 0;
}

.article-author__img {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50%;
  display: block;
}

.article-author__label {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-steel);
  margin-bottom: 4px;
}

.article-author__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-anthracite);
  margin-bottom: 6px;
}

.article-author__bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-graphite);
  margin: 0;
}

/* ==========================================================================
   SINGLE ARTICLE: Predošlý / ďalší
   ========================================================================== */

.article-nav-wrap {
  padding: 0 0 0;
  border-top: 1px solid var(--c-border);
}

.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.article-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 28px;
  text-decoration: none;
  transition: background 0.15s;
  border-bottom: 1px solid var(--c-border);
}

.article-nav__item:hover {
  background: var(--c-bg-soft);
}

.article-nav__item--next {
  border-left: 1px solid var(--c-border);
  text-align: right;
  align-items: flex-end;
}

.article-nav__dir {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-steel);
}

.article-nav__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-anthracite);
  line-height: 1.35;
  max-width: 380px;
}

/* ==========================================================================
   SINGLE ARTICLE: Súvisiace články
   ========================================================================== */

.article-related {
  padding: 48px 0 64px;
  background: var(--c-bg-soft);
  border-top: 1px solid var(--c-border);
}

.article-related__heading {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-anthracite);
  margin: 0 0 24px;
}

/* ==========================================================================
   STATIC PAGE: Hero + body
   ========================================================================== */

.page-hero {
  background: var(--c-anthracite);
  padding: 44px 0 40px;
  border-bottom: 3px solid var(--c-lime);
}

.page-hero__title {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 10px;
}

.page-hero__lead {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255,255,255,0.6);
  margin: 0;
  max-width: 620px;
}

.page-body-wrap {
  padding: 48px 0 80px;
}

.page-body-inner {
  max-width: none;
}

/* page-prose — celá šírka, max-width riešime na úrovni wrappera */
.page-prose {
  max-width: none;
}

/* Odsek za nadpisom */
.page-prose > h2:first-child,
.page-prose > h3:first-child {
  margin-top: 0;
}

/* ==========================================================================
   JS: TOC generovanie (script tag v single.php footer)
   ========================================================================== */

/* Highlight aktívnej sekcie (scroll spy cez Intersection Observer) */
.article-toc__nav a.is-active {
  color: var(--c-lime-dark);
  font-weight: 600;
  border-left-color: var(--c-lime);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .article-layout {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-post-featured {
    grid-template-columns: 1fr;
  }
  .blog-post-featured__img {
    aspect-ratio: 16/7;
  }
  .blog-post-featured__body {
    padding: 28px 28px;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 40px 0 36px;
  }
  .blog-hero__title {
    font-size: 28px;
  }
  .article-hero {
    padding: 36px 0 32px;
  }
  .article-hero__title {
    font-size: 26px;
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    position: static;
    order: -1; /* TOC hore na mobile */
    display: none; /* skryť na mobile — cluttered */
  }
  .article-author {
    flex-direction: column;
  }
  .article-nav {
    grid-template-columns: 1fr;
  }
  .article-nav__item--next {
    border-left: none;
    border-top: 1px solid var(--c-border);
    text-align: left;
    align-items: flex-start;
  }
  .blog-grid,
  .blog-grid--3 {
    grid-template-columns: 1fr;
  }
  .page-hero {
    padding: 32px 0 28px;
  }
  .page-body-wrap {
    padding: 32px 0 48px;
  }
}

/* ==========================================================================
   DOPLNKY — blog-hero back link, page-prose vylepšenia
   ========================================================================== */

/* Blog hero — back arrow link (category.php) */
.blog-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-lime);
  text-decoration: none;
  border: 1px solid rgba(157, 201, 60, 0.4);
  border-radius: 999px;
  padding: 4px 12px;
  transition: all 0.15s;
}
.blog-hero__back:hover {
  background: rgba(157, 201, 60, 0.12);
  color: var(--c-lime-light);
}
.blog-hero__back svg {
  flex-shrink: 0;
}

/* ==========================================================================
   PAGE.PHP — statické stránky (obchodné podmienky, GDPR, kontakt atď.)
   ========================================================================== */

/* Breadcrumb bar pre statické stránky — biele pozadie */
.page-body-wrap .breadcrumbs {
  border-bottom: none;
}

/* Vylepšené page-prose pre dlhé právne texty */
.page-prose h2 {
  padding-top: 8px;
  border-top: 2px solid var(--c-lime);
  margin-top: 40px !important;
}

.page-prose h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0 !important;
}

/* Číslované zoznamy — lepší odsadenie */
.page-prose ol {
  counter-reset: none;
}

.page-prose ol li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.page-prose ul li {
  position: relative;
  padding-left: 4px;
}

/* Inline kód — pre technické stránky */
.page-prose strong {
  color: var(--c-anthracite);
  font-weight: 600;
}

/* Contact info box */
.page-prose .contact-box {
  background: var(--c-bg-soft);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-lime);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin: 24px 0;
}

/* ==========================================================================
   SINGLE ARTICLE — doplnkové štýly
   ========================================================================== */

/* Titulný obrázok — zaoblenie dole tiež na widescreen */
.article-thumbnail .container {
  padding-top: 0;
}

/* Väčší bottom padding na autor boxe */
.article-author-wrap {
  padding-bottom: 0;
}

/* article-nav — full width čiara oddeľovač */
.article-nav-wrap {
  margin-top: 48px;
}

/* ==========================================================================
   SUBPAGE GRID — rodičovská stránka s podstránkami (page.php)
   ========================================================================== */

.page-subpages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 48px;
  margin-bottom: 16px;
}

/* Ak je obsah navrchu, grid je tesnejšie pod ním */
.page-subpages-grid--below {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--c-border);
}

/* Hero varianta — bez vlastného obsahu rodiča, karty väčšie */
.page-subpages-grid--hero {
  margin-top: 0;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

/* Karta podstránky */
.subpage-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.subpage-card:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

/* Obrázok */
.subpage-card__img {
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  background-color: var(--c-bg-cool);
  flex-shrink: 0;
}

.subpage-card--large .subpage-card__img {
  aspect-ratio: 16/8;
}

.subpage-card__img--placeholder {
  background: linear-gradient(135deg, var(--c-bg-soft) 0%, var(--c-bg-cool) 100%);
  position: relative;
}

/* Placeholder ikona */
.subpage-card__img--placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24' fill='none' stroke='%23d0d4da' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center no-repeat;
}

/* Body karty */
.subpage-card__body {
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}

.subpage-card__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--c-anthracite);
  margin: 0;
}

.subpage-card--large .subpage-card__title {
  font-size: 22px;
}

.subpage-card__excerpt {
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-graphite);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA arrow */
.subpage-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-lime-dark);
  margin-top: 4px;
  transition: gap 0.15s ease;
}

.subpage-card:hover .subpage-card__cta {
  gap: 10px;
}

/* page-hero back link (pre podstránky) */
.page-hero__eyebrow {
  margin-bottom: 12px;
}

.page-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.page-hero__back:hover {
  color: rgba(255,255,255,0.85);
}

/* page-prose--parent — obsah s podstránkami, full-width */
.page-prose--parent {
  max-width: none;
  padding-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .page-subpages-grid,
  .page-subpages-grid--hero {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SERVICE PAGE — podstránky montáže (kamery, poplachové, vrátniki...)
   ========================================================================== */

.service-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 64px;
  align-items: start;
}

/* Hlavný obsah — WP blok content */
.service-page__content.page-prose {
  font-size: 16px;
}

/* Obrázky v service page — full šírka stĺpca, pekne zaoblené */
.service-page__content img {
  width: 100%;
  height: auto;
  border-radius: var(--r-xl);
  margin: 28px 0;
  display: block;
}

/* WP gallery / figure v service page */
.service-page__content figure {
  margin: 28px 0;
}

.service-page__content figure img {
  margin: 0;
}

/* h2 sekcie — s lime akcentom */
.service-page__content h2 {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--c-anthracite) !important;
  margin: 36px 0 12px !important;
  padding-top: 36px !important;
  border-top: 1px solid var(--c-border) !important;
}

.service-page__content h2:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.service-page__content h3 {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--c-anthracite) !important;
  margin: 24px 0 8px !important;
  border-top: none !important;
  padding-top: 0 !important;
}

/* Odrážky v service page */
.service-page__content ul {
  list-style: none;
  margin: 16px 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-page__content ul li {
  padding: 0 0 0 20px;
  position: relative;
  line-height: 1.6;
  color: var(--c-graphite);
}

.service-page__content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-lime);
}

/* ==========================================================================
   SERVICE CTA — sticky sidebar box
   ========================================================================== */

.service-cta {
  position: sticky;
  top: 24px;
}

.service-cta__inner {
  background: var(--c-anthracite);
  border-radius: var(--r-xl);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.service-cta__label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-lime);
  margin-bottom: 8px;
}

.service-cta__desc {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  margin: 0;
}

.service-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.service-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.service-cta__btn--primary {
  background: var(--c-lime);
  color: var(--c-anthracite);
}

.service-cta__btn--primary:hover {
  background: var(--c-lime-light);
}

.service-cta__btn--secondary {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.12);
}

.service-cta__btn--secondary:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

/* Licencia */
.service-cta__license {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  margin-top: 4px;
}

.service-cta__license-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.service-cta__license-link:hover {
  opacity: 0.85;
}

.service-cta__license-img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  display: block;
  border: 1px solid rgba(255,255,255,0.12);
}

.service-cta__license-caption {
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  text-align: center;
}

/* ==========================================================================
   SERVICE PAGE — predely medzi sekciami
   ========================================================================== */

.service-page__content h2 {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Divider vložený PHP pred každý h2 okrem prvého */
.section-divider {
  margin: 56px 0 32px;
  position: relative;
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
}

.section-divider::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 3px;
  background: var(--c-lime);
  border-radius: 2px;
}

/* Wrapper okolo každého h2 + obsah sekcie */
.service-page__content > h2:not(:first-child),
.service-page__content > .wp-block-heading:not(:first-child) {
  margin-top: 64px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

/* Predel — plná linka s lime akcentom naľavo, výška 3px */
.service-page__content > h2:not(:first-child)::before,
.service-page__content > .wp-block-heading:not(:first-child)::before {
  content: '';
  display: block;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--c-lime) 48px, var(--c-border) 48px);
  border-radius: 2px;
  margin-bottom: 32px;
}

/* Predel pred každým h2 okrem prvého — linka s lime punktom naľavo */
.service-page__content > h2:not(:first-child),
.service-page__content > .wp-block-heading:not(:first-child) {
  margin-top: 52px !important;
  padding-top: 0 !important;
  border-top: none !important;
}

.service-page__content > h2:not(:first-child)::before,
.service-page__content > .wp-block-heading:not(:first-child)::before {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--c-lime) 40px, var(--c-border) 40px);
  margin-bottom: 28px;
  border-radius: 1px;
}

/* Responsive */
@media (max-width: 900px) {
  .service-cta {
    position: static;
    order: -1;
  }

  .service-cta__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .service-cta__btn {
    flex: 1;
    min-width: 160px;
  }
}


.service-cta__license-link {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.service-cta__license-link:hover {
  opacity: 0.85;
}

.service-cta__license-img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  display: block;
  border: 1px solid rgba(255,255,255,0.12);
}

.service-cta__license-caption {
  font-family: var(--f-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  text-align: center;
}

/* ==========================================================================
   SERVICE PAGE — predely medzi sekciami
   ========================================================================== */

.service-page__content h2 {
  border-top: none !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.service-page__content > h2:not(:first-child),
.service-page__content > .wp-block-heading:not(:first-child) {
  margin-top: 56px !important;
  padding-top: 0 !important;
  border-top: none !important;
  position: relative;
}

.service-page__content > h2:not(:first-child)::before,
.service-page__content > .wp-block-heading:not(:first-child)::before {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--c-lime) 32px, var(--c-border) 32px);
  margin-bottom: 28px;
}

/* ==========================================================================
   IPKL — právne formuláre (plugin ip-kamery-legal)
   Overriduje page-prose max-width pre stránky s formulármi
   ========================================================================== */
.page-prose .ipkl-wrap,
.page-prose .ipkl-form,
article .ipkl-wrap {
  max-width: none !important;
  width: 100% !important;
}
