/* === 0. Font Awesome swap === */
@font-face {
  font-family: "Font Awesome 6 Brands";
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-brands-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Free";
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Free";
  src: url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
=== 1. Глобальные стили ===
  ============================================================ */
body,
html {
  margin: 0; /* Убираем отступы браузера */
  padding: 0; /* Убираем внутренние отступы */
  font-family: Arial, sans-serif; /* Шрифт страницы */
  height: 100%; /* Полная высота */
  overflow-x: hidden; /* Скрываем горизонтальный скролл */
}

  /* ============================================================
  === 2. Хедер ===
  ============================================================ */
header {
  position: relative;
  width: 100%;
  height: 100vh; /* Полный экран */
  overflow: hidden;
  transition: height 1s ease;
}

header img.bg {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Масштабируем без искажения */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: height 1s ease;
}

  /* ============================================================
  === 3. Навигация ===
  ============================================================ */
.top-bar {
  position: fixed;
  top: -100px; /* Скрыта в начале */
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  z-index: 10;
  opacity: 0;
  transition: top 0.8s ease, background 0.3s ease, opacity 0.8s ease;
  }

.top-bar.visible {
  top: 0;
  opacity: 1;
}

.top-bar.scrolled {
  background: rgba(0, 0, 0, 0.85);
}

.top-bar img.logo {
  height: 120px;
  transition: height 0.3s ease;
}

.top-bar .nav-links a {
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.85);
}

  /* === 5. Меню навигации === */
.nav-links {
  display: flex;
  gap: 25px;
  align-items: center;
  margin-left: 60px;
}

.nav-links a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1em;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #00aaff;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-right: 70px;
}

.social-links a {
  color: #fff;
  font-size: 1.6em;
  transition: transform 0.3s;
}

.social-links a:hover {
  transform: scale(1.2);
  color: #00aaff;
}

@media (min-width: 901px) {
  .nav-links {
    margin-left: 27px;
  }
} /* Desktop Fix — только для ПК */

  /* ============================================================
  === 4. Заголовок ===
  ============================================================ */
header h1 {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scaleY(0);
  color: #fff;
  font-size: 2.8em;
  font-weight: bold;
  text-align: center;
  text-shadow: 3px 3px 8px #000;
  z-index: 2;
  opacity: 0;
  transition: transform 1s ease, opacity 1s ease;
}

@media (min-width: 901px) {
  #main-title {
    top: 58%; /* сдвиг вниз для больших экранов */
  }
}

  /* ============================================================
  === 5. Секции контента ===
  ============================================================ */
section {
  width: 100%;
  padding: 60px 40px;
  box-sizing: border-box;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
  align-items: center;
}

.text-column,
.image-column {
  flex: 1;
  min-width: 280px;
}

.text-column h2 {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 20px;
  color: #0077cc; /* синий */
}

.text-column h3 {
  color: #0077cc;
}

.text-column p {
  font-size: 1em;
  line-height: 1.7;
  margin-bottom: 15px;
  color: #333;
}

.image-column img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

  /* ============================================================
  === 6. Анимация появления секций при скролле ===
  ============================================================ */
.hidden-section {
  opacity: 0; /* Скрыта */
  transform: translateY(50px); /* Смещена вниз */
  transition: opacity 1s ease, transform 1s ease;
}

.hidden-section.visible {
  opacity: 1; /* Появляется */
  transform: translateY(0);
}

  /* Уменьшаем фото только в первых двух секциях */
section:nth-of-type(1) .image-column img,
section:nth-of-type(2) .image-column img {
  width: 70%;
  max-width: 500px;
  margin: 0 auto;
  display: block;
}

  /* ============================================================
  === 7. Плавающая кнопка звонка с эффектом волны ===
  ============================================================ */
#call-container {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#call-icon {
  position: relative;
  background-color: #0077cc;
  color: white;
  font-size: 2em;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 20px 5px rgba(0, 119, 204, 0.7),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s, box-shadow 0.3s;
  overflow: visible;
}

#call-icon::before,
#call-icon::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid rgba(0, 119, 204, 0.5);
  top: 0;
  left: 0;
  transform: scale(1);
  opacity: 0.7;
  animation: ripple 2s infinite;
  pointer-events: none;
}

#call-icon::after {
  animation-delay: 1s;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

#call-window {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 250px;
  background-color: #1c1c1c;
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  color: white;
  font-family: Arial, sans-serif;
  transition: opacity 0.3s ease;
  opacity: 0;
}

#call-window.visible {
  display: flex;
  opacity: 1;
}

#call-header {
  background-color: #0077cc;
  padding: 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#call-close {
  cursor: pointer;
  font-size: 1.2em;
}

#call-body {
  padding: 10px;
  line-height: 1.4;
}

#call-body a {
  color: #4fc3f7;
  text-decoration: none;
}

#call-body a:hover {
  text-decoration: underline;
}

.desktop {
  display: block;
}

.mobile {
  display: none;
}

  /* ============================================================
  === Секция overlap ===
  ============================================================ */
.overlap-section {
  position: relative;
  width: 100%;
  min-height: 300px;
  padding: 60px 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease, transform 1s ease;
}

.image-stack {
  position: relative;
  width: 80%;
  max-width: 1200px;
}

  /* ============================================================
  === Стили для стековых фото (лесенка) ===
  ============================================================ */
.stack-img {
  position: absolute;
  width: 450px;
  height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease, z-index 0.3s ease;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.stack-img:nth-child(1) {
  z-index: 1;
  top: 0;
  left: 0;
}

.stack-img:nth-child(2) {
  z-index: 2;
  top: -20px;
  left: 260px;
}

.stack-img:nth-child(3) {
  z-index: 3;
  top: -40px;
  left: 520px;
}

.stack-img:nth-child(4) {
  z-index: 4;
  top: -60px;
  left: 790px;
}

  /* ============================================================
  === Активная фотка в лайтбоксе ===
  ============================================================ */
.stack-img.active-clone {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 600px;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  cursor: zoom-out;
  transition: all 0.3s ease;
}

  /* ============================================================
  === Overlay ===
  ============================================================ */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
}

  /* ============================================================
  === Полноразмерные картинки в секциях ===
  ============================================================ */
.full-width-image {
  width: 100%;
  text-align: center;
}

.full-width-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

  /* ============================================================
  === Footer ===
  ============================================================ */
footer {
  position: relative;
  background: url("../img/img3.WEBP") center/cover no-repeat;
  color: #fff;
  padding: 40px 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(0px);
  z-index: 0;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
  width: 100%;
}

.footer-left {
  flex: 1;
}

.footer-left h2 {
  margin-bottom: 10px;
}

.footer-left p {
  margin: 4px 0;
}

.footer-left a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-left a:hover {
  color: #00aaff;
}

.seo-hidden-desktop {
  font-size: 0.65em;
  color: #ccc;
  width: 250px;
  display: flex;
  gap: 10px;
  line-height: 1.2;
}

.seo-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
  margin-top: 25px;
  font-size: 0.9em;
  color: #ddd;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 15px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.footer-left p.emergency {
  margin-top: 1em;
}

.footer-left p.emergency span {
  color: red;
  font-weight: bold;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.25);
    text-shadow: 0 0 20px rgba(255, 0, 0, 1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
  }
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

  /* ============================================================
  === 11. Адаптив под мобилку ===
  ============================================================ */
@media (max-width: 900px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .top-bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    gap: 10px;
    box-sizing: border-box;
  }

  .desktop {
    display: none;
  }

  .mobile {
    display: block;
  }

  .social-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    margin: 0;
  }

  .social-links a {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 50px;
  }

  .nav-links a {
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    padding: 5px 10px;
    color: #fff;
  }

  .top-bar img.logo {
    height: 55px;
    width: auto;
    margin: 0;
    flex-shrink: 0;
  }

  header h1 {
    font-size: 1.6em;
    text-align: center;
    top: 63%;
    left: 50%;
    transform: translate(-50%, -50%);
    position: absolute;
  }

  #content-inner {
    display: flex;
    flex-direction: column;
  }

  .image-column {
    display: none;
  }

  .text-column {
    width: 100%;
  }

  .overlap-section {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .image-stack {
    min-width: 600px;
  }

  .stack-img {
    transform-origin: center center;
    will-change: transform;
  }

  .seo-hidden-desktop {
    display: none;
  }
}

  /* --- Ультра-маленькие экраны (телефоны до 420px) --- */
@media (max-width: 420px) {
  .top-bar img.logo {
    height: 45px;
  }

  .nav-links a {
    font-size: 14px;
    padding: 4px 8px;
  }

  .social-links a {
    font-size: 18px;
    width: 30px;
    height: 30px;
  }
}