/* ═══════════════════════════════════════════════
   Журнал «Уютный» — общие стили
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Golos+Text:wght@400;500;600&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --cream:    #F7F0E6;
  --brown:    #2C2318;
  --terra:    #C4633A;
  --coffee:   #8B5E3C;
  --rose:     #E8C9C1;
  --sage:     #C5D5C0;
  --fog:      #C0CDD5;
  --ochre:    #E8D5A3;
  --lavender: #D5C5E0;
  --text:     #3D2E22;
}

body {
  background: var(--cream);
  color: var(--brown);
  font-family: 'Golos Text', sans-serif;
}

a { text-decoration: none; color: inherit; }

/* ── NAV ── */
/* Шапка: название и подпись издания в одну строку, разделы — отдельной
   полкой под тонкой линией (вариант «В», выбор Ирины 20.09.2026). Раньше
   подпись стояла под названием и липла к разделам: три строки сходились
   вплотную, и глазу не за что было зацепиться.
   Высота не жёсткая, поэтому всё липкое ниже шапки берёт отступ
   из --nav-h, а не из цифры 64px (на неё была завязана панель фильтра). */
:root { --nav-h: 98px; }
nav {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(139,94,60,0.1);
  position: sticky; top: 0; z-index: 100;
}
.nav-top {
  max-width: 1200px; margin: 0 auto; padding: 14px 40px 12px;
  min-height: 56px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
/* Название и подпись — по общей базовой линии, подпись занимает свободное
   место и при нехватке обрезается многоточием, а не переносится. */
.nav-brand { display: flex; align-items: baseline; gap: 16px; min-width: 0; flex: 1; }
.nav-tagline {
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
  font-size: 12px; color: var(--coffee); line-height: 1.3;
}
.nav-tagline-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-age {
  font-size: 10px; font-weight: 600; line-height: 1.3;
  border: 1.5px solid var(--coffee); border-radius: 5px; padding: 0 4px;
  flex-shrink: 0;
}
/* Разделы — отдельная полка: светлая линия отделяет их от названия. */
.nav-row {
  max-width: 1200px; margin: 0 auto; padding: 11px 40px 12px;
  border-top: 1px solid rgba(139,94,60,0.12);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px; font-weight: 400; line-height: 1; flex-shrink: 0;
}
.nav-sections {
  display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px;
  color: var(--coffee);
}
.nav-sections a:hover { color: var(--terra); }
.nav-sections a.active { color: var(--terra); font-weight: 600; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-search, .nav-account {
  display: flex; align-items: center; gap: 6px;
  background: var(--cream); border-radius: 8px;
  padding: 7px 14px; font-size: 13px; color: var(--coffee);
  cursor: pointer; white-space: nowrap;
}
.nav-account:hover { color: var(--terra); }
.nav-tune {
  background: var(--terra); color: white;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  border: none; font-family: 'Golos Text', sans-serif;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--coffee); margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(139,94,60,0.15);
}

/* ── CARD TAG ── */
.card-tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 10px; font-weight: 600; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 8px;
}
.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400; line-height: 1.25; margin-bottom: 8px;
}
.card-date { font-size: 11px; color: var(--coffee); }

/* ── FLOATING CHAT WIDGET ── */
.chat-widget-btn {
  position: fixed; bottom: 32px; right: 32px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #3D2E22; color: white; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(44,35,24,0.3);
  transition: transform .2s, box-shadow .2s;
}
.chat-widget-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(44,35,24,0.4); }
.chat-widget-btn svg { width: 22px; height: 22px; }
.chat-widget-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--terra); color: white; border-radius: 10px;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  white-space: nowrap; font-family: 'Golos Text', sans-serif;
  animation: badge-pulse 3s ease-in-out 1s infinite;
}
@keyframes badge-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:.7; transform:scale(0.95); }
}
.chat-widget-panel {
  position: fixed; bottom: 100px; right: 32px; z-index: 200;
  width: 340px; background: #3D2E22; border-radius: 20px;
  box-shadow: 0 8px 40px rgba(44,35,24,0.35);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(0.97);
  pointer-events: none; transition: opacity .25s, transform .25s;
}
.chat-widget-panel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
.chat-widget-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-widget-head-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 300; color: white;
}
.chat-widget-head-sub { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 1px; }
.chat-widget-close {
  background: rgba(255,255,255,0.08); border: none;
  color: rgba(255,255,255,0.5); width: 28px; height: 28px;
  border-radius: 8px; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.chat-widget-messages {
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  max-height: 240px; overflow-y: auto;
}
.chat-widget-messages::-webkit-scrollbar { width: 3px; }
.chat-widget-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.cwm { max-width: 88%; padding: 10px 14px; font-size: 13px; line-height: 1.5; border-radius: 12px; }
.cwm-bot { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); border-radius: 4px 12px 12px 12px; align-self: flex-start; }
.cwm-user { background: var(--terra); color: white; border-radius: 12px 4px 12px 12px; align-self: flex-end; }
.chat-widget-hints { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat-widget-hint {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 8px 12px; font-size: 12px;
  color: rgba(255,255,255,0.6); cursor: pointer; transition: background .15s;
}
.chat-widget-hint:hover { background: rgba(255,255,255,0.12); color: white; }
.chat-widget-input-row { margin: 0 16px 16px; display: flex; gap: 8px; }
.chat-widget-input {
  flex: 1; background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; color: white;
  font-family: 'Golos Text', sans-serif; outline: none;
}
.chat-widget-input::placeholder { color: rgba(255,255,255,0.3); }
.chat-widget-send {
  background: var(--terra); border: none; border-radius: 10px;
  width: 36px; height: 36px; cursor: pointer; color: white; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── FOOTER ── */
footer { background: var(--brown); color: rgba(255,255,255,0.65); padding: 56px 0 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 32px; font-weight: 300; color: white; margin-bottom: 12px; }
.footer-desc { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.footer-geo { font-size: 12px; color: rgba(255,255,255,0.3); letter-spacing: 0.5px; }
.footer-col h4 { color: rgba(255,255,255,0.35); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: white; }
.footer-note { display: block; font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-bottom { padding: 16px 0; font-size: 12px; color: rgba(255,255,255,0.25); display: flex; justify-content: space-between; }

/* ── ГАМБУРГЕР ── */
.nav-burger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px; background: none; border: none;
  cursor: pointer; padding: 4px; flex-shrink: 0;
}
.nav-burger span {
  display: block; height: 2px; background: var(--brown);
  border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Мобильное меню */
.nav-mobile {
  display: none; flex-direction: column;
  background: white; border-top: 1px solid rgba(139,94,60,0.08);
  padding: 8px 0 12px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  padding: 12px 20px; font-size: 15px; color: var(--brown);
  border-bottom: 1px solid rgba(139,94,60,0.06);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--terra); background: rgba(196,99,58,0.04); }

/* ── МОБИЛЬНАЯ ── */
@media (max-width: 768px) {
  :root { --nav-h: 56px; }
  .nav-top { padding: 8px 20px; min-height: 56px; }
  .nav-row { display: none; }
  .nav-sections { display: none; }
  .nav-tune { display: none; }
  .nav-search span, .nav-account span { display: none; }
  .nav-burger { display: flex; }
  .footer-inner { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .chat-widget-panel { width: calc(100vw - 32px); right: 16px; }
  .chat-widget-btn { bottom: 20px; right: 20px; }
}
/* Подпись под названием прячем, только когда ей и правда тесно рядом с
   кнопками. Первый порог стоял на 1100px и срезал её на обычном ноутбуке —
   а подпись и есть смысл этой шапки. По замеру ей хватает места до ~900px. */
@media (max-width: 900px) {
  .nav-tagline-text { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
