/* ====== ПЕРЕМЕННЫЕ И БАЗА ====== */
:root {
  --red-50:  #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;

  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 30px rgba(220,38,38,.15);
  --shadow-xl: 0 20px 40px rgba(220,38,38,.25);

  --radius: 12px;
  --radius-lg: 20px;
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-decoration: none; }

/* ====== АНИМАЦИИ ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); }
  50%      { box-shadow: 0 0 0 12px rgba(220,38,38,0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fadeIn { animation: fadeIn .6s ease-out both; }
.animate-delay-1 { animation-delay: .15s; }
.animate-delay-2 { animation-delay: .3s; }

/* ====== TOPBAR ====== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.topbar {
  background: linear-gradient(135deg, var(--red-700), var(--red-900));
  color: var(--white);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
}

.brand img {
  height: 42px;
  width: auto;

}
.brand:hover img { transform: scale(1.05); }

.eds-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.2);
  transition: var(--transition);
}
.eds-badge:hover {
  background: rgba(255,255,255,.2);
  transform: translateY(-2px);
}
.eds-badge__label {
  font-size: 13px;
  opacity: .85;
  font-weight: 500;
}
.eds-badge__phones {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}
.eds-badge__phones strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
}
.eds-badge__phones span {
  font-size: 13px;
  opacity: .8;
}

/* ====== NAVBAR ====== */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.navline {
  display: flex;
  gap: 6px;
  padding: 6px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.navline::-webkit-scrollbar { display: none; }
.navline a {
  position: relative;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-600);
  white-space: nowrap;
  border-radius: 8px;
  transition: var(--transition);
}
.navline a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--red-600);
  transition: var(--transition);
  transform: translateX(-50%);
}
.navline a:hover {
  color: var(--red-700);
  background: var(--red-50);
}
.navline a:hover::after { width: 60%; }

/* ====== HERO ====== */
.hero {
  padding: 40px 0 20px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}
.card__icon--office {
  background: var(--red-50);
  color: var(--red-700);
}
.card__icon--eds {
  background: var(--red-600);
  color: var(--white);
}
.card__header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
}
.card__subtitle {
  color: var(--gray-600);
  margin-bottom: 24px;
  font-size: 14px;
}

/* Карточка АДС — красный акцент */
.card-eds {
  background: linear-gradient(135deg, var(--red-700), var(--red-900));
  color: var(--white);
}
.card-eds .card__header h2 { color: var(--white); }
.card-eds .card__subtitle { color: rgba(255,255,255,.85); }
.card-eds .card__icon--eds {
  background: rgba(255,255,255,.18);
  color: var(--white);
}

.card__ribbon {
  position: absolute;
  top: 20px;
  right: -32px;
  background: #fbbf24;
  color: var(--gray-900);
  padding: 4px 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* Телефоны в карточке офиса */
.phone-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.phone-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--gray-50);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  transition: var(--transition);
}
.phone-btn svg { color: var(--red-600); flex-shrink: 0; }
.phone-btn:hover {
  background: var(--red-50);
  border-color: var(--red-500);
  color: var(--red-700);
  transform: translateX(4px);
}

/* Большой телефон АДС */
.eds-phone-big {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  font-size: 26px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: .5px;
  margin-bottom: 20px;
  transition: var(--transition);
  animation: pulse 2.5s infinite;
}
.eds-phone-big:hover {
  background: rgba(255,255,255,.22);
  transform: scale(1.02);
  animation: none;
}

/* Действия в карточке АДС */
.eds-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ====== КНОПКИ ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn svg { flex-shrink: 0; transition: var(--transition); }

.btn-primary {
  background: var(--red-600);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(220,38,38,.35);
}
.btn-primary:hover {
  background: var(--red-700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220,38,38,.45);
}
.btn-primary:hover svg { transform: translateX(4px); }

.btn-xl {
  padding: 16px 28px;
  font-size: 16px;
}

.btn-ghost {
  background: rgba(255,255,255,.12);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.3);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.5);
  transform: translateY(-2px);
}

/* ====== ПОИСК ====== */
.search-section {
  padding: 20px 0 40px;
}
.search-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--red-600);
}
.search-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
}

.search-form {
  display: flex;
  gap: 10px;
  background: var(--gray-50);
  padding: 6px;
  border-radius: var(--radius);
  border: 2px solid var(--gray-200);
  transition: var(--transition);
}
.search-form:focus-within {
  border-color: var(--red-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(220,38,38,.1);
}

.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--gray-800);
  outline: none;
  font-family: inherit;
}
.search-form input::placeholder { color: var(--gray-400); }

.search-results {
  margin-top: 16px;
  color: var(--gray-600);
  font-size: 14px;
}

/* ====== FOOTER ====== */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-200);
  padding: 30px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-copy { font-size: 14px; }
.footer-copy a {
  color: var(--red-500);
  font-weight: 500;
  transition: var(--transition);
}
.footer-copy a:hover { color: var(--red-100); }

.msg-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--white);
  color: var(--gray-900);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}
.msg-btn img { height: 22px; width: auto; }
.msg-btn:hover {
  background: var(--red-600);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220,38,38,.4);
}

/* ====== АДАПТИВ ====== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .topbar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .eds-badge { justify-content: center; }
  .eds-badge__phones { text-align: center; }
  .eds-phone-big { font-size: 22px; }
  .card { padding: 24px; }
}

@media (max-width: 520px) {
  .navline a { padding: 10px 12px; font-size: 14px; }
  .search-form { flex-direction: column; background: transparent; padding: 0; border: none; gap: 10px; }
  .search-form input {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 14px 16px;
  }
  .search-form input:focus { border-color: var(--red-500); }
  .eds-actions .btn { width: 100%; }
}