/* Оптимизация шрифтов и анимации */
html {
  scroll-behavior: smooth;
}

a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

header nav a {
  font-weight: 500;
}

header nav a.active {
  border-bottom: 2px solid currentColor;
}

/* Мобильное меню */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  nav {
    display: none;
  }
  .mobile-nav {
    display: block;
  }
}
.contacts-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.contacts-card:hover {
  transform: translateY(-3px);
}

.contacts-icon img {
  width: 24px;
  height: 24px;
}
/* ==== AUTH CHIP & DROPDOWN ==== */
.auth-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  padding: 6px 10px;
  background: #fff;
}

.auth-chip__avatar {
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.auth-chip__email {
  max-width: 180px;
  font-size: 12px;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 6px;
  display: none;
  z-index: 60;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
}

.dropdown-menu button:hover {
  background: #f3f4f6;
}

@media (max-width: 1024px) {
  .auth-chip__email {
    max-width: 120px;
  }
}
.navbar-account { margin-left: 60px; }

/* === Footer (унифицировано для всех страниц) === */
.footer-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding-top:4px;
  padding-bottom:4px;
}
.footer-inner p{ margin:0; }

/* ряд соц-иконок */
.soc-row{
  list-style:none;
  padding:0;
  margin:0 0 0 16px;       /* отступ от текста © */
  display:flex;
  align-items:center;
  gap:14px;
}
.soc-row img{
  width:22px; height:22px; display:block;
  transition:transform .18s ease, opacity .18s ease;
  opacity:.95;
}
.soc-row a:hover img{ transform:scale(1.15); opacity:1; }

/* ссылки справа */
.footer-links{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  white-space:nowrap;
}

/* мобилка */
@media (max-width:640px){
  .footer-inner{ gap:8px; }
  .soc-row{ gap:16px; margin-left:0; }
  .soc-row img{ width:24px; height:24px; }
}

/* Размытие фона для модалки */
#modal-overlay{
  /* НЕ задаём display здесь! его даёт разметка через классы flex/hidden */
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Когда есть класс hidden — гарантированно прячем */
#modal-overlay.hidden{
  display: none !important;
}
/* ↓ Сдвиг содержимого футера чуть ниже */
footer .footer-inner{
  padding-top: 12px !important;  /* было 4–6px, поднимаем выше = визуально ниже */
  padding-bottom: 4px !important;
  line-height: 1 !important;
}

/* иконки — на полпикселя ниже, чтобы идти вровень с текстом */
footer .footer-inner .soc-row{ transform: translateY(1px); }
/* Футер — размеры иконок как в index */
footer .soc-row{display:flex;align-items:center;gap:10px}
footer .soc-row img{width:20px;height:20px;display:block}
@media (max-width:768px){
  footer .soc-row img{width:18px;height:18px}
}

/* HERO — компактно как на index */
.ads-hero{padding-top:12px;padding-bottom:12px}
.ads-hero h1{font-size:18px;line-height:1.2;font-weight:700;letter-spacing:.2px}
.ads-hero .logo{height:28px;width:auto}
@media (min-width:768px){
  .ads-hero{padding-top:16px;padding-bottom:16px}
  .ads-hero h1{font-size:20px}
  .ads-hero .logo{height:32px}
}
#prev-article,
#next-article {
  display: none !important;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
  overflow: hidden;
}

.article-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* Соотношение сторон */
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
}

.btn-ghost {
  background: #fff;
}

.btn-like[aria-pressed="true"] {
  border-color: #fb7185;
  background: #fff1f2;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
}

.article-modal {
  max-width: 880px;
  width: 100%;
}

.article-scroll {
  max-height: 80vh;
  overflow: auto;
}

.hero {
  padding-top: 12px;
  padding-bottom: 12px;
}

.hero h1 {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .2px;
}

.hero .logo {
  height: 28px;
  width: auto;
}

@media (min-width: 768px) {
  .hero {
    padding-top: 16px;
    padding-bottom: 16px;
  }
  .hero h1 {
    font-size: 20px;
  }
  .hero .logo {
    height: 32px;
  }
}

footer .soc-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

footer .soc-row img {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 768px) {
  footer .soc-row img {
    width: 18px;
    height: 18px;
  }
}
.hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem; /* Можно увеличить для выразительности */
  font-weight: 400;
}
.footer-search {
  border: none;
  border-bottom: 1px solid #ccc;
  background: transparent;
  padding: 2px 4px;
  font-size: 12px;
  width: 140px;
  outline: none;
  transition: border-color 0.3s;
}
.footer-search::placeholder {
  color: #999;
}
.footer-search:focus {
  border-color: #555;
}
.dark .footer-search {
  color: #e5e7eb;
  border-color: #555;
}
.dark .footer-search::placeholder {
  color: #888;
}
.brand-text {
  font-family: 'Jura', sans-serif;
  font-weight: 700;
  font-size: 1.125rem; /* примерно text-xl */
  line-height: 1.2;
}
.brand-logo {
  /* Сохраняем визуальную высоту шапки */
  display: inline-flex;
  align-items: center;
}
.welcome-text {
  font-family: 'Great Vibes', cursive;
  font-size: 1.75rem; /* ~28px — можно подкорректировать под дизайн */
  line-height: 1.1;
  display: block;
  margin-top: 0.25rem;
  color: inherit; /* чтобы подстраивался под светлый/тёмный режим */
}
.welcome-text {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(18px, 2.2vw, 28px);
  color: black;
  display: inline-block;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    to right,
    black 0%,
    black 40%,
    gold 50%,
    black 60%,
    black 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: letterShine 10s ease-in-out infinite; /* ← было 6s, стало 10s */
}

@keyframes letterShine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.welcome-title {
  font-family: 'Philosopher', sans-serif; /* ← применяем новый шрифт */
  font-weight: 700;
  font-size: clamp(36px, 5vw, 60px);
  margin-bottom: 0.4rem;
  color: #0f172a;
}
