/* hepatolog.az - single article page.
   Scoped to the .ar_* blocks used only on article pages. */

/* ---------- header ---------- */

.ar_head_sec {
  padding: 70px 0 0;
}

.ar_head {
  max-width: 820px;
}

.ar_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: #9099a8;
}

.ar_meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ar_meta i {
  color: var(--coral);
}

.ar_cat {
  display: inline-flex;
  align-items: center;
  padding: 6px 15px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--wine);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  transition: all 0.3s var(--ease);
}

.ar_cat:hover {
  background: var(--coral);
  color: #fff;
}

.ar_head h1 {
  margin-top: 22px;
  font-size: 40px;
  line-height: 1.22;
  font-weight: 700;
  color: var(--wine);
}

.ar_byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-soft);
}

.ar_author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ar_author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 0 0 3px var(--coral-soft);
}

.ar_author strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--wine);
}

.ar_author span {
  display: block;
  font-size: 14px;
  color: #6b7280;
}

.ar_share {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ar_share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--ink-soft);
  color: var(--wine);
  font-size: 15px;
  transition: all 0.3s var(--ease);
}

.ar_share a:hover {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
  transform: translateY(-3px);
}

/* ---------- layout ---------- */

.ar_body_sec {
  padding: 40px 0 100px;
}

.ar_layout {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 46px;
  align-items: start;
}

/* ---------- article ---------- */

.ar_hero {
  margin: 0 0 36px;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #f7fbfd 0%, var(--surface) 100%);
  border: 1px solid var(--ink-soft);
}

.ar_hero img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
}

/* video in place of the lead image */
.ar_hero_video .ar_embed {
  border: 0;
  border-radius: 12px;
  box-shadow: none;
}

.ar_article p {
  font-size: 17px;
  line-height: 32px;
  color: #3f4756;
}

.ar_article p + p {
  margin-top: 18px;
}

.ar_lead {
  padding-left: 22px;
  border-left: 4px solid var(--coral);
  font-size: 20px !important;
  line-height: 34px !important;
  font-weight: 600;
  color: var(--wine) !important;
}

.ar_article h2 {
  margin-top: 42px;
  margin-bottom: 16px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--wine);
}

.ar_list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ar;
}

.ar_list li {
  position: relative;
  counter-increment: ar;
  padding: 14px 20px 14px 60px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--surface);
  font-size: 16px;
  line-height: 28px;
  color: #3f4756;
  transition: all 0.3s var(--ease);
}

.ar_list li::before {
  content: counter(ar);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red) 0%, var(--wine-deep) 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.ar_list li:hover {
  background: #fff;
  box-shadow: 0 14px 26px -20px rgba(22, 47, 98, 0.5);
  transform: translateX(3px);
}

/* ---------- figures ---------- */

.ar_figs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 28px 0;
}

/* одиночная картинка занимает всю ширину колонки, а не половину */
.ar_figs > :only-child {
  grid-column: 1 / -1;
}

.ar_figs > .ar_zoom {
  box-shadow: 0 14px 34px -22px rgba(22, 47, 98, 0.6);
}

.ar_figs img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.ar_figs > .ar_zoom:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.ar_fig {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--ink-soft);
  box-shadow: 0 3px 14px -10px rgba(22, 47, 98, 0.4);
  transition: all 0.3s var(--ease);
}

.ar_fig img {
  display: block;
  width: 100%;
  border-radius: 10px;
}

.ar_fig figcaption {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--wine);
}

.ar_fig:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 22px 38px -24px rgba(119, 28, 46, 0.45);
}

/* ---------- video ---------- */

.ar_video {
  margin-top: 10px;
}

.ar_embed {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--ink-soft);
  box-shadow: 0 26px 46px -30px rgba(22, 47, 98, 0.6);
  background: #000;
}

.ar_embed iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

/* ---------- tags ---------- */

.ar_tags {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-soft);
}

.ar_tags h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #6b7280;
}

.ar_tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.ar_tags a {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--wine);
  font-size: 15px;
  transition: all 0.3s var(--ease);
}

.ar_tags a:hover {
  background: var(--coral);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- sidebar ---------- */

.ar_side {
  position: sticky;
  top: 24px;
}

.ar_side .widget {
  margin-bottom: 26px;
}

.ar_side .widget:last-child {
  margin-bottom: 0;
}

/* ---------- responsive ---------- */

@media (max-width: 1199px) {
  .ar_layout { grid-template-columns: minmax(0, 1fr); gap: 50px; }
  .ar_side { position: static; }
}

@media (max-width: 991px) {
  .ar_head_sec { padding-top: 56px; }
  .ar_head h1 { font-size: 32px; }
  .ar_article h2 { font-size: 23px; }
}

@media (max-width: 767px) {
  .ar_head h1 { font-size: 26px; }
  .ar_body_sec { padding: 30px 0 70px; }
  .ar_hero { padding: 16px; }
  .ar_figs { grid-template-columns: minmax(0, 1fr); }
  .ar_lead { font-size: 18px !important; line-height: 30px !important; }
  .ar_byline { justify-content: flex-start; }
}

/* ---------- sidebar: recent posts ---------- */

.ar_recent ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ar_recent li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(22, 47, 98, 0.08);
}

.ar_recent li:first-child {
  padding-top: 4px;
}

.ar_recent li:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.ar_rc_thumb {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px -8px rgba(22, 47, 98, 0.6);
}

.ar_rc_thumb img {
  display: block;
  width: 92px;
  height: 66px;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.ar_rc_body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.ar_rc_title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--wine);
  transition: color 0.3s var(--ease);
}

.ar_rc_date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9099a8;
}

.ar_rc_date i {
  color: var(--coral);
  font-size: 12px;
}

.ar_recent li:hover .ar_rc_thumb img {
  transform: scale(1.08);
}

.ar_recent li:hover .ar_rc_title {
  color: var(--coral);
}

.ar_rc_all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(22, 47, 98, 0.08);
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  color: var(--wine);
  transition: color 0.3s var(--ease);
}

.ar_rc_all i {
  transition: transform 0.3s var(--ease);
}

.ar_rc_all:hover {
  color: var(--coral);
}

.ar_rc_all:hover i {
  transform: translateX(4px);
}

/* ---------- image zoom ---------- */

.ar_zoom {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
}

.ar_zoom::after {
  content: "\f00e";
  font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(20, 24, 31, 0.6);
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s var(--ease);
}

.ar_fig:hover .ar_zoom::after {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- lists inside the article body ---------- */
/* тема глушит маркеры глобально (body ul li { list-style: none }) —
   в тексте статьи списки должны выглядеть как списки */

.ar_article ul,
.ar_article ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.ar_article ul li,
.ar_article ol li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 18px;
  color: #4a5568;
  font-size: 17px;
  line-height: 30px;
  list-style: none;
}

.ar_article ol li {
  counter-increment: ar_li;
}

.ar_article ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.ar_article ol {
  counter-reset: ar_li;
}

.ar_article ol li::before {
  content: counter(ar_li) ".";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--wine);
  font-weight: 700;
}

@media (max-width: 767px) {
  .ar_article ul li,
  .ar_article ol li {
    font-size: 16px;
    line-height: 28px;
  }
}

/* ---------- медицинская оговорка и запись на приём ---------- */

.ar_note {
  margin: 34px 0 0;
  padding: 18px 22px;
  border-left: 3px solid var(--coral);
  border-radius: 0 14px 14px 0;
  background: var(--coral-soft, rgba(252, 117, 117, 0.12));
}

.ar_note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--wine);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ar_note p {
  margin: 0;
  color: #4a5568;
  font-size: 16px;
  line-height: 27px;
}

.ar_cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  padding: 24px 26px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--wine-deep) 0%, var(--red) 100%);
  color: #fff;
}

.ar_cta strong {
  display: block;
  font-size: 19px;
}

.ar_cta span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 24px;
  opacity: 0.85;
}

.ar_cta_actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.ar_cta .theme_btn {
  background-image: none;
  background: #fff;
  color: var(--wine) !important;
}

.ar_cta .theme_btn:hover {
  background: var(--coral);
  color: #fff !important;
}

.ar_cta_link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ar_cta_link:hover { color: var(--coral); }

.ar_dates {
  display: block;
  margin-top: 4px;
  color: #7a8699;
  font-size: 14px;
}

.ar_dates time + time::before {
  content: " · ";
}

@media (max-width: 600px) {
  .ar_cta { flex-direction: column; align-items: flex-start; }
}

/* текстовая страница без сайдбара */
.ar_article_wide {
  max-width: 860px;
  margin: 0 auto;
}

/* ---------- источники под статьёй ---------- */

.ar_sources {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--ink-soft);
}

.ar_sources h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.ar_sources ul { margin: 0; padding-left: 22px; }

.ar_sources li::before { background: var(--wine); }

.ar_sources a {
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ar_sources a:hover { color: var(--coral); }

/* ---------- частые вопросы ---------- */

.faq_item {
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-soft);
}

.faq_item:first-of-type { border-top: 1px solid var(--ink-soft); }

.faq_item h2 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.35;
  color: var(--wine);
}

.faq_item p {
  margin: 0;
  color: #4a5568;
  font-size: 17px;
  line-height: 30px;
}

@media (max-width: 767px) {
  .faq_item h2 { font-size: 18px; }
  .faq_item p { font-size: 16px; line-height: 28px; }
}
