/* ===== KVADRO — Коммерческая недвижимость ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1a3c5e;
  --primary-dark: #0f2540;
  --accent: #e8a020;
  --accent-hover: #d4901a;
  --text: #1e2a38;
  --text-light: #6b7a8d;
  --bg: #f5f7fa;
  --white: #ffffff;
  --border: #e2e8f0;
  --card-shadow: 0 4px 24px rgba(26,60,94,0.10);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== HEADER ===== */
.header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--white);
  letter-spacing: -1px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 2px;
  line-height: 1;
}

.logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  letter-spacing: 0.3px;
}

.nav a:hover { color: var(--accent); }

.header-tg {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.header-tg:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.header-tg svg { width: 18px; height: 18px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #1e4d7a 100%);
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 400px; height: 400px;
  background: rgba(232,160,32,0.08);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(232,160,32,0.18);
  border: 1px solid rgba(232,160,32,0.4);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero h1 span { color: var(--accent); }

.hero p {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.35);
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.08);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

/* ===== FILTERS ===== */
.filters-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  position: sticky;
  top: 70px;
  z-index: 90;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.filters-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-right: 4px;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.filter-select {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7a8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-select:focus { border-color: var(--primary); }

/* ===== CATALOG ===== */
.catalog-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
}

.section-count {
  font-size: 14px;
  color: var(--text-light);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,60,94,0.16);
}

.card-img {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #e8edf2;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-img img { transform: scale(1.04); }

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.badge-rent {
  background: rgba(26,60,94,0.88);
  color: var(--white);
}

.badge-sale {
  background: rgba(232,160,32,0.92);
  color: var(--white);
}

.card-type-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.card-price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-light);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--text-light);
}

.card-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.card-address {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  flex: 1;
}

.card-address svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-footer {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.card-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.card-btn-primary {
  background: var(--primary);
  color: var(--white);
}

.card-btn-primary:hover { background: var(--primary-dark); }

.card-btn-tg {
  background: #229ED9;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
}

.card-btn-tg:hover { background: #1a8bbf; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-light);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-img {
  height: 300px;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #e8edf2;
}

.modal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body { padding: 28px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--text-light);
  transition: background 0.2s;
}

.modal-close:hover { background: var(--border); }

.modal-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
}

.modal-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.modal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-meta-label {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.modal-meta-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.modal-desc {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 24px;
  white-space: pre-line;
}

.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-btn {
  flex: 1;
  min-width: 140px;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-btn-primary {
  background: var(--primary);
  color: var(--white);
}

.modal-btn-primary:hover { background: var(--primary-dark); }

.modal-btn-tg {
  background: #229ED9;
  color: var(--white);
  text-decoration: none;
}

.modal-btn-tg:hover { background: #1a8bbf; }

/* ===== CONTACT FORM ===== */
.contact-section {
  background: var(--primary);
  padding: 72px 24px;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.contact-inner p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  margin-bottom: 40px;
}

.contact-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-consent {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 20px;
  line-height: 1.5;
}

.form-consent a {
  color: var(--primary);
  text-decoration: underline;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}

.form-submit:hover { background: var(--accent-hover); }

.form-success {
  display: none;
  text-align: center;
  padding: 20px;
  color: #16a34a;
  font-weight: 600;
  font-size: 16px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 24px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand .logo-name { font-size: 24px; }
.footer-brand .logo-sub { color: rgba(255,255,255,0.4); }

.footer-desc {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 16px;
  color: rgba(255,255,255,0.55);
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--accent); }

.footer-tg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #229ED9;
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 16px;
  transition: background 0.2s;
}

.footer-tg:hover { background: #1a8bbf; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.footer-bottom a { color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--accent); }

/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 560px;
  background: var(--primary-dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 999;
  display: none;
  animation: slideUp 0.4s ease;
}

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

.cookie-banner.show { display: block; }

.cookie-text {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}

.cookie-text a { color: var(--accent); text-decoration: underline; }

.cookie-actions { display: flex; gap: 10px; }

.cookie-accept {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s;
}

.cookie-accept:hover { background: var(--accent-hover); }

.cookie-decline {
  padding: 10px 20px;
  background: transparent;
  color: rgba(255,255,255,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}

.cookie-decline:hover { border-color: rgba(255,255,255,0.5); color: var(--white); }

/* ===== PAGES ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 48px 24px;
  text-align: center;
}

.page-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
}

.page-hero p {
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  font-size: 15px;
}

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 32px 0 12px;
}

.page-content p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 12px;
}

.page-content .req-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.page-content .req-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.page-content .req-table td:first-child {
  font-weight: 600;
  color: var(--text-light);
  width: 40%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > *:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .burger { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--primary-dark);
    padding: 24px;
    gap: 20px;
    z-index: 99;
  }
  .header-tg { display: none; }
  .hero { padding: 56px 20px 64px; }
  .hero-stats { gap: 32px; }
  .listings-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .filters-inner { gap: 8px; }
}

@media (max-width: 480px) {
  .modal-body { padding: 20px; }
  .contact-form { padding: 20px; }
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; }
}
