@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Inter:wght@400;500;600&subset=latin,cyrillic,cyrillic-ext&display=swap');

:root {
  /* Премиальная типографика и палитра (совместимо с существующими --*) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-premium: cubic-bezier(0.33, 1, 0.68, 1);
  --duration-fast: 180ms;
  --duration-med: 260ms;
  --focus-ring: rgba(37, 99, 235, 0.45);
  /* iOS Color System - Light Mode */
  --bg: #FAFAF7;
  --card: #f4f5f8;
  --text: #17191d;
  --muted: #64748b;
  --brand: #1A2332;
  --brand-2: #2C5282;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --ok: #34C759; /* iOS Green */
  --err: #FF3B30; /* iOS Red */
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.12);
  
  /* iOS System Colors */
  --ios-blue: #1A2332;
  --ios-green: #34C759;
  --ios-red: #FF3B30;
  --ios-orange: #FF9500;
  --ios-purple: #AF52DE;
  --ios-pink: #FF2D55;
  --ios-yellow: #FFCC00;
  
  /* iOS Gray Scale */
  --ios-gray-1: #8e8e93;
  --ios-gray-2: #aeaeb2;
  --ios-gray-3: #c7c7cc;
  --ios-gray-4: #d1d1d6;
  --ios-gray-5: #e5e5ea;
  --ios-gray-6: #f2f2f7;
  
  /* Для затемненных секций - iOS Dark Mode */
  --dark-bg: #000000;
  --dark-card: #1c1c1e;
  --dark-text: #ffffff;
  --dark-muted: #8e8e93;
  
  /* iOS Spacing */
  --ios-spacing-xs: 4px;
  --ios-spacing-sm: 8px;
  --ios-spacing-md: 16px;
  --ios-spacing-lg: 24px;
  --ios-spacing-xl: 32px;
  
  /* iOS Typography */
  --ios-font-size-large-title: 34px;
  --ios-font-size-title-1: 28px;
  --ios-font-size-title-2: 22px;
  --ios-font-size-title-3: 20px;
  --ios-font-size-headline: 17px;
  --ios-font-size-body: 17px;
  --ios-font-size-callout: 16px;
  --ios-font-size-subhead: 15px;
  --ios-font-size-footnote: 13px;
  --ios-font-size-caption-1: 12px;
  --ios-font-size-caption-2: 11px;
}

* { 
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body { 
  height: 100%; 
  margin: 0;
  padding: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: #f5f6f8;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.018em;
  overflow-x: hidden;
  max-width: 100vw;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
}

.card-title,
.project-hero h1 {
  overflow-wrap: anywhere;
}

.container { 
  width: min(1180px, 92%); 
  margin: 0 auto; 
  padding: 0 var(--ios-spacing-md);
}

/* Header - темный стиль */
.site-header { 
  position: sticky; 
  top: 0; 
  z-index: 50; 
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(11, 17, 27, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 32px rgba(0, 0, 0, 0.12);
}

.header-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: var(--ios-spacing-sm) 0; 
}

.logo { 
  color: var(--dark-text); 
  text-decoration: none; 
  font-weight: 600; 
  font-size: var(--ios-font-size-title-2);
  letter-spacing: -0.022em;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.logo span { 
  color: var(--ios-blue); 
}

.nav { 
  display: none; 
  gap: var(--ios-spacing-lg); 
}

.nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--ios-spacing-lg);
  align-items: center;
}

.nav li {
  margin: 0;
  padding: 0;
}

.nav a { 
  color: var(--dark-muted); 
  text-decoration: none; 
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 400;
}

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

.nav li span {
  color: var(--dark-muted);
}

/* Бургер-меню - iOS Style */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark-text);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  padding: var(--ios-spacing-sm);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle:active {
  background-color: rgba(255, 255, 255, 0.15);
}

/* iOS Buttons */
.btn { 
  appearance: none; 
  border: none;
  background: transparent; 
  color: var(--ios-blue); 
  padding: var(--ios-spacing-sm) var(--ios-spacing-md); 
  border-radius: var(--radius); 
  cursor: pointer; 
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
  min-height: 44px; 
  min-width: 44px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  font-size: var(--ios-font-size-body);
  font-weight: 400;
  font-family: var(--font-sans);
  letter-spacing: -0.015em;
}

.btn.primary { 
  background: linear-gradient(135deg, #1F3A5F 0%, #2C5282 100%); 
  color: #fff; 
  border-color: transparent; 
  font-weight: 600; 
  letter-spacing: 0.3px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(31, 58, 95, 0.3),
              0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn.primary.big-cta {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.btn.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn.primary:hover::before {
  left: 100%;
}

.btn.primary:hover { 
  filter: brightness(1.1); 
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 58, 95, 0.4),
              0 4px 12px rgba(0, 0, 0, 0.15);
} 

.btn.primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(31, 58, 95, 0.3);
}

.btn.ghost { 
  color: var(--ios-blue);
  background: transparent;
}

.btn.ghost:hover { 
  background: rgba(26, 35, 50, 0.08);
}

.btn.ghost:active {
  background: rgba(26, 35, 50, 0.15);
}

/* Hero - iOS Style */
.hero { 
  padding: var(--ios-spacing-xl) 0 var(--ios-spacing-lg); 
  background: var(--bg);
}

.hero-inner { 
  display: grid; 
  grid-template-columns: 1.1fr .9fr; 
  gap: var(--ios-spacing-xl); 
  align-items: center; 
}

.hero-copy h1 { 
  margin: 0 0 var(--ios-spacing-sm); 
  font-size: var(--ios-font-size-large-title);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.hero-copy p { 
  margin: 0 0 var(--ios-spacing-md); 
  color: var(--ios-gray-1); 
  font-size: var(--ios-font-size-body);
  line-height: 1.47059;
  font-weight: 400;
}

.hero-cta { 
  display: flex; 
  gap: var(--ios-spacing-sm); 
  margin: var(--ios-spacing-md) 0 var(--ios-spacing-sm); 
}

.trust { 
  display: flex; 
  flex-wrap: wrap; 
  gap: var(--ios-spacing-sm) var(--ios-spacing-md); 
  margin-top: var(--ios-spacing-md); 
  color: var(--ios-gray-1); 
}

.trust-item { 
  padding: var(--ios-spacing-xs) var(--ios-spacing-sm); 
  background: var(--ios-gray-6);
  border-radius: 20px; 
  font-size: var(--ios-font-size-footnote);
  font-weight: 400;
}

.hero-visual img { 
  width: 100%; 
  height: auto; 
  border-radius: var(--radius); 
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  object-fit: cover; 
}

/* Sections - iOS Style */
.section-head h2 { 
  margin: 0 0 var(--ios-spacing-xs); 
  font-size: var(--ios-font-size-title-1);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

.section-head p { 
  color: var(--ios-gray-1); 
  margin: 0 0 var(--ios-spacing-md); 
  font-size: var(--ios-font-size-body);
  line-height: 1.47059;
  font-weight: 400;
}

/* Черный текст для секций с белым фоном */
section[style*="background: white"] .section-head h2,
section[style*="background: #f8f9fa"] .section-head h2,
.project-timeline .section-head h2,
.project-cost-calculator .section-head h2,
.faq-section .section-head h2,
.comparison-section .section-head h2,
.testimonials-with-projects .section-head h2 {
  color: #000 !important;
}

section[style*="background: white"] .section-head p,
section[style*="background: #f8f9fa"] .section-head p,
.project-timeline .section-head p,
.project-cost-calculator .section-head p,
.faq-section .section-head p,
.comparison-section .section-head p,
.testimonials-with-projects .section-head p {
  color: #000 !important;
}

/* Catalog - iOS Style */
.catalog { 
  padding: var(--ios-spacing-lg) 0 var(--ios-spacing-md); 
  background: var(--bg);
}

.filters { 
  background: var(--ios-gray-6);
  border: 0.5px solid var(--ios-gray-5);
  padding: 24px; 
  border-radius: 16px; 
  margin: var(--ios-spacing-md) 0 var(--ios-spacing-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.filter-group { 
  display: flex;
  flex-direction: column;
}

.filter-group label { 
  display: block; 
  color: var(--ios-gray-1); 
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.4;
}

.filter-group select, 
.filter-group input[type="number"] { 
  width: 100%; 
  padding: 12px 16px; 
  border-radius: 10px; 
  border: 1px solid var(--ios-gray-4);
  background: var(--bg); 
  color: var(--text);
  font-size: 15px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none;
  appearance: none;
}

.filter-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3px rgba(26, 35, 50, 0.08);
}

.filter-group input[type="number"]::-webkit-inner-spin-button,
.filter-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filter-group input[type="number"] {
  -moz-appearance: textfield;
}

.filter-group.range .range-row { 
  display: grid; 
  grid-template-columns: 1fr auto 1fr; 
  gap: 12px; 
  align-items: center; 
}

.range-separator {
  color: var(--ios-gray-2);
  font-size: 16px;
  font-weight: 500;
  padding: 0 4px;
}

.garage-options {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--ios-blue);
  flex-shrink: 0;
}

.checkbox-label span {
  line-height: 1.4;
}

.filter-actions { 
  display: flex; 
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--ios-gray-5);
  margin-top: 8px;
  align-items: center;
}

.filter-group select:not([value=""]) {
  border-color: rgba(31, 58, 95, 0.3);
  background-color: rgba(31, 58, 95, 0.03);
}

.filter-group input[type="number"]:not(:placeholder-shown) {
  border-color: rgba(31, 58, 95, 0.3);
}

.checkbox-label input[type="checkbox"]:checked + span {
  color: var(--brand);
  font-weight: 500;
}

/* Projects Grid - iOS Style */
.projects-grid { 
  display: grid; 
  grid-template-columns: repeat(3, minmax(0,1fr)); 
  gap: var(--ios-spacing-md); 
}

.card { 
  background: var(--bg); 
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: var(--radius); 
  overflow: hidden; 
  transition: transform var(--duration-med) var(--ease-premium), box-shadow var(--duration-med) var(--ease-premium), border-color var(--duration-fast) ease;
  box-shadow: var(--shadow);
}

.card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-lg);
  border-color: rgba(26, 74, 140, 0.18);
}

.card-thumb {
  position: relative;
  overflow: hidden;
}

.card-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.card:hover .card-thumb::before {
  opacity: 1;
}

.card-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.card:hover .card-thumb::after {
  opacity: 1;
}

.card:active {
  transform: scale(0.98);
}

.card-thumb img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.card-thumb img:not(.loaded) {
  opacity: 0;
}

.card-thumb img.loaded {
  opacity: 1;
}

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

.badge { 
  position: absolute; 
  top: var(--ios-spacing-sm); 
  left: var(--ios-spacing-sm); 
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff; 
  padding: var(--ios-spacing-xs) var(--ios-spacing-sm); 
  border-radius: 20px; 
  font-size: var(--ios-font-size-caption-1);
  font-weight: 500;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
}

.card-body { 
  padding: var(--ios-spacing-md); 
  display: grid; 
  gap: var(--ios-spacing-sm); 
}

.card-title { 
  margin: 0; 
  font-size: var(--ios-font-size-headline);
  font-weight: 600; 
  color: var(--text);
  letter-spacing: -0.022em;
  line-height: 1.4;
}

.meta { 
  display: flex; 
  flex-wrap: wrap; 
  gap: var(--ios-spacing-sm) var(--ios-spacing-md); 
  color: var(--ios-gray-1); 
  font-size: var(--ios-font-size-subhead);
  font-weight: 400;
}

.price { 
  font-weight: 600; 
  color: var(--ios-blue); 
  font-size: var(--ios-font-size-headline);
}

.card-actions { 
  display: flex; 
  gap: var(--ios-spacing-sm); 
  margin-top: var(--ios-spacing-xs); 
}

/* Custom section - iOS Style */
.custom { 
  padding: var(--ios-spacing-lg) 0 var(--ios-spacing-md); 
  background: var(--bg);
}

.custom-inner { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: var(--ios-spacing-xl); 
  align-items: center; 
}

.custom-copy p { 
  color: var(--ios-gray-1);
  font-size: var(--ios-font-size-body);
  line-height: 1.47059;
}

.custom-list { 
  margin: var(--ios-spacing-md) 0 var(--ios-spacing-md); 
  padding-left: var(--ios-spacing-lg); 
  color: var(--text);
  font-size: var(--ios-font-size-body);
  line-height: 1.47059;
}

/* Исправление цвета текста для темного фона */
.custom[style*="background: #0c1623"] .custom-copy h2,
.custom[style*="background: #0c1623"] .custom-copy p,
.custom[style*="background: #0c1623"] .custom-list,
.custom[style*="background: #0c1623"] .custom-list li {
  color: #ffffff !important;
}

.custom[style*="background: #0c1623"] .custom-copy p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.custom[style*="background: #0c1623"] .custom-list {
  color: rgba(255, 255, 255, 0.85) !important;
}

.custom-list li {
  margin-bottom: var(--ios-spacing-sm);
}

.custom-visual img { 
  width: 100%; 
  border-radius: var(--radius); 
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Why - iOS Style */
.why { 
  padding: var(--ios-spacing-lg) 0 var(--ios-spacing-md); 
  background: var(--ios-gray-6);
}

.why-grid { 
  display: grid; 
  grid-template-columns: repeat(4, minmax(0,1fr)); 
  gap: var(--ios-spacing-md); 
}

.why-card { 
  background: var(--bg);
  border: 0.5px solid var(--ios-gray-5);
  padding: var(--ios-spacing-md); 
  border-radius: var(--radius); 
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.why-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.why-card h3 { 
  margin: 0 0 var(--ios-spacing-sm); 
  font-size: var(--ios-font-size-headline);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.022em;
}

.why-card p { 
  margin: 0; 
  color: var(--ios-gray-1);
  font-size: var(--ios-font-size-subhead);
  line-height: 1.47059;
}

/* Contacts */
.contacts { padding: 20px 0 40px; }
.contacts-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
.contacts-info p, .contacts-info a { color: var(--muted); text-decoration: none; }
.contacts-map img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

/* Calculator - iOS Style */
.calculator { 
  padding: var(--ios-spacing-xl) 0; 
  background: var(--bg);
}

.calc-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  gap: var(--ios-spacing-md); 
  margin-top: var(--ios-spacing-lg); 
}

.calc-field label { 
  display: block; 
  color: var(--ios-gray-1); 
  font-size: var(--ios-font-size-footnote);
  font-weight: 400;
  margin-bottom: var(--ios-spacing-xs); 
}
.calc-field input, 
.calc-field select { 
  width: 100%; 
  padding: var(--ios-spacing-sm) var(--ios-spacing-md); 
  border-radius: var(--radius); 
  border: 0.5px solid var(--ios-gray-4);
  background: var(--bg); 
  color: var(--text);
  font-size: var(--ios-font-size-body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none;
  appearance: none;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--ios-blue);
}
.calc-actions { 
  display: flex; 
  gap: var(--ios-spacing-sm); 
  align-items: end; 
}

.calc-result { 
  margin-top: var(--ios-spacing-md); 
  background: rgba(26, 35, 50, 0.08);
  border: 0.5px solid rgba(0, 122, 255, 0.3);
  padding: var(--ios-spacing-md); 
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Результаты калькулятора */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.result-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.result-value {
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .result-value {
    font-size: 1.2rem;
  }
}

/* Редактор страниц */
.page-editor {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.08);
}

.page-selector {
  margin-bottom: 20px;
}

.page-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.page-selector select {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.editor-section {
  margin-bottom: 20px;
}

.editor-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text);
}

.editor-section input,
.editor-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  box-sizing: border-box;
}

.editor-section textarea {
  resize: vertical;
  min-height: 100px;
}

.editor-section input:focus,
.editor-section textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.1);
}

/* Footer - iOS Style */
.site-footer { 
  border-top: 0.5px solid var(--ios-gray-5); 
  padding: var(--ios-spacing-lg) 0; 
  background: var(--ios-gray-6);
}

.footer-inner { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  color: var(--ios-gray-1);
}

.header-actions { 
  display: flex; 
  align-items: center; 
  gap: 20px; 
}

.social-links { 
  display: flex; 
  gap: var(--ios-spacing-sm); 
}

.social-links a { 
  color: var(--ios-gray-1); 
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
}

.social-links a:hover { 
  color: var(--ios-blue); 
}

/* Кнопка в шапке - фиксированный размер */
.header-actions .btn.primary {
  width: auto !important;
  min-width: 180px;
  padding: 12px 24px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Анимация для иконки MAX */
.max-icon-link {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.max-icon-link svg {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.max-icon-link:hover {
  transform: translateY(-2px) scale(1.1);
}

.max-icon-link:hover svg {
  transform: rotate(5deg);
  filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.3));
}

.footer-content { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  width: 100%; 
}

.footer-info { 
  display: flex; 
  flex-direction: column; 
  gap: var(--ios-spacing-sm); 
}

.footer-links { 
  display: flex; 
  gap: var(--ios-spacing-md); 
}

.footer-links a { 
  color: var(--ios-gray-1); 
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover { 
  color: var(--text); 
}

a.footer-privacy-highlight {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 122, 255, 0.45);
  background: rgba(255, 255, 255, 0.95);
  color: var(--brand) !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
a.footer-privacy-highlight:hover {
  border-color: var(--brand);
  box-shadow: 0 3px 14px rgba(26, 35, 50, 0.15);
  color: var(--brand-2) !important;
}

.footer-social .social-links a { 
  color: var(--ios-gray-1); 
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1); 
}

.footer-social .social-links a:hover { 
  color: var(--ios-blue); 
}

/* Footer sections - iOS Style */
.footer-section {
  color: var(--text);
}

.footer-section h3,
.footer-section h4 {
  color: var(--text);
  font-size: var(--ios-font-size-headline);
  font-weight: 600;
  margin-bottom: var(--ios-spacing-sm);
}

.footer-section p {
  color: var(--ios-gray-1);
  font-size: var(--ios-font-size-subhead);
  margin: var(--ios-spacing-xs) 0;
}

.footer-section a {
  color: var(--ios-blue);
  text-decoration: none;
  transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-section a:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

/* Modals */
.modal { 
  position: fixed; 
  inset: 0; 
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-dialog { 
  position: relative; 
  max-width: 520px; 
  width: 90%;
  margin: 6vh auto; 
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px; 
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.modal-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1F3A5F 0%, #2C5282 50%, #1F3A5F 100%);
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.modal-close { 
  position: absolute; 
  top: 16px; 
  right: 16px; 
  background: rgba(0, 0, 0, 0.05); 
  border: none; 
  color: var(--muted); 
  font-size: 24px; 
  cursor: pointer;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-close:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1) rotate(90deg);
}
.modal-close:active {
  transform: scale(0.95) rotate(90deg);
}
.modal-content { 
  position: relative;
  background: transparent;
  padding: 32px;
  animation: modalFadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content h3 {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1F3A5F 0%, #2C5282 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-content > p {
  margin: 0 0 28px 0;
  color: var(--ios-gray-1);
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.8;
}

.modal-header {
  margin-bottom: var(--ios-spacing-lg);
  padding-right: 40px;
}

.modal-header h2 {
  margin: 0;
  font-size: var(--ios-font-size-title-2);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.022em;
}

.modal-body {
  color: var(--text);
}

.modal-body p {
  color: var(--ios-gray-1);
  font-size: var(--ios-font-size-body);
  line-height: 1.47059;
}

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

/* Forms - iOS Style */
.form-row { 
  margin-bottom: 20px; 
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.form-row input, 
.form-row textarea,
.form-row select { 
  width: 100%; 
  padding: 14px 16px; 
  border-radius: 12px; 
  border: 2px solid rgba(0, 0, 0, 0.08);
  background: #ffffff; 
  color: var(--text);
  font-size: 16px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  letter-spacing: -0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  appearance: none;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: #1F3A5F;
  box-shadow: 0 0 0 4px rgba(31, 58, 95, 0.1),
              0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.form-row input:invalid { 
  border-color: rgba(239, 83, 80, 0.5);
  box-shadow: 0 0 0 4px rgba(239, 83, 80, 0.1);
}

.form-row input::placeholder {
  color: rgba(0, 0, 0, 0.3);
  opacity: 1;
}

/* Privacy Checkbox Styles */
.privacy-checkbox {
  margin: 20px 0;
}

.privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.privacy-label:hover {
  background: rgba(0, 0, 0, 0.04);
}

.privacy-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #1F3A5F;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  background: #ffffff;
  appearance: checkbox !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  position: relative;
  padding: 0;
  box-shadow: none;
}

.privacy-label input[type="checkbox"]:checked {
  background-color: #1F3A5F;
  border-color: #1F3A5F;
  accent-color: #1F3A5F;
}

.privacy-label input[type="checkbox"]:focus {
  outline: 2px solid rgba(31, 58, 95, 0.3);
  outline-offset: 2px;
  border-color: #1F3A5F;
}

.privacy-label span {
  flex: 1;
  user-select: none;
}

.privacy-label a {
  color: #1F3A5F;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.privacy-label a:hover {
  border-bottom-color: #1F3A5F;
}

.form-actions { 
  display: flex; 
  align-items: center; 
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.form-note { 
  color: var(--ios-gray-1); 
  font-size: var(--ios-font-size-footnote);
  font-weight: 400;
  margin-top: var(--ios-spacing-xs);
}
.msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.ok { background: rgba(76,175,80,.1); border: 1px solid rgba(76,175,80,.3); }
.msg.err { background: rgba(239,83,80,.1); border: 1px solid rgba(239,83,80,.3); }

/* Кнопка "Смотреть все проекты" */
.view-all-projects {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding: 20px 0;
}

.view-all-projects .btn {
  font-size: 1.1rem;
  padding: 15px 30px;
  border-radius: 12px;
}

/* Анимация карточек в каталоге */
.catalog-card-hidden {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.catalog-card-visible {
  opacity: 1;
  transform: translateY(0);
}

/* На мобильных все карточки видны сразу */
@media (max-width: 768px) {
  .catalog-card-hidden {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .custom-inner { grid-template-columns: 1fr; }
  .contacts-inner { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}
@media (min-width: 900px) { .nav { display: flex; } }

/* Адаптивность фильтров */
@media (max-width: 1024px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .filters {
    padding: 20px;
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
  }
  
  .garage-options {
    flex-wrap: wrap;
  }
  
  .filter-actions {
    flex-direction: column;
  }
  
  .filter-actions .btn {
    width: 100%;
  }
  
  .projects-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: 34px; }
}


/* Анимация появления и переходов (MIKHALIT CMS) */
.fade-in-up {opacity:0;transform:translateY(24px);transition:all .8s cubic-bezier(0.42,0,0.58,1);will-change:opacity,transform;}
.fade-in-up.visible {opacity:1;transform:none;}

.btn {transition:box-shadow .23s cubic-bezier(0.53,0,.43,1),transform .23s,background .23s;}
.btn:hover {box-shadow:0 6px 28px rgba(80,150,255,.10),0 2px 3px rgba(57,45,118,.02);transform:scale(1.055);}
.btn:active {transform:scale(0.96);box-shadow:none;}

.card {transition:box-shadow .32s cubic-bezier(0.42,0,0.6,1),transform .32s cubic-bezier(0.5,0,0.4,1);}
.card.fade-in-up {transition-delay:.15s;}
.card:hover, .card:focus-within {box-shadow:0 12px 50px rgba(40,70,130,.40);transform:translateY(-8px) scale(1.01);}

.section-head h2, .footer-inner {transition:opacity .8s cubic-bezier(.42,0,.58,1),transform .8s;opacity:0;transform:translateY(34px);}
.section-head h2.visible,.footer-inner.visible {opacity:1;transform:none;}

section, .custom-inner, .contacts-inner, .why, .calculator, .projects-grid, .why-grid {
  transition:opacity 0.7s cubic-bezier(.53,0,.43,1),transform .55s cubic-bezier(.47,.02,.34,1.05);opacity:0;transform:translateY(35px);}
section.visible, .custom-inner.visible, .contacts-inner.visible, .why.visible, .calculator.visible, .projects-grid.visible, .why-grid.visible {opacity:1;transform:none;}
/* Hero and header must never start hidden — prevents CLS and bad LCP */
section.hero-full, .site-header {opacity:1!important;transform:none!important;transition:none!important;}

.projects-grid .card {transition-delay:.1s;}
.projects-grid .card:nth-child(2) {transition-delay:.18s;}
.projects-grid .card:nth-child(3) {transition-delay:.24s;}
.projects-grid .card:nth-child(4) {transition-delay:.3s;}

.why-grid .why-card {transition-delay:.12s;}
.why-grid .why-card:nth-child(2) {transition-delay:.18s;}
.why-grid .why-card:nth-child(3) {transition-delay:.24s;}
.why-grid .why-card:nth-child(4) {transition-delay:.3s;}

/* Модальные (MIKHALIT) */
.modal {transition:background .45s cubic-bezier(.51, 0, .49, 1);}
.modal[aria-hidden="false"] .modal-backdrop {opacity:.95;transition:opacity .37s;}
.modal[aria-hidden="false"] .modal-dialog {animation: modal-pop .63s cubic-bezier(.43,1.6,.33,1.0) both;}
@keyframes modal-pop {from{transform:scale(.75) translateY(28px);opacity:.7;}to{transform:none;opacity:1;}}

/* Full-screen hero для MIKHALIT */
.hero-full {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  background: linear-gradient(rgba(0,0,0,.5),rgba(0,0,0,.5)), url('/assets/images/hero-bg.jpg') center center/cover no-repeat;
  animation: heroZoom 8s ease-in-out infinite;
}
@keyframes heroZoom {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.05);
    opacity: 0.8;
  }
}
.hero-center {
  position: relative;
  z-index: 2; width: 100%;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 100px;
}
.hero-content {
  width: 100%;
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
  color: #fff;
}
.big-logo { color: #fff; font-size: 2.5rem; text-shadow: 0 6px 38px rgba(0,11,70,.28); letter-spacing: 0.04em; font-weight: 900; display: block; margin-bottom: 18px;}
.hero-title { 
  color: #fff; 
  font-size: 2.25rem; 
  font-weight: 800; 
  line-height: 1.1; 
  margin: 0 0 16px 0; 
  text-shadow: 0 2px 19px rgba(0,0,50,0.14), 0 4px 8px rgba(0,0,0,0.3);
  animation: fadeInUp 0.8s ease-out;
}
@media (min-width:600px){ .hero-title {font-size: 3rem;} }
.hero-lead { 
  color: #e6e8eb; 
  font-size: 1.18rem; 
  margin-bottom: 28px; 
  opacity:.97;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: fadeInUp 1s ease-out 0.2s both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.big-cta { font-size: 1.18rem; padding:16px 38px; border-radius: 14px; margin-right:16px; }
.scroll-down-arrow { position: absolute; left: 0; right:0; margin: auto; bottom: 34px; background: none; border:none; cursor:pointer; animation:arrow-bounce 1.8s infinite .6s; opacity:.85; z-index:4; }
.scroll-down-arrow svg {display:block;animation:downArrowFade .78s linear alternate infinite;}
@keyframes downArrowFade{0%{opacity:.6;}100%{opacity:1;}}
@keyframes arrow-bounce{0%,100%{transform:translateY(0);}50%{transform:translateY(10px);}}

/* Старый hero удалён */
.hero-inner, .hero-visual, .hero-copy {display:none !important;}

/* Ипотечный калькулятор */
.calc-result {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-top: 30px;
  box-shadow: 0 8px 32px rgba(31, 58, 95, 0.3);
}

.calc-result h3 {
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.result-label {
  font-weight: 500;
  opacity: 0.9;
}

.result-value {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

@media (max-width: 768px) {
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .result-value {
    font-size: 1.2rem;
  }
}

/* Секция с отзывами */
.reviews {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(31, 58, 95, 0.05) 0%, rgba(14, 17, 22, 0.8) 100%);
}

.reviews .section-head {
  text-align: center;
  margin-bottom: 50px;
}

.reviews .section-head h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.reviews .section-head p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.review-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
  background: linear-gradient(135deg, var(--card) 0%, rgba(255,255,255,0.98) 100%);
}

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

.review-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.author-info h4, .author-info .reviewer-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
  display: block;
}

.author-location {
  font-size: 14px;
  color: var(--muted);
}

.review-rating .stars {
  color: #ffd700;
  font-size: 18px;
  line-height: 1;
}

.review-content p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 15px;
  font-style: italic;
}

.review-date {
  font-size: 14px;
  color: var(--muted);
}

.review-date time {
  color: var(--brand);
  font-weight: 500;
}

/* Адаптивность для отзывов */
@media (max-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .reviews .section-head h2 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .reviews {
    padding: 60px 0;
  }
  
  .reviews .section-head h2 {
    font-size: 28px;
  }
  
  .reviews .section-head p {
    font-size: 16px;
  }
  
  .review-card {
    padding: 20px;
  }
  
  .review-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .review-author {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .reviews .section-head h2 {
    font-size: 24px;
  }
  
  .review-card {
    padding: 16px;
  }
  
  .author-avatar {
    width: 50px;
    height: 50px;
  }
  
  .author-info h4 {
    font-size: 16px;
  }
  
  .review-content p {
    font-size: 15px;
  }
}

/* Секция с видео готовых домов */
.completed-houses {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(31, 58, 95, 0.05) 0%, rgba(14, 17, 22, 0.8) 100%);
}

.completed-houses .section-head {
  text-align: center;
  margin-bottom: 50px;
}

.completed-houses .section-head h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.completed-houses .section-head p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 50px;
}

.video-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.video-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.video-play-button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card:hover .video-play-button {
  transform: scale(1.1);
}

.video-card:hover .video-play-button circle {
  fill: rgba(0,0,0,0.85);
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #000;
  border-radius: var(--radius) var(--radius) 0 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-info {
  padding: 24px;
}

.video-info h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.video-info p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.4;
}

.video-location {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(31, 58, 95, 0.2);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid rgba(31, 58, 95, 0.3);
}

/* Адаптивность для видео секции */
@media (max-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .completed-houses .section-head h2 {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .completed-houses {
    padding: 60px 0;
  }
  
  .completed-houses .section-head h2 {
    font-size: 28px;
  }
  
  .completed-houses .section-head p {
    font-size: 16px;
  }
  
  .video-info {
    padding: 20px;
  }
  
  .video-info h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .completed-houses .section-head h2 {
    font-size: 24px;
  }
  
  .video-info {
    padding: 16px;
  }
  
  .video-info h3 {
    font-size: 16px;
  }
  
  .video-info p {
    font-size: 13px;
  }
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

/* Базовые мобильные стили */
@media (max-width: 768px) {
  /* Улучшенная типографика для мобильных */
  body {
    font-size: 16px;
    line-height: 1.6;
    /* Отступ под фиксированную шапку (высота блока + вырез экрана) */
    padding-top: calc(68px + env(safe-area-inset-top, 0px));
  }
  
  /* Контейнер */
  .container {
    width: 95%;
    padding: 0 10px;
  }
  
  /* КРИТИЧНО: Показываем проекты на мобильных сразу, без анимации */
  .projects-grid,
  section,
  .custom-inner,
  .contacts-inner,
  .why,
  .calculator,
  .why-grid,
  .card,
  .why-card {
    opacity: 1 !important;
    transform: none !important;
  }
  
  /* Шапка сайта — всегда у верхнего края вьюпорта на мобильных */
  .site-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    padding: env(safe-area-inset-top, 0px) 0 0;
    z-index: 50;
  }
  
  .header-inner {
    padding: 12px 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .logo {
    font-size: 20px;
    flex: 1;
  }
  
  /* Мобильная навигация */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 17, 27, 0.95);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 0 0 12px 12px;
    padding: 20px;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
  }
  
  .nav ul {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  .nav li {
    width: 100%;
  }
  
  .nav.active {
    display: flex;
  }
  
  .nav.active ul {
    display: flex;
  }
  
  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: 16px;
    display: block;
    width: 100%;
    color: rgba(255, 255, 255, 0.9);
  }
  
  .nav a:hover {
    color: rgba(255, 255, 255, 1);
  }
  
  .nav li span {
    color: rgba(255, 255, 255, 0.7);
  }
  
  .nav li:last-child a {
    border-bottom: none;
  }
  
  /* Бургер-меню (показываем на мобильных) */
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  /* Кнопки в шапке */
  .header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .header-actions .btn {
    padding: 8px 12px;
    font-size: 14px;
    width: auto !important;
    min-width: auto;
  }
  
  /* Социальные ссылки в шапке */
  .social-links {
    display: flex;
    gap: 8px;
  }
  
  .social-links a {
    padding: 6px;
  }
  
  /* Главный баннер */
  .hero {
    padding: 40px 0 20px;
  }
  
  .hero-center {
    /* Раньше компенсировали шапку в потоке; отступ перенесён на body */
    padding-top: 28px !important;
  }
  
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .hero-copy h1 {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  
  .hero-copy p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .hero-cta .btn {
    width: 100%;
    max-width: 280px;
    padding: 14px 20px;
    font-size: 16px;
  }
  
  .trust {
    justify-content: center;
    margin-top: 20px;
  }
  
  .trust-item {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  /* Сетки проектов */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .project-card,
  .card {
    margin-bottom: 15px;
  }
  
  .project-card img,
  .card-thumb {
    height: 240px;
    min-height: 240px;
    object-fit: cover;
  }
  
  .project-card-body,
  .card-body {
    padding: 12px;
  }
  
  .project-card-body h3,
  .card-body h3 {
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.3;
  }
  
  .project-card-body p,
  .card-body p {
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
  }
  
  .project-meta,
  .card-meta {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    font-size: 11px;
  }
  
  .project-meta span,
  .card-meta span {
    font-size: 11px;
  }
  
  .card-price {
    font-size: 16px;
    margin-top: 8px;
  }
  
  /* Фильтры */
  .filters {
    padding: 20px 0;
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .filter-group {
    margin-bottom: 15px;
  }
  
  .filter-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .filter-group select,
  .filter-group input {
    padding: 12px;
    font-size: 16px;
  }
  
  /* Формы */
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  .form-group textarea {
    min-height: 100px;
  }
  
  /* Кнопки */
  .btn {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
  }
  
  /* Секции */
  .section {
    padding: 40px 0;
  }
  
  .section-head h2 {
    font-size: 28px;
    margin-bottom: 16px;
  }
  
  .section-head p {
    font-size: 16px;
  }
  
  /* Ипотечный калькулятор */
  .mortgage-calc {
    padding: 20px;
  }
  
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .calc-field {
    margin-bottom: 15px;
  }
  
  .calc-field label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .calc-field input,
  .calc-field select {
    padding: 12px;
    font-size: 16px;
  }
  
  /* Результаты калькулятора */
  .result-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .result-item {
    padding: 12px;
  }
  
  .result-label {
    font-size: 14px;
  }
  
  .result-value {
    font-size: 16px;
  }
}

/* ===== ПЛАВАЮЩИЕ КНОПКИ СВЯЗИ ===== */
.floating-contact-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: none; /* Скрыты по запросу */
  flex-direction: column;
  gap: 12px;
}

.floating-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
}

.floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.floating-btn svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.phone-btn {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
}

.telegram-btn {
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
}

.max-btn {
  background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
}

@media (max-width: 768px) {
  .floating-contact-buttons {
    bottom: 15px;
    right: 15px;
  }
  
  .floating-btn {
    width: 56px;
    height: 56px;
  }
  
  .floating-btn svg {
    width: 28px;
    height: 28px;
  }
}

/* ===== FAQ СЕКЦИЯ ===== */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(31, 58, 95, 0.2);
  background: rgba(31, 58, 95, 0.02);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 24px 20px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .faq-question {
    padding: 16px 18px;
    font-size: 15px;
  }
  
  .faq-answer p {
    padding: 0 18px 16px;
    font-size: 14px;
  }
}

/* ===== ИНДИКАТОРЫ ДОВЕРИЯ ===== */
.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 0;
  margin: 40px 0;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}

.trust-indicator-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(31, 58, 95, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(31, 58, 95, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.trust-indicator-item:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(31, 58, 95, 0.15);
  border-color: rgba(31, 58, 95, 0.3);
  box-shadow: 0 4px 12px rgba(31, 58, 95, 0.2);
}

.trust-indicator-item svg {
  width: 24px;
  height: 24px;
  fill: var(--brand);
  transition: transform 0.3s ease;
}

.trust-indicator-item:hover svg {
  transform: scale(1.1);
}

.trust-indicator-text {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .trust-indicators {
    flex-direction: column;
    gap: 12px;
    padding: 20px 15px;
  }
  
  .trust-indicator-item {
    width: 100%;
    justify-content: center;
  }
}

/* ===== ПАГИНАЦИЯ ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px 0 20px;
  padding: 20px 0;
}

.pagination-btn {
  min-width: 44px;
  height: 44px;
  padding: 10px 15px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  font-weight: 500;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--brand);
  border-color: var(--brand);
  transform: translateY(-2px);
}

.pagination-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--muted);
  font-size: 14px;
  margin: 0 10px;
}

@media (max-width: 600px) {
  .pagination {
    gap: 8px;
  }
  
  .pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .pagination-info {
    font-size: 13px;
  }
}

  /* Очень маленькие экраны */
@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 0 5px;
  }
  
  .hero-copy h1 {
    font-size: 28px;
  }
  
  .hero-copy p {
    font-size: 15px;
  }
  
  .section-head h2 {
    font-size: 24px;
  }
  
  .project-card-body h3 {
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px;
    font-size: 16px;
  }
  
  .calc-field input,
  .calc-field select {
    padding: 10px;
    font-size: 16px;
  }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    width: 90%;
  }
  
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Скрытие бургер-меню на десктопе */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
  
  .nav {
    display: flex !important;
  }
}

/* Дополнительные мобильные стили */
@media (max-width: 768px) {
  /* Модальные окна */
  .modal {
    padding: 20px;
  }
  
  .modal-content {
    width: 95%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
  }
  
  .modal-header h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .modal-close {
    font-size: 24px;
    top: 10px;
    right: 15px;
  }
  
  /* Таблицы в админке */
  .admin-table {
    overflow-x: auto;
  }
  
  .admin-table table {
    min-width: 600px;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 8px;
    font-size: 14px;
  }
  
  /* Формы в админке */
  .admin-form {
    padding: 20px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-group {
    width: 100%;
  }
  
  /* Кнопки действий */
  .btn-small {
    padding: 6px 10px;
    font-size: 12px;
  }

  /* Убедимся что карточки проектов отображаются одна колонка */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  
  /* Секция с видео */
  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .video-card {
    margin-bottom: 20px;
  }
  
  .video-info {
    padding: 16px;
  }
  
  .video-info h3 {
    font-size: 16px;
  }
  
  .video-info p {
    font-size: 13px;
  }
  
  /* Ипотечный калькулятор - компактная версия */
  .compact-mortgage-calc {
    padding: 15px;
  }
  
  .compact-calc-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .compact-calc-field {
    margin-bottom: 10px;
  }
  
  .compact-calc-field label {
    font-size: 13px;
    margin-bottom: 4px;
  }
  
  .compact-calc-field input,
  .compact-calc-field select {
    padding: 8px;
    font-size: 14px;
  }
  
  .compact-result {
    padding: 10px;
  }
  
  .compact-result-item {
    padding: 8px;
  }
  
  .compact-result-label {
    font-size: 12px;
  }
  
  .compact-result-value {
    font-size: 14px;
  }
  
  /* Футер */
  .footer {
    padding: 40px 0 20px;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
  
  .footer-section {
    margin-bottom: 20px;
  }
  
  .footer-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .footer-section p,
  .footer-section a {
    font-size: 14px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  /* Улучшения для touch-устройств */
  .btn,
  .mobile-menu-toggle,
  .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Убираем hover-эффекты на touch-устройствах */
  @media (hover: none) {
    .btn:hover,
    .nav a:hover,
    .project-card:hover {
      transform: none;
      filter: none;
    }
  }
}

/* ===== СОЦИАЛЬНЫЕ ИКОНКИ НА СТРАНИЦЕ КОНТАКТОВ ===== */
.social-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  overflow: hidden;
}

.social-icon-circle:hover {
  transform: translateY(-3px) scale(1.05);
  filter: brightness(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-icon-circle svg {
  display: block;
  transition: all 0.3s ease;
}

/* Адаптивность для социальных иконок */
@media (max-width: 768px) {
  .social-icons-contacts {
    justify-content: flex-start;
  }
  
  .social-icon-circle svg {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (max-width: 480px) {
  .social-icons-contacts {
    gap: 12px !important;
  }
  
  .social-icon-circle svg {
    width: 32px !important;
    height: 32px !important;
  }
}

/* ===== ВЫБОР МЕССЕНДЖЕРОВ В ФОРМАХ ===== */
.messenger-choice {
  margin: 24px 0;
  padding: 20px;
  background: linear-gradient(135deg, rgba(31, 58, 95, 0.04) 0%, rgba(44, 82, 130, 0.06) 100%);
  border-radius: 16px;
  border: 2px solid rgba(31, 58, 95, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.messenger-choice-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.messenger-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.messenger-checkbox-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  padding: 10px 16px;
  background: #ffffff;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  min-width: 120px;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.messenger-checkbox-item:hover {
  border-color: rgba(31, 58, 95, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.messenger-checkbox-item input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #1F3A5F;
  flex-shrink: 0;
}

.messenger-checkbox-item input[type="radio"]:checked + label,
.messenger-checkbox-item:has(input[type="radio"]:checked) {
  background: linear-gradient(135deg, rgba(31, 58, 95, 0.1) 0%, rgba(44, 82, 130, 0.15) 100%);
  border-color: #1F3A5F;
  color: #1F3A5F;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(31, 58, 95, 0.2);
}

.messenger-checkbox-item:has(input[type="radio"]:checked) label svg {
  opacity: 1;
  filter: brightness(0.9);
}

.messenger-checkbox-item label {
  margin: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  user-select: none;
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: center;
}

.messenger-checkbox-item label svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.messenger-checkbox-item:hover label svg,
.messenger-checkbox-item:has(input[type="radio"]:checked) label svg {
  opacity: 1;
}

@media (max-width: 768px) {
  .modal-dialog {
    max-width: 95%;
    margin: 4vh auto;
    border-radius: 20px;
    padding: 0;
  }
  
  .modal-content {
    padding: 24px 20px;
  }
  
  .modal-content h3 {
    font-size: 24px;
  }
  
  .modal-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  
  .form-row input,
  .form-row textarea,
  .form-row select {
    padding: 12px 14px;
    font-size: 16px; /* Предотвращает zoom на iOS */
  }
  
  .messenger-choice {
    padding: 16px;
    margin: 20px 0;
    border-radius: 14px;
  }
  
  .messenger-choice-label {
    font-size: 13px;
    margin-bottom: 12px;
  }
  
  .messenger-checkboxes {
    gap: 8px;
    flex-direction: column;
  }
  
  .messenger-checkbox-item {
    font-size: 14px;
    min-width: 100%;
    padding: 12px 16px;
  }
  
  .messenger-checkbox-item label {
    font-size: 14px;
  }
  
  .btn.primary {
    padding: 14px 24px;
    font-size: 16px;
  }
  
  .privacy-label {
    padding: 10px;
    font-size: 13px;
  }
  
  .form-actions {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* Timeline Styles */
.project-timeline .timeline {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
}

.project-timeline .timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
}

.timeline-step {
  position: relative;
  margin-bottom: 40px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(31, 58, 95, 0.4);
  position: relative;
  z-index: 1;
}

.step-content {
  flex: 1;
  background: white;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.step-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.step-content h3 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  color: #000;
}

.step-content p {
  margin: 0 0 15px 0;
  color: #000;
  line-height: 1.7;
}

.step-duration {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(31, 58, 95, 0.08);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .project-timeline .timeline::before {
    left: 20px;
  }
  
  .timeline-step {
    gap: 20px;
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .step-content {
    padding: 20px;
  }
  
  .step-content h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .project-timeline .timeline::before {
    left: 15px;
  }
  
  .timeline-step {
    gap: 15px;
  }
  
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  
  .step-content {
    padding: 15px;
  }
}

/* FAQ Styles */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item.active {
  border-color: var(--brand);
  background: white;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  color: #000;
  transition: all 0.3s ease;
}

.faq-question:hover {
  color: var(--brand);
}

.faq-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: var(--brand-2);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 1000px;
}

.faq-answer p, .faq-answer ul {
  padding: 0 25px 20px 25px;
  margin: 0;
  color: #000;
  line-height: 1.7;
}

.faq-answer ul {
  list-style: none;
  padding-left: 40px;
}

.faq-answer li {
  padding: 5px 0;
  position: relative;
}

.faq-answer li::before {
  content: '✓';
  position: absolute;
  left: -25px;
  color: var(--brand);
  font-weight: bold;
}

@media (max-width: 768px) {
  .faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  .faq-answer p, .faq-answer ul {
    padding: 0 20px 15px 20px;
    font-size: 0.95rem;
  }
  
  /* Сравнительная таблица на мобильных */
  .comparison-table {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  /* Отзывы на мобильных */
  .testimonials-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Дополнительная адаптивность для маленьких экранов */
@media (max-width: 480px) {
  .section-head h2 {
    font-size: 24px !important;
  }
  
  .section-head p {
    font-size: 14px !important;
  }
  
  .timeline-summary {
    padding: 20px 15px !important;
  }
  
  .calculator-container {
    padding: 25px 20px !important;
  }
  
  .comparison-col {
    padding: 25px 20px !important;
  }
  
  .testimonial-card {
    font-size: 14px;
  }
}

/* Наши работы */
.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12) !important;
}

/* Адаптивность для "Наши работы" */
@media (max-width: 768px) {
  .works-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ===== РАСШИРЕННАЯ МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

/* Адаптация для Hero секции */
@media (max-width: 768px) {
  .hero {
    padding: 40px 0 20px;
  }
  
  .hero-copy h1 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 15px;
  }
  
  .hero-copy p {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }
  
  .hero-cta .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .trust {
    justify-content: center;
  }
  
  .trust-item {
    font-size: 13px;
    padding: 5px 8px;
  }
}

/* Адаптация фильтров - дублируется в общих стилях выше, оставляем для совместимости */

/* Адаптация карточек проектов для средних экранов */
@media (min-width: 640px) and (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .meta {
    font-size: 13px;
  }
}

/* Адаптация Why секции */
@media (max-width: 768px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .why-item {
    padding: 20px;
    text-align: center;
  }
  
  .why-item h3 {
    font-size: 18px;
  }
  
  .why-item p {
    font-size: 14px;
  }
}

/* Адаптация Custom секции */
@media (max-width: 768px) {
  .custom {
    padding: 30px 0;
  }
  
  .custom-inner {
    gap: 25px;
  }
  
  .custom-copy h2 {
    font-size: 26px;
    margin-bottom: 15px;
  }
  
  .custom-copy p {
    font-size: 15px;
  }
  
  .custom-list li {
    font-size: 14px;
    margin-bottom: 10px;
  }
}

/* Адаптация контактов */
@media (max-width: 768px) {
  .contacts-inner {
    gap: 30px;
  }
  
  .contact-info h2 {
    font-size: 26px;
  }
  
  .contact-item {
    font-size: 15px;
    padding: 12px 0;
  }
  
  .contact-item strong {
    display: block;
    margin-bottom: 5px;
  }
}

/* Адаптация футера */
@media (max-width: 768px) {
  .footer {
    padding: 30px 0 20px;
  }
  
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
}

/* Адаптация форм */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group label {
    font-size: 14px;
    margin-bottom: 6px;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Предотвращает зум на iOS */
    padding: 12px;
  }
  
  .form-group textarea {
    min-height: 120px;
  }
  
  .checkbox-label {
    font-size: 13px;
  }
  
  button[type="submit"] {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }
}

/* Адаптация калькулятора ипотеки */
@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .calc-field label {
    font-size: 14px;
  }
  
  .calc-field input,
  .calc-field select {
    font-size: 16px;
    padding: 12px;
  }
  
  .result-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .result-item {
    padding: 15px;
  }
  
  .result-label {
    font-size: 13px;
  }
  
  .result-value {
    font-size: 18px;
  }
}

/* Адаптация таблиц */
@media (max-width: 768px) {
  .comparison-table,
  .price-table,
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .comparison-table table {
    min-width: 600px;
  }
  
  table th,
  table td {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* Адаптация проектов (внутренняя страница) */
@media (max-width: 768px) {
  .project-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .project-title {
    font-size: 24px;
  }
  
  .project-price {
    font-size: 20px;
  }
  
  .project-gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .project-specs {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .spec-item {
    padding: 12px;
  }
  
  .project-tabs {
    flex-direction: column;
    gap: 8px;
  }
  
  .tab-button {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}

/* Адаптация страницы ипотеки */
@media (max-width: 768px) {
  .mortgage-programs {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .program-card {
    padding: 20px;
  }
  
  .program-rate {
    font-size: 28px;
  }
  
  .program-features {
    font-size: 14px;
  }
  
  .technology-filters {
    flex-direction: column;
    gap: 8px;
  }
  
  .filter-btn {
    width: 100%;
    padding: 12px;
  }
  
  .mortgage-projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Очень маленькие экраны (< 480px) */
@media (max-width: 480px) {
  .container {
    width: 98%;
    padding: 0 8px;
  }
  
  .hero-copy h1 {
    font-size: 24px;
  }
  
  .hero-copy p {
    font-size: 15px;
  }
  
  .section-head h2 {
    font-size: 22px !important;
  }
  
  .section-head p {
    font-size: 14px !important;
  }
  
  .btn {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .card-body h3 {
    font-size: 15px;
  }
  
  .meta {
    font-size: 12px;
  }
  
  .price {
    font-size: 16px;
  }
  
  .trust-item {
    font-size: 12px;
    padding: 4px 6px;
  }
  
  .logo {
    font-size: 18px;
  }
  
  .project-title {
    font-size: 20px;
  }
  
  .program-rate {
    font-size: 24px;
  }
  
  /* Форма консультации на мобильных */
  .consultation-form .container {
    padding: 0 15px;
  }
  
  .consultation-form h2 {
    font-size: 1.5rem !important;
  }
  
  .consultation-form > div > div:first-child p {
    font-size: 0.95rem !important;
  }
  
  .consultation-form form > div:first-child {
    padding: 25px 20px !important;
  }
  
  .consultation-form input,
  .consultation-form textarea,
  .consultation-form button {
    font-size: 14px !important;
    padding: 12px !important;
  }
  
  .consultation-form button[type="submit"] {
    padding: 15px !important;
    font-size: 1rem !important;
  }
}

/* Ready Houses Promo Section - Apple Style */
.ready-houses-promo {
  padding: 80px 0 40px;
  background: var(--bg);
}

.promo-card {
  display: flex;
  align-items: center;
  background: var(--card);
  border-radius: 28px;
  overflow: hidden;
  padding: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  min-height: 460px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.promo-card:hover {
  transform: scale(1.005);
}

.promo-content {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.1;
}

.promo-subtitle {
  font-size: 21px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 440px;
  line-height: 1.4;
  font-weight: 400;
}

.promo-link {
  font-size: 21px;
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}

.promo-link .arrow {
  margin-left: 8px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  font-size: 24px;
}

.promo-link:hover {
  opacity: 0.7;
}

.promo-link:hover .arrow {
  transform: translateX(6px);
}

.promo-image {
  flex: 1.3;
  height: 460px;
  position: relative;
  overflow: hidden;
}

.promo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@media (max-width: 991px) {
  .ready-houses-promo {
    padding: 40px 0 20px;
  }
  .promo-card {
    flex-direction: column;
    text-align: center;
    min-height: auto;
    border-radius: 20px;
  }
  .promo-content {
    padding: 40px 24px;
    order: 1;
  }
  .promo-image {
    width: 100%;
    height: 320px;
    order: 2;
  }
  .promo-title {
    font-size: 32px;
  }
  .promo-subtitle {
    font-size: 18px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 24px;
  }
  .promo-link {
    justify-content: center;
    font-size: 19px;
  }
}

/* ========= Главная страница — улучшения только для мобильных (≤768px) ========= */
.hero-home {
  padding-top: 0;
  margin-top: -80px;
}
.hero-cta--home {
  flex-wrap: wrap;
  justify-content: center;
}
.hero-cta--home .hero-cta__secondary,
.hero-cta--home .hero-cta__tertiary {
  color: #fff !important;
}
.scroll-down-arrow--home {
  min-width: 48px;
  min-height: 48px;
  padding: 4px;
}
.custom--home {
  background: #0c1623;
}
.custom-visual__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}
.section-head__title-mobile {
  display: none;
}
.seo-home-block {
  background: #f8f9fa;
  padding: 48px 0 40px;
}
.seo-home-block__title {
  font-size: 1.4rem;
  margin: 0 0 16px;
  color: var(--text, #0f172a);
}
.seo-home-block__text {
  max-width: 780px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 14px;
}
.seo-home-block__text--last {
  margin-bottom: 24px;
}
.seo-home-block__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filters--home .filters-mobile-toggle {
  display: none;
}
.filters--home .filters-panel-mobile {
  display: block;
}

@media (max-width: 768px) {
  .hero-home {
    margin-top: -68px;
  }
  .hero-lead {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.55;
  }
  .hero-cta--home {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
  }
  .hero-cta--home .hero-cta__primary,
  .hero-cta--home .hero-cta__secondary {
    width: 100%;
    max-width: none;
    margin-right: 0 !important;
    text-align: center;
    justify-content: center;
  }
  .hero-cta--home .big-cta {
    margin-right: 0 !important;
    padding: 15px 22px;
  }
  .hero-cta--home .hero-cta__tertiary {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: underline;
    text-underline-offset: 4px;
    min-height: auto !important;
    padding: 10px 8px !important;
    font-size: 15px !important;
    font-weight: 500;
    width: auto;
    align-self: center;
  }
  .trust-indicators--home {
    display: block;
    padding: 16px 0 24px;
    margin: 24px 0;
  }
  .trust-indicators__container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .trust-indicators--home .trust-indicators__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
    justify-content: stretch;
    align-items: stretch;
  }
  .trust-indicators--home .trust-indicator-item {
    width: auto;
    flex-direction: column;
    text-align: center;
    padding: 14px 10px;
    gap: 8px;
    justify-content: flex-start;
    min-height: 92px;
  }
  .trust-indicators--home .trust-indicator-text {
    font-size: 0.82rem;
    line-height: 1.25;
  }
  .section-head__title-desktop {
    display: none;
  }
  .section-head__title-mobile {
    display: block;
  }
  .section-head__title {
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    line-height: 1.25;
  }
  .completed-houses--home .section-head p {
    font-size: 0.95rem;
  }
  .custom--home .custom-copy h2 {
    font-size: 1.45rem;
    line-height: 1.2;
  }
  .custom--home .custom-copy p {
    font-size: 0.98rem;
    line-height: 1.55;
    opacity: 0.95;
  }
  .custom--home .custom-list li {
    font-size: 0.95rem;
    padding: 6px 0;
  }
  .seo-home-block {
    padding: 28px 0 32px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
  }
  .seo-home-block__inner {
    padding-left: 4px;
    padding-right: 4px;
  }
  .seo-home-block__title {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  .seo-home-block__text {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .seo-home-block__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .seo-home-block__actions .btn {
    width: 100%;
    justify-content: center;
  }
  .catalog-lead-msg {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: 16px !important;
    padding: 14px;
  }
  .catalog-lead-msg__btn {
    margin-left: 0 !important;
    width: 100%;
  }
  .filters--home .filters-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 0;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: var(--card, #fff);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    text-align: left;
    gap: 12px;
  }
  .filters--home .filters-mobile-toggle__icon {
    flex-shrink: 0;
    transition: transform 0.25s ease;
    opacity: 0.75;
  }
  .filters--home .filters-mobile-toggle.is-open .filters-mobile-toggle__icon {
    transform: rotate(180deg);
  }
  .filters--home .filters-panel-mobile:not(.is-open) {
    display: none;
  }
  .filters--home .filters-panel-mobile.is-open {
    display: block;
    padding-top: 14px;
  }
  .filters--home .filters-grid {
    padding-top: 4px;
  }
}

/* Skip link + main landmark helpers */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 10001;
  width: auto;
  height: auto;
  margin: 0;
  padding: 12px 18px;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.skip-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
main#main-content:focus {
  outline: none;
}
.mobile-menu-toggle .mobile-menu-icon--close {
  display: none;
}
.mobile-menu-toggle.active .mobile-menu-icon--open {
  display: none;
}
.mobile-menu-toggle.active .mobile-menu-icon--close {
  display: block;
}

/* ========= Премиальный слой (глобально): фокус, типографика, reduced motion ========= */
::selection {
  background: rgba(37, 99, 235, 0.16);
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-head h2 {
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.section-head p {
  color: var(--muted);
  max-width: 52ch;
}

.nav a,
.site-footer a {
  transition: color var(--duration-fast) var(--ease-premium), opacity var(--duration-fast) ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn.primary::before {
    transition: none !important;
  }
}
