/* =========================================================
   EBC – Kućni red
   ========================================================= */

/* ---------- Heroj ---------- */
.kr-hero__ring {
  top: -240px;
  right: -200px;
  width: 520px;
  height: 520px;
}

.kr-hero {
  --split-cols: minmax(0, 1.15fr) minmax(0, 0.85fr);
  position: relative;
  gap: 48px 64px;
  align-items: center;
  padding-top: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.kr-hero__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.kr-hero__title {
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.08;
}

.kr-hero__izvor {
  color: var(--muted);
  font-size: 14px;
}

/* Kartica dokumenta (PDF) */
.kr-doc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  justify-self: end;
}

.kr-doc__sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 200px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 24px 24px 8px 8px;
  background: var(--white);
  box-shadow: var(--shadow-panel);
}

.kr-doc__line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--ice-2);
}

.kr-doc__line--title {
  width: 70%;
  height: 16px;
  margin-bottom: 8px;
  background: var(--line-btn);
}

.kr-doc__line--short {
  width: 55%;
}

.kr-doc__card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: -64px;
  margin-inline: 20px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-float);
}

.kr-doc__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.kr-doc__meta strong {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 16px;
}

.kr-doc__meta span {
  color: var(--muted);
  font-size: 14px;
}

.kr-doc__btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  transition: background 0.2s ease;
}

.kr-doc__btn:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.kr-doc__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-inline: 20px;
}

.kr-doc__facts li {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line-soft);
}

.kr-doc__facts strong {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.kr-doc__facts span {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Najvažnije ukratko ---------- */
.ukratko {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.ukratko .heading {
  max-width: 760px;
}

.ukratko__note {
  color: var(--muted);
}

.odmor {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 32px 56px;
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: var(--ice);
}

.odmor__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.odmor__title {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.odmor__table-wrap {
  overflow-x: auto;
}

.odmor__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--white);
  font-variant-numeric: tabular-nums;
}

.odmor__table th,
.odmor__table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

.odmor__table tbody tr:last-child th,
.odmor__table tbody tr:last-child td {
  border-bottom: 0;
}

.odmor__table thead th {
  background: var(--ice-2);
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.odmor__table tbody th {
  color: var(--navy);
  font-weight: 700;
}

.odmor__table td {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.odmor__foot {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.faq-cards {
  gap: 20px;
}

.faq-card .title-card {
  margin-top: 4px;
}

.faq-card__text {
  font-size: 16px;
  line-height: 1.65;
}

.faq-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Ceo tekst odluke ---------- */
.law {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.law__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 900px;
}

.law__title {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: clamp(26px, 2.8vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.law__izvor,
.glava__izvor {
  color: var(--muted);
  font-size: 15px;
}

.law__grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* Sadržaj */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - var(--header-h) - 40px);
}

.toc__box {
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--white);
}

.toc__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.toc__summary::-webkit-details-marker {
  display: none;
}

.toc__summary svg {
  color: var(--muted);
  transition: transform 0.2s ease;
}

.toc__box[open] .toc__summary svg {
  transform: rotate(180deg);
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0 10px 14px;
  list-style: none;
}

.toc__glava {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.toc__glava span {
  min-width: 26px;
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
}

.toc__glava small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.toc__sub {
  display: flex;
  flex-direction: column;
  margin: 0 0 6px 36px;
  padding: 0;
  list-style: none;
}

.toc__sub a {
  display: block;
  padding: 5px 10px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}

.toc__glava:hover,
.toc__sub a:hover {
  background: var(--ice);
  color: var(--accent);
}

.toc__pdf {
  width: 100%;
  height: 52px;
}

/* Tekst */
.law__text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: clamp(24px, 4vw, 56px);
  border: 1px solid var(--line-soft);
  border-radius: 28px;
  background: var(--white);
}

.glava {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.glava + .glava {
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}

.glava__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.25;
}

.glava__title--small {
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.4;
}

.glava__rim {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 40px;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--ice-2);
  color: var(--accent);
  font-size: 18px;
}

.deo {
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--mint);
  color: var(--mint-ink-2);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.clan {
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.clan:target {
  margin-inline: -16px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--ice);
}

.clan__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  color: var(--navy);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.clan__num {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 15px;
  text-decoration: none;
}

.clan__num:hover {
  text-decoration: underline;
}

.clan p,
.clan__list {
  font-size: 16.5px;
  line-height: 1.75;
}

.clan__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 1.4em;
}

ul.clan__list {
  list-style: disc;
}

.clan__list li::marker {
  color: var(--accent);
}

.law__napomena {
  margin-top: 8px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ice);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Poziv ---------- */
.kr-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 48px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--mint-line);
  border-radius: 28px;
  background: var(--mint-soft);
}

.kr-cta__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
}

.cta__title {
  color: var(--navy);
  font-family: var(--font-head);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- Prilagođavanje ---------- */
@media (max-width: 980px) {
  .kr-doc {
    justify-self: start;
  }

  .odmor,
  .law__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 640px) {
  .odmor__table th,
  .odmor__table td {
    padding: 12px 10px;
  }

  .odmor__table td {
    font-size: 16px;
  }

  .clan:target {
    margin-inline: -8px;
    padding: 10px 8px;
  }
}

/* ---------- Štampa: samo tekst odluke ---------- */
@media print {
  .topbar,
  .site-header,
  .site-footer,
  .skip-link,
  .kr-doc,
  .btn-row,
  .toc,
  .kr-cta-section,
  .bubble {
    display: none !important;
  }

  body,
  .section {
    background: #fff;
  }

  .law__grid {
    display: block;
  }

  .law__text {
    padding: 0;
    border: 0;
  }

  .clan {
    break-inside: avoid;
  }
}
