:root {
  --bg: #f4f9fc;
  --text: #173a4a;
  --accent: #0ea5b7;
  --accent-dark: #0b6f7d;
  --card: #ffffff;
  --soft: #e8f4f8;
  --nav-backdrop-blur: blur(6px);
  /* Chrome, Safari, Edge, Firefox, Opera: системные шрифты + кириллица (Noto Sans, Liberation) */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.hero {
  min-height: 100vh;
  min-height: 100dvh;
  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%;
  min-width: 0;
  padding-inline: max(4%, calc((100% - 1100px) / 2));
  z-index: 1000;
  background: transparent;
  -webkit-backdrop-filter: var(--nav-backdrop-blur);
  backdrop-filter: var(--nav-backdrop-blur);
  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;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  flex-shrink: 0;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent none !important;
  color: #fff;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 11px 10px;
  box-sizing: border-box;
  cursor: pointer;
  appearance: none;
  -webkit-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;
}

/* Три полоски: margin вместо gap — старый Safari/iOS и часть WebView плохо рисуют gap внутри <button> */
.menu-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  min-height: 2px;
  flex: 0 0 auto;
  border-radius: 1px;
  background-color: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.menu-toggle-bar + .menu-toggle-bar {
  margin-top: 5px;
}

/* Десктоп (ширина окна ≥901px): только горизонтальное меню; бургер в разметке скрыт. При сужении ≤900px — max-width ниже. JS: closeMenu при innerWidth > 900 */
@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(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.service-card {
  min-width: 0;
  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-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(0, 1fr));
  gap: 1rem;
}

.price-card {
  min-width: 0;
  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(0, 1fr));
  gap: 1rem;
}

.video-card {
  min-width: 0;
  margin: 0;
  background: #fff;
  border-radius: 0.9rem;
  overflow: hidden;
  position: relative;
  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);
}

.video-tap-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(5, 30, 39, 0.62);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  opacity: 0.95;
  transform: translateY(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.video-tap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: #9defff;
  animation: tap-nudge 1.15s ease-in-out infinite;
}

.video-tap-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.video-tap-text {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

.video-card.is-interacted .video-tap-hint,
.video-card.is-playing .video-tap-hint {
  opacity: 0;
  transform: translateY(6px);
}

.video-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(13, 43, 54, 0.42);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  opacity: 1;
  visibility: visible;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-card.is-ready .video-loader {
  opacity: 0;
  visibility: hidden;
}

.video-card.is-error .video-loader {
  opacity: 1;
  visibility: visible;
}

.video-card.is-error .video-loader::after {
  content: "Не удалось загрузить видео";
  position: absolute;
  left: 50%;
  top: calc(50% + 28px);
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  padding: 0 10px;
}

.video-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: video-spin 0.85s linear infinite;
}

.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;
  border: 0;
}

.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) {
  html {
    scroll-behavior: auto;
  }

  .hero::before,
  .hero::after,
  .hero-content,
  .scroll-down {
    animation: none !important;
  }

  .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 video-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tap-nudge {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  35% {
    transform: translateY(-2px) scale(1.05);
  }
  70% {
    transform: translateY(1px) scale(0.98);
  }
}

@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;
  }

  .nav.scrolled .menu {
    background: rgba(255, 255, 255, 0.82);
    border-top: 1px solid rgba(10, 35, 46, 0.1);
  }

  .menu a {
    display: inline-block;
    padding: 0.12rem 0;
    font-size: 0.94rem;
  }

  .nav.menu-open .menu-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav.menu-open .menu-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav.menu-open .menu-toggle-bar:nth-child(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: clamp(0.86rem, 2.2vw, 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;
  }
}

.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);
  }
}

:root {
  --primary-color: #007AFF;
  --inst-gradient: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  --tg-color: #26A5E4;
  --vb-color: #7360F2;
  --widget-size: 66px;
  --widget-link-size: 56px;
  --widget-offset: max(18px, calc(env(safe-area-inset-bottom) + 14px));
  --widget-side-offset: max(18px, calc(env(safe-area-inset-right) + 14px));
}

.smart-contact-wrapper {
  position: fixed;
  right: var(--widget-side-offset);
  bottom: var(--widget-offset);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  font-family: var(--font-sans);
  pointer-events: none;
}

.main-trigger {
  width: var(--widget-size);
  height: var(--widget-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5b7, #007aff);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
  box-shadow: 0 16px 35px rgba(0, 122, 255, 0.32);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.main-trigger:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 122, 255, 0.38);
}

.icon-wrap {
  color: white;
  width: 30px;
  height: 30px;
  position: relative;
  transition: transform 0.3s ease;
}

.icon-wrap svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-wrap .icon-close {
  opacity: 0;
  transform: scale(0.7) rotate(-90deg);
}

.smart-contact-wrapper.active .icon-wrap .icon-message {
  opacity: 0;
  transform: scale(0.7) rotate(90deg);
}

.smart-contact-wrapper.active .icon-wrap .icon-close {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.pulse-ring {
  position: absolute;
  inset: 0;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: smart-pulse 2s infinite;
  z-index: -1;
}

@keyframes smart-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.link-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--widget-link-size);
  height: var(--widget-link-size);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px) scale(0.82);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  position: relative;
  pointer-events: none;
}

.link-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.link-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vb .link-icon img {
  width: 112%;
  height: 112%;
}

.link-item .label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.link-item:hover .label,
.link-item:focus-visible .label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.smart-contact-wrapper.active .link-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: calc(var(--i) * 0.1s);
}

.smart-contact-wrapper.active .main-trigger {
  background: #173a4a;
}

.smart-contact-wrapper.active .pulse-ring {
  display: none;
}

.tg { background: var(--tg-color); }
.vb { background: var(--vb-color); }
.inst { background: var(--inst-gradient); }

@media (max-width: 480px) {
  :root {
    --widget-size: 58px;
    --widget-link-size: 50px;
  }

  .smart-contact-wrapper {
    gap: 10px;
  }

  .link-item .label {
    display: none;
  }
}

.tg { 
  background-color: #26A5E4; 
}

.vb { 
  background-color: #7360F2; 
}

/* Градиент Instagram (официальные цвета) */
.inst { 
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* Эффект при наведении на логотипы */
.link-item:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 26px rgba(0,0,0,0.24);
}

.main-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background-color: white;
  color: #333;
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.smart-contact-wrapper:not(.active) .main-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  transition-delay: 0.8s;
}

.smart-contact-wrapper.active .main-tooltip {
  opacity: 0;
  transform: translateY(-50%) translateX(10px);
  transition: 0.2s;
}

.main-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 7px solid white;
}

@media (max-width: 480px) {
  .main-tooltip {
    display: none;
  }
}

@media (max-width: 360px) {
  :root {
    --widget-size: 54px;
    --widget-link-size: 46px;
  }

  .smart-contact-wrapper {
    right: max(12px, calc(env(safe-area-inset-right) + 10px));
    bottom: max(12px, calc(env(safe-area-inset-bottom) + 10px));
  }

  .link-icon {
    width: 24px;
    height: 24px;
  }
}