/* ===== style.css (ПОЛНОСТЬЮ ИСПРАВЛЕННАЯ ВЕРСИЯ) ===== */
:root {
  --navy: #0e3a5f;
  --navy-deep: #102a4d;
  --yellow: #f8d878;
  --page: #f7f9fb;
  --text: #222;
  --radius: 12px;
  --shadow-sm: 0 3px 12px rgba(15, 40, 70, .08);
  --shadow-md: 0 8px 22px rgba(15, 40, 70, .14);
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-md: .9375rem;
  --fs-base: 1rem;
  --fs-h3: 1.0625rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: 'PT Sans', Arial, sans-serif; background: var(--page); color: var(--text); font-size: var(--fs-base); line-height: 1.6; }
.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
svg { display: block; }
img { max-width: 100%; }

/* TOP BAR */
.topbar { background: var(--navy-deep); color: #fff; }
.topbar-inner { display: flex; gap: 44px; align-items: center; min-height: 38px; font-size: var(--fs-xs); flex-wrap: wrap; }
.tb-item { display: flex; align-items: center; gap: 8px; }
.tb-item svg { width: 15px; height: 15px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* HEADER */
.header {
  background: #fff;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 5;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;       /* Убрали вертикальные отступы для точной настройки */
  min-height: 70px;      /* Фиксируем высоту полосы */
  flex-wrap: wrap;       /* Для мобильных экранов */
}

/* Логотип (увеличен, выступает за края без поломки полосы) */
.logo {
  height: 95px;          /* Размер логотипа */
  width: auto;
  object-fit: contain;
  display: block;
  flex: none;
  margin-top: -15px;     /* Приподнимаем вверх */
  margin-bottom: -15px;  /* Опускаем вниз */
  z-index: 10;
}

/* Контейнер для контактов */
.header-contacts {
  display: flex;
  align-items: center;
  gap: 50px;             /* Расстояние между почтой и телефоном */
  margin-left: 30px;     /* Отступ от логотипа */
}

.contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.c-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .08);
}

.c-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #4a3f14;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact small {
  display: block;
  font-size: var(--fs-xs);
  color: #666;
  margin-bottom: 2px;
}

.contact strong {
  font-size: var(--fs-md);
  line-height: 1.4;
  display: block;
  color: var(--navy-deep);
}

/* HERO */
.hero {
  position: relative;
  color: #fff;
  padding: 76px 0 60px;
  background-color: var(--navy);
  background-image: linear-gradient(180deg, rgba(14, 58, 95, .72) 0%, rgba(14, 58, 95, .86) 60%, rgba(14, 58, 95, .94) 100%), url("img/header-bg.webp");
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
}

.hero h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.125rem);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: .2px;
  max-width: 960px;
  margin-bottom: 30px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

.h1-top { font-size: .6em; }

.hero-box {
  background: rgba(255, 255, 255, .96);
  color: var(--navy-deep);
  border-radius: var(--radius);
  padding: 17px 24px;
  text-align: center;
  font-size: var(--fs-base);
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.hero-box:last-child { margin-bottom: 0; }
.hero-box b { color: var(--navy); }

/* INFO CARD */
.info-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px 20px; margin-top: 14px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; font-size: var(--fs-sm); color: #444; padding: 7px 0; }
.info-row svg { width: 15px; height: 15px; fill: none; stroke: #9aa7b1; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; margin-top: 2px; }

/* PRODUCTS */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 46px 0 32px; perspective: 1200px; }
.p-card {
  background: linear-gradient(145deg, #f2f2f2, #e8e8e8);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .3s ease, box-shadow .3s ease;
}
.p-card::after { content: ""; position: absolute; right: -50px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255, 255, 255, .4); }
.p-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(15, 40, 70, .18); }
.p-card h3 { font-size: var(--fs-h3); margin-bottom: 14px; position: relative; z-index: 1; line-height: 1.4; color: var(--navy-deep); }
.p-card .frac { font-size: var(--fs-sm); color: #555; margin-bottom: 14px; position: relative; z-index: 1; }
.p-card .price { font-size: var(--fs-base); font-weight: 700; position: relative; z-index: 1; color: var(--navy); }
.p-card.yellow { background: var(--yellow); display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: var(--fs-md); line-height: 1.55; padding: 16px; color: var(--navy-deep); }
.p-card.yellow::after { display: none; }
.note { font-size: var(--fs-md); color: #333; margin-bottom: 12px; }

/* ADVANTAGES */
.advantages {
  color: #fff;
  padding: 52px 0 60px;
  margin-top: 28px;
  background-color: var(--navy-deep);
  background-image: linear-gradient(180deg, rgba(16, 42, 77, .9) 0%, rgba(16, 42, 77, .95) 100%), url("img/header-bg.webp");
  background-size: cover;
  background-position: center 62%;
}
@media (min-width: 961px) { .advantages { background-attachment: fixed; } }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; text-align: center; }
.adv-grid h3 { font-size: var(--fs-h3); margin-bottom: 12px; }
.adv-grid p { font-size: var(--fs-md); line-height: 1.65; color: #dce6f1; max-width: 300px; margin: 0 auto; }

/* SECTION TITLE */
.section-title { text-align: center; font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); line-height: 1.3; margin-bottom: 42px; font-weight: 700; }

/* CHOOSE + TABLE */
.choose { padding: 54px 0 20px; }
.choose p { font-size: var(--fs-base); margin-bottom: 12px; }
.choose ul { margin: 0 0 10px 24px; font-size: var(--fs-base); }
.choose li { margin-bottom: 5px; }
.table-wrap { overflow-x: auto; border: 1px solid #d9d9d9; background: #fff; margin-top: 28px; border-radius: 6px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.table-wrap th, .table-wrap td { border: 1px solid #d9d9d9; padding: 10px 12px; text-align: left; vertical-align: top; color: #333; }
.table-wrap th { background: #e9e9e9; font-weight: 700; color: var(--navy-deep); }
.table-wrap td.scope { background: #f4f4f4; }
.table-wrap tbody tr:nth-child(even) td:not(.scope) { background: #f0f0f0; }

/* GALLERY */
.gallery { background: transparent; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 74px 0 64px; }
.gallery-item { margin: 0; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.gi-wrap { overflow: hidden; height: 200px; background: #e8ecf1; }
.gi-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(.78);
  opacity: .35;
  transition: transform 1s cubic-bezier(.22, .61, .36, 1), opacity .8s ease;
}
.gallery-item.in-view .gi-wrap img { transform: scale(1); opacity: 1; }
.gallery-item.in-view:hover .gi-wrap img { transform: scale(1.06); }
.gallery-item.flip .gi-wrap img { transform: scale(-.78, .78); }
.gallery-item.flip.in-view .gi-wrap img { transform: scale(-1, 1); }
.gallery-item.flip.in-view:hover .gi-wrap img { transform: scale(-1.06, 1.06); }
.gallery-item figcaption { display: none; }

/* FOOTER */
.footer { background: var(--navy-deep); color: #fff; padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: center; }
.f-item { display: flex; align-items: center; gap: 14px; }
.f-item .c-icon { width: 38px; height: 38px; }
.f-item .c-icon svg { width: 16px; height: 16px; }
.f-item small { display: block; font-size: var(--fs-xs); color: #c7d2e2; margin-bottom: 2px; }
.f-item strong { font-size: var(--fs-sm); line-height: 1.45; display: block; }
.copyright { background: var(--navy); color: #fff; }
.copyright .container { padding-top: 14px; padding-bottom: 14px; font-size: var(--fs-xs); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .products { grid-template-columns: repeat(2, 1fr); }
  .adv-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr; gap: 12px; }
  .gi-wrap { height: 240px; }
  
  /* Контакты в шапке становятся в столбик на планшетах и телефонах */
  .header-contacts {
    flex-direction: column; 
    align-items: flex-start;
    gap: 16px;
    margin-top: 15px;
    margin-left: 0; 
    width: 100%;
  }

  /* На мобильных отменяем отрицательные отступы и уменьшаем логотип */
  .header-inner {
    padding: 10px 20px;
    min-height: auto;
  }
  
  .logo {
    height: 64px; 
    margin-top: 0;
    margin-bottom: 0;
    margin-bottom: 15px;
  }
}

@media (max-width: 640px) {
  .products { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero { padding: 56px 0 44px; }
}