/*
Theme Name: Mozaik
Theme URI: https://example.com/mozaik
Author: Custom Theme
Author URI: https://example.com
Description: Moderna WordPress tema optimizirana za 1920px ekrane s mrežnim prikazom postova, padajućim izbornikom i infinity scrollom.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mozaik
Tags: custom-menu, featured-images, post-formats, infinite-scroll, grid-layout
*/

/* =============================================
   CSS VARIJABLE I RESET
   ============================================= */
:root {
  --color-bg:        #0d0f14;
  --color-surface:   #141720;
  --color-surface2:  #1c2030;
  --color-border:    #252a3a;
  --color-accent:    #e8c547;
  --color-accent2:   #3d9be9;
  --color-text:      #e8eaf0;
  --color-muted:     #7a8099;
  --color-tag-bg:    #1e2438;
  --color-tag-text:  #a0b4d6;

  --font-display:    'Roboto', sans-serif;
  --font-body:       'Roboto', sans-serif;
  --font-mono:       'Roboto Mono', monospace;

  --nav-height:      64px;
  --header-height:   120px;
  --max-width:       1920px;
  --content-width:   1840px; /* 1920 - 2*40px padding */
  --tile-gap:        20px;
  --tile-img:        240px;

  --radius-tile:     6px;
  --radius-tag:      3px;
  --shadow-tile:     0 2px 16px rgba(0,0,0,0.4);
  --shadow-tile-hover: 0 8px 32px rgba(0,0,0,0.6);
  --transition:      0.22s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

/* =============================================
   GOOGLE FONTS IMPORT (u functions.php se enqueue)
   ============================================= */

/* =============================================
   WRAPPER
   ============================================= */
.site-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* =============================================
   HEADER
   ============================================= */
#site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: hidden;
}

/* Suptilna pozadinska tekstura */
#site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(232,197,71,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 100% at 100% 50%, rgba(61,155,233,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.header-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 40px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* --- Branding lijevo --- */
.site-branding {
  flex: 0 0 auto;
  z-index: 1;
}

.site-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: var(--color-text);
}

.site-title a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-title a::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 32px;
  background: var(--color-accent);
  border-radius: 3px;
  flex-shrink: 0;
}

.site-description {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
  padding-left: 16px;
}

/* --- Header fotografija desno --- */
.header-image-wrap {
  flex: 0 0 1024px;
  height: 240px; /* Kontejner je 240px visok, ali header je 120px - slika se izlijeva */
  position: relative;
  border-radius: var(--radius-tile);
  overflow: hidden;
  align-self: stretch;
  max-height: 100%;
}

/* Kad je header-height 120px, slika se skalira */
.header-image-wrap {
  width: 1024px;
  height: var(--header-height);
}

.header-image-wrap img,
.header-image-wrap .header-img-placeholder {
  width: 1024px;
  height: 240px;
  object-fit: cover;
  object-position: center;
  /* Prikaži samo gornji dio ako je kontejner manji */
  position: absolute;
  top: 0; left: 0;
}

.header-img-placeholder {
  background: linear-gradient(135deg, var(--color-surface2) 0%, #1a2040 50%, var(--color-surface2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-img-placeholder span {
  font-size: 13px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.header-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-surface) 0%, transparent 20%);
  pointer-events: none;
}

/* =============================================
   NAVIGACIJSKA TRAKA
   ============================================= */
#site-nav {
  background: var(--color-surface2);
  border-bottom: 1px solid var(--color-border);
  height: var(--nav-height);
  position: sticky;
  top: var(--header-height);
  z-index: 199;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Glavni izbornik --- */
#primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

#primary-menu > li {
  position: relative;
}

#primary-menu > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
  color: var(--color-text);
  background: rgba(255,255,255,0.06);
}

#primary-menu > li.current-menu-item > a {
  color: var(--color-accent);
}

/* Strelica za dropdown */
#primary-menu > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
}

#primary-menu > li.menu-item-has-children:hover > a::after {
  transform: rotate(-135deg) translateY(-2px);
}

/* --- Dropdown podizbornik --- */
#primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tile);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  pointer-events: none;
  overflow: hidden;
}

#primary-menu > li:hover .sub-menu,
#primary-menu > li:focus-within .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

#primary-menu .sub-menu::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px;
  height: 9px;
  background: var(--color-surface2);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
}

#primary-menu .sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--color-muted);
  transition: color var(--transition), background var(--transition), padding var(--transition);
  border-left: 2px solid transparent;
}

#primary-menu .sub-menu li a:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.05);
  border-left-color: var(--color-accent);
  padding-left: 24px;
}

/* =============================================
   GLAVNI SADRŽAJ
   ============================================= */
#main-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--tile-gap) 40px 60px;
}

/* =============================================
   MREŽA POSTOVA
   ============================================= */
#posts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--tile-gap);
}

/* =============================================
   PLOČICA POSTA
   ============================================= */
.post-tile {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tile);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow-tile);
  cursor: pointer;
}

.post-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-tile-hover);
  border-color: rgba(232,197,71,0.25);
}

/* --- Istaknuta slika --- */
.post-tile__thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: var(--tile-img);
  overflow: hidden;
  position: relative;
  background: var(--color-surface2);
  flex-shrink: 0;
}

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

.post-tile:hover .post-tile__thumbnail img {
  transform: scale(1.06);
}

/* Placeholder kad nema slike */
.post-tile__thumbnail--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-surface2) 0%, #1a2040 100%);
}

.post-tile__thumbnail--empty::after {
  content: attr(data-initials);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  color: var(--color-border);
}

.post-tile__thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,15,20,0.7) 100%);
  pointer-events: none;
}

/* --- Tijelo pločice --- */
.post-tile__body {
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* --- Naslov --- */
.post-tile__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);

  /* Ograničenje na 2 reda */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  /* Max 80 znakova se kontrolira PHP-om, ali vizualno ograničavamo visinu */
  min-height: calc(15px * 1.4 * 2); /* 2 reda */
  max-height: calc(15px * 1.4 * 2);

  transition: color var(--transition);
}

.post-tile:hover .post-tile__title {
  color: var(--color-accent);
}

.post-tile__title a {
  color: inherit;
}

/* --- Tagovi --- */
.post-tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 22px;
}

.post-tile__tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--color-tag-bg);
  color: var(--color-tag-text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: var(--radius-tag);
  border: 1px solid rgba(160, 180, 214, 0.12);
  transition: background var(--transition), color var(--transition);
}

.post-tile__tag:hover {
  background: rgba(61,155,233,0.15);
  color: var(--color-accent2);
}

/* =============================================
   INFINITY SCROLL LOADER
   ============================================= */
#load-more-trigger {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--tile-gap);
}

.loader-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: dot-pulse 1.4s ease-in-out infinite;
  opacity: 0.3;
}

.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

#load-more-trigger.hidden { display: none; }

.no-more-posts {
  font-size: 13px;
  color: var(--color-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  display: none;
}

/* =============================================
   ANIMACIJA ULASKA PLOČICE
   ============================================= */
.post-tile {
  animation: tile-in 0.35s ease both;
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered delay za batch */
.post-tile:nth-child(5n+2) { animation-delay: 0.05s; }
.post-tile:nth-child(5n+3) { animation-delay: 0.10s; }
.post-tile:nth-child(5n+4) { animation-delay: 0.15s; }
.post-tile:nth-child(5n+5) { animation-delay: 0.20s; }

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 24px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

/* =============================================
   SINGLE POST — PRIKAZ POJEDINOG POSTA
   ============================================= */

/* Wrapper – centriran na 1280px */
#single-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.single-article {
  color: var(--color-text);
}

/* --- Hero istaknuta slika --- */
.single-hero {
  position: relative;
  width: 1280px;           /* točno 1280px */
  max-width: 100%;
  margin: 0 auto 40px;
  border-radius: var(--radius-tile);
  overflow: hidden;
  background: var(--color-surface2);
}

/* Slika se rasteže/skuplja na točno 1280px širine uz zadržavanje proporcija */
.single-hero__img {
  width: 1280px !important; /* uvijek 1280px */
  max-width: 100%;
  height: auto !important;  /* proporcije */
  display: block;
  object-fit: contain;
}

.single-hero__overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(13,15,20,0.6));
  pointer-events: none;
}

/* --- Zaglavlje posta --- */
.single-header {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-border);
}

.single-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 42px);
  font-weight: 700;
  line-height: 1.22;
  color: var(--color-text);
  margin-bottom: 16px;
}

.single-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-muted);
}

.single-meta__sep {
  opacity: 0.4;
}

/* --- Sadržaj posta --- */
.entry-content {
  font-size: 17px;
  line-height: 1.85;
  color: rgb(160, 160, 160);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-display);
  color: rgb(160, 160, 160);
  margin: 2em 0 0.6em;
  line-height: 1.3;
}

.entry-content h2 { font-size: 1.65em; }
.entry-content h3 { font-size: 1.35em; }
.entry-content h4 { font-size: 1.15em; }

.entry-content p {
  margin-bottom: 1.4em;
}

.entry-content a {
  color: var(--color-accent2);
  text-decoration: underline;
  text-decoration-color: rgba(61,155,233,0.35);
  text-underline-offset: 3px;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.entry-content a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.entry-content blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 12px 24px;
  margin: 2em 0;
  background: var(--color-surface);
  border-radius: 0 var(--radius-tile) var(--radius-tile) 0;
  font-style: italic;
  color: var(--color-muted);
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.4em;
}

.entry-content li {
  margin-bottom: 0.4em;
}

.entry-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--color-accent2);
}

.entry-content pre {
  background: var(--color-surface2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tile);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 1.6em;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: var(--color-text);
}

/* -------------------------------------------------------
   FOTOGRAFIJE U SADRŽAJU POSTA
   Sve slike se prikazuju na točno 1280px širine.
   - Slike ŠIRE od 1280px: smanjuju se na 1280px (max-width)
   - Slike UŽE od 1280px: uvećavaju se na 1280px (min-width)
   Proporcije se uvijek zadržavaju (height: auto).
   ------------------------------------------------------- */
.entry-content img {
  display: block;
  width: 1280px !important;  /* Uvijek prikaži na 1280px */
  max-width: 100%;           /* Responsive — ne prelazi container */
  height: auto !important;   /* Zadržava proporcije */
  object-fit: contain;
  margin: 2em auto;
  border-radius: var(--radius-tile);
  background: var(--color-surface2); /* Pozadina za slike s prozirnim dijelovima */
}

/* WordPress figure/caption omotač */
.entry-content figure {
  margin: 2em auto;
  width: 1280px;
  max-width: 100%;
}

.entry-content figure img {
  margin: 0 auto;  /* figure već ima margin */
}

.entry-content figcaption,
.entry-content .wp-caption-text {
  font-size: 13px;
  color: var(--color-muted);
  font-family: var(--font-mono);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.03em;
}

/* WordPress .wp-caption omotač */
.entry-content .wp-caption {
  width: 1280px !important;
  max-width: 100%;
  margin: 2em auto;
  background: transparent;
  border: none;
  padding: 0;
}

.entry-content .wp-caption img {
  margin: 0 auto;
}

/* WordPress blok galerija */
.entry-content .wp-block-image {
  width: 1280px;
  max-width: 100%;
  margin: 2em auto;
}

.entry-content .wp-block-image img {
  width: 100%;
  height: auto !important;
}

/* WordPress blok galerija (više slika) */
.entry-content .wp-block-gallery {
  width: 1280px;
  max-width: 100%;
  margin: 2em auto;
}

/* --- Tagovi ispod posta --- */
.single-tags {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* --- Navigacija između postova --- */
.single-post-nav {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.single-post-nav__item {
  flex: 1;
  padding: 18px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-tile);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition), background var(--transition);
}

.single-post-nav__item:hover {
  border-color: rgba(232,197,71,0.3);
  background: var(--color-surface2);
}

.single-post-nav__item--next {
  text-align: right;
}

.single-post-nav__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.single-post-nav__title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
}

/* =============================================
   RESPONZIVNOST
   ============================================= */

/* ── 1680px–1920px: 5 stupaca (defaultno, bez media query) ── */

/* ── Ekrani užih od 1680px: 4 pločice u redu ── */
@media (max-width: 1679px) {
  #posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Ekrani užih od 1280px: 2 pločice u redu ── */
@media (max-width: 1279px) {

  /* Sakrij header fotografiju */
  .header-image-wrap {
    display: none;
  }

  .header-inner {
    padding: 0 24px;
    justify-content: flex-start;
  }

  /* 2 pločice u redu */
  #posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  #main-content {
    padding: var(--tile-gap) 24px 60px;
  }

  /* Single post: fluid, bez horizontalnog scrolla */
  #single-content {
    max-width: 100%;
    padding: 24px 24px 60px;
    overflow-x: hidden;
  }

  .single-hero {
    width: 100%;
  }

  .single-hero__img {
    width: 100% !important;
    height: auto !important;
  }

  /* Sve slike i tablice u sadržaju posta su fluid */
  .entry-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  .entry-content figure,
  .entry-content .wp-caption,
  .entry-content .wp-block-image,
  .entry-content .wp-block-gallery {
    width: 100% !important;
    max-width: 100% !important;
  }

  .entry-content table {
    width: 100%;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ── Mobilni uređaji (do 767px): 1 pločica u redu ── */
@media (max-width: 767px) {

  /* Kompaktan sticky header */
  :root {
    --header-height: 64px;
    --nav-height:    52px;
  }

  .header-image-wrap {
    display: none;
  }

  .header-inner {
    padding: 0 16px;
    height: var(--header-height);
    justify-content: flex-start;
  }

  .site-title {
    font-size: 20px;
  }

  .site-description {
    font-size: 11px;
  }

  .site-title a::before {
    height: 22px;
  }

  /* Nav: horizontalno scrollable, bez vidljivog scrollbara */
  .nav-inner {
    padding: 0 16px;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-inner::-webkit-scrollbar { display: none; }

  #primary-menu {
    gap: 0;
    flex-wrap: nowrap;
  }

  #primary-menu > li > a {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Dropdown na mobilnom — poravnat uz lijevu stranu stavke */
  #primary-menu .sub-menu {
    left: 0;
    transform: translateX(0) translateY(-8px);
  }

  #primary-menu > li:hover .sub-menu,
  #primary-menu > li:focus-within .sub-menu {
    transform: translateX(0) translateY(0);
  }

  #primary-menu .sub-menu::before {
    left: 20px;
    transform: translateX(0) rotate(45deg);
  }

  /* 1 pločica u redu */
  #posts-grid {
    grid-template-columns: 1fr;
  }

  #main-content {
    padding: 12px 12px 40px;
  }

  /* ── Single post na mobilnom ── */
  #single-content {
    padding: 16px 16px 40px;
    overflow-x: hidden;
    /* Spriječi da bilo koji child element izlazi izvan viewport-a */
    max-width: 100vw;
    box-sizing: border-box;
  }

  /* Sve što je unutar single članka mora stati u širinu */
  .single-article {
    overflow-x: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .single-title {
    font-size: clamp(18px, 5vw, 26px);
    word-break: break-word;
  }

  .single-hero {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 4px;
  }

  .single-hero__img {
    width: 100% !important;
    height: auto !important;
  }

  .entry-content {
    font-size: 15px;
    overflow-x: hidden;
  }

  /* Sve slike u objavi — fluid, proporcionalno */
  .entry-content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 1em auto;
  }

  /* Svi omotači slika — fluid */
  .entry-content figure,
  .entry-content .wp-caption,
  .entry-content .wp-block-image,
  .entry-content .wp-block-gallery {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Tablice: horizontalni scroll unutar bloka, ne cijele stranice */
  .entry-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }

  /* Blokovi koda: horizontalni scroll unutar bloka */
  .entry-content pre {
    overflow-x: auto;
    font-size: 12px;
    padding: 14px 16px;
  }

  /* Blokovi ugradnje (iframe, video, embed) — fluid */
  .entry-content iframe,
  .entry-content video,
  .entry-content embed,
  .entry-content object {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* WordPress blok za video */
  .entry-content .wp-block-video video {
    width: 100% !important;
    height: auto !important;
  }

  .single-tags {
    margin-top: 32px;
  }

  .single-post-nav {
    flex-direction: column;
    margin-top: 32px;
  }

  .single-post-nav__item--next {
    text-align: left;
  }

  #site-footer {
    padding: 16px;
    font-size: 11px;
  }
}
