/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, picture, video { display: block; max-width: 100%; }

/* ===== VARIABLES ===== */
:root {
  --primary: #1A6FBF;
  --primary-dark: #155a9e;
  --primary-light: #e8f1fb;
  --accent: #E8420A;
  --accent-light: #fef0eb;
  --dating-color: #c0185a;
  --dating-light: #fce8f1;
  --bg: #F4F6FA;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --border: #dde2ee;
  --ink: #1C2333;
  --ink-mute: #6b7590;
  --ink-light: #9aa3bc;
  --success: #1a9e5c;

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

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 16px rgba(26,111,191,0.08);
  --shadow-md: 0 4px 24px rgba(26,111,191,0.13);

  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ===== BASE ===== */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--s-4);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }
.btn-sm { padding: var(--s-2) var(--s-4); font-size: 13px; }
.btn-dating { background: var(--dating-color); color: #fff; border-color: var(--dating-color); }
.btn-dating:hover { background: #a01249; border-color: #a01249; }
.btn-dating-main { background: var(--dating-color); color: #fff; border-color: var(--dating-color); padding: var(--s-3) var(--s-6); font-weight: 600; }
.btn-dating-main:hover { background: #a01249; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(26,111,191,0.07);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-6);
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.logo--footer .logo-text { color: #fff; }
.main-nav { flex: 1; }
.nav-list {
  display: flex;
  gap: var(--s-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  display: block;
  padding: var(--s-2) var(--s-3);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-left: auto;
}
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
  border-radius: var(--radius-sm);
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,111,191,0.82) 0%, rgba(28,35,51,0.65) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: var(--s-16) var(--s-4);
  color: #fff;
  max-width: 680px;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: var(--s-1) var(--s-3);
  border-radius: 20px;
  margin-bottom: var(--s-4);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  margin: 0 0 var(--s-4);
  line-height: 1.1;
  letter-spacing: -1px;
}
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  opacity: 0.9;
  margin: 0 0 var(--s-8);
  max-width: 520px;
}
.hero-cta {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-12);
}
.hero-stats {
  display: flex;
  gap: var(--s-8);
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.hero-stat__label {
  font-size: 12px;
  opacity: 0.75;
  margin-top: var(--s-1);
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--s-12) 0;
}
.section--alt {
  background: var(--surface-2);
}
.section--dating {
  background: linear-gradient(135deg, #fce8f1 0%, #f8f0fb 100%);
}
.section--comments {
  background: var(--surface);
}
.section--subscribe {
  background: var(--primary);
  padding: var(--s-12) 0;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}
.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: var(--s-1) var(--s-3);
  border-radius: 20px;
  margin-bottom: var(--s-2);
}
.section-tag--region { color: var(--success); background: #e8f7ef; }
.section-tag--ads { color: var(--accent); background: var(--accent-light); }
.section-tag--dating { color: var(--dating-color); background: var(--dating-light); }
.section-tag--comments { color: #7c3aed; background: #ede9fe; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.section-desc {
  color: var(--ink-mute);
  margin: calc(-1 * var(--s-4)) 0 var(--s-8);
  font-size: 15px;
}
.link-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  text-decoration: none;
}
.link-more:hover { text-decoration: underline; }

/* ===== CARDS GRID ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-6);
  align-items: stretch;
}
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__image-wrap {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.card__image {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  display: block;
  transition: transform 0.3s;
}
.card:hover .card__image { transform: scale(1.03); }
.card__image--wide {
  aspect-ratio: 16/9;
}
.card__image--square {
  aspect-ratio: 1/1;
}
.card__body {
  flex: 1 1 auto;
  padding: var(--s-4);
}
.card__footer {
  margin-top: auto;
  padding: 0 var(--s-4) var(--s-4);
}
.card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: var(--s-2) 0 var(--s-3);
  color: var(--ink);
  line-height: 1.35;
}
.card__text {
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.6;
}
.card__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== NEWS FEATURED ===== */
.news-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-8);
  align-items: stretch;
}
.news-main {
  grid-row: span 1;
}
.news-side {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}
.news-side .card {
  flex: 1;
}
.news-cat {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px var(--s-2);
  border-radius: 4px;
  z-index: 1;
}
.news-cat--city { background: var(--primary); color: #fff; }
.news-cat--transport { background: #0891b2; color: #fff; }
.news-cat--culture { background: #7c3aed; color: #fff; }
.news-cat--economy { background: var(--success); color: #fff; }
.news-cat--sport { background: var(--accent); color: #fff; }
.news-cat--social { background: #d97706; color: #fff; }
.news-date {
  font-size: 12px;
  color: var(--ink-light);
  display: block;
}
.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.news-comments {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  font-size: 13px;
  color: var(--ink-mute);
}
.news-views {
  font-size: 13px;
  color: var(--ink-mute);
}

/* ===== NEWS FEED ===== */
.news-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.feed-item {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-6);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.feed-item:last-child { border-bottom: none; }
.feed-item__title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  min-width: 200px;
}
.feed-item__title:hover { color: var(--primary); }
.feed-item__meta {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
}

/* ===== CLASSIFIEDS ===== */
.classifieds-cats {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-bottom: var(--s-6);
}
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-4);
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.cat-pill:hover, .cat-pill--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
}
.ad-badge {
  position: absolute;
  top: var(--s-3);
  left: var(--s-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 3px var(--s-2);
  border-radius: 4px;
  z-index: 1;
}
.ad-badge--auto { background: #0891b2; color: #fff; }
.ad-badge--realty { background: var(--success); color: #fff; }
.ad-badge--sell { background: var(--accent); color: #fff; }
.ad-title {
  font-size: 15px;
}
.ad-details {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: var(--s-2);
}
.ad-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.ad-price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.classifieds-cta {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-top: var(--s-8);
}

/* ===== DATING ===== */
.dating-card .card__image-wrap { position: relative; }
.dating-online {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  font-size: 11px;
  font-weight: 700;
  color: var(--success);
  background: rgba(255,255,255,0.92);
  padding: 2px var(--s-2);
  border-radius: 20px;
  z-index: 1;
}
.dating-tags {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
  margin-top: var(--s-3);
}
.tag {
  font-size: 12px;
  font-weight: 500;
  background: var(--dating-light);
  color: var(--dating-color);
  padding: 2px var(--s-2);
  border-radius: 20px;
}

/* ===== COMMENTS ===== */
.comments-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: start;
}
.comments-desc {
  color: var(--ink-mute);
  margin: var(--s-4) 0 var(--s-6);
}
.comments-stats {
  display: flex;
  gap: var(--s-8);
  margin-bottom: var(--s-6);
  flex-wrap: wrap;
}
.c-stat {
  display: flex;
  flex-direction: column;
}
.c-stat__num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.c-stat__label {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: var(--s-1);
}
.comments-feed {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.comment-item {
  display: flex;
  gap: var(--s-3);
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: var(--s-4);
}
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.comment-content { flex: 1; }
.comment-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.comment-header strong { font-size: 14px; color: var(--ink); }
.comment-header time { font-size: 12px; color: var(--ink-light); }
.comment-content p { font-size: 14px; color: var(--ink); margin: 0 0 var(--s-2); }
.comment-actions {
  display: flex;
  gap: var(--s-4);
  font-size: 13px;
  color: var(--ink-mute);
  cursor: pointer;
}

/* ===== SUBSCRIBE ===== */
.subscribe-block {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  flex-wrap: wrap;
}
.subscribe-text {
  flex: 1;
  min-width: 240px;
}
.subscribe-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 var(--s-2);
}
.subscribe-text p {
  color: rgba(255,255,255,0.8);
  margin: 0;
  font-size: 15px;
}
.subscribe-form {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  flex-shrink: 0;
}
.subscribe-input {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  min-width: 240px;
  transition: border-color 0.2s;
}
.subscribe-input::placeholder { color: rgba(255,255,255,0.6); }
.subscribe-input:focus { border-color: rgba(255,255,255,0.7); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: var(--s-12) 0 var(--s-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-8);
}
.footer-brand .logo-text { color: #fff; }
.footer-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  margin: var(--s-4) 0 var(--s-6);
  line-height: 1.6;
}
.footer-social {
  display: flex;
  gap: var(--s-3);
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.social-link:hover { background: var(--primary); color: #fff; text-decoration: none; }
.footer-col__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 var(--s-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--s-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.footer-legal {
  display: flex;
  gap: var(--s-6);
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}
.footer-legal a:hover { color: rgba(255,255,255,0.8); }

/* ===== TABLE ===== */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; }
.data-table thead { background: var(--surface-2); }
.data-table th { font-weight: 600; }
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: none; }
@media (max-width: 640px) {
  .data-table thead { position: absolute; left: -9999px; }
  .data-table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border: none;
    gap: 12px;
  }
  .data-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ink-mute);
    flex: 0 0 auto;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--s-8);
  }
  .footer-brand { grid-column: span 2; }
  .news-featured {
    grid-template-columns: 1fr;
  }
  .news-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-6);
  }
  .comments-block {
    grid-template-columns: 1fr;
    gap: var(--s-8);
  }
}

@media (max-width: 640px) {
  .site-header .btn-primary.btn-sm { display: none; }
  .burger { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    z-index: 99;
    padding: var(--s-4);
  }
  .main-nav.is-open { display: block; }
  .nav-list {
    flex-direction: column;
    gap: var(--s-1);
  }
  .nav-link {
    padding: var(--s-3) var(--s-4);
    font-size: 15px;
  }
  .hero { min-height: 420px; }
  .hero-content { padding: var(--s-12) var(--s-4); }
  .hero-stats { gap: var(--s-6); }
  .hero-stat__num { font-size: 22px; }
  .cards {
    grid-template-columns: 1fr;
  }
  .news-featured {
    grid-template-columns: 1fr;
  }
  .news-side {
    display: flex;
    flex-direction: column;
    gap: var(--s-6);
  }
  .feed-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-4);
  }
  .feed-item__title { min-width: unset; }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand { grid-column: span 1; }
  .classifieds-cats { gap: var(--s-2); }
  .cat-pill { font-size: 13px; padding: var(--s-2) var(--s-3); }
  .subscribe-block { flex-direction: column; gap: var(--s-6); }
  .subscribe-form { width: 100%; }
  .subscribe-input { min-width: unset; width: 100%; }
  .subscribe-form { flex-direction: column; }
  .comments-block { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .classifieds-cta { flex-direction: column; }
  .classifieds-cta .btn { width: 100%; justify-content: center; }
}