@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

/* =========================================================
   0) SCOPE: samo single blog post content
   ========================================================= */
.single-post .entry-content,
.single-post .entry-content p,
.single-post .entry-content li {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Naslovi */
.single-post .entry-content h1,
.single-post .entry-content h2,
.single-post .entry-content h3 {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em; /* suptilno “clean” */
}

/* Global scale (tvoj) */
.single-post .entry-content {
  --type-scale: 1.3;
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
}

/* Paragraf / liste */
.single-post .entry-content p,
.single-post .entry-content li {
  font-size: calc(1.0625rem * var(--type-scale));
  line-height: 1.75;
  margin: 0 0 calc(1.05rem * var(--type-scale));
  color: #232a31; /* malo “crisper” od default sivila */
}

/* Naslovi (zadržan tvoj koncept, samo malo finije margine) */
.single-post .entry-content h1 {
  font-size: clamp(
    calc(2.0rem * var(--type-scale)),
    4vw,
    calc(2.85rem * var(--type-scale))
  );
  line-height: 1.06;
  margin: 0 0 calc(0.95rem * var(--type-scale));
}

.single-post .entry-content h2 {
  font-size: clamp(
    calc(1.55rem * var(--type-scale)),
    2.4vw,
    calc(2.05rem * var(--type-scale))
  );
  line-height: 1.18;
  margin: calc(1.9rem * var(--type-scale)) 0 calc(0.7rem * var(--type-scale));
}

.single-post .entry-content h3 {
  font-size: clamp(
    calc(1.22rem * var(--type-scale)),
    1.7vw,
    calc(1.55rem * var(--type-scale))
  );
  line-height: 1.22;
  margin: calc(1.35rem * var(--type-scale)) 0 calc(0.55rem * var(--type-scale));
}

/* Liste */
.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0 0 calc(1.05rem * var(--type-scale)) calc(1.25rem * var(--type-scale));
}

.single-post .entry-content li {
  margin: calc(0.35rem * var(--type-scale)) 0;
}

/* =========================================================
   1) LINKOVI: premium underline + bolji hover
   ========================================================= */
.single-post .entry-content a {
  color: #0b7a3b;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.single-post .entry-content a:hover {
  color: #075c2d;
  text-decoration-thickness: 0.11em;
}

/* Focus visible (tastatura) */
.single-post .entry-content a:focus-visible {
  outline: 3px solid rgba(11, 122, 59, 0.30);
  outline-offset: 3px;
  border-radius: 8px;
}

/* =========================================================
   2) TABLES: čitljivost + premium header + stabilan layout
   ========================================================= */
.single-post .entry-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: calc(1.25rem * var(--type-scale)) 0;
  background: #ffffff;
  border: 1px solid #dbe3ea;
  border-radius: 12px;
  overflow: hidden; /* da radius radi */
}

.single-post .entry-content th,
.single-post .entry-content td {
  padding: calc(0.65rem * var(--type-scale)) calc(0.75rem * var(--type-scale));
  vertical-align: top;
}

/* High-contrast header */
.single-post .entry-content thead th {
  background: #0b7a3b;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.92rem; /* namerno malo “tight” da ne eksplodira */
  line-height: 1.2;
  border-bottom: 1px solid rgba(255,255,255,.16);
}

/* Separation između header kolona */
.single-post .entry-content thead th + th {
  border-left: 1px solid rgba(255,255,255,.14);
}

/* Body grid */
.single-post .entry-content tbody td {
  border-top: 1px solid #eef2f7;
}

/* Zebra suptilno */
.single-post .entry-content tbody tr:nth-child(even) td {
  background: #fafafa;
}

/* Bolje lomljenje dugih reči u tabeli */
.single-post .entry-content td,
.single-post .entry-content th {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

/* =========================================================
   3) RESPONSIVE: telefon (tabela scroll + lep padding)
   ========================================================= */
@media (max-width: 768px) {
  .single-post .entry-content {
    max-width: 94vw;
    padding-left: 3vw;
    padding-right: 3vw;
    --type-scale: 1.18; /* malo smanji na telefonu da deluje prirodnije */
  }

  .single-post .entry-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* bitno: zadrži “realnu” širinu da horizontal scroll radi */
  .single-post .entry-content table thead,
  .single-post .entry-content table tbody {
    display: table;
    width: 100%;
    min-width: 720px;
  }

  /* header na telefonu: malo veći i čitljiviji */
  .single-post .entry-content thead th {
    font-size: 0.95rem;
    letter-spacing: 0.035em;
  }
}

@media (max-width: 600px) {
  .single-post .entry-content table thead,
  .single-post .entry-content table tbody {
    min-width: 780px;
  }
}