/* ============================================================
   ZRT AUTO — современный автомобильный новостной портал
   Плиточная система, фон шапки «закат» повторяется по горизонтали
   ============================================================ */

:root {
  --primary: #E7A71D;
  --primary-dark: #c98d14;
  --primary-light: #f5b93e;
  --secondary: #1d3557;
  --accent: #457b9d;

  --bg: #f0f2f5;
  --bg-alt: #e7eaf0;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --border: #dde1e8;
  --border-strong: #c9cfda;

  --text: #1c2430;
  --text-2: #4d5a6d;
  --text-3: #8a95a5;
  --text-inverse: #ffffff;

  --dark-bg: #0d1420;
  --dark-bg-2: #141d2c;
  --dark-border: rgba(255,255,255,0.09);
  --dark-text: #e9edf4;
  --dark-text-2: #9aa8bd;
  --dark-text-3: #64748b;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;

  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md: 0 4px 14px rgba(16,24,40,0.1);
  --shadow-lg: 0 12px 32px rgba(16,24,40,0.16);
  --shadow-primary: 0 6px 18px rgba(231,167,29,0.35);

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-heading: 'Montserrat', 'Inter', sans-serif;

  --container: 1320px;
  --gutter: 24px;

  --t-fast: 0.15s ease;
  --t-med: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 0.95rem; color: var(--text); }

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; color: var(--text); }
h1 { font-size: 1.6rem; margin-bottom: var(--sp-4); }
h2 { font-size: 1.25rem; margin-bottom: var(--sp-3); }
h3 { font-size: 1.05rem; margin-bottom: var(--sp-2); }

/* ============================================================
   HEADER — фон «закат» повторяется по горизонтали (repeat-x)
   ============================================================ */
.site-header { position: relative; z-index: 100; background: var(--dark-bg); }

.header-sky {
  height: 200px;
  background: url('../images/header-bg.jpg') repeat-x top center;
  background-size: auto 200px;
  position: relative;
}

.header-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,20,32,0.05) 0%, rgba(13,20,32,0.15) 50%, rgba(13,20,32,0.6) 100%);
}

.header-sky__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 15px var(--gutter) 0;
  height: 200px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: var(--sp-5);
}

.header-sky__left { display: flex; align-items: flex-start; }

.header-sky__slogan {
  font-size: 0.82rem;
  color: #ffe9b3;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
  max-width: 260px;
  line-height: 1.5;
  margin-top: 10px;
}

.logo { display: flex; align-items: center; gap: var(--sp-3); flex-shrink: 0; }

.logo--center { justify-self: center; }

.logo__img {
  width: 240px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
  transition: transform var(--t-med);
}

.logo__img:hover { transform: scale(1.03); }

.logo__img--footer { width: 170px; filter: none; }

.logo__icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: var(--shadow-primary);
}

.logo__text { display: flex; flex-direction: column; line-height: 1.1; }

.logo__name {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem;
  color: #fff; letter-spacing: 0.5px; text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0,0,0,0.6);
}

.logo__tagline {
  font-size: 0.7rem; color: #ffe9b3; text-transform: uppercase;
  letter-spacing: 2px; font-weight: 600;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}

.nav-search { flex-shrink: 0; margin-left: auto; }

.nav-search form {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--t-med), box-shadow var(--t-med);
}

.nav-search form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(231,167,29,0.2); }

.nav-search input[type="text"] {
  width: 160px; background: transparent; border: none; outline: none;
  color: #fff; padding: 7px 12px; font-size: 0.85rem;
}

.nav-search input[type="text"]::placeholder { color: rgba(255,255,255,0.6); }

.nav-search button {
  display: flex; align-items: center;
  padding: 7px 12px; background: var(--primary); color: #fff;
  transition: background var(--t-fast);
}

.nav-search button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); justify-content: flex-end; min-width: 0; align-self: end; margin-bottom: 9px; }

.login-trigger {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff; font-weight: 600; font-size: 0.9rem;
  padding: 9px 18px; border-radius: var(--radius-full);
  backdrop-filter: blur(6px); transition: all var(--t-med); white-space: nowrap;
}

.login-trigger:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-1px); }

.user-chip {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 5px 8px 5px 5px; border-radius: var(--radius-full);
  backdrop-filter: blur(6px); color: #fff; font-weight: 600; font-size: 0.85rem;
}

.user-chip img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); }
.user-chip:hover { background: rgba(255,255,255,0.2); }

/* NAV */
.nav {
  background: var(--dark-bg-2);
  border-top: 3px solid var(--primary);
  position: sticky; top: 0; z-index: 90;
}

.nav__inner {
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; position: relative;
}

.nav__list { display: flex; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav__list::-webkit-scrollbar { display: none; }
.nav__item { position: relative; flex-shrink: 0; }

.nav__link {
  display: flex; align-items: center; padding: 14px var(--sp-4);
  font-weight: 600; font-size: 0.88rem; color: var(--dark-text);
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.3px;
  transition: color var(--t-fast);
}

.nav__link:hover { color: var(--primary-light); }
.nav__item.active .nav__link { color: var(--primary-light); }

.nav__item.active .nav__link::after {
  content: '';
  position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: 0;
  height: 3px; background: var(--primary); border-radius: 3px 3px 0 0;
}

.nav__burger { display: none; flex-direction: column; gap: 5px; padding: var(--sp-3); }
.nav__burger span { width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform var(--t-med), opacity var(--t-med); }

/* MAIN LAYOUT */
.main { flex: 1; max-width: var(--container); margin: 0 auto; width: 100%; padding: var(--sp-6) var(--gutter) var(--sp-7); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-6); align-items: start; }

/* ============================================================
   TILE GRID — плиточная система
   ============================================================ */
.content-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); align-items: start; }

.content-col > .speedbar,
.content-col > .info { grid-column: 1 / -1; }

/* Полная новость, похожие и комментарии — на всю ширину */
.content-col > .story,
.content-col > .related,
.content-col > .comments-section,
.content-col > .comment,
.content-col > .addcomment { grid-column: 1 / -1; }

.content-col > .pagination { grid-column: 1 / -1; }

.news-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--t-med), transform var(--t-med);
}

.news-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

/* Картинка в плитке — не больше 300px шириной (исходники 300px) */
.news-tile__media {
  position: relative;
  width: 100%;
  height: 187px;
  overflow: hidden;
  background: var(--dark-bg);
  flex-shrink: 0;
}

.news-tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.news-tile:hover .news-tile__media img { transform: scale(1.06); }

.news-tile__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(13,20,32,0.6) 100%); }

.news-tile__cat {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 2;
  background: var(--primary); color: #fff;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 4px 12px; border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.news-tile__body { padding: var(--sp-4); display: flex; flex-direction: column; flex: 1; }

.news-tile__title { font-size: 0.95rem; line-height: 1.35; margin-bottom: var(--sp-2); }
.news-tile__title a { color: var(--text); }
.news-tile__title a:hover { color: var(--primary-dark); }

.news-tile__excerpt {
  color: var(--text-2); font-size: 0.84rem; line-height: 1.55; margin-bottom: var(--sp-3);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.news-tile__excerpt img { display: none; }

.news-tile__foot {
  margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}

.news-tile__meta { display: flex; align-items: center; gap: var(--sp-3); font-size: 0.72rem; color: var(--text-3); flex-wrap: wrap; }
.news-tile__meta span { display: flex; align-items: center; gap: 5px; }

.news-tile__more { display: inline-flex; align-items: center; gap: var(--sp-1); color: var(--primary-dark); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.news-tile__more .arr { transition: transform var(--t-med); }
.news-tile__more:hover .arr { transform: translateX(3px); }

.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  margin-bottom: var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 2px solid var(--text);
}

.section-head h1 { margin: 0; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; }
.section-head h1::before { content: ''; width: 6px; height: 24px; background: var(--primary); margin-right: var(--sp-3); border-radius: var(--radius-sm); }

/* SIDEBAR */
.sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: var(--sp-5); }

.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.widget__title {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--secondary); border-bottom: 2px solid var(--primary); background: var(--surface-2);
}

.widget__body { padding: var(--sp-3) var(--sp-4); }

.cat-list__item { border-bottom: 1px solid var(--bg-alt); }
.cat-list__item:last-child { border-bottom: none; }

.cat-list__link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); font-weight: 500; font-size: 0.9rem; color: var(--text);
  position: relative; transition: all var(--t-med);
}

.cat-list__link::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); transform: scaleY(0); transition: transform var(--t-med); }
.cat-list__link:hover { background: var(--surface-2); color: var(--primary-dark); padding-left: calc(var(--sp-4) + var(--sp-2)); }
.cat-list__link:hover::before { transform: scaleY(1); }

.cat-list__icon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 0.9rem; background: var(--bg-alt); flex-shrink: 0; }

.cat-list__sub { display: none; padding: 0 var(--sp-4) var(--sp-2) calc(var(--sp-4) + 34px); }
.cat-list__item.open .cat-list__sub { display: block; }
.cat-list__sub a { display: block; padding: var(--sp-2); font-size: 0.84rem; color: var(--text-2); }
.cat-list__sub a:hover { color: var(--primary-dark); }

.popular__item { display: flex; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--bg-alt); align-items: center; }
.popular__item:first-child { padding-top: 0; }
.popular__item:last-child { border-bottom: none; padding-bottom: 0; }

.popular__thumb { width: 76px; height: 50px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; background: var(--bg-alt); }
.popular__thumb img { width: 100%; height: 100%; object-fit: cover; }

.popular__body { flex: 1; min-width: 0; }
.popular__title { font-size: 0.84rem; font-weight: 600; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.popular__title:hover { color: var(--primary-dark); }
.popular__meta { font-size: 0.74rem; color: var(--text-3); margin-top: var(--sp-1); }

/* FULL STORY */
.story { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

.story__head { padding: var(--sp-6) var(--sp-6) var(--sp-5); border-bottom: 1px solid var(--border); }

.story__cat { display: inline-block; background: var(--primary); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 12px; border-radius: var(--radius-full); margin-bottom: var(--sp-3); }

.story__head h1 { font-size: 1.8rem; line-height: 1.3; margin-bottom: var(--sp-4); }

.story__meta { display: flex; align-items: center; gap: var(--sp-5); font-size: 0.84rem; color: var(--text-3); flex-wrap: wrap; }
.story__meta span { display: flex; align-items: center; gap: 6px; }
.story__meta a { color: var(--text-2); }
.story__meta a:hover { color: var(--primary-dark); }



.story__body { padding: var(--sp-6); }
.story__body .news { color: var(--text); font-size: 1rem; line-height: 1.75; }
.story__body .news p { margin-bottom: var(--sp-4); }
.story__body .news img {
  max-width: 300px;
  max-height: 400px;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}
.story__body .news img[style*="float:left"] {
  margin: 0 var(--sp-4) var(--sp-3) 0;
}
.story__body .news img[style*="float:right"] {
  margin: 0 0 var(--sp-3) var(--sp-4);
}

.story__body .news blockquote { border-left: 4px solid var(--primary); background: var(--surface-2); padding: var(--sp-4) var(--sp-5); margin: var(--sp-5) 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--text-2); font-style: italic; }
.story__body .news h2, .story__body .news h3 { margin-top: var(--sp-5); }
.story__body .news a { color: var(--primary-dark); text-decoration: underline; }

.story__tags { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-4) var(--sp-6); border-top: 1px solid var(--border); }
.story__tags-label { font-size: 0.8rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-right: var(--sp-2); }
.story__tag { background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; color: var(--text-2); padding: 3px 12px; border-radius: var(--radius-full); transition: all var(--t-fast); }
.story__tag:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* RELATED */
.related { margin-top: var(--sp-6); }
.related h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: var(--sp-3); border-bottom: 2px solid var(--text); margin-bottom: var(--sp-4); }
.related__list { display: flex; flex-direction: column; }
.related__item { display: flex; gap: var(--sp-4); padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.related__item:last-child { border-bottom: none; }
.related__media { width: 130px; height: 76px; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.related__media img { width: 100%; height: 100%; object-fit: cover; }
.related__title { font-size: 0.88rem; font-weight: 600; line-height: 1.4; }
.related__title a { color: var(--text); }
.related__title a:hover { color: var(--primary-dark); }

/* COMMENTS */
.comments-section { margin-top: var(--sp-7); }
.comments-section h2 { font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.5px; padding-bottom: var(--sp-3); border-bottom: 2px solid var(--text); margin-bottom: var(--sp-5); display: flex; align-items: center; gap: var(--sp-3); }
.comments-section h2 .count { font-size: 0.78rem; font-weight: 600; color: var(--primary-dark); background: rgba(231,167,29,0.14); padding: 3px 12px; border-radius: var(--radius-full); }

.comment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin-bottom: var(--sp-4); overflow: hidden; }
.comment__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) var(--sp-5); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.comment__author { display: flex; align-items: center; gap: var(--sp-3); }
.comment__avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--bg-alt); flex-shrink: 0; border: 2px solid var(--border); }
.comment__avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment__name { font-weight: 600; font-size: 0.92rem; }
.comment__name a { color: var(--text); }
.comment__name a:hover { color: var(--primary-dark); }
.comment__group { font-size: 0.72rem; color: var(--text-3); }
.comment__date { font-size: 0.78rem; color: var(--text-3); display: flex; align-items: center; gap: 5px; }
.comment__body { padding: var(--sp-5); color: var(--text); line-height: 1.7; font-size: 0.95rem; }
.comment__body p { margin-bottom: var(--sp-3); }
.comment__footer { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) var(--sp-5); background: var(--surface-2); border-top: 1px solid var(--border); }
.comment__actions { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.comment__actions a { font-size: 0.76rem; color: var(--text-3); padding: 3px 12px; border-radius: var(--radius-full); border: 1px solid var(--border); transition: all var(--t-fast); }
.comment__actions a:hover { color: var(--primary-dark); border-color: var(--primary); background: rgba(231,167,29,0.08); }

.addcomment { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); margin-top: var(--sp-6); }
.addcomment h3 { font-size: 1.05rem; margin-bottom: var(--sp-4); }
.addcomment textarea, .addcomment input[type="text"] { width: 100%; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-2); outline: none; transition: border-color var(--t-med), box-shadow var(--t-med); margin-bottom: var(--sp-3); }
.addcomment textarea { min-height: 130px; resize: vertical; }
.addcomment textarea:focus, .addcomment input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(231,167,29,0.15); background: var(--surface); }

/* BUTTONS & FORMS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2); padding: 10px 22px; border-radius: var(--radius-md); font-weight: 600; font-size: 0.9rem; transition: all var(--t-med); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-primary); }
.btn--outline { background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary-dark); background: rgba(231,167,29,0.06); }

.textbox, select { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); outline: none; transition: border-color var(--t-med), box-shadow var(--t-med); }
.textbox:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(231,167,29,0.15); }
textarea.textbox { resize: vertical; min-height: 120px; }
.form-row { margin-bottom: var(--sp-4); }
.form-row label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: var(--sp-2); color: var(--text); }
.form-note { font-size: 0.8rem; color: var(--text-3); margin-top: var(--sp-1); }

/* MODAL LOGIN */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(13,20,32,0.7); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: var(--sp-4); }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 400px; overflow: hidden; box-shadow: var(--shadow-lg); animation: fadeUp 0.3s ease both; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--sp-4) var(--sp-5); background: var(--dark-bg); color: #fff; }
.modal__head h3 { color: #fff; margin: 0; font-size: 1.05rem; }
.modal__close { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(255,255,255,0.1); font-size: 1.1rem; transition: background var(--t-fast); }
.modal__close:hover { background: var(--primary); }
.modal__body { padding: var(--sp-5); }
.modal__body form { display: flex; flex-direction: column; gap: var(--sp-3); }
.modal__body form .textbox { margin: 0; }
.modal__links { display: flex; justify-content: space-between; font-size: 0.84rem; margin-top: var(--sp-1); }
.modal__links a { color: var(--text-3); }
.modal__links a:hover { color: var(--primary-dark); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* PAGINATION */
.pagination { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); margin-top: var(--sp-6); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--sp-3); border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 600; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: all var(--t-med); }
.pagination a:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateY(-1px); }
.pagination span { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .nav-prev, .pagination .nav-next { min-width: auto; padding: 0 var(--sp-4); }

/* INFO / PAGES */
.info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.info h1 { font-size: 1.3rem; margin-bottom: var(--sp-3); }
.info .error { color: var(--primary-dark); font-size: 0.92rem; }

.page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-6); color: var(--text); line-height: 1.7; }
.page h1 { font-size: 1.4rem; padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-5); }
.page p { margin-bottom: var(--sp-4); }
.page img { border-radius: var(--radius-md); margin: var(--sp-4) 0; }
.page ul, .page ol { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
.page ul { list-style: disc; }
.page ol { list-style: decimal; }
.page a { color: var(--primary-dark); text-decoration: underline; }

.search-result { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); margin-bottom: var(--sp-4); transition: box-shadow var(--t-med); }
.search-result:hover { box-shadow: var(--shadow-md); }
.search-result h2 { font-size: 1.1rem; }
.search-result .meta { font-size: 0.8rem; color: var(--text-3); margin-bottom: var(--sp-3); }

/* USER PANEL */
.user-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); }
.user-panel__greet { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.user-panel__greet img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.user-panel__greet strong { font-size: 0.95rem; }
.user-panel__greet span { display: block; font-size: 0.78rem; color: var(--text-3); }
.user-panel__menu { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.user-panel__menu a { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border-radius: var(--radius-md); font-size: 0.84rem; color: var(--text-2); transition: all var(--t-fast); }
.user-panel__menu a:hover { background: var(--surface-2); color: var(--primary-dark); }

/* POLL */
.poll .vote-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.poll label { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; transition: all var(--t-fast); font-size: 0.9rem; }
.poll label:hover { border-color: var(--primary); background: rgba(231,167,29,0.06); }
.poll input[type="radio"], .poll input[type="checkbox"] { accent-color: var(--primary); }
.poll__actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.poll__total { font-size: 0.8rem; color: var(--text-3); margin-top: var(--sp-3); }

/* FOOTER */
.site-footer { background: var(--dark-bg); color: var(--dark-text-2); border-top: 3px solid var(--primary); margin-top: var(--sp-7); }
.footer-grid { max-width: var(--container); margin: 0 auto; padding: var(--sp-7) var(--gutter) var(--sp-5); display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: var(--sp-6); }
.footer-col h3 { color: var(--text-inverse); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: var(--sp-4); position: relative; padding-bottom: var(--sp-2); }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 32px; height: 2px; background: var(--primary); }
.footer-about p { font-size: 0.88rem; line-height: 1.7; }
.footer-logo { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.footer-links li { margin-bottom: var(--sp-2); }
.footer-links a { font-size: 0.88rem; color: var(--dark-text-2); display: inline-flex; align-items: center; gap: var(--sp-2); }
.footer-links a::before { content: '›'; color: var(--primary); }
.footer-links a:hover { color: var(--text-inverse); }
.footer-contacts li { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-3); font-size: 0.88rem; }
.footer-contacts .ic { color: var(--primary); font-size: 1rem; line-height: 1.4; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid var(--dark-border); }
.footer-bottom__inner { max-width: var(--container); margin: 0 auto; padding: var(--sp-4) var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); font-size: 0.82rem; color: var(--dark-text-3); flex-wrap: wrap; }

/* TO TOP */
.to-top { position: fixed; right: var(--sp-5); bottom: var(--sp-5); width: 46px; height: 46px; border-radius: var(--radius-md); background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--shadow-primary); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--t-med); z-index: 90; }
.to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* SPEEDBAR */
.speedbar { font-size: 0.84rem; color: var(--text-3); margin-bottom: var(--sp-4); display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.speedbar a { color: var(--text-2); }
.speedbar a:hover { color: var(--primary-dark); }
.speedbar .speedbar_sep { color: var(--border-strong); margin: 0 var(--sp-1); }

/* RESPONSIVE */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
  .content-col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .header-sky__slogan { display: none; }
  .nav-search { display: none; }
  .nav__burger { display: flex; }
  .nav__list { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--dark-bg-2); flex-direction: column; align-items: stretch; border-top: 1px solid var(--dark-border); box-shadow: var(--shadow-lg); }
  .nav__list.open { display: flex; }
  .nav__link { padding: 14px var(--sp-5); border-bottom: 1px solid var(--dark-border); }
  .sidebar { grid-template-columns: repeat(2, 1fr); }
  .story__head { padding: var(--sp-5); }
  .story__head h1 { font-size: 1.5rem; }
  .story__body { padding: var(--sp-5); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  h1 { font-size: 1.4rem; }
  .header-sky { height: 140px; background-size: auto 140px; }
  .header-sky__inner { height: 140px; }
  .logo__img { width: 150px; }
  .content-col { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .comment__head { flex-direction: column; align-items: flex-start; }
  .story__head h1 { font-size: 1.3rem; }
  .story__body { padding: var(--sp-4); }
  .pagination a, .pagination span { min-width: 34px; height: 34px; font-size: 0.8rem; }
}

/* DLE COMPAT */
.rating { display: inline-flex; align-items: center; }
.rating .unit-rating { position: relative; width: 85px; height: 17px; display: inline-block; }
.rating .unit-rating li { position: absolute; top: 0; left: 0; list-style: none; }
.rating .unit-rating li.current-rating { z-index: 1; }
.rating .unit-rating li a { display: block; width: 17px; height: 17px; }

.vote-result { font-size: 0.9rem; }
.vote-result div { margin-bottom: var(--sp-2); }
.vote-result .progress { background: var(--bg-alt); border-radius: var(--radius-full); height: 8px; overflow: hidden; margin-top: var(--sp-1); }
.vote-result .progress div { height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light)); border-radius: var(--radius-full); }

.editor textarea { width: 100%; min-height: 130px; border: 1px solid var(--border) !important; border-radius: var(--radius-md); padding: var(--sp-3) !important; font-family: inherit; }

#loading-layer { background: var(--dark-bg); color: #fff; padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }

#searchsuggestions { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); overflow: hidden; }
#searchsuggestions a { display: block; padding: var(--sp-3); border-bottom: 1px solid var(--bg-alt); color: var(--text); }
#searchsuggestions a:hover { background: var(--surface-2); color: var(--primary-dark); }
#searchsuggestions span.searchheading { display: block; font-weight: 700; padding: var(--sp-2) var(--sp-3); background: var(--primary); color: #fff; }
#searchsuggestions span.notfound { display: block; padding: var(--sp-3); color: var(--text-2); }

#dropmenudiv { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--sp-2); font-size: 0.85rem; }
#dropmenudiv a { display: block; padding: 6px 10px; color: var(--text); border-radius: var(--radius-sm); }
#dropmenudiv a:hover { background: var(--surface-2); color: var(--primary-dark); }

.title_quote, .quote, .title_spoiler, .text_spoiler, .scriptcode { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-3) var(--sp-4); margin: var(--sp-4) 0; }
.title_quote, .title_spoiler { font-weight: 700; border-bottom: none; border-radius: var(--radius-md) var(--radius-md) 0 0; }
.text_spoiler { border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.hide { background: var(--surface-2); border: 1px solid var(--border); padding: var(--sp-3); border-radius: var(--radius-md); margin: var(--sp-4) 0; }

pre code { display: block; background: var(--dark-bg); color: var(--dark-text); padding: var(--sp-4); border-radius: var(--radius-md); overflow-x: auto; font-size: 0.85rem; margin: var(--sp-4) 0; }
.scriptcode { color: #2a7fdb; font-family: monospace; }

.calendar { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.calendar td, .calendar th { padding: 6px; text-align: center; border: 1px solid var(--bg-alt); }
.calendar th { background: var(--surface-2); color: var(--text); font-weight: 600; }
.day-current { background: var(--primary) !important; color: #fff !important; border-radius: var(--radius-sm); }
.day-current a { color: #fff !important; }
.weekday-active, .day-active { font-weight: 700; color: var(--primary-dark); }
.monthselect { font-size: 0.9rem; color: var(--text); }

table { border-collapse: collapse; }
table td, table th { padding: 8px 12px; }
table tr { border-bottom: 1px solid var(--bg-alt); }
table th { background: var(--surface-2); font-weight: 600; text-align: left; }

.mass_comments_action { text-align: right; padding: var(--sp-2) 0; }
.selectmass { margin-right: var(--sp-2); }

/* FUEL PRICES */
.fuel { display: flex; flex-direction: column; }
.fuel__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--bg-alt);
  font-size: 0.9rem;
}
.fuel__row:last-child { border-bottom: none; }
.fuel__name { color: var(--text-2); font-weight: 500; }
.fuel__val {
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
}
.fuel__val--92 { color: #2a7fdb; background: rgba(42,127,219,0.1); }
.fuel__val--95 { color: #2a9d8f; background: rgba(42,157,143,0.1); }
.fuel__val--98 { color: var(--primary-dark); background: rgba(231,167,29,0.12); }
.fuel__val--diesel { color: #6c3483; background: rgba(108,52,131,0.1); }
.fuel__val--gas { color: #7d6608; background: rgba(125,102,8,0.1); }
.fuel__note {
  margin-top: var(--sp-2);
  font-size: 0.72rem;
  color: var(--text-3);
  text-align: center;
}

/* SOCIAL */
.social { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.social__link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--t-fast);
}
.social__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.social__link--vk .social__icon { background: #4c75a3; }
.social__link--tg .social__icon { background: #229ed9; }
.social__link--ok .social__icon { background: #ed812b; }
.social__link--yt .social__icon { background: #ff0000; }
.social__link:hover { background: var(--surface-2); color: var(--primary-dark); }

/* TAG CLOUD */
.tagcloud { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tagcloud a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-2);
  transition: all var(--t-fast);
}
.tagcloud a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* VK WIDGET */
.vk-widget { margin: calc(var(--sp-3) * -1); }
.vk-widget iframe { border-radius: 0; }
