/* ============================================================
   ГБУЗ «Областной перинатальный центр» — типовая контентная страница
   Стили: чистый CSS3, mobile-first, @layer, light-dark()
   ============================================================ */

@layer components {

  /* ============================================================
     СТРАНИЦА
     ============================================================ */
  .page {
    padding-block: var(--sp-3) var(--sp-6);
  }

  /* ============================================================
     ХЛЕБНЫЕ КРОШКИ
     ============================================================ */
  .breadcrumbs {
    margin-bottom: var(--sp-1);
    font-size: .9rem;
    color: var(--muted);
  }
  .breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
  }
  .breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .breadcrumbs__item + .breadcrumbs__item::before {
    content: "";
    display: inline-block;
    width: 0.7em;
    height: 0.7em;
    background: currentColor;
    opacity: 0.55;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .breadcrumbs__item a { color: var(--muted); }
  .breadcrumbs__item a:hover { color: var(--accent); }
  .breadcrumbs__item[aria-current="page"] {
    color: var(--fg);
    font-weight: 200;
    opacity: .7;
  }

  /* ============================================================
     ЗАГОЛОВОК СТРАНИЦЫ
     ============================================================ */
  .page-head {
    margin-bottom: var(--sp-5);
  }
  .page-head__eyebrow {
    font-size: var(--fs-meta);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: var(--sp-2);
  }
  .page-head__title {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.08;
    text-wrap: balance;
  }
  .page-head__lead {
    margin-top: var(--sp-3);
    font-size: var(--fs-lead);
    font-weight: 200;
    color: var(--muted);
  }

  /* ============================================================
     РАСКЛАДКА: ПОДРАЗДЕЛЫ + КОНТЕНТ
     ============================================================ */
  .page__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
    align-items: start;
  }

  @media (min-width: 1024px) {
    .page__layout {
      grid-template-columns: 340px 1fr;
      gap: var(--sp-5);
    }
  }

  /* ============================================================
     ПОДРАЗДЕЛЫ (боковая навигация, native details/summary)
     ============================================================ */
  .subnav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-4);
    overflow: hidden;
  }

  .subnav__list { display: flex; flex-direction: column; }

  .subnav__item + .subnav__item { border-top: 1px solid var(--border); }

  .subnav__group { display: block; }

  .subnav__summary {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    width: 100%;
    padding-inline-end: 0.5rem;
  }
  .subnav__summary-link {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.85rem var(--sp-2) 0.85rem var(--sp-3);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--fg);
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  .subnav__summary-link:hover {
    color: var(--accent);
  }
  .subnav__toggle {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-1);
    color: var(--muted);
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  .subnav__toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }
  .subnav__caret {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    transition: transform 0.2s ease;
  }
  .subnav__group.is-open .subnav__caret { transform: rotate(180deg); }

  .subnav__sublist {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0 0.5rem;
    background: var(--secondary);
  }
  .subnav__sublist[hidden] { display: none; }
  .subnav__sublink {
    display: block;
    padding: 0.55rem var(--sp-3) 0.55rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 200;
    color: var(--fg);
    border-inline-start: 2px solid transparent;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  }
  .subnav__sublink:hover {
    color: var(--accent);
    background: var(--accent-soft);
    border-inline-start-color: var(--accent);
  }

  .subnav__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem var(--sp-3);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--fg);
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  .subnav__link:hover {
    background: var(--accent-soft);
    color: var(--accent);
  }

  .subnav__summary-link.is-active,
  .subnav__link.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 600;
  }
  .subnav__sublink.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    border-inline-start-color: var(--accent);
    font-weight: 600;
  }

  @media (min-width: 1024px) {
    .subnav { position: sticky; top: var(--sp-3); }
  }

  /* ============================================================
     КОНТЕНТ (типографика)
     ============================================================ */
  .article {
    min-width: 0;
  }

  .article__section + .article__section {
    margin-top: var(--sp-5);
    padding-top: var(--sp-5);
    border-top: 1px solid var(--border);
  }

  .article__section {
    scroll-margin-top: var(--sp-4);
  }

  .article h2 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--sp-3);
  }
  .article h3 {
    font-size: var(--fs-h3);
    margin-bottom: var(--sp-2);
  }
  .article p {
    margin-bottom: var(--sp-3);
    color: var(--fg);
    font-weight: 300;
  }
  .article p:last-child { margin-bottom: 0; }
  .article a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }
  .article a:hover { color: var(--accent-hover); }
  .article strong { font-weight: 600; }

  /* ============================================================
     СПИСКИ
     ============================================================ */
  .article__list {
    margin: 0 0 var(--sp-3);
    padding-inline-start: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  .article__list li {
    font-weight: 300;
    color: var(--fg);
    padding-inline-start: 0.25rem;
  }
  .article__list li::marker { color: var(--accent); font-weight: 600; }

  .article__list--ordered { list-style: decimal; }

  /* ============================================================
     ТАБЛИЦЫ
     ============================================================ */
  .table-wrap {
    margin-bottom: var(--sp-3);
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-2);
  }
  .table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 560px;
  }
  .table__caption {
    padding: var(--sp-2) var(--sp-3);
    text-align: start;
    font-weight: 600;
    color: var(--fg);
    border-bottom: 1px solid var(--border);
    background: var(--secondary);
    caption-side: top;
  }
  .table th,
  .table td {
    padding: 0.7rem var(--sp-3);
    text-align: start;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }
  .table thead th {
    font-weight: 600;
    font-size: var(--fs-meta);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--surface);
  }
  .table tbody tr:last-child td { border-bottom: none; }
  .table tbody tr:hover { background: var(--secondary); }
  .table tbody td { font-weight: 300; color: var(--fg); }

}

/* ============================================================
   ГБУЗ «Областной перинатальный центр» — страница «Новости»
   Стили: чистый CSS3, mobile-first, @layer, light-dark()
   ============================================================ */

@layer components {

  /* ============================================================
     СЕТКА НОВОСТЕЙ (mobile-first)
     ============================================================ */
  .news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }
  @media (min-width: 640px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 1024px) {
    .news-grid { grid-template-columns: repeat(4, 1fr); }
  }

  .news-post__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-4);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  }
  .news-post__link:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
  }

  .news-post__media {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: var(--accent-soft);
  }
  .news-post__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
  }
  .news-post__link:hover .news-post__media img { transform: scale(1.05); }

  .news-post__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--sp-3);
    flex: 1;
  }
  .news-post__date {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
  }
  .news-post__title {
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--fg);
    transition: color 0.2s ease;
  }
  .news-post__link:hover .news-post__title { color: var(--accent); }
  .news-post__text {
    font-size: 0.9rem;
    font-weight: 300;
    color: var(--muted);
  }

  /* ============================================================
     ДЕТАЛЬНАЯ СТРАНИЦА НОВОСТИ
     ============================================================ */
  .news-item {
    max-width: 98ch;
  }
  .news-item__head {
    margin-bottom: var(--sp-4);
  }
  .news-item__date {
    font-family: var(--font-mono);
    font-size: var(--fs-meta);
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
  }
  .news-item__title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin-top: var(--sp-2);
  }
  .news-item__body {
    font-weight: 300;
    color: var(--fg);
  }
  .news-item__body p {
    margin-bottom: var(--sp-3);
  }
  .news-item__body h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: var(--sp-4) 0 var(--sp-3);
  }
  .news-item__body .article__list {
    margin: 0 0 var(--sp-3);
    padding-inline-start: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: disc;
  }
  .news-item__body .article__list li { padding-inline-start: 0.25rem; }
  .news-item__body .article__list li::marker { color: var(--accent); font-weight: 600; }
  .news-item__body .blockquote {
    margin: var(--sp-3) 0;
  }

  .news-item__section {
    margin-top: var(--sp-5);
  }
  .news-item__subtitle {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--sp-3);
  }

  /* ============================================================
     ДРУГИЕ НОВОСТИ (горизонтальный ряд)
     ============================================================ */
  .news-more {
    max-width: 1500px;
    margin-top: var(--sp-6);
  }
  .news-more__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2-alt);
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: var(--sp-4);
  }
  .news-more__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  @media (min-width: 640px) {
    .news-more__list { grid-template-columns: repeat(2, 1fr); }
  }
  @media (min-width: 1024px) {
    .news-more__list { grid-template-columns: repeat(3, 1fr); }
  }
}
