/**
 * Articles archive — editorial premium redesign.
 * Loaded after articles.css.
 */

body.blog,
body.archive {
  --art-ink: #102c45;
  --art-muted: #64798a;
  --art-blue: #147cac;
  --art-teal: #18b8a5;
  --art-orange: #ed6b18;
  --art-line: #d9e6ec;
  background: #f4f8fb;
}

.articlesHero {
  display: flex;
  min-height: 410px;
  padding: 0 24px;
  align-items: center;
  overflow: hidden;
  text-align: left;
  background:
    radial-gradient(circle at 78% 22%, rgba(62, 214, 196, .24), transparent 26%),
    linear-gradient(115deg, #082f4c 0%, #0a526f 52%, #158c91 100%);
}

.articlesHero::before {
  top: -160px;
  right: -35px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 76px rgba(255, 255, 255, .035),
    0 0 0 158px rgba(255, 255, 255, .02);
}

.articlesHero::after {
  top: auto;
  right: 10%;
  bottom: -98px;
  left: auto;
  width: 290px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 30px 30px 0 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  box-shadow:
    -46px -42px 0 -1px rgba(255, 255, 255, .045),
    -46px -42px 0 0 rgba(255, 255, 255, .09);
  transform: rotate(-7deg);
  backdrop-filter: blur(4px);
}

.articlesHeroTitle,
.articlesHeroSub {
  width: 100%;
  max-width: 1217px;
  margin-right: auto;
  margin-left: auto;
}

.articlesHeroTitle {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  margin: -78px 0 0;
  color: #fff;
  font-size: clamp(54px, 6.5vw, 82px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
  transform: translate(-50%, -50%);
}

.articlesHeroTitle::before {
  content: "Медицинский журнал";
  display: block;
  margin-bottom: 16px;
  color: #8ce0d5;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.articlesHeroSub {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  max-width: 1217px;
  margin: 48px 0 0;
  padding-right: 480px;
  color: rgba(255, 255, 255, .75);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.65;
  transform: translate(-50%, -50%);
}

.articlesHeroSub::after {
  content: "Экспертные материалы простым языком";
  display: flex;
  width: max-content;
  min-height: 36px;
  margin-top: 22px;
  padding: 0 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  backdrop-filter: blur(10px);
}

.articlesGrid {
  display: grid;
  width: 100%;
  max-width: 1265px;
  margin: 0 auto;
  padding: 58px 24px 42px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.articleCard {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(211, 225, 232, .95);
  border-radius: 24px;
  background: #fff;
  color: inherit;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(16, 51, 74, .075);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.articleCard:hover {
  border-color: rgba(20, 124, 172, .28);
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(16, 51, 74, .14);
}

.articleCard:first-child {
  display: grid;
  grid-column: span 2;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, .82fr);
}

.articleCard:first-child .articleCardImgWrap {
  height: 100%;
  min-height: 390px;
  aspect-ratio: auto;
}

.articleCard:first-child .articleCardBody {
  min-width: 0;
  padding: 32px 30px 28px;
}

.articleCard:first-child .articleCardTitle {
  font-size: clamp(23px, 2.15vw, 30px);
  line-height: 1.2;
}

.articleCard:first-child .articleCardDesc {
  font-size: 15px;
}

.articleCardImgWrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9.5;
  background: #eaf2f5;
}

.articleCardImgWrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 92px;
  background: linear-gradient(transparent, rgba(6, 40, 61, .15));
  pointer-events: none;
}

.articleCardImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.articleCard:hover .articleCardImg {
  transform: scale(1.04);
}

.articleCardBadge {
  display: inline-flex !important;
  z-index: 2;
  top: 15px;
  left: 15px;
  min-height: 30px;
  padding: 0 11px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 9px;
  background: rgba(8, 72, 93, .84) !important;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .08em;
  box-shadow: 0 7px 18px rgba(6, 39, 59, .16);
  backdrop-filter: blur(10px);
}

.articleCardBody {
  display: flex;
  min-width: 0;
  min-height: 198px;
  padding: 22px 22px 20px;
  flex: 1;
  flex-direction: column;
}

.articleCardTitle {
  margin: 0 0 9px;
  max-width: 100%;
  overflow-wrap: anywhere;
  hyphens: auto;
  color: var(--art-ink);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.025em;
}

.articleCardDesc {
  margin: 0 0 18px;
  flex: 1;
  color: var(--art-muted);
  font-size: 13px;
  line-height: 1.65;
}

.articleCardLink {
  display: flex;
  min-height: 42px;
  padding: 0 13px;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  background: #eef7fa;
  color: #176c93;
  font-size: 11px;
  font-weight: 800;
  transition: color .2s ease, background-color .2s ease;
}

.articleCardLink::after {
  content: "→";
  font-size: 16px;
  font-weight: 500;
}

.articleCard:hover .articleCardLink {
  background: linear-gradient(135deg, #147cac, #18b8a5);
  color: #fff;
}

.articlesPagination {
  max-width: 1265px;
  margin: 0 auto;
  padding: 8px 24px 78px;
}

.articlesPagination .nav-links {
  gap: 9px;
}

.articlesPagination .page-numbers {
  min-width: 46px;
  height: 46px;
  border: 1px solid var(--art-line);
  border-radius: 13px;
  background: #fff;
  color: #536a7b;
  box-shadow: 0 6px 18px rgba(16, 51, 74, .05);
}

.articlesPagination .page-numbers:hover {
  border-color: rgba(20, 124, 172, .45);
  background: #f2fafb;
  color: var(--art-blue);
  box-shadow: 0 10px 24px rgba(20, 124, 172, .1);
}

.articlesPagination .page-numbers.current,
.articlesPagination .prev.page-numbers:hover,
.articlesPagination .next.page-numbers:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #147cac, #18b8a5);
  color: #fff;
  box-shadow: 0 9px 22px rgba(20, 124, 172, .2);
}

.articlesPagination .prev.page-numbers,
.articlesPagination .next.page-numbers {
  border-color: #d6e5eb;
  background: #fff;
  color: var(--art-blue);
}

@media (max-width: 980px) {
  .articlesHeroSub {
    padding-right: 300px;
  }

  .articlesGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .articleCard:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .articlesHero {
    min-height: 360px;
    padding: 0 20px;
  }

  .articlesHero::after {
    display: none;
  }

  .articlesHeroTitle {
    margin-top: -70px;
    padding: 0 20px;
    font-size: clamp(48px, 15vw, 66px);
  }

  .articlesHeroSub {
    margin-top: 50px;
    padding: 0 20px;
    font-size: 15px;
  }

  .articlesGrid {
    padding: 34px 16px 30px;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .articleCard:first-child {
    display: flex;
    grid-column: auto;
  }

  .articleCard:first-child .articleCardImgWrap {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .articleCard:first-child .articleCardBody {
    padding: 24px 22px 21px;
  }

  .articleCard:first-child .articleCardTitle {
    font-size: 23px;
  }

  .articlesPagination {
    padding: 6px 16px 58px;
  }
}

@media (max-width: 480px) {
  .articlesHeroSub::after {
    width: 100%;
    justify-content: center;
    font-size: 10px;
  }

  .articlesPagination .prev.page-numbers,
  .articlesPagination .next.page-numbers {
    padding: 0 12px;
    font-size: 0;
  }

  .articlesPagination .prev.page-numbers svg,
  .articlesPagination .next.page-numbers svg {
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .articleCard,
  .articleCardImg,
  .articleCardLink,
  .articlesPagination .page-numbers {
    transition: none;
  }
}
