:root {
  --bg: #f4f9fc;
  --text: #173a4a;
  --accent: #0ea5b7;
  --accent-dark: #0b6f7d;
  --card: #ffffff;
  --soft: #e8f4f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  width: 100%;
  color: #fff;
  background:
    linear-gradient(130deg, rgba(6, 41, 51, 0.75), rgba(7, 102, 117, 0.45)),
    url("assets/hero-bg.png") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  padding-top: 88px;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.2;
  animation: float 7s ease-in-out infinite;
}

.hero::before {
  background: #8ee6ff;
  top: -80px;
  left: -80px;
}

.hero::after {
  background: #7fffd4;
  bottom: -100px;
  right: -100px;
  animation-delay: 2s;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding-inline: max(4%, calc((100% - 1100px) / 2));
  z-index: 1000;
  background: transparent;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  isolation: isolate;
}

.nav.container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #fff;
  transition: color 0.3s ease;
}

.logo span {
  color: #8de8f9;
  transition: color 0.3s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  direction: ltr;
  unicode-bidi: isolate;
  position: relative;
  z-index: 2;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: #9defff;
}

.hero-phones {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-phones span {
  font-size: 14px;
}

.hero-phones a {
  color: #e0f9ff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: color 0.3s ease;
}

.hero-phones a:hover {
  color: #9defff;
}

.menu-toggle {
  display: none;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #fff;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  position: relative;
  z-index: 1010;
  overflow: visible;
  pointer-events: auto;
  line-height: 0;
}

/* SVG-иконка: явный stroke — currentColor в WebView часто даёт белый фон + невидимые линии */
.menu-toggle-svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
}

.menu-toggle-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: 12px 12px;
}

.nav.scrolled .menu-toggle-line {
  stroke: #0f2732;
}

@media (min-width: 901px) {
  .menu-toggle {
    display: none !important;
  }
}

.hero-instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e0f9ff;
  transition: color 0.3s ease;
}

.hero-instagram:hover {
  color: #e1306c;
}

.hero-instagram svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 6px 16px rgba(10, 35, 46, 0.12);
}

.nav.scrolled .logo,
.nav.scrolled .menu a,
.nav.scrolled .hero-phones a,
.nav.scrolled .hero-instagram,
.nav.scrolled .menu-toggle {
  color: #0f2732;
}

.nav.scrolled .logo span {
  color: #0b6f7d;
}

.nav.scrolled .menu a:hover,
.nav.scrolled .hero-phones a:hover {
  color: #0b6f7d;
}

.hero-content {
  position: relative;
  padding: 5rem 0 8rem;
  animation: slideUp 1s ease both;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  max-width: 680px;
  line-height: 1;
  margin: 0 0 1rem;
}

.hero-rivers {
  font-size: 0.63em;
}

.hero p {
  max-width: 630px;
  margin-bottom: 2rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.4rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 0.7rem;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 96px;
}

footer[id] {
  scroll-margin-top: 96px;
}

.section h2 {
  margin-top: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.about-text {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  margin: 0;
}

.about-text + .about-text {
  margin-top: 1rem;
}

.section-soft {
  background: var(--soft);
}

.services-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
}

.services-head p {
  margin: 0;
  max-width: 520px;
  color: #2f5563;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.service-card {
  background: var(--card);
  padding: 1.3rem;
  border-radius: 1rem;
  border: 1px solid rgba(14, 165, 183, 0.18);
  box-shadow: 0 10px 20px rgba(8, 47, 59, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 183, 0.45);
  box-shadow: 0 16px 30px rgba(8, 47, 59, 0.15);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0ea5b7, #0b6f7d);
}

.service-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  color: #0b6f7d;
  background: #d9f4f8;
  font-weight: 600;
}

.service-card h3 {
  margin: 0.8rem 0 0.4rem;
}

.service-card p {
  margin: 0 0 0.8rem;
  color: #2f5563;
}

.service-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.service-card li {
  margin-bottom: 0.35rem;
}

.price-grid {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 1rem;
}

.price-card {
  background: var(--card);
  padding: 1.2rem;
  border-radius: 0.9rem;
  box-shadow: 0 8px 18px rgba(8, 47, 59, 0.09);
}

.price-card-wide {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0.9rem;
  border-radius: 0.65rem;
}

.price-card-wide ul {
  padding-left: 0;
  list-style-position: inside;
}

.price-card h3 {
  margin: 0 0 0.8rem;
}

.price-card ul {
  margin: 0;
  padding-left: 1.1rem;
}

.price-card li {
  margin-bottom: 0.5rem;
}

.photo-grid {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.photo {
  margin: 0;
  overflow: hidden;
  border-radius: 0.9rem;
  box-shadow: 0 8px 18px rgba(8, 47, 59, 0.12);
}

.photo img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.photo:hover img {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.video-grid {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 1rem;
}

.video-card {
  margin: 0;
  background: #fff;
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(8, 47, 59, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(8, 47, 59, 0.2);
}

.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  transform: scale(1);
}

.video-card:hover video {
  transform: scale(1.08);
}

.footer {
  background: #0d2b36;
  color: #d5ebf2;
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-map {
  position: relative;
  overflow: hidden;
}

.footer-map-link {
  color: #eee;
  font-size: 12px;
  position: absolute;
}

.footer-map-link-top {
  top: 0;
}

.footer-map-link-mid {
  top: 14px;
}

.footer-map-link-bottom {
  top: 28px;
}

.footer-map-frame {
  position: relative;
}

.footer-note {
  margin-left: 5%;
  margin-right: 5%;
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(22px) translateX(6px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .nav {
    padding-inline: max(3%, 1rem);
  }

  .menu {
    gap: 0.8rem;
  }

  .menu a {
    font-size: 0.92rem;
  }
}

@media (max-width: 900px) {
  .hero {
    padding-top: 128px;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  /* Явная сетка: бургер слева, логотип по центру блока, Instagram справа */
  .brand {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.45rem;
    overflow: visible;
  }

  .menu-toggle {
    display: flex !important;
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
    pointer-events: auto;
  }

  .brand .logo {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .brand .hero-instagram {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  .hero-phones {
    flex: 0 0 auto;
    margin-left: auto;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-end;
    text-align: right;
    white-space: nowrap;
  }

  .menu {
    flex: 1 1 100%;
    width: 100%;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.15rem;
    padding: 0.65rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 35, 46, 0.35);
  }

  .nav.menu-open .menu {
    display: flex;
  }

  .menu a {
    display: inline-block;
    padding: 0.12rem 0;
    font-size: 0.94rem;
  }

  .nav.menu-open .menu-toggle-line-1 {
    transform: translateY(7px) rotate(45deg);
  }

  .nav.menu-open .menu-toggle-line-2 {
    opacity: 0;
  }

  .nav.menu-open .menu-toggle-line-3 {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero-content {
    padding-top: 3rem;
  }

  .service-cards,
  .price-grid,
  .video-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo img {
    height: 460px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 112px;
  }

  .scroll-down {
    bottom: max(0.55rem, env(safe-area-inset-bottom));
  }

  .hero-phones a {
    font-size: 0.84rem;
  }

  .logo {
    font-size: clamp(1rem, 4vw, 1.2rem);
  }

  .menu a {
    font-size: 0.9rem;
  }

  .photo-grid {
    grid-template-columns: 1fr;
  }

  .photo img {
    height: 420px;
  }
}

@media (max-width: 420px) {
  .menu-toggle {
    width: 40px;
    height: 40px;
    padding: 8px;
  }

  .hero-phones a {
    font-size: 0.8rem;
  }

  .menu a {
    font-size: 0.86rem;
  }
}

.scroll-down {
  position: absolute;
  bottom: max(0.8rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  animation: bounce 1.5s infinite;
  transition: opacity 0.3s;
  z-index: 3;
}

.scroll-down:hover {
  opacity: 1;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 0.5rem;
}

.lightbox.active {
  display: flex;
}

@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 10px);
  }
}
