/* =========================================================
   a11y-overrides.css – heading hierarchy for WP content
   ========================================================= */

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h1,h2,h3,h4,h5,h6, .h1,.h2,.h3,.h4,.h5,.h6){
  margin-top: 0;
  margin-bottom: 0.6rem;
  line-height: 1.15;
  color: var(--bs-heading-color);
}

/* zgornji razmak samo, če naslov NI prvi element v tem content kontejnerju */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h1,h2,h3,h4,h5,h6, .h1,.h2,.h3,.h4,.h5,.h6):not(:first-child){
  margin-top: 1.25rem;
}

/* manjši razmak, če je naslov takoj za naslovom */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h1,h2,h3,h4,h5,h6) + :where(h1,h2,h3,h4,h5,h6){
  margin-top: 0.75rem;
}

/* font-weight hierarhija */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h1,.h1){ font-weight: 700; letter-spacing: -0.02em; }

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h2,.h2){ font-weight: 650; letter-spacing: -0.015em; }

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h3,.h3){ font-weight: 500; }

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h4,.h4){ font-weight: 400; }

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h5,.h5){ font-weight: 400; }

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
:where(h6,.h6){
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* bralna udobnost */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article) p{
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Izjema: kadar odstavku sledi seznam, zmanjšaj razmik */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
p:has(+ ul),
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
p:has(+ ol){
  margin-bottom: 0.5rem !important; /* poskusi 0.5rem; po želji 0.25rem */
}

/* In še: zmanjšaj zgornji razmik seznama, ko pride takoj za odstavkom */
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
p + ul,
:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article)
p + ol{
  margin-top: 0.15rem !important;  /* po želji 0 */
}


/* (neaktivno) ločnica za h2 – odkomentiraj, če boš želel več razločnosti 

:where(.entry-content, .wp-block-post-content, .post-content, .page-content, main, article) :where(h2,.h2){
  padding-bottom: 0.25rem;
  border-bottom: 2px solid rgba(var(--bs-primary-rgb), 0.66);
*/

.vsebina h2,
.vsebina .h2 {
	padding-bottom: 0.25rem;
	border-bottom: 2px solid rgba(var(--bs-primary-rgb), 0.66);
}

