/* ===== СБРОС И ПЕРЕМЕННЫЕ ===== */

:root {
  --bg: #FAF9FE;
  --header-bg: #23365F;
  --header-text: #F4F5F8;
  --button-bg: #243C7E;
  --button-border: #4B6092;
  --button-text: #F4F5F8;

  --container: 1674px;
  --header-height: 60px;
  --bottom-bar-height: 30px;
  --hero-bg-x: 100%;
  --service-card-height: 250px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  min-width: 320px;
}

body {
  font-family: 'Akshar', sans-serif;
  background: var(--bg);
  color: #2F3135;
}

/* ===== ОБЩИЕ УТИЛИТЫ ===== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 38px;
  box-sizing: border-box;
}

.section-title {
  max-width: var(--container);
  margin: 12.5px auto;
  padding: 0 38px;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Akshar', sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #000000;
}

/* ===== ВЕРХНИЙ БАР ===== */

.header-top {
  width: 100%;
  background: var(--header-bg);
  height: var(--header-height);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: opacity 0.4s ease, transform 0.4s ease, height 0.4s ease, padding 0.4s ease;
  overflow: hidden;
}

.header-top-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 38px;
  padding-right: 38px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
}

.header-left {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 19px;
  transition: all 0.4s ease;
}

.header-logo img {
  width: 85px;
  height: 55px;
  object-fit: contain;
}

.header-title {
  font-size: 16px;
  font-weight: 400;
  color: var(--header-text);
  white-space: nowrap;
  line-height: 1;
}

.header-menu {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  transition: all 0.4s ease;
}

.header-menu a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 1.5px;
  display: inline-block;
  padding: 6px 0;
}

.header-button {
  justify-self: end;
  flex-shrink: 0;
  width: 200px;
  height: 45px;
  background: var(--button-bg);
  border: 2px solid var(--button-border);
  color: var(--button-text);
  font-weight: 400;
  font-size: 16px;
  border-radius: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 1.3px;
  transition: all 0.2s ease;
  margin: 0;
}

/* ===== НИЖНИЙ БАР ===== */

.header-bottom {
  width: 100%;
  background: #EEF0F6;
  height: var(--bottom-bar-height);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
  transition: all 0.5s ease;
  opacity: 1;
  overflow: hidden;
}

.header-bottom-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 38px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-family: 'Akshar', sans-serif;
  letter-spacing: 1.8px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.header-bottom-inner > * {
  transition: all 0.3s ease;
}

.header-address-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-address {
  color: #2F3135;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-address .note {
  margin-left: 6px;
  color: inherit;
  font-size: 13px;
}

.header-hours {
  display: flex;
  align-items: center;
  color: #6b7280;
  font-size: 13px;
  letter-spacing: 1px;
  white-space: nowrap;
  margin-left: 0;
}

.header-phones {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #243C7E;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-phones a {
  color: #243C7E;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.header-phones a:hover {
  color: #1a2f66;
  transform: translateY(-1px);
}

.header-bottom .header-phones a,
.header-bottom .header-phones a:link,
.header-bottom .header-phones a:visited,
.header-bottom .header-phones a:hover,
.header-bottom .header-phones a:active,
.header-bottom .header-phones a:focus {
  color: #243C7E !important;
  -webkit-text-fill-color: #243C7E !important;
  text-decoration: none !important;
}

/* ===== HERO ===== */

.hero-section {
  width: 100%;
  background: var(--bg);
  overflow: hidden;
}

.hero-inner {
  position: relative;
  width: 100%;
  height: 100vh;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 38px;
  padding-right: 38px;
  box-sizing: border-box;
}

.hero-inner picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-inner picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-bg-x) center;
  display: block;
}

.hero-content {
  position: absolute;
  top: 6%;
  left: 5%;
  z-index: 5;
  width: min(52%, 620px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2vw, 18px);
}

.hero-title {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.8px;
  color: #162650;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: inline-block;
  transform: translateY(120%);
  opacity: 0;
  animation: riseUp 0.9s ease forwards;
}

.hero-title .line:nth-child(1) span { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) span { animation-delay: 0.25s; }
.hero-title .line:nth-child(3) span { animation-delay: 0.4s; }

.hero-subtitle {
  display: block;
  overflow: hidden;
  opacity: 0;
  transform: translateY(120%);
  animation: riseUp 0.9s ease forwards;
  position: relative;
  padding-left: 30px;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.6;
  color: #162650;
  margin-bottom: 8px;
}

.hero-subtitle::before {
  content: "•";
  position: absolute;
  left: 10px;
  top: 0;
  color: #6A7386;
  font-size: 20px;
  line-height: 1.5;
}

.hero-subtitle:nth-of-type(1) { animation-delay: 0.55s; }
.hero-subtitle:nth-of-type(2) { animation-delay: 0.7s; }
.hero-subtitle:nth-of-type(3) { animation-delay: 0.85s; }

@keyframes riseUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero-button {
  flex-shrink: 0;
  width: 215px;
  padding: 16px 0;
  height: auto;
  background: var(--button-bg);
  border: 2px solid var(--button-border);
  color: var(--button-text);
  font-weight: 400;
  font-size: 17px;
  border-radius: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 1.3px;
  transition: all 0.2s ease;
  margin-top: 16px;
}

.hero-button:hover {
  background: #1d2f66;
  transform: translateY(-2px);
}

.hero-inner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 15%;
  background: linear-gradient(to bottom, rgba(250, 249, 254, 0) 0%, #FAF9FE 100%);
  z-index: 3;
  pointer-events: none;
}

/* ===== КАРТОЧКИ УСЛУГ ===== */

.services {
  padding-bottom: 10px;
}

.service-section {
  margin-bottom: 50px;
  margin-top: 10px;
}

.service-section:last-child {
  margin-bottom: 0;
}

#services-title {
  color: #162650;
  font-family: 'Akshar', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-top: 10px;
  text-align: center;
  width: 100%;
  margin-left: 0;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}

#services-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-wrapper {
  display: flex;
  align-items: stretch;
  background: #F9F6FD;
  overflow: hidden;
  border: 1px solid #e3e6ef;
  min-height: var(--service-card-height);
  max-width: 1200px;
  margin: 0 auto;
  flex-direction: row;
  flex-wrap: nowrap;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-wrapper.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-wrapper:hover {
  transform: translateY(-3.6px);
  box-shadow: 0 9px 25px rgba(0, 0, 0, 0.10);
}

.service-image {
  flex: 0 0 36%;
  max-width: 36%;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  height: auto;
  margin: 35px;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-image picture {
  width: 100%;
  height: 100%;
  display: flex;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-content {
  flex: 1;
  padding: 35px 36px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14.4px;
  text-align: left;
  font-family: 'Akshar', sans-serif;
}

.service-content h3 {
  font-size: 25px;
  font-weight: 400;
  color: #122D65;
  letter-spacing: 0.45px;
  margin-bottom: 7.2px;
}

.service-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5.4px;
}

.service-content ul li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14.4px;
  align-items: center;
  font-size: 17.1px;
  color: #2F3135;
  letter-spacing: 0.45px;
  margin-bottom: 5.4px;
}

.service-content .svc-price {
  justify-self: end;
  white-space: nowrap;
}

.btn-order {
  width: 193.5px;
  height: 45px;
  background: var(--button-bg);
  border: 2px solid var(--button-border);
  color: var(--button-text);
  border-radius: 22.5px;
  font-family: 'Akshar', sans-serif;
  font-weight: 400;
  font-size: 16.2px;
  letter-spacing: 0.9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: auto;
  align-self: flex-end;
}

.service-wrapper-big .service-content {
  padding: 24px 34px;
  gap: 10px;
}

.service-wrapper-big .service-content h3 {
  font-size: 24px;
  margin-bottom: 4px;
}

.service-wrapper-big .service-content ul {
  gap: 3px;
}

.service-wrapper-big .service-content ul li {
  font-size: 16px;
  letter-spacing: 0.3px;
  margin-bottom: 3px;
}

/* ===== ГАЛЕРЕЯ ===== */

.gallery {
  padding: 10px 0;
  background: #FAF9FE;
}

.gallery-container {
  text-align: center;
}

.gallery-grid {
  column-count: 3;
  column-gap: 25px;
  padding-bottom: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid img {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 75px;
  display: block;
  break-inside: avoid;
  object-fit: cover;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.gallery-grid img.show {
  opacity: 1;
  transform: translateY(0);
}

.g1 { height: 557px; }
.g2 { height: 333px; }
.g3 { height: 557px; }
.g4 { height: 258px; }
.g5 { height: 483px; }
.g6 { height: 285px; }

#gallery-title {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}

#gallery-title.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ПРЕИМУЩЕСТВА ===== */

.benefits {
  background: var(--bg);
  padding: 10px 0;
}

.benefits .container {
  background: var(--bg);
}

#benefits-title {
  color: #162650;
  font-family: 'Akshar', sans-serif;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-align: center;
  margin: 12.5px 0;
  font-size: 25px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}

#benefits-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px 35px;
  justify-content: center;
  align-items: stretch;
  max-width: 1100px;
  margin: 0 auto;
}

.benefit-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #FAF9FE;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  overflow: visible;
  min-height: 260px;
  opacity: 0;
  transform: translateY(50px);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.benefit-item:nth-child(1) { transition-delay: 0.1s; }
.benefit-item:nth-child(2) { transition-delay: 0.2s; }
.benefit-item:nth-child(3) { transition-delay: 0.3s; }

.benefit-item .icon {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.benefit-item .icon svg {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.benefit-item h3 {
  color: #1E3A8A;
  margin-bottom: 10px;
  font-size: 20px;
}

.benefit-item p {
  color: #333;
  font-size: 15px;
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: #fff;
  padding: 40px 40px 20px;
  border-radius: 50px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
  margin-bottom: 20px;
  color: #1E3A8A;
  font-size: 24px;
  text-align: center;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  height: 55px;
  padding: 0 18px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 16px;
  box-sizing: border-box;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}

.modal-content input {
  line-height: 55px;
}

.modal-content textarea {
  height: 120px;
  padding: 15px 18px;
  line-height: 1.4;
  overflow: hidden;
  resize: none;
}

.modal-content textarea::-webkit-scrollbar {
  display: none;
}

.modal-content input:focus,
.modal-content textarea:focus {
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #444;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}

.modal-close:hover {
  color: #1E3A8A;
}

.btn-submit {
  height: 45px;
  padding: 0 28px;
  align-self: center;
  width: auto;
  background: #1E3A8A;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 22px;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
}

.btn-submit:hover {
  background: #152a63;
}

.btn-submit:active {
  transform: scale(0.98);
}

#formStatus {
  text-align: center;
  margin-top: 10px;
  font-size: 16px;
}

/* ===== ФУТЕР ===== */

.footer-contacts {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 20px;
  font-family: 'Akshar', sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
}

.footer-contacts-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-contacts-info a {
  color: var(--header-text);
  text-decoration: none;
}

.footer-contacts-info a:hover {
  text-decoration: underline;
}

.footer-phones {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-weight: 600;
}

.footer-phones a {
  color: var(--header-text);
  text-decoration: none;
}

.footer-phones a:hover {
  text-decoration: underline;
}

.page-footer__button {
  background: #FFC107;
  color: #23365F;
  border: none;
  padding: 10px 26px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.3s;
}

.page-footer__button:hover {
  background: #ffdb4d;
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: 500;
}

.footer-bottom-links a:hover {
  text-decoration: underline;
}

.footer-bottom-address {
  text-align: center;
  font-size: 14px;
  color: rgba(244, 245, 248, 0.7);
}

/* ===== ФИКСЫ ===== */

a[href^="tel"] {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

a[href^="tel"]:hover,
a[href^="tel"]:active,
a[href^="tel"]:visited {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
  opacity: 0.9;
}

meta[name="format-detection"] {
  content: "telephone=no";
}

/* ===== МЕДИА-ЗАПРОСЫ ===== */

@media (min-width: 1600px) {
  .header-menu { gap: 36px; }
}

@media (max-width: 1700px) {
  .header-top-inner,
  .header-bottom-inner,
  .hero-inner {
    max-width: 100%;
  }
}

@media (max-width: 1200px) {
  .header-top-inner { gap: 12px; }
  .header-menu { gap: 22px; }
  .section-title { padding: 0 28px; margin-bottom: 20px; }

  .header-bottom-inner {
    padding: 0 24px;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .header-address-wrapper,
  .header-phones {
    margin-top: 6px;
    font-size: 12px;
  }
}

@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .benefit-item {
    min-height: 260px;
  }
}

@media (max-width: 1000px) {
  .header-bottom {
    height: 0 !important;
    opacity: 0;
    padding: 0 !important;
    pointer-events: none;
  }
}

@media (max-width: 902px) {
  .header-top-inner {
    grid-template-columns: 0fr auto 0fr;
    justify-content: center;
  }
  .header-menu {
    justify-self: center;
    gap: 18px;
  }
  .header-left {
    opacity: 0;
    transform: translateX(-30px);
    pointer-events: none;
  }
  .header-button {
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
  }
}

@media (max-width: 900px) {
  .hero-content {
    width: 100%;
    left: 20px;
    top: 40px;
  }
  .hero-subtitle { font-size: 18px; }
  .hero-title {
    font-size: 36px;
    line-height: 1.5;
  }

  .header-logo,
  .header-title,
  .header-button {
    display: none;
  }
  .header-top-inner {
    padding-left: 12px;
    padding-right: 12px;
    justify-content: center;
  }
  .header-menu {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 28px !important;
    margin: 10px 0 !important;
  }

  .service-wrapper {
    width: 100%;
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: center;
    gap: 0;
  }
  .service-image,
  .service-content {
    width: 100% !important;
    max-width: 100% !important;
  }
  .service-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
  }

  .header-bottom {
    height: auto;
    padding: 10px 0;
  }
  .header-bottom-inner {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
  }
  .header-address-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .header-address,
  .header-hours,
  .header-phones {
    margin: 0;
    font-size: 12px;
    text-align: center;
    white-space: normal;
  }

  .gallery-grid {
    column-count: 1;
    column-gap: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 16px 40px;
  }
  .gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 25px;
  }
  .g1, .g2, .g3, .g4, .g5, .g6 { height: auto; }

  .benefits-grid { grid-template-columns: 1fr; }
  .benefits { padding-bottom: 10px; }
  .benefit-item { min-height: auto; }
}

@media (max-width: 600px) {
  :root { --hero-bg-x: 75%; }

  .header-top {
    opacity: 0;
    transform: translateY(-100%);
    height: 0;
    padding: 0;
    pointer-events: none;
  }

  .hero-content {
    top: 60px;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px);
  }
  .hero-title {
    font-size: clamp(32px, 8vw, 42px);
    line-height: 1.6;
  }
  .hero-title .line { margin-bottom: 12px; }
  .hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
  }
  .hero-button {
    width: 210px;
    padding: 20px 0;
    height: auto;
    font-size: 16px;
    margin-top: 16px;
  }

  .service-wrapper {
    width: calc(100% - 64px);
    margin: 10px auto;
  }
  .service-image {
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
  }
  .service-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
  }
  .service-content { padding: 14px; }
}

@media (max-width: 480px) {
  .header-bottom-inner {
    gap: 4px;
    padding: 8px 12px;
  }
  .header-address-wrapper,
  .header-phones {
    font-size: 11px;
  }
}