/*
 * CRPZ Block theme — residual CSS (last resort).
 * Everything expressible as Gutenberg block attributes / theme.json presets
 * lives in the patterns + theme.json. Only the following need real CSS:
 *   - hero mask gradient + frosted CTA card layout (custom layout, no core block)
 *   - three-box image hover zoom + in-heading link color
 *   - statistics frosted-glass blur (backdrop-filter)
 *   - card date-badge overlay, title line-clamp, pinned CTA arrow (::after)
 */

/* ---------- Hero ---------- */
/* Full-bleed hero + pattern separator: break out of the constrained column */
.wp-block-cover.crpz-hero.alignfull,
.wp-block-group.crpz-band.alignfull {
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.wp-block-cover.crpz-hero {
  min-height: 600px;
}
.crpz-hero .wp-block-cover__inner-container {
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 0 80px;
}
.crpz-hero__inner {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 0;
}
.crpz-hero__title { flex: 0 1 570px; }
.crpz-hero__title h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 52px;
  color: #fff;
  margin: 0;
}
.crpz-hero__cta {
  flex: 0 1 468px;
  background: rgba(255, 255, 255, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 40px;
  box-sizing: border-box;
}
.crpz-hero__cta h2 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
  color: #fff;
  margin: 0 0 28px 0;
}
.crpz-hero__cta .wp-block-button__link {
  background-color: var(--wp--preset--color--accent) !important;
  color: #fff;
  border-radius: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
}

/* ---------- Three boxes (Cover blocks): hover zoom + link color ---------- */
.wp-block-cover.crpz-box {
  overflow: hidden;
}
.wp-block-cover.crpz-box .wp-block-cover__image-background {
  transition: transform 0.3s ease;
}
.wp-block-cover.crpz-box:hover .wp-block-cover__image-background {
  transform: scale(1.1);
}
.wp-block-cover.crpz-box .wp-block-heading a {
  color: #fff;
  text-decoration: none;
}

/* ---------- Statistics: frosted-glass blur only ---------- */
.crpz-numbers .wp-block-column {
  -webkit-backdrop-filter: blur(30px);
  backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

/* ---------- News cards: image, date badge, clamp, CTA ---------- */
.wp-block-post {
  position: relative;
  overflow: hidden;
}
.wp-block-post .crpz-card-img {
  margin: 0;
  height: 264px;
  overflow: hidden;
}
.wp-block-post .crpz-card-img img {
  width: 100%;
  height: 264px;
  -o-object-fit: cover;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.wp-block-post:hover .crpz-card-img img {
  transform: scale(1.1);
}
/* date badge overlaid on the image */
.wp-block-post .wp-block-post-date {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 4;
  background: #fff;
  padding: 12px;
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 16px;
  color: var(--wp--preset--color--primary);
}
/* 2-line clamped title (no core block equivalent).
   WP's layout CSS sets display:flow-root on headings which defeats
   -webkit-box line-clamp, so force display here. */
.wp-block-post .wp-block-post-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wp-block-post .wp-block-post-title a {
  text-decoration: none;
  /* core sets the title link to display:inline-block, which BREAKS
     -webkit-line-clamp (2-line clamp stops working). Keep the link
     inline so the clamp applies, matching the reference cards. */
  display: inline;
}
/* pinned CTA chevron button (light-blue square + blue chevron) inside the (already linking) title */
.wp-block-post { padding-bottom: 0; position: relative; }
/* anchor the chevron button to the visible card (not the padded li, which
   would drop it into the gap below the card = the "background issue") */
.crpz-news-card { position: relative; padding-bottom: 88px !important; }
.wp-block-post .wp-block-post-title a::after {
  content: "\203A";
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  color: #0b5faf;
  background: #cddff7;
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease;
}
.wp-block-post:hover .wp-block-post-title a::after {
  background: #b7d0f3;
  color: #083f7a;
}
.wp-block-post .wp-block-post-excerpt {
  margin: 12px 0;
}
/* Tehnologije archive: show FULL post titles (site clamps cards to 2 lines) */
.crpz-tech-archive .wp-block-post .wp-block-post-title {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}
/* Tehnologije archive: equal card heights per row (stretch card to fill grid cell) */
.crpz-tech-archive .wp-block-post {
  display: flex;
}
.crpz-tech-archive .crpz-news-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.crpz-tech-archive .crpz-card-img {
  flex: 0 0 auto;
}
/* News section (frontpage): equal card heights per row, same as tehnologije archive */
.crpz-news .wp-block-post {
  display: flex;
}
.crpz-news .crpz-news-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.crpz-news .crpz-card-img {
  flex: 0 0 auto;
}
/* Tech section (frontpage): equal card heights per row, same as news section */
.crpz-tech .wp-block-post {
  display: flex;
}
.crpz-tech .crpz-news-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.crpz-tech .crpz-card-img {
  flex: 0 0 auto;
}
/* General equal-height fallback: make ANY crpz card body fill its grid cell,
   so news/tech card grids stay equal even without a wrapping section class
   (e.g. the category template). Only applies where .crpz-news-card exists. */
.wp-block-post-template > li.wp-block-post > .crpz-news-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.wp-block-post-template > li.wp-block-post > .crpz-news-card > .crpz-card-img {
  flex: 0 0 auto;
}
/* News pagination: roomy numbered badge style */
.crpz-news .wp-block-query-pagination,
.crpz-news .wp-block-query-pagination-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.crpz-news .wp-block-query-pagination-numbers {
  font-size: 0; /* neutralise stray whitespace text-nodes between links */
}
.crpz-news .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0b5faf;
  background: #eef3fb;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.crpz-news .page-numbers:not(.dots):hover {
  background: #cddff7;
  color: #083f7a;
}
.crpz-news .page-numbers.current {
  background: var(--wp--preset--color--primary);
  color: #fff;
}
.crpz-news .page-numbers.dots {
  background: transparent;
  color: #63717e;
  min-width: 20px;
  padding: 0;
}
.crpz-news .wp-block-query-pagination-prev,
.crpz-news .wp-block-query-pagination-next {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0b5faf;
  background: #eef3fb;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.crpz-news .wp-block-query-pagination-prev:hover,
.crpz-news .wp-block-query-pagination-next:hover {
  background: #cddff7;
  color: #083f7a;
}

/* ---------- Logo banner (content width) ---------- */
.crpz-logos {
  max-width: 1200px;
  margin-left: auto !important;
  margin-right: auto !important;
}
.crpz-logos img {
  width: 100% !important;
  height: auto !important;
}

/* ---------- Responsive images in content (project logos etc.) ----------
   Core "align" images (size-large logos on project pages) keep their native
   large width and overflow the viewport on mobile. Constrain to container. */
.wp-block-image { max-width: 100%; }
.wp-block-image img { max-width: 100%; height: auto; }

/* ---------- Language switcher ---------- */
.crpz-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.crpz-lang-item a {
  color: #63717e;
  text-decoration: none;
}
.crpz-lang-item a:hover { color: var(--wp--preset--color--primary); }
.crpz-lang-item.is-current a {
  color: #001424;
  pointer-events: none;
}

/* ---------- Events ---------- */
.crpz-events {
  margin-top: 120px;
}

@media (max-width: 900px) {
  .crpz-hero .wp-block-cover__inner-container { padding: 0 30px; }
  .crpz-hero__inner { flex-direction: column; align-items: flex-start; }
  .crpz-hero__title { flex-basis: auto; }
  .crpz-hero__cta { flex-basis: auto; width: 100%; }
  .crpz-hero__title h1 { font-size: 34px; line-height: 40px; }
}

/* Legacy "Stopite v stik" CTA card look */
.crpz-cta-card{backdrop-filter:blur(30px);-webkit-backdrop-filter:blur(30px)}

/* ---------- Mobile: page content breathing room ---------- */
@media (max-width: 900px) {
  main.is-layout-constrained {
    padding-left: 20px;
    padding-right: 20px;
  }
  /* keep the full-bleed CTA band spanning edge-to-edge on mobile */
  main .crpz-cta-band.alignwide {
    margin-left: -20px !important;
    margin-right: -20px !important;
    width: calc(100% + 40px);
  }
}

/* ---------- Equal-height cards (landing + sibling strip) ---------- */
/* Make each card's inner group stretch to fill its column so all cards in
   a row match height regardless of text length. */
.wp-block-columns > .wp-block-column {
  display: flex;
  flex-direction: column;
}
.wp-block-columns > .wp-block-column > .wp-block-group.has-section-background-color {
  flex: 1;
}

/* ---------- Pravni viri: document links (legacy file-download look) ---------- */
.crpz-files { margin-top: 48px; margin-bottom: 60px; }
.crpz-files .file-download { border-bottom: 1px solid #D4DEE7; transition: border-bottom 0.3s ease; }
.crpz-files .file-download:hover { border-bottom-color: var(--wp--preset--color--accent); }
.crpz-files .file-download a {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 12px 0;
}
.crpz-files .file-download .file-download-plain {
  display: flex;
  align-items: center;
  padding: 12px 0;
}
.crpz-files .file-download a .file-download-icon {
  display: flex;
  align-self: flex-start;
  margin-right: 16px;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.crpz-files .file-download a .file-download-icon svg { height: 100%; width: auto; }
.crpz-files .file-download a .file-download-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  margin: 0;
  color: #001424;
  transition: color 0.3s ease;
}
.crpz-files .file-download a:hover .file-download-content h3 { color: var(--wp--preset--color--primary); }
@media (max-width: 900px) {
  .crpz-files .file-download a .file-download-icon { width: 60px; height: 60px; }
  .crpz-files .file-download a .file-download-content h3 { font-size: 16px; line-height: 24px; }
}

/* ===== Tehnologije single page (legacy-faithful, block-native) ===== */
.teh-page .crpz-tech-layout{column-gap:52px}
.teh-page .crpz-tech-left{max-width:305px;-ms-flex-negative:0;flex-shrink:0}
.teh-page .crpz-tech-sidebar{background:#F7F9FB;padding:6px 0}
.teh-page .crpz-tech-sidebar .side-tech-item{padding:20px 28px;border-bottom:1px solid #D4DEE7;margin:0;color:#63717E;font-weight:400;font-size:16px;line-height:24px}
.teh-page .crpz-tech-sidebar .side-tech-item:last-child{border-bottom:none}
.teh-page .crpz-tech-sidebar .side-tech-item strong{color:#363E45;font-weight:600;font-size:16px}
.teh-page .crpz-tech-sidebar .side-tech-item a{color:var(--wp--preset--color--primary);text-decoration:none;font-weight:500}
.teh-page .crpz-tech-right h1{font-weight:700;font-size:28px;line-height:34px;color:#001424;margin:0 0 16px}
.teh-page .crpz-tech-right .crpz-tech-featured{margin:0 0 20px}
.teh-page .crpz-tech-featured img{width:100%;height:auto;display:block}
.teh-page .crpz-tech-right p{color:#001424}
.teh-page .crpz-tech-right h2{color:var(--wp--preset--color--accent);font-weight:700}
@media only screen and (max-width:860px){.teh-page .crpz-tech-layout{column-gap:0}.teh-page .crpz-tech-left{max-width:100%;width:100%}}

/* ===== Header (legacy-faithful: UP logo + nav + flag switcher) ===== */
.crpz-header { background:#ffffff; }
.crpz-header__inner { padding-top:0; padding-bottom:0; max-width:1400px; }
.crpz-header .crpz-logo { margin:0; flex:0 0 auto; margin-right:48px; }
.crpz-logo img { height:52px; width:auto; display:block; }
.crpz-header__right { gap:0 32px; }
/* legacy menu look on the core navigation block */
.crpz-header .wp-block-navigation__container { gap:24px; }
.crpz-header .wp-block-navigation-item__content {
  font-family:'DM Sans',sans-serif;
  font-size:16px; line-height:16px; font-weight:400;
  color:#63717E; text-decoration:none; padding:28px 0;
}
.crpz-header .wp-block-navigation-item__content:hover,
.crpz-header .wp-block-navigation-item__content:focus { color:var(--wp--preset--color--primary); }
.crpz-header .current-menu-item > .wp-block-navigation-item__content { color:var(--wp--preset--color--primary); }
/* divider between menu and language switcher */
.crpz-header .crpz-lang-switcher { position:relative; margin-left:32px; padding-left:32px; }
.crpz-header .crpz-lang-switcher::before {
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:1px; height:32px; background:#D4DEE7;
}
/* flag language switcher (replaces text switcher) */
.crpz-lang-switcher { display:flex; align-items:center; gap:16px; }
.crpz-lang-switcher a { display:inline-flex; line-height:0; }
.crpz-lang-switcher img { display:block; border-radius:2px; opacity:.85; transition:opacity .2s ease; }
.crpz-lang-switcher a:hover img { opacity:1; }
/* show only the NON-active language flag to save header space */
.crpz-lang-switcher .crpz-lang-item.is-current { display:none; }
/* submenu dropdown — legacy look */
.crpz-header .wp-block-navigation__submenu-container {
  background:#fff; border:none; padding:12px 0;
}
.crpz-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  padding:14px 28px; font-size:15px; line-height:18px; color:#363E45;
}
.crpz-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { color:var(--wp--preset--color--primary); }
@media (max-width: 900px) {
  .crpz-header__inner { padding-top:14px; padding-bottom:14px; }
  .crpz-logo img { height:40px; }
  .crpz-header .crpz-lang-switcher { margin-left:16px; padding-left:16px; gap:12px; }
}

/* ===== Footer (legacy-faithful: tagline + link columns + EU logos) ===== */
.crpz-footer { color:#fff; }
.crpz-footer a { color:#D4DEE7; text-decoration:none; }
.crpz-footer__inner { padding-top:76px; padding-bottom:60px; }
/* tagline + subtitle (legacy .footer-title-subtitle) */
.crpz-footer .crpz-footer__title {
  font-family:'DM Sans',sans-serif; font-weight:500;
  font-size:24px; line-height:24px; color:#fff; margin:0;
}
.crpz-footer .crpz-footer__subtitle {
  font-family:'DM Sans',sans-serif; font-weight:500;
  font-size:18px; line-height:28px; color:#D4DEE7; margin-top:24px; margin-bottom:0;
}
.crpz-footer__intro { max-width:50%; margin-right:40px; }
/* link columns (legacy .footer-right / .footer-links) */
.crpz-footer__top { gap:20px; }
.crpz-footer .crpz-footer-nav .wp-block-navigation__container {
  flex-direction:column; align-items:flex-start; gap:24px;
}
.crpz-footer .crpz-footer-nav li { margin:0; }
.crpz-footer .crpz-footer-nav a.wp-block-navigation-item__content {
  font-family:'DM Sans',sans-serif; font-weight:500;
  font-size:16px; line-height:16px; color:#D4DEE7; padding:0; transition:color .3s ease;
}
.crpz-footer .crpz-footer-nav a.wp-block-navigation-item__content:hover { color:var(--wp--preset--color--accent); }
/* logos + legal row (legacy .footer-cta-holder / .footer-logos / .footer-left-links) */
.crpz-footer__aux {
  display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-between; column-gap:40px; row-gap:24px;
  margin-top:60px;
}
.crpz-footer__logos { display:flex; flex-wrap:wrap; align-items:center; column-gap:20px; row-gap:16px; }
.crpz-footer__logos img { width:100%; height:auto; }
.crpz-footer__logos .crpz-footer__eu img { max-width:135px; }
.crpz-footer__logos .crpz-footer__mizisz img { max-width:195px; }
.crpz-footer__legal p {
  margin:0; display:flex; flex-wrap:wrap; align-items:center; column-gap:26px; row-gap:16px;
}
.crpz-footer__legal a {
  font-family:'DM Sans',sans-serif; font-weight:500;
  font-size:16px; line-height:16px; color:#D4DEE7; transition:color .3s ease;
}
.crpz-footer__legal a:hover { color:var(--wp--preset--color--accent); }
.crpz-footer__uni {
  font-family:'DM Sans',sans-serif; font-weight:500;
  font-size:16px; line-height:16px; color:#D4DEE7;
}
@media (max-width: 900px) {
  .crpz-footer__inner { padding-top:48px; padding-bottom:40px; }
  .crpz-footer__top { flex-direction:column; }
  .crpz-footer__intro { max-width:100%; margin-right:0; }
  .crpz-footer__aux { justify-content:flex-start; }
}

/* AA 1.4.1: inline links inside body paragraphs get an underline so
   color is never the only distinguishing cue */
main p a { text-decoration: underline; }
/* WCAG 1.4.1: distinguish text links without relying on color alone (covers p/li/h-* and other content blocks) */
main a:not(.wp-block-button__link):not(.wp-block-navigation-item__content):not(:has(img)) {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/* Breathing room between the page/post title and the content that follows it */
.wp-block-post-title + .wp-block-post-content { margin-top: 1.75rem; }

/* ===== Single post (news) layout ===== */
.crpz-single { padding-bottom: 80px; }
.crpz-single__meta { align-items: center; }
.crpz-single__meta .wp-block-post-date { margin: 0; }
.crpz-single__sep { margin: 0; }
.crpz-single .wp-block-post-terms { margin: 0; }
.crpz-single .wp-block-post-terms a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}
.crpz-single .wp-block-post-terms a:hover { text-decoration: underline; }
.crpz-single__img { margin: 0 0 40px; }
.crpz-single__img img { width: 100%; height: auto; display: block; }
.crpz-single .entry-content p { color: #001424; }
.crpz-single .entry-content h2 { color: var(--wp--preset--color--accent); font-weight: 700; }
@media (max-width: 860px) {
  .crpz-single .wp-block-post-title { font-size: 1.8rem !important; }
}

/* ---------- Core galleries: real grid instead of one-per-row ---------- */
.wp-block-gallery.has-nested-images {
  display: grid !important;
  gap: 12px;
  grid-template-columns: repeat(var(--crpz-gallery-cols, 3), minmax(0, 1fr));
  margin-block: 24px;
}

.wp-block-gallery.has-nested-images > figure.wp-block-image {
  width: auto !important;
  margin: 0 !important;
  max-width: none !important;
}

.wp-block-gallery.has-nested-images img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.wp-block-gallery.columns-1 { --crpz-gallery-cols: 1; }
.wp-block-gallery.columns-2 { --crpz-gallery-cols: 2; }
.wp-block-gallery.columns-3 { --crpz-gallery-cols: 3; }
.wp-block-gallery.columns-4 { --crpz-gallery-cols: 4; }
.wp-block-gallery.columns-5 { --crpz-gallery-cols: 5; }
.wp-block-gallery.columns-6,
.wp-block-gallery.columns-7,
.wp-block-gallery.columns-8 { --crpz-gallery-cols: 6; }

@media (max-width: 680px) {
  .wp-block-gallery.has-nested-images { --crpz-gallery-cols: 2; gap: 8px; }
}

/* ---------- Lightbox ---------- */
.crpz-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 12, 24, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  cursor: zoom-out;
}

.crpz-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
}

.crpz-lightbox__close {
  position: absolute;
  top: 18px;
  right: 24px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Embeds: never overflow the content column ---------- */
.wp-block-embed__wrapper { position: relative; max-width: 100%; }
.wp-block-embed__wrapper iframe,
.wp-block-embed iframe { max-width: 100%; }

/* ---------- Icon Block: keep icons centred (production used inline justification) ---------- */
.wp-block-outermost-icon-block { justify-content: center; }

/* ---------- Innovation catalogue list (Katalog inovacij UP) ---------- */
.crpz-katalog-item { margin: 0 0 20px; align-items: stretch; }
.crpz-katalog-item > .wp-block-image,
.crpz-katalog-item > .wp-block-post-featured-image { flex: 0 0 413px; margin: 0; }
.crpz-katalog-item > .wp-block-image img,
.crpz-katalog-item > .wp-block-post-featured-image img {
  width: 100%; height: 325px; object-fit: cover; display: block;
}
.crpz-katalog-item__body { flex: 1 1 auto; padding: 24px 28px; }
.crpz-katalog-item__body .wp-block-post-title { font-size: 1.5rem; line-height: 1.3; margin: 0 0 12px; }
.crpz-katalog-item__body .wp-block-post-title a { color: #001424; text-decoration: none; }
.crpz-katalog-item__body .wp-block-post-title a:hover { text-decoration: underline; }
.crpz-katalog-item__body p { font-size: 1.125rem; line-height: 1.55; color: #63717e; margin: 0; }
.crpz-katalog-item__body .wp-block-read-more {
  display: inline-block; margin-top: 14px; font-weight: 600;
  color: var(--wp--preset--color--primary); text-decoration: none;
}
.crpz-katalog-item__body .wp-block-read-more:hover { text-decoration: underline; }

/* pagination (Katalog inovacij) */
.wp-block-query-pagination { margin-top: 36px; gap: 8px; align-items: center; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 14px;
  background: var(--wp--preset--color--section, #f7f9fb);
  color: #001424; font-weight: 600; text-decoration: none; border-radius: 0;
}
.wp-block-query-pagination a:hover { background: var(--wp--preset--color--primary); color: #fff; }
.wp-block-query-pagination .current {
  background: var(--wp--preset--color--primary); color: #fff;
}
.wp-block-query-pagination .wp-block-query-pagination-next,
.wp-block-query-pagination .wp-block-query-pagination-previous { text-decoration: none; }

@media (max-width: 860px) {
  .crpz-katalog-item { flex-wrap: wrap !important; }
  .crpz-katalog-item > .wp-block-image,
  .crpz-katalog-item > .wp-block-post-featured-image { flex: 1 1 100%; }
  .crpz-katalog-item > .wp-block-image img,
  .crpz-katalog-item > .wp-block-post-featured-image img { height: auto; }
  .crpz-katalog-item__body { padding: 20px 22px; }
}

/* ---------- Breath around headings inside post content ---------- */
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 2rem;
  margin-bottom: 1rem;
}
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6):first-child {
  margin-top: 0;
}
/* cards and list items already carry their own padding: keep those titles tight */
.crpz-card :is(h1, h2, h3, h4, h5, h6),
.crpz-cards :is(h1, h2, h3, h4, h5, h6),
.crpz-katalog-item__body :is(h1, h2, h3, h4, h5, h6),
.crpz-news-card :is(h1, h2, h3, h4, h5, h6) {
  margin-top: 0;
  margin-bottom: 12px;
}

/* long unbreakable URLs in content must not blow out the layout */
.wp-block-post-content a { overflow-wrap: anywhere; }

/* wide content tables scroll instead of breaking the mobile layout */
.wp-block-post-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; }

/* bullet lists in content need air around them like the rest of the flow */
.wp-block-post-content .wp-block-list { margin-top: .5rem; margin-bottom: 1.25rem; }
.crpz-card .wp-block-list,
.crpz-katalog-item__body .wp-block-list,
.crpz-news-card .wp-block-list { margin-top: 0; margin-bottom: 0; }

/* ---------- Sticky footer: short pages keep the footer at the bottom ---------- */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body > .wp-site-blocks {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
body > .wp-site-blocks > main {
  flex: 1 0 auto;
}
body.admin-bar { min-height: calc(100vh - 32px); }
@media screen and (max-width: 782px) {
  body.admin-bar { min-height: calc(100vh - 46px); }
}

/* ---------- Paragraph rhythm inside post content (production uses 18px) ---------- */
.wp-block-post-content p {
  margin-top: 18px;
  margin-bottom: 18px;
}
.wp-block-post-content > p:first-child {
  margin-top: 0;
}
/* Card content keeps its own tighter rhythm */
.wp-block-post-content :is(.crpz-card, .crpz-cards, .crpz-cta-card, .crpz-news-card, .crpz-katalog-item, .crpz-katalog-item__body) p {
  margin-top: 0;
  margin-bottom: 12px;
}
