/* Контейнер страницы — боковые отступы, чтобы кнопки не упирались в край */
.container-custom {
  padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
  padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 768px) {
  .container-custom {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: max(2rem, env(safe-area-inset-left, 0px));
    padding-right: max(2rem, env(safe-area-inset-right, 0px));
  }
}

/* Шапка — тёмно-синяя (#1c3152), см. index.html */
header.fixed {
  --header-color: #1c3152;
}

header.fixed .el-site-logo {
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.35));
}

@media (max-width: 1023px) {
  .el-site-logo {
    width: clamp(130px, 22vw, 180px);
    max-height: 52px;
  }
}

/* Только верхняя полоска шапки — не трогаем выпадающее мобильное меню */
header.fixed .container-custom > div.flex {
  gap: 0.75rem;
  min-width: 0;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  height: auto;
  min-height: 4.5rem;
  max-height: 5.25rem;
}

header.fixed .container-custom nav {
  flex-shrink: 1;
  min-width: 0;
  padding-top: 0;
}

header.fixed .container-custom > div.flex > div:last-child {
  flex-shrink: 0;
  padding-top: 0;
}

/* Мобильный бургер: пункты на белом фоне должны быть тёмными */
header.fixed > div.absolute nav button,
header.fixed > div.absolute .text-foreground {
  color: #1c3152 !important;
}

header.fixed > div.absolute nav button:hover {
  color: #f97316 !important;
}

/* Логотип в шапке */
.el-site-logo-btn {
  gap: 0 !important;
  align-self: center;
  flex-shrink: 0;
  padding: 0 0 0 2px;
  line-height: 0;
  overflow: visible;
}

.el-site-logo {
  display: block;
  width: clamp(140px, 15vw, 210px);
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: left center;
  overflow: visible;
}

@media (max-width: 1023px) {
  header.fixed .container-custom > div.flex {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .el-site-logo {
    width: clamp(130px, 38vw, 170px);
    max-height: 56px;
  }
}

/* Единый шрифт и скругление для всего сайта */
:root {
  --radius: 12px;
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Montserrat", sans-serif;
}

html,
body,
#root {
  font-family: "Montserrat", sans-serif;
}

.font-heading,
.font-body,
.font-sans,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
a,
button,
input,
textarea,
select,
label,
li,
td,
th {
  font-family: "Montserrat", sans-serif;
}

/* Одинаковое закругление для карточек, кнопок, полей, изображений */
.rounded,
.rounded-sm,
.rounded-md,
.rounded-lg,
.rounded-xl,
.rounded-2xl,
.rounded-\[2px\] {
  border-radius: var(--radius) !important;
}

/* Бейдж в герое — без pill, как остальной UI */
#hero .rounded-full {
  border-radius: var(--radius) !important;
}

/* Кнопка входа: белый текст на оранжевом фоне (не трогаем bg-accent/10) */
button[class~="bg-accent"],
a[class~="bg-accent"] {
  color: #ffffff !important;
}

button[class~="bg-accent"] svg,
a[class~="bg-accent"] svg {
  color: #ffffff !important;
}

/* Направленные углы — тоже единый радиус */
.rounded-t-sm,
.rounded-t-md,
.rounded-t-lg,
.rounded-t-xl,
.rounded-t-2xl,
.rounded-b-sm,
.rounded-b-md,
.rounded-b-lg,
.rounded-b-xl,
.rounded-b-2xl,
.rounded-l-sm,
.rounded-l-md,
.rounded-l-lg,
.rounded-l-xl,
.rounded-l-2xl,
.rounded-r-sm,
.rounded-r-md,
.rounded-r-lg,
.rounded-r-xl,
.rounded-r-2xl {
  border-radius: 0 !important;
}

.rounded-t-sm,
.rounded-t-md,
.rounded-t-lg,
.rounded-t-xl,
.rounded-t-2xl {
  border-top-left-radius: var(--radius) !important;
  border-top-right-radius: var(--radius) !important;
}

.rounded-b-sm,
.rounded-b-md,
.rounded-b-lg,
.rounded-b-xl,
.rounded-b-2xl {
  border-bottom-left-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

.rounded-l-sm,
.rounded-l-md,
.rounded-l-lg,
.rounded-l-xl,
.rounded-l-2xl {
  border-top-left-radius: var(--radius) !important;
  border-bottom-left-radius: var(--radius) !important;
}

.rounded-r-sm,
.rounded-r-md,
.rounded-r-lg,
.rounded-r-xl,
.rounded-r-2xl {
  border-top-right-radius: var(--radius) !important;
  border-bottom-right-radius: var(--radius) !important;
}

/* Кнопки и поля ввода без явного класса */
button:not(.rounded-full),
input:not([type="checkbox"]):not([type="radio"]),
textarea,
select,
[role="dialog"],
[data-radix-popper-content-wrapper] > * {
  border-radius: var(--radius);
}

/* Изображения в карточках */
img:not(.rounded-full) {
  border-radius: var(--radius);
}

/* Контакты — тёмный фон + сеть точек (инженерные «связи») */
#contacts.el-network-section,
#contacts {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 15% 20%, rgba(249, 115, 22, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 60% at 90% 80%, rgba(56, 120, 180, 0.12), transparent 50%),
    linear-gradient(165deg, #15233a 0%, #1c3152 48%, #121c2e 100%) !important;
  color: rgba(255, 255, 255, 0.94);
}

#contacts .el-network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

#contacts > .container-custom {
  position: relative;
  z-index: 1;
}

#contacts .text-foreground {
  color: rgba(255, 255, 255, 0.96) !important;
}

#contacts .text-muted-foreground {
  color: rgba(226, 232, 240, 0.78) !important;
}

#contacts .bg-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

#contacts .bg-card .text-foreground,
#contacts .bg-card label,
#contacts .bg-card h3,
#contacts .bg-card h4 {
  color: #1c3152 !important;
}

#contacts .bg-card .text-muted-foreground {
  color: #64748b !important;
}

#contacts .bg-card a.text-muted-foreground:hover {
  color: #ea580c !important;
}

#contacts .bg-accent\/10 {
  background: rgba(249, 115, 22, 0.16) !important;
  border: 1px solid rgba(249, 115, 22, 0.28);
  backdrop-filter: blur(6px);
}

/* Карточки контактов — одна колонка: ровно, без «дыры» и рваного ряда */
#contacts .space-y-6 > .grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.75rem !important;
  align-items: stretch;
}

#contacts .space-y-6 > .grid > .bg-card {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
  padding: 0.95rem 1.15rem !important;
  box-sizing: border-box;
}

#contacts .space-y-6 > .grid > .bg-card > .flex {
  align-items: center;
  width: 100%;
  gap: 0.875rem;
}

#contacts .space-y-6 > .grid > .bg-card .min-w-0 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  min-width: 0;
}

#contacts .space-y-6 > .grid > .bg-card .min-w-0 > p:first-child {
  margin-bottom: 0;
  line-height: 1.3;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Значения: телефон/email в одну строку */
#contacts .space-y-6 > .grid > .bg-card a,
#contacts .space-y-6 > .grid > .bg-card .break-all {
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
  line-height: 1.4;
  font-size: 0.9375rem;
  color: #1c3152 !important;
  font-weight: 600;
}

#contacts .space-y-6 > .grid > .bg-card p.text-sm:last-of-type {
  line-height: 1.4;
  margin: 0;
  font-size: 0.9375rem;
  color: #1c3152 !important;
  font-weight: 600;
}

#contacts .space-y-6 > .grid > .bg-card .min-w-0 > p.text-muted-foreground:first-child {
  color: #64748b !important;
  font-weight: 500 !important;
  font-size: 0.75rem !important;
}

@media (max-width: 767px) {
  #contacts .el-network-canvas {
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  #contacts .el-network-canvas {
    opacity: 0.35;
  }
}
