/*
Theme Name: Box Realty Modern
Theme URI: https://box-realty.ru/
Description: Современная витрина жилых комплексов и честных обзоров новостроек России от реальных покупателей.
Version: 1.0.0
Author: Box Realty Editorial
Text Domain: box-realty-modern
*/

:root {
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary: #059669;
  --primary-hover: #047857;
  --primary-soft: #ecfdf5;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --badge-bg: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-main);
  background: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.15s ease, border-color 0.15s ease; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #059669, #0284c7);
  color: white;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}
.header-nav a:hover { color: var(--primary); }
.header-badge {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border-color);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.hero-title span {
  background: linear-gradient(135deg, #059669, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 580px;
}
.hero-stats-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.stat-box strong {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.stat-box span {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  line-height: 1.5;
}

/* Sections */
.section {
  padding: 56px 0;
}
.section.tinted {
  background: #f1f5f9;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  gap: 20px;
  flex-wrap: wrap;
}
.section-header h2 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 4px;
}

/* Featured Cards with Photos */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 28px;
}
.card-item {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.card-thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}
.card-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card-item:hover .card-thumb-wrapper img {
  transform: scale(1.05);
}
.card-badge-city {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
}
.card-badge-retention {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(5, 150, 105, 0.9);
  backdrop-filter: blur(6px);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-persona-tag {
  display: inline-block;
  color: #b45309;
  background: #fef3c7;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 10px;
  align-self: flex-start;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
}
.card-lead {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
}

/* City Accordion Directory */
.cities-directory {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.city-details-block {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.city-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  background: white;
  font-weight: 700;
  font-size: 1.15rem;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease;
}
.city-summary::-webkit-details-marker { display: none; }
.city-summary:hover { background: #f8fafc; }
.city-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.city-icon {
  font-size: 1.3rem;
}
.city-count-badge {
  background: var(--badge-bg);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 600;
}
.city-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  font-size: 0.9rem;
}
.city-details-block[open] .city-arrow {
  transform: rotate(180deg);
}
.city-links-grid {
  padding: 20px 24px 28px;
  border-top: 1px solid var(--border-color);
  background: #fafafa;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 18px;
}
.realty-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-main);
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: all 0.15s ease;
}
.realty-link-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.realty-link-item .bullet {
  color: var(--primary);
  font-size: 0.75rem;
}

/* Personas Section */
.personas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}
.persona-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.persona-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.persona-icon {
  font-size: 1.8rem;
}
.persona-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.persona-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.persona-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.persona-link {
  font-size: 0.88rem;
  color: #334155;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f8fafc;
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid transparent;
}
.persona-link:hover {
  background: white;
  border-color: var(--border-color);
  color: var(--primary);
}

/* Single Article Layout */
.article-page {
  padding: 40px 0 80px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs span { color: #94a3b8; }

.article-hero {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}
.article-photo-wrapper {
  max-height: 460px;
  overflow: hidden;
  position: relative;
}
.article-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-hero-content {
  padding: 36px;
}
.article-meta-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tag-city {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.tag-role {
  background: #fef3c7;
  color: #b45309;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.tag-accuracy {
  background: #dcfce7;
  color: #15803d;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}
.article-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.author-perspective-box {
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin-bottom: 32px;
}
.author-perspective-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.author-perspective-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Article Body */
.article-body {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 44px;
  box-shadow: var(--shadow-sm);
  font-size: 1.12rem;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 40px;
}
.article-body h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 36px 0 16px;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-main);
}
.article-body p {
  margin-bottom: 22px;
}
.article-body strong {
  font-weight: 700;
  color: var(--text-main);
}
.article-body ul, .article-body ol {
  margin: 20px 0 24px 28px;
}
.article-body li {
  margin-bottom: 10px;
}
.article-body blockquote {
  border-left: 4px solid #cbd5e1;
  padding: 14px 20px;
  margin: 24px 0;
  color: #475569;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

/* Related Complexes */
.related-section {
  margin-top: 48px;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 56px 0 32px;
  font-size: 0.95rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand h3 {
  color: white;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.footer-links h4 {
  color: white;
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .article-body { padding: 24px; }
}

.sape-container {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #1e293b;
  font-size: 0.85rem;
  color: #94a3b8;
  text-align: center;
}
.sape-container a {
  color: #cbd5e1;
  text-underline-offset: .15em;
}
.sape-container a:hover {
  color: white;
}

