/* Белый минималистичный дизайн */
:root {
  --bg: #ffffff;
  --panel: #fafafa;
  --text: #1a1a1a;
  --muted: #666666;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
  --brand: #1a1a1a;
  --brand-2: #333333;
  --danger: #dc3545;
  --accent: #ffd166;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding-top: 70px;
  color: var(--text);
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* Выравнивание текста по ширине */
p, .post-content, .case-content, .lead, .muted {
  text-align: justify;
}
.card p {
  text-align: justify;
}
/* Заголовки не выравниваются по ширине */
h1, h2, h3, h4, h5, h6, .h1, .section-title {
  text-align: left;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
a:hover { border-bottom-color: var(--text); }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* Header */
header.site-header {
  position: fixed; 
  top: 0; 
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  display: flex; gap: 12px; align-items: center;
  font-weight: 600; letter-spacing: -0.3px;
  color: var(--text);
  text-decoration: none;
  border-bottom: none;
}
.brand:hover {
  border-bottom: none;
  opacity: 0.8;
}
.brand .badge { 
  width: 36px; height: 36px; border-radius: 8px; 
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  overflow: hidden;
  flex-shrink: 0;
}
.brand .badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.nav nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav a { color: var(--text); margin-left: 0; border-bottom: none; }
.nav a:hover { border-bottom: 1px solid var(--text); }
.nav a.cta {
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px; 
  border-radius: 6px; 
  font-weight: 500;
  border: none;
}
.nav a.cta:hover { background: var(--muted); border-bottom: none; }

/* Mobile menu */
.mobile-menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
  position: relative;
  flex-shrink: 0;
}

.mobile-menu-toggle span {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  left: 50%;
  transform: translateX(-50%);
}

.mobile-menu-toggle span:nth-child(1) { top: 9px; }
.mobile-menu-toggle span:nth-child(2) { top: 15px; }
.mobile-menu-toggle span:nth-child(3) { top: 21px; }

.mobile-menu-toggle.active span:nth-child(1) {
  top: 15px;
  transform: translateX(-50%) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) translateX(-10px);
}
.mobile-menu-toggle.active span:nth-child(3) {
  top: 15px;
  transform: translateX(-50%) rotate(-45deg);
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: block; }
  .nav nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    z-index: 999;
    visibility: hidden;
  }
  .nav nav.open {
    max-height: 600px;
    opacity: 1;
    padding: 20px;
    visibility: visible;
  }
  .nav nav a {
    margin-left: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    display: block;
    color: var(--text);
    text-decoration: none;
  }
  .nav nav a:hover { border-bottom: 1px solid var(--text); }
  .nav nav a:last-child { border-bottom: none; }
  .nav nav a.cta {
    margin-top: 12px;
    text-align: center;
    border: none;
    padding: 14px;
    border-radius: 6px;
    background: var(--text);
    color: var(--bg);
  }
  .nav nav a.cta:hover {
    background: var(--muted);
    color: var(--bg);
    border-bottom: none;
  }
}

/* Hero */
.hero { padding: 60px 0 40px; }
.hero.has-bg { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.25; pointer-events: none; }
.hero-bg picture, .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  position: relative;
  z-index: 1;
}
.hero-photo {
  width: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--panel);
}
.hero-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}
.hero .panel {
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  display: grid;
  gap: 20px;
}
@media (max-width: 768px) {
  .hero-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .hero-photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
  }
}
.eyebrow { 
  color: var(--muted); 
  text-transform: uppercase; 
  font-size: 11px; 
  letter-spacing: 1.5px; 
  font-weight: 500;
}
.h1 { 
  font-size: clamp(28px, 5vw, 42px); 
  line-height: 1.2; 
  margin: 0; 
  font-weight: 600;
  letter-spacing: -0.5px;
}
.lead { 
  color: var(--muted); 
  font-size: 16px; 
  line-height: 1.7;
}
.hero-actions { 
  display: flex; 
  gap: 12px; 
  flex-wrap: wrap; 
  margin-top: 8px;
}
.hero-social-icons {
  display: flex;
  gap: 12px;
}
.btn {
  display: inline-flex; 
  align-items: center; 
  gap: 8px;
  background: transparent; 
  color: var(--text); 
  border: 1px solid var(--border);
  padding: 12px 20px; 
  border-radius: 6px; 
  font-weight: 500;
  transition: all 0.2s;
}
.btn.primary { 
  background: var(--text); 
  color: var(--bg); 
  border-color: var(--text); 
}
.btn:hover { 
  text-decoration: none; 
  border-color: var(--text);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn.primary:hover {
  background: var(--muted);
  border-color: var(--muted);
}
.btn-icon {
  padding: 10px;
  min-width: 44px;
  justify-content: center;
}
.btn-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

/* Sections */
section { padding: 60px 0; }
.section-title { 
  font-size: 32px; 
  margin: 0 0 32px; 
  font-weight: 600;
  letter-spacing: -0.5px;
}
.grid { display: grid; gap: 24px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) { 
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; } 
}
@media (max-width: 640px) { 
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } 
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.card h3 { 
  margin: 0 0 12px; 
  font-size: 20px; 
  font-weight: 600;
}
.muted { color: var(--muted); }
.price { 
  font-size: 24px; 
  font-weight: 700; 
  margin-top: 16px; 
  color: var(--text);
}

/* Media helpers */
.media-cover { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.media-cover img { display: block; width: 100%; height: auto; }
.icon { width: 28px; height: 28px; vertical-align: middle; margin-right: 8px; opacity: 0.9; }

/* Blog list */
.post-list { display: grid; gap: 24px; }
.post-item { 
  display: grid; 
  gap: 8px; 
}
.post-item.card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--border); 
  border-radius: 12px; 
  box-shadow: var(--shadow);
}
.post-item h3 { margin: 0 0 8px; font-size: 18px; }
.post-item h3 a {
  color: var(--text);
  text-decoration: none;
}
.post-item h3 a:hover {
  color: var(--text);
  text-decoration: underline;
}
.post-meta { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.post-item .muted { color: var(--muted); }

/* Post cards for homepage latest posts */
.post-card { 
  position: relative; 
  border-radius: 12px; 
  overflow: hidden; 
  border: 1px solid var(--border); 
  box-shadow: var(--shadow); 
  background: var(--panel);
}
.post-thumb { 
  width: 100%; 
  height: 0; 
  padding-bottom: 60%; 
  position: relative; 
  background: var(--panel); 
}
.post-thumb img { 
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  display: block; 
}
.post-overlay { 
  position: absolute; 
  inset: 0; 
  display: grid; 
  align-content: end; 
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 85%); 
  padding: 14px; 
}
.post-overlay h3 { 
  margin: 0; 
  font-size: 16px; 
  line-height: 1.3; 
  color: #fff; 
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); 
}
.post-card .inner { padding: 12px; }

.post-item a {
  color: var(--text);
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5em 0.8em;
  transition: all 0.2s;
  display: inline-block;
}
.post-item a:hover {
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-color: var(--text);
}

/* Forms */
form { display: grid; gap: 16px; }
input, textarea {
  width: 100%; 
  padding: 12px 16px; 
  border-radius: 8px; 
  color: var(--text);
  background: var(--bg); 
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
button { cursor: pointer; font-family: inherit; }

/* Review form styles */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}
.form-group small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.form-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}
.post-content, .case-content {
  line-height: 1.8;
}
.post-content h3, .case-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.post-content p, .case-content p {
  margin-bottom: 1rem;
}
.post-content ul, .case-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}
.post-content li, .case-content li {
  margin-bottom: 0.5rem;
}

/* Стиль для ссылок "Читать весь кейс" */
a.read-more, .card a[href*="/cases/"] {
  color: #1e90ff;
  text-decoration: underline;
  border-bottom: none;
}
a.read-more:hover, .card a[href*="/cases/"]:hover {
  color: #0066cc;
  border-bottom: none;
}

/* Utilities */
.pill { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; color: var(--muted); }
.stack-s { display: grid; gap: 8px; }
.stack-m { display: grid; gap: 16px; }
.stack-l { display: grid; gap: 24px; }
.social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Map wrapper */
.map-frame { 
  width: 100%; 
  height: 320px; 
  border: 1px solid var(--border); 
  border-radius: 12px; 
  overflow: hidden; 
  box-shadow: var(--shadow); 
}

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--muted);
  background: var(--panel);
  margin-top: 60px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

.footer-content a {
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.footer-content a:hover {
  border-bottom-color: var(--muted);
}

/* ============================================
   МОБИЛЬНАЯ ВЕРСИЯ САЙТА
   ============================================ */

body.mobile-view {
  padding-top: 60px;
}

body.mobile-view .container {
  width: 95%;
  max-width: 100%;
}

body.mobile-view header.site-header {
  padding: 8px 0;
}

body.mobile-view .nav {
  flex-wrap: wrap;
  padding: 8px 0;
}

body.mobile-view .brand {
  font-size: 14px;
}

body.mobile-view .brand .badge {
  width: 32px;
  height: 32px;
}

body.mobile-view .nav nav {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  z-index: 999;
  visibility: hidden;
}

body.mobile-view .nav nav.open {
  max-height: 600px;
  opacity: 1;
  padding: 20px;
  visibility: visible;
}

body.mobile-view .nav nav a {
  margin-left: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: block;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

body.mobile-view .nav nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

body.mobile-view .nav nav a:last-child {
  border-bottom: none;
}

body.mobile-view .nav nav a.cta {
  margin-top: 12px;
  text-align: center;
  border: none;
  padding: 14px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
}
body.mobile-view .nav nav a.cta:hover {
  background: var(--muted);
  color: var(--bg);
  text-decoration: none;
  border-bottom: none;
}

body.mobile-view .mobile-menu-toggle {
  display: block;
}

body.mobile-view .nav {
  justify-content: space-between;
}

body.mobile-view .nav a.cta {
  padding: 8px 12px;
  font-size: 13px;
  margin-left: 0;
}

body.mobile-view .hero {
  padding: 24px 0 16px;
}

body.mobile-view .hero-panel {
  grid-template-columns: 1fr;
  gap: 16px;
}

body.mobile-view .hero-photo {
  width: 100%;
  max-width: 200px;
  height: 250px;
  margin: 0 auto;
}

body.mobile-view .hero .panel {
  padding: 16px;
  gap: 12px;
}

body.mobile-view .h1 {
  font-size: 22px;
  line-height: 1.3;
}

body.mobile-view .lead {
  font-size: 14px;
}

body.mobile-view .hero-actions {
  flex-direction: column;
  gap: 8px;
}

body.mobile-view .hero-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

body.mobile-view .hero-social-icons {
  width: 100%;
  display: flex;
  flex-direction: row;
  gap: 8px;
}

body.mobile-view .hero-social-icons .btn-icon {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 12px;
}

body.mobile-view section {
  padding: 20px 0;
}

body.mobile-view .section-title {
  font-size: 20px;
  margin-bottom: 12px;
}

body.mobile-view .grid {
  gap: 12px;
}

body.mobile-view .grid.cols-4,
body.mobile-view .grid.cols-3,
body.mobile-view .grid.cols-2 {
  grid-template-columns: 1fr;
}

body.mobile-view .card {
  padding: 14px;
}

body.mobile-view .card h3 {
  font-size: 16px;
}

body.mobile-view .price {
  font-size: 18px;
}

body.mobile-view form {
  gap: 12px;
}

body.mobile-view input,
body.mobile-view textarea {
  padding: 12px;
  font-size: 16px;
}

body.mobile-view .btn {
  padding: 12px 16px;
  font-size: 14px;
}
body.mobile-view .btn-icon {
  padding: 10px;
  min-width: 44px;
}

body.mobile-view footer.site-footer {
  padding: 16px 0 24px;
  font-size: 13px;
}

body.mobile-view .footer-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
}

body.mobile-view .eyebrow {
  font-size: 11px;
}

body.mobile-view .post-card .inner {
  padding: 10px;
}

body.mobile-view .post-overlay h3 {
  font-size: 14px;
}

body.mobile-view .map-frame {
  height: 250px;
}

/* Кнопка переключения версий */
.version-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0,0,0,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 12px;
}

.version-toggle:hover {
  background: rgba(0,0,0,0.1);
  border-color: var(--text);
}

.version-toggle-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
}

/* ============================================
   COOKIE БАННЕР
   ============================================ */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  z-index: 9999;
  display: none;
  backdrop-filter: blur(10px);
}

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

.cookie-banner-content {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 250px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

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

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

.cookie-banner-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.cookie-banner-btn.accept {
  background: var(--text);
  color: var(--bg);
}

.cookie-banner-btn.accept:hover {
  background: var(--muted);
}

.cookie-banner-btn.decline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.cookie-banner-btn.decline:hover {
  background: rgba(0,0,0,0.05);
  border-color: var(--text);
}

body.mobile-view .cookie-banner {
  padding: 14px 16px;
}

body.mobile-view .cookie-banner-content {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

body.mobile-view .cookie-banner-text {
  font-size: 13px;
}

body.mobile-view .cookie-banner-actions {
  flex-direction: column;
}

body.mobile-view .cookie-banner-btn {
  width: 100%;
  padding: 12px;
}

/* Компенсация высоты шапки для якорных ссылок */
#tipovye-iski {
  scroll-margin-top: 90px;
}

/* Модальное окно для тарифов */
.tariff-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.tariff-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  touch-action: none;
}

.tariff-modal-content {
  position: relative;
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2rem;
  padding-top: calc(2rem + env(safe-area-inset-top, 0px));
  z-index: 1001;
  -webkit-overflow-scrolling: touch;
  /* Предотвращаем прокрутку фона на iOS */
  overscroll-behavior: contain;
}

.tariff-modal-close {
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  z-index: 1002;
  /* Увеличиваем область клика для touch-устройств */
  touch-action: manipulation;
}

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

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

.tariff-modal-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text);
}

.tariff-modal-content .price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--brand);
  margin: 1rem 0;
}

.tariff-modal-content ul {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.tariff-modal-content ul li {
  padding: 0.75rem 0;
  padding-left: 1.5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.tariff-modal-content ul li:last-child {
  border-bottom: none;
}

.tariff-modal-content ul li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

.tariff-modal-content .btn {
  margin-top: 1.5rem;
  width: 100%;
}

.tariff-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.tariff-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

@media (max-width: 768px) {
  .tariff-modal {
    padding: 0;
    align-items: flex-end;
    /* Учитываем безопасную зону для iOS */
    padding-top: env(safe-area-inset-top, 0px);
  }
  
  .tariff-modal-content {
    padding: 1.5rem 1rem 1rem;
    padding-top: calc(4rem + env(safe-area-inset-top, 0px));
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
  }
  
  .tariff-modal-close {
    top: calc(0.75rem + env(safe-area-inset-top, 0px) + 20px);
    right: 0.75rem;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.75rem;
  }
  
  .tariff-modal-content h2 {
    font-size: 1.5rem;
    padding-right: 2.5rem;
    margin-top: 0;
  }
  
  .tariff-modal-content .price {
    font-size: 1.25rem;
  }
  
  .tariff-modal-content ul li {
    padding: 0.625rem 0;
    padding-left: 1.5rem;
    font-size: 0.95rem;
  }
  
  .tariff-modal-content h3 {
    font-size: 1.1rem;
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
  .tariff-modal-content {
    padding: 1.25rem 0.875rem 0.875rem;
    padding-top: calc(3.5rem + env(safe-area-inset-top, 0px));
    max-height: 98vh;
  }
  
  .tariff-modal-close {
    top: calc(0.5rem + env(safe-area-inset-top, 0px) + 20px);
    right: 0.5rem;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .tariff-modal-content h2 {
    font-size: 1.25rem;
    padding-right: 2.25rem;
  }
}
/* Стили для обертки иконок под кнопкой */
.hero-social-icons-wrapper {
  width: 100%;
  display: flex;
  justify-content: center; /* Изменено с flex-start на center */
}

.hero-social-icons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: auto;
}

.hero-social-icons-grid .btn-icon {
  width: 100%;
  justify-content: center;
  padding: 12px;
}

/* Центрирование основной кнопки и контейнера действий */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center; /* Добавлено для центрирования всего содержимого */
  gap: 12px;
}

/* Убедимся, что основная кнопка не растягивается на всю ширину */
.hero-actions .btn.primary {
  width: auto;
  display: inline-flex;
}


/* ============================================
   ФИКС ДЛЯ ЯКОРНЫХ ССЫЛОК В МОБИЛЬНОЙ ВЕРСИИ
   ============================================ */

/* Добавляем отступ снизу для секции контактов */
body.mobile-view section#contact {
    padding-bottom: 100px;
}

/* Увеличиваем scroll-margin для якорных ссылок */
body.mobile-view #contact {
    scroll-margin-top: 80px;
}

/* Компенсация для всех якорных ссылок */
body.mobile-view [id] {
    scroll-margin-top: 70px;
}

/* Гарантируем достаточную высоту карточки с формой */
body.mobile-view #contact .card:first-child {
    min-height: 400px;
}