/**
 * Base single post layout styles
 * 
 * Global layout helpers only - section-specific styles in parts/
 */

.single-content__article {
    text-align: justify;
}

.single-content__article p {
    text-align: justify;
}

section.single-references {
    max-width: 900px;
    margin: 0 auto;
}

article.single-content__article {
    padding: 1em;
}

/* ================================
   Single References (ACF)
   ================================ */

.single-references {
  margin-top: clamp(1.25rem, 3vw, 2.5rem);
}

a.single-references__link {
    font-size: smaller;
}

.single-references__inner {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: clamp(1rem, 2.2vw, 1.5rem);
  background: #fff;

}

/* Header */
.single-references__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Small accent dot */
.single-references__title::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.25;
}

/* List layout */
.single-references__list {
  margin: 0;
  padding: 0;
  list-style: none;

  display: grid;
  grid-template-columns: 1fr;
}

.single-references__title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.single-references__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.6rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.08);
}

.single-references__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.single-references__num {
  flex: 0 0 auto;
  width: 2.25rem;
  text-align: right;
  font-weight: 700;
  opacity: 0.7;
  line-height: 1.4;
}



/* Link card */
.single-references__link {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;

  text-decoration: none;
  padding: 0.85rem 0.9rem;

  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.0));

  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  will-change: transform;
}



/* Link text formatting */
.single-references__link {
  color: inherit;
  line-height: 1.35;
  word-break: break-word;
}

.single-content__article > p:first-of-type {
    position: relative;
   
    min-height: 140px;
}

.single-content__article > p:first-of-type::first-letter {
    position: absolute;
    left: -10px;
    top: -25px;
    font-size: 180px;
    line-height: 1;
    font-weight: 900;
    color: #559da4;
    z-index: -1;
}

/* Style in-text reference links */
a[href^="#ref-"] {
    color: #559da4;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85em;
    vertical-align: super;
    padding: 0 3px;
    transition: all 0.2s ease;
}

a[href^="#ref-"]:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Highlight referenced item when jumped to */
.single-references__item:target {
    background-color: #fff3cd;
    padding: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Optional: Add scroll offset if you have a sticky header */
.single-references__item:target::before {
    content: "";
    display: block;
    height: 80px; /* Adjust to your header height */
    margin-top: -80px;
    visibility: hidden;
}
.wp-block-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
}

.wp-block-list li {
    padding-left: 1.5em;
    margin-bottom: 0.75em;
    position: relative;
    line-height: 1.6;
}

.wp-block-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #559da4;
    font-weight: bold;
}

ol.wp-block-list {
    counter-reset: item;
    list-style: none;
    padding-left: 0;
    margin: 1.5em 0;
}

ol.wp-block-list li {
    counter-increment: item;
    padding-left: 3em;
    margin-bottom: 1em;
    position: relative;
    line-height: 1.7;
}

ol.wp-block-list li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #559da4;
    font-size: 1.1em;
    min-width: 2em;
}

/* Dark mode support (if your site uses prefers-color-scheme) */
@media (prefers-color-scheme: dark) {
  .single-references__inner {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: none;
  }

  .single-references__link {
    border-color: rgba(255, 255, 255, 0.10);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  }



  .single-references__link::before {
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.78);
  }

  .single-references__link::after {
    opacity: 0.55;
  }
}
  