/*
Theme Name: TechHorizon
Theme URI: https://techhorizon.news
Author: TechHorizon
Description: Custom lightweight news theme for curated, insights and sponsored articles.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.2
Text Domain: techhorizon
License: GPL-2.0-or-later
*/

/* ===== Root vars ===== */
:root{
  --grid-gap: 1rem;
  --border: #e2e8f0;
  --muted: #5f6368;
  --text: #111;
  --section-space: 2.5rem;
}

/* ===== Minimal reset ===== */
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,'Noto Sans',sans-serif;line-height:1.55;color:#0b0c0d;background:#fff}
a{color:#0b57d0;text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
figure{margin:0}

/* ===== Layout ===== */
.container{max-width:1140px;margin-inline:auto;padding:0 1rem}
.header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid #eceef1}
.site-brand{font-weight:800;font-size:1.25rem;letter-spacing:.2px}
.nav{display:flex;gap:1rem;align-items:center}
.nav a{padding:.75rem .5rem;border-radius:.5rem;color:#111}
.nav a[aria-current="page"]{background:#eef2ff}
.header-row{display:flex;align-items:center;justify-content:space-between;padding:.5rem 0}
.menu-toggle{display:none;appearance:none;border:0;background:transparent;font-size:1.25rem;line-height:1;padding:.5rem;border-radius:.5rem}
.menu-toggle:focus{outline:2px solid #0b57d0;outline-offset:2px}

/* Mobile drawer */
.mobile-drawer{display:none;position:fixed;inset:0;background:rgba(0,0,0,.42)}
.mobile-panel{position:absolute;inset:0 0 0 25%;background:#fff;padding:1rem;overflow:auto}
.mobile-nav a{display:block;padding:.75rem 0;border-bottom:1px solid #f0f0f0;color:#111}

/* ===== Grid utilities ===== */
.grid{display:grid;gap:var(--grid-gap)}
.grid-1x4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-2x4{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid-1x3{grid-template-columns:repeat(3,minmax(0,1fr))}

/* ===== Cards ===== */
.card{display:flex;flex-direction:column;gap:.5rem;border:1px solid #eceef1;border-radius:12px;overflow:hidden;background:#fff;transition:box-shadow .2s ease}
.card:hover{box-shadow:0 4px 20px rgba(0,0,0,.05)}
.card-thumb{aspect-ratio:16/9;background:#f6f7f9;overflow:hidden}
.card-meta{font-size:.8125rem;color:#5f6368;display:flex;gap:.5rem;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;gap:.25rem;font-size:.75rem;padding:.15rem .5rem;border-radius:999px;border:1px solid #e2e8f0;color:#475569;background:#f8fafc}
.badge.sponsored{border-color:#d97706;background:#fffbeb;color:#9a3412}
.badge.breaking{border-color:#ef4444;background:#fef2f2;color:#991b1b}
.badge.analysis{border-color:#3b82f6;background:#eff6ff;color:#1d4ed8}

.sidebar{position:sticky;top:4.25rem;align-self:start}
.tabs{display:flex;gap:.5rem;border-bottom:1px solid #eceef1}
.tab-btn{background:transparent;border:0;padding:.75rem 1rem;font-weight:600}
.tab-btn[aria-selected="true"]{border-bottom:2px solid #0b57d0;color:#0b57d0}
.tab-panel{display:none}
.tab-panel[aria-hidden="false"]{display:block}

/* Mobile rail (ako koristiš) */
.mobile-rail{display:none}

/* ===== Footer ===== */
.footer{margin-top:2rem;border-top:1px solid #eceef1;padding:2rem 0;background:#fff}

/* Accessibility helpers */
.skip-link{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:1rem;top:1rem;width:auto;height:auto;padding:.5rem 1rem;background:#111;color:#fff;border-radius:.5rem}

/* ===== VERTIKALNI RITAM SEKCIJA ===== */
.hero,
.hero-browse,
.grid,
.section{ margin-bottom: var(--section-space); }

/* ===== Responsive (kartice i navigacija) ===== */
@media (max-width: 1024px){
  .grid-1x4,.grid-2x4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sidebar{top:3.5rem}
}
@media (max-width: 640px){
  .nav{display:none}
  .menu-toggle{display:inline-block}
  .grid-1x4,.grid-2x4,.grid-1x3{grid-template-columns:1fr}
  :root{ --section-space: 1.5rem; }
}

/* ===== The Events Calendar tweaks (light) ===== */
.tribe-common a{color:inherit;text-decoration:underline}
.tribe-common .tribe-events-c-ical__link{font-size:.875rem}
.tribe-events .tribe-events-calendar-month__header{position:sticky;top:4rem;background:#fff;z-index:1}
.tribe-events-c-top-bar{margin-bottom:1rem}
.tribe-events-calendar-list__event{border:1px solid #eceef1;border-radius:12px;padding:1rem;margin-bottom:1rem}
.tribe-events-calendar-list__event-date-tag{border-radius:8px}

/* ===== Header (dark skin) ===== */
.site-header--dark{background:#0c0f14;color:#e5e7eb;border-bottom:1px solid #1f2937}
.site-header--dark a{color:#e5e7eb}
.header-top{display:grid;grid-template-columns:1fr minmax(280px,600px) auto auto;gap:1rem;align-items:center;padding:.75rem 0}
.brand{display:flex;align-items:center;gap:.5rem;font-weight:800}
.brand img{border-radius:.5rem}
.header-search form{display:flex;align-items:center;background:#11151b;border:1px solid #243043;border-radius:12px;padding:.25rem .5rem}
.header-search input[type="search"]{background:transparent;border:0;outline:none;color:#e5e7eb;padding:.5rem .5rem;width:100%}
.header-search button{background:#2f6fec;color:#fff;border:0;border-radius:10px;padding:.45rem .8rem;margin-left:.5rem}
.btn-subscribe{display:inline-flex;align-items:center;justify-content:center;background:#1f2937;border:1px solid #2e3746;border-radius:999px;padding:.45rem .85rem}
.header-nav{border-top:1px solid #11151b;border-bottom:1px solid #11151b}
.header-nav .menu{display:flex;gap:1rem;margin:0;padding:.5rem 0}
.header-nav li{list-style:none}
.header-nav a{display:inline-block;padding:.5rem .75rem;border-radius:999px;color:#cbd5e1}
.header-nav a:hover, .header-nav a[aria-current="page"]{background:#11151b;color:#fff}

.header-chips{padding:.35rem 0}
.header-chips .chips{display:flex;gap:.75rem;margin:0;padding:0;flex-wrap:wrap}
.header-chips li{list-style:none}
.header-chips a{display:inline-block;padding:.25rem .6rem;border-radius:999px;border:1px solid #253042;background:#0f131a;color:#93a4b8;font-size:.875rem}
.header-chips a::before{content:"#";margin-right:.15rem;color:#64748b}

/* Mobile header breakpoints */
@media (max-width:1024px){
  .header-top{grid-template-columns:1fr auto auto}
  .header-search{display:none}
}
@media (max-width:640px){
  .header-nav{display:none}
  .header-chips{display:none}
}

/* ===== Meniji: reset i layout ===== */
.nav .menu,
.header-nav .menu { display:flex; gap:1rem; margin:0; padding:0; align-items:center; }
.nav .menu li,
.header-nav .menu li { list-style:none; }
.nav .menu a,
.header-nav .menu a { display:inline-block; padding:.5rem .75rem; border-radius:.5rem; color:#111; }
.nav .menu a[aria-current="page"] { background:#eef2ff; }

.mobile-nav .menu { margin:0; padding:0; }
.mobile-nav .menu li { list-style:none; }
.mobile-nav .menu.chips a {
  display:inline-block; margin:.25rem .5rem .25rem 0;
  border:1px solid #e2e8f0; border-radius:999px; padding:.35rem .75rem;
}

/* ===== Brand text logo ===== */
.brand-text {
  font-family: 'Segoe UI', Roboto, Ubuntu, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: #ffffff;
  text-decoration: none;
  display: inline-block;
}
.brand-text span { color: #3b82f6; }

/* ===== Browse-first hero (konsolidovano) ===== */
.hero-browse{margin:1rem 0 1.25rem}

.hb-chips{display:flex;gap:.5rem;overflow:auto;padding-bottom:.25rem;margin-bottom:.75rem}
.chip{
  padding:.45rem .75rem;border-radius:999px;border:1px solid var(--border);
  background:transparent;color:var(--muted);font-weight:700;white-space:nowrap;cursor:pointer
}
.chip.active,.chip:hover{background:#f5f7fb;color:var(--text);border-color:var(--border)}

.hb-grid{ display:grid; gap:var(--grid-gap); grid-template-columns:repeat(4,minmax(0,1fr)); align-items:start; }
.hb-card{ height:100%; max-height:420px; overflow:hidden; }
.hb-card .card-media{ aspect-ratio:16/9; background:#eef3fb; }
.hb-card .card-media img{ width:100%; height:100%; object-fit:cover; display:block; border-radius:inherit; }
.hb-card.no-thumb .card-media{ display:none; }
.hb-card .card-body{ display:flex; flex-direction:column; gap:.3rem; }
.hb-card .post-title{
  font-size:clamp(1rem,.95rem + .2vw,1.08rem);
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  min-height:3em;
}

/* Responsive 4→3→2→1 za hero grid */
@media (max-width:1200px){ .hb-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:900px){  .hb-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:560px){  .hb-grid{ grid-template-columns:1fr; } .hb-card .post-title{ -webkit-line-clamp:3; min-height:auto; } }

/* ===== Global Dark Theme ===== */
.theme-dark{
  --bg:#0c0f14;
  --surface:#0f131a;
  --card:#0f131a;
  --text:#e5e7eb;
  --muted:#93a4b8;
  --border:#243043;
  --link:#5da2ff;
  --link-hover:#8bb8ff;

  background:var(--bg);
  color:var(--text);
}

/* tekst/linkovi */
.theme-dark a{ color:var(--link); text-decoration:none; }
.theme-dark a:hover{ color:var(--link-hover); text-decoration:underline; }

/* header & navigacija */
.theme-dark .header,
.theme-dark .site-header--dark{ background:#0c0f14; border-bottom:1px solid var(--border); }
.theme-dark .header-nav{ border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.theme-dark .header-nav .menu>li>a{ color:#cbd5e1; }
.theme-dark .header-nav .menu>li>a:hover,
.theme-dark .header-nav .menu>li+a[aria-current="page"]{ background:#11151b; color:#fff; }

/* search + CTA u headeru */
.theme-dark .header-search form{ background:#11151b; border:1px solid var(--border); }
.theme-dark .header-search input[type="search"]{ color:var(--text); }
.theme-dark .btn-subscribe{ background:#1f2937; border:1px solid #2e3746; color:#e5e7eb; }

/* kartice i meta */
.theme-dark .card{ background:var(--card); border-color:var(--border); box-shadow:none; }
.theme-dark .card-thumb{ background:#11151b; }
.theme-dark .card-meta{ color:var(--muted); }

/* značke */
.theme-dark .badge{ background:#0f131a; border-color:#2a3548; color:#cbd5e1; }
.theme-dark .badge.sponsored{ background:#281e0b; border-color:#7a4a09; color:#ffdd9b; }
.theme-dark .badge.breaking{ background:#3a0d0d; border-color:#6e1b1b; color:#fca5a5; }
.theme-dark .badge.analysis{ background:#0b1b3a; border-color:#1d4ed8; color:#93c5fd; }

/* tabovi / sidebar */
.theme-dark .tabs{ border-color:var(--border); }
.theme-dark .tab-btn{ color: var(--muted); }
.theme-dark .tab-btn[aria-selected="true"]{ border-bottom-color:var(--link); color:#dbeafe; }

/* hero-browse, chips */
.theme-dark .hb-card .card-media{ background:#11151b; }
.theme-dark .hb-chips .chip{ background:#0f131a; border-color:var(--border); color: var(--muted); }
.theme-dark .chip.active, .theme-dark .chip:hover{ background:#11151b; color:var(--text); }

/* mobilni meni */
.theme-dark .mobile-panel{ background:#0c0f14; }
.theme-dark .mobile-drawer{ background:rgba(0,0,0,.6); }
.theme-dark .mobile-nav a{ color:#e5e7eb; border-bottom:1px solid var(--border); }

/* footer */
.theme-dark .footer{ background:#0c0f14; border-top:1px solid var(--border); color: var(--muted); }

/* ===== Badge base (namespace) ===== */
.badge{
  display:inline-block;
  font-weight:700;
  font-size:.75rem;
  line-height:1;
  padding:.25rem .5rem;
  border-radius:.375rem;
  border:1px solid transparent;
  text-transform:uppercase;
  letter-spacing:.03em;
}

/* ===== Sponsored disclosure (light/dark aware) ===== */
.th-disclosure{
  border:1px solid var(--border);
  border-radius:.5rem;
  padding:1rem;
  margin:0 0 1rem;
  background:var(--surface);
  color:var(--text);
}
.th-disclosure p{ margin:.5rem 0 0; }

.th-disclosure {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: .5rem .75rem;
}
.th-disclosure p { margin: 0; font-size: .9rem; line-height: 1.4; }
.th-disclosure .badge.sponsored {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 700;
  background: #f59e0b;
  color: #111827;
}
.th-disclosure--single { padding: .75rem 1rem; margin: 1rem 0; }
.th-disclosure--slim   { padding: .5rem .75rem; margin: 1rem 0 0 0; font-size: .875rem; }
@media (max-width: 900px) { .th-disclosure { grid-template-columns: 1fr; } }

/* ===== Contact form (namespaced) ===== */
.th-contact-wrap { margin-block: 1rem 2rem; }
.th-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem 1.25rem; }
.th-field { display: flex; flex-direction: column; gap: .35rem; }
.th-field--full { grid-column: 1 / -1; }
.th-contact-form input[type="text"],
.th-contact-form input[type="email"],
.th-contact-form select,
.th-contact-form textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: .5rem; padding: .6rem .75rem;
}
.th-contact-form textarea { resize: vertical; min-height: 160px; }
.th-contact-form label { font-size: .925rem; color: var(--muted); }
.th-consent { grid-column: 1 / -1; display: flex; align-items: start; gap: .5rem; font-size: .9rem; color: var(--muted); }
.th-actions { grid-column: 1 / -1; }
.th-contact-form .btn { padding: .6rem 1rem; border-radius: .5rem; }
.th-contact-form .hp { display:none !important; position:absolute; left:-9999px; height:0; width:0; overflow:hidden; }
.th-alert { border-radius: .5rem; padding: .75rem 1rem; margin-bottom: 1rem; }
.th-success { background: rgba(16,185,129,.12); border:1px solid rgba(16,185,129,.35); }
.th-error   { background: rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.35); }
@media (max-width: 800px) { .th-contact-form { grid-template-columns: 1fr; } }

/* Sakrij duplicirane forme na Kontakt stranici */
.page .comment-respond,
.page .comment-form,
.wpforms-container,
.wpcf7,
.form-patterns-contact-form { display:none !important; }

/* ===== Calendar (fallback list) ===== */
.th-cal-header { margin-bottom: 1rem; }
.th-events-list { margin: 1rem 0; }
.th-event-item { padding: .9rem 0; border-bottom: 1px solid var(--border, #2f3b4a); }
.th-event-meta { font-size: .95rem; opacity: .9; margin-bottom: .25rem; }
.th-event-title { margin: .25rem 0 .5rem; font-size: 1.1rem; line-height: 1.3; }
.th-event-title a { text-decoration: none; }
.th-event-cta { display: inline-block; padding: .35rem .7rem; border: 1px solid var(--border,#2f3b4a);
  border-radius: .5rem; font-size: .9rem; text-decoration: none; }
.th-event-cta:hover { background: rgba(255,255,255,.06); }
.th-events-all { margin-top: 1rem; }
.th-events-notice { margin: 1rem 0; padding: .75rem 1rem; border: 1px solid #2f3b4a; border-radius: .5rem; }
.th-events-empty { opacity: .9; }

/* ===== Cards: excerpts & responsiveness ===== */
.post-excerpt{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  max-height:3em;
}
@media (max-width:680px){
  .card .post-excerpt{ display:none }
  .hero-grid .card:first-child .post-excerpt{ display:-webkit-box }
}
/* Featured grid: dozvoli 3 reda na desktopu */
.grid.grid-1x4 .card .post-excerpt{ -webkit-line-clamp:3; max-height:4.5em; }
@media (max-width: 900px){
  .grid.grid-1x4 .card .post-excerpt{ -webkit-line-clamp:2; max-height:3em; }
}


/* Manji naslovi za SVE listinge na frontpage-u */
body.home .grid-1x4 .card .post-title{
  font-size: clamp(0.95rem, 0.9rem + .2vw, 1.05rem);
  line-height: 1.35;
}

/* Izuzetak: prvi grid na stranici (Featured) zadržava veći font  
body.home section > .grid.grid-1x4:first-of-type .card .post-title{
  font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem);
  line-height: 1.35;
} */

/* (Opcionalno) malo zategni na užim širinama */
@media (max-width: 900px){
  body.home .grid-1x4 .card .post-title{
    font-size: clamp(0.95rem, 0.92rem + .15vw, 1.02rem);
  }
}


/* ===== The Events Calendar: Dark blend-in ===== */
.tribe-common { background: transparent; color: #e5e7eb; }
.tribe-common a { color: #60a5fa; }
.tribe-common a:hover { text-decoration: underline; }
.tribe-events .tribe-events-calendar-list__event-title a { color: #93c5fd; }
.tribe-events .tribe-events-calendar-list__event-title a:hover { color: #bfdbfe; }
.tribe-common .tribe-common-b2, .tribe-common .tribe-common-b3 { color: #cbd5e1; }
.tribe-common .tribe-common-h6--min-medium { color:#9ca3af; }
.tribe-common .tribe-common-c-btn, 
.tribe-common .tribe-events-c-view-selector__button {
  background:#0b5; color:#fff; border-radius:.5rem; border:none;
}
.tribe-common .tribe-common-c-btn:hover { filter: brightness(1.05); }
.tribe-common .tribe-common-g-row, 
.tribe-common .tribe-common-g-col,
.tribe-events .tribe-events-calendar-list__event {
  border-color: #2f3b4a;
}
.tribe-events .tribe-events-venue-map { border-radius:.5rem; overflow:hidden; }

/* ===== Footer – clean layout ===== */
.footer-columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-block: 2rem;
}
.footer-col { display: flex; flex-direction: column; gap: .75rem; }
.footer-title { font-size: 1rem; font-weight: 700; margin: 0; }
.footer-desc { margin: 0; color: var(--muted); }
.footer-inputs { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.th-newsletter-form input[type="email"] {
  width: 100%; padding: .6rem .75rem; border-radius: .5rem;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.th-newsletter-form .btn { padding: .6rem 1rem; border-radius: .5rem; }
.footer-consent { display: flex; align-items: start; gap: .5rem; font-size: .875rem; color: var(--muted); }
.footer-consent a { text-decoration: underline; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-links li { margin: 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover, .footer-links a:focus { text-decoration: underline; }
.linklike { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.linklike:hover { text-decoration: none; }
.footer-sub { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--border); padding-block: 1rem; }
.footer-sub .muted { color: var(--muted); }
@media (max-width: 900px) {
  .footer-columns { grid-template-columns: 1fr; }
  .footer-inputs { grid-template-columns: 1fr; }
  .footer-sub { flex-direction: column; align-items: flex-start; gap: .5rem; }
}
/* Sakrij honeypot polje */
.th-newsletter-form .hp {
  display: none !important; visibility: hidden; position: absolute !important;
  left: -9999px; height: 0; width: 0; overflow: hidden;
}

/* =========================================================
   FRONT PAGE: CSS-ONLY FIX ZA SIDEBAR I PRAZNU KOLONU
   ========================================================= */
/* @media (max-width: 900px){
  /* sakrij sidebar/rail na početnoj */
/*   body.home aside,
  body.home [role="complementary"],
  body.home .sidebar,
  body.home .site-sidebar,
  body.home .th-sidebar,
  body.home .rail{
    display:none !important;
  }
  /* sruši inline 2-kolonske definicije na 1 kolonu */
/*   body.home .grid[style*="grid-template-columns"]{
    grid-template-columns:1fr !important;
  }
  /* raširi djecu preko cijele širine */
/*   body.home .grid[style*="grid-template-columns"] > *{
    grid-column:1 / -1 !important;
  }
}*/
/*@media (min-width: 901px){
  body.home .sidebar,
  body.home .rail,
  body.home [role="complementary"],
  body.home aside[aria-label="Sidebar"]{
    display:block !important;
  }
}*/

/* Layout s railom (main + sidebar) */
.grid--with-rail{
  display:grid;
  grid-template-columns:3fr 1fr;
  gap:2rem;
}

/* Mobile/tablet: 1 kolona, sakrij sidebar */
@media (max-width:900px){
  .grid--with-rail{ grid-template-columns:1fr; gap:1rem; }
  .grid--with-rail .sidebar{ display:none !important; }
}

/* Desktop safety: obavezno prikaži sidebar iznad 900px */
@media (min-width:901px){
  .grid--with-rail .sidebar{ display:block !important; }
}

/* ===== Frontpage sekcije: "All articles →" link ===== */
.section-more a {
  font-size: .9rem;
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}
.section-more a:hover { text-decoration: underline; }

/* Desktop: sakrij "All articles" jer je naslov klikabilan */
.section-more.mobile-only { display: none; }

/* Mobilni prikaz (≤900px): prikaži link ispod naslova */
@media (max-width:900px){
  .section-more.mobile-only { display: block; margin-top: .35rem; }
  .section-header { flex-direction: column; align-items: flex-start; }
}

/* ===== Responsive ===== */
@media (max-width:680px){
  .search input{min-width:0;width:120px}
  .nav-inner{display:none}
  .nav-inner.open{display:flex;flex-direction:column;gap:.3rem;padding:.5rem 0}
  .hero-grid{grid-template-columns:1fr}
  .secondary{grid-template-columns:1fr}
  .section-grid{grid-template-columns:1fr}      /* RED 512: 1 kolona na mobitelu */
  .footer-grid{grid-template-columns:1fr}
}

/* ===== Source attribution ===== */
.source-box a:hover {
  text-decoration: underline;
}

.th-sourcebox {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  font-size: .95rem;
  color: var(--muted);
}
.th-sourcebox a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.th-sourcebox a:hover { text-decoration: underline; }

/* Inline prikaz kategorija/tagova ispod naslova */
.entry-footer ul.post-categories,
.entry-footer ul.post-tags,
.post-meta ul,
.post-categories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem; /* razmak između tagova */
}

.entry-footer ul.post-categories li,
.entry-footer ul.post-tags li,
.post-categories li {
  display: inline;
  margin: 0;
}

.entry-footer ul.post-categories a,
.entry-footer ul.post-tags a,
.post-categories a {
  text-decoration: none;
  color: #60a5fa; /* svijetlo plava – možeš prilagoditi */
}

.entry-footer ul.post-categories a:hover,
.entry-footer ul.post-tags a:hover,
.post-categories a:hover {
  text-decoration: underline;
}

/* ===== FIX: Pages on mobile = 1 column, same as category ===== */
@media (max-width: 680px){
  /* Stranice: sruši sve gridove na jednu kolonu */
  body.page .section-grid,
  body.page .grid-1x4,
  body.page .grid-2x4,
  body.page .grid-1x3 {
    grid-template-columns: 1fr !important;
  }

  /* Ako je gdje ostao rail layout, sruši ga i sakrij sidebar */
  body.page .grid--with-rail {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  body.page .grid--with-rail .sidebar,
  body.page aside.sidebar {
    display: none !important;
  }

  /* Veći card vizual (kao kategorije): velika slika i malo veći naslov */
  body.page .section-grid .card-media,
  body.page .grid-1x4 .card-media,
  body.page .grid-2x4 .card-media {
    aspect-ratio: 16/9;
  }
  body.page .section-grid .post-title,
  body.page .grid-1x4 .post-title,
  body.page .grid-2x4 .post-title {
    font-size: 1.08rem;
    line-height: 1.3;
  }
}

/* ===== FINAL MOBILE FIX: category/page = 1 kolona, bez "mrtve" desne kolone ===== */
@media (max-width: 680px){
  /* Sruši SVE gride na 1 kolonu na category i page */
  body.archive .grid,
  body.archive .grid-1x4,
  body.archive .grid-2x4,
  body.archive .grid-1x3,
  body.page .grid,
  body.page .grid-1x4,
  body.page .grid-2x4,
  body.page .grid-1x3,
  body.archive .grid--with-rail,
  body.page .grid--with-rail {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Forsiraj da SVA djeca budu preko pune širine (ukloni “drugu kolonu”) */
  body.archive .grid > *,
  body.page .grid > *,
  body.archive .grid--with-rail > *,
  body.page   .grid--with-rail > * {
    grid-column: 1 / -1 !important;
  }

  /* Ukloni sidebar ako ga neki template ipak isporuči */
  body.archive .sidebar,
  body.page .sidebar,
  body.archive aside[aria-label="Sidebar"],
  body.page aside[aria-label="Sidebar"] {
    display: none !important;
  }
}

/* Honeypot za newsletter formu */
.hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}
