﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Базовые настройки */
body {
  font-family: 'GT Eesti Pro Display', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f2f8fc;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/*Настройка логотипа*/
.logo img {
  width: 64px;
  height: 64px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s, box-shadow 0.2s;
}

.logo img:hover{
  transform: scale(1.04);
}

/* менюшка */
.nav-menu {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #5494cf;
  width: 100%;
  padding: 0 3% 0 10%;
  position: sticky;
  top: 0;
  z-index: 1000;
  cursor: pointer;
}

.nav-menu .dropdown ul li a {
  display: block;
  font-family: 'GT Eesti Pro Display', sans-serif;
  color: #1A3055;
  text-decoration: none;
  font-size: calc(12px + (18+12)*((100vw-350px)/(1600-300)));
  padding: 5% 0 5% 10%;
  border-radius: 15px;
}

.nav-menu .dropdown ul li a:hover {
  background-color: #cde3f7;

}

.nav-menu .dropdown ul li ul {
  flex-direction: column;
  position: absolute;
  right: 0;
  width: 18rem;
  background-color: #e8f3fc;
  opacity: 0;
  border-radius: 15px;
  transition: 0.3s;
  margin-top: 45%;
  visibility: hidden;
}

/* Активное меню (открытое по клику) */
.nav-menu .dropdown ul li ul.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-menu .dropdown ul li {
  position: relative;
  list-style: none;
}

/* ===== КНОПКА КВИЗА В ШАПКЕ ===== */
.quiz-header-btn {
  background: linear-gradient(135deg, #ff8d5c 0%, #ff6b3d 100%);
  border: none;
  border-radius: 40px;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  font-family: 'GT Eesti Pro Display', sans-serif;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-right: 16px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.quiz-header-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255, 109, 61, 0.4);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */
.quiz-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.quiz-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.quiz-modal-container {
  position: relative;
  width: min(90%, 700px);
  max-height: 85vh;
  background: transparent;
  border-radius: 40px;
  z-index: 10;
  overflow-y: auto;
  animation: modalAppear 0.3s ease;
}

@keyframes modalAppear {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.quiz-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: #5494cf;
  border-radius: 40px 40px 0 0;
}

.quiz-modal-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.quiz-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: bold;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.quiz-modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

.quiz-modal-body {
  background: white;
  border-radius: 0 0 40px 40px;
  padding: 8px 0 20px 0;
}

/* ===== СТИЛИ КВИЗА ВНУТРИ МОДАЛКИ ===== */
.quiz-widget {
  padding: 24px 32px 32px;
}

.quiz-progress {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5494cf;
  margin-bottom: 12px;
}

.quiz-question {
  font-size: 26px;
  font-weight: 700;
  color: #1A3055;
  margin-bottom: 28px;
  line-height: 1.3;
}

.quiz-options-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}

.quiz-options-list li {
  margin: 12px 0;
  background: #f8fbfe;
  border-radius: 100px;
  border: 1px solid rgba(84, 148, 207, 0.25);
  transition: all 0.2s;
}

.quiz-options-list li:hover {
  border-color: #5494cf;
  background: #ffffff;
}

.quiz-options-list input[type="radio"] {
  display: none;
}

.quiz-options-list label {
  display: block;
  padding: 14px 24px;
  font-size: 17px;
  font-weight: 500;
  color: #1A3055;
  cursor: pointer;
  transition: 0.2s;
}

.quiz-options-list input[type="radio"]:checked + label {
  background: #5494cf;
  color: white;
  border-radius: 100px;
}

.quiz-submit-btn {
  background: linear-gradient(135deg, #5494cf 0%, #467fb2 100%);
  border: none;
  border-radius: 60px;
  padding: 14px 28px;
  font-size: 18px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.quiz-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(84, 148, 207, 0.4);
}

.quiz-result {
  text-align: center;
  padding: 20px;
}

.quiz-result-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.quiz-result-title {
  font-size: 28px;
  font-weight: 700;
  color: #2b6e3c;
  margin-bottom: 20px;
}

.quiz-result-text {
  font-size: 18px;
  line-height: 1.5;
  color: #2d3c4f;
  margin-bottom: 28px;
}

.quiz-restart-btn {
  background: #40a0fa;
  color: #2b4427;
  border: none;
  border-radius: 60px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .quiz-header-btn {
    padding: 6px 14px;
    font-size: 13px;
    margin-right: 8px;
  }

  .quiz-question {
    font-size: 20px;
  }

  .quiz-options-list label {
    padding: 12px 18px;
    font-size: 15px;
  }

  .quiz-widget {
    padding: 20px 20px 28px;
  }
}

.nav-brand {
  gap: 10px;
  display: flex;
  align-items: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  margin-left: 4px;
  font-size: calc(20px + (35+20)*((100vw-350px)/(1600-300)));
}

.menu-item {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  text-decoration: none;
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-weight: bold;
  font-size: 18px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-name {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-weight: bold;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  color: #f8f3e7;
  font-family: 'GT Eesti Pro Display', sans-serif;
  font-size: 16px;
  font-weight: normal;
  line-height: 1;
  white-space: nowrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  margin-left: -4px;
  border: 0;
  border-radius: 50%;
  background-color: #858b94;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle::before {
  content: "☾";
  font-size: 18px;
  line-height: 1;
}

.theme-toggle:hover {
  background-color: #6e747c;
  transform: translateY(-1px);
}

.theme-toggle:focus-visible {
  outline: 3px solid rgba(248, 243, 231, 0.85);
  outline-offset: 3px;
}

body.theme-dark {
  background-color: #121923;
  color: #e7edf5;
}

body.theme-dark .nav-menu,
body.theme-dark .site-footer {
  background-color: #243140;
}

body.theme-dark .nav-menu .dropdown ul li ul {
  background-color: #1b2430;
}

body.theme-dark .nav-menu .dropdown ul li a,
body.theme-dark .brand-name,
body.theme-dark .brand-subtitle,
body.theme-dark .menu-item,
body.theme-dark .mail,
body.theme-dark .footer-nav a,
body.theme-dark .footer-contact a,
body.theme-dark .footer-brand-block h3,
body.theme-dark .footer-brand-block p,
body.theme-dark .footer-bottom p {
  color: #e7edf5;
}

body.theme-dark .nav-menu .dropdown ul li a:hover {
  background-color: #334254;
}

body.theme-dark .mail {
  background-color: #334254;
}

body.theme-dark .main-content,
body.theme-dark .contact-form,
body.theme-dark .text-card,
body.theme-dark .news-card,
body.theme-dark .mchs {
  background-color: #223142;
  color: #e7edf5;
}

body.theme-dark .contact-form {
  background: linear-gradient(180deg, #2a3b4e 0%, #223142 100%);
  box-shadow: 0 20px 44px rgba(8, 12, 18, 0.28);
}

body.theme-dark .main-content p,
body.theme-dark .text-card p,
body.theme-dark .contact-form label,
body.theme-dark .contact-form-title,
body.theme-dark .contact-form-lead,
body.theme-dark .intro-block p {
  color: #ffffff;
}

body.theme-dark .main-content h1,
body.theme-dark .text-card h2,
body.theme-dark .text-card h3,
body.theme-dark .text-fotm-header,
body.theme-dark .contact-form-kicker {
  color: #ffffff;
}

body.theme-dark .main-content,
body.theme-dark .text-card {
  box-shadow: inset 0 0 0 1px rgba(157, 186, 217, 0.14), 0 18px 48px rgba(8, 12, 18, 0.2);
}

body.theme-dark input,
body.theme-dark textarea {
  background-color: #f4f7fb;
  color: #243140;
  caret-color: #243140;
  border-color: #b8c8db;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #6d7f92;
}

body.theme-dark .form-actions input[type="submit"] {
  background-color: #8fb6d9;
  color: #e7edf5;
  border-color: transparent;
}

body.theme-dark .form-actions input[type="submit"]:hover {
  background-color: #7ea7cc;
}

body.theme-dark .back-to-top,
body.theme-dark .back-to-feedback {
  background-color: #334254;
}

body.theme-dark .back-to-top:hover,
body.theme-dark .back-to-feedback:hover {
  background-color: #415164;
}

body.theme-dark .theme-toggle {
  background-color: #a0a6ae;
  color: #1b2430;
}

body.theme-dark .theme-toggle::before {
  content: "☀";
}

body.theme-dark iframe {
  filter: saturate(0.9) brightness(0.88);
}



.image-container,
.main-baner-news,
.news,
.main-content,
.contact-section {
  width: 94%;
  max-width: 106.25rem;
  margin-left: auto;
  margin-right: auto;
}

.main-baner-news {
  position: relative;
  margin-top: 0;
  margin-bottom: 48px;
  padding-bottom: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.main-baner-news:hover{
  transform: scale(1.04);
}



.main-banner-carousel {
  position: relative;
  min-height: 540px;
  z-index: 2;
  overflow: hidden;
  border-radius: 32px;
  margin-top: 2%;
}

.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(4%);
  transition: opacity 1.2s ease, transform 1.2s ease, visibility 1.2s ease;
}

.banner-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.hero-news-card {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 540px;
  margin: 0;
  border-radius: 32px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 18px 40px rgba(26, 48, 85, 0.18);
}

.hero-news-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.12) 0%, rgba(20, 28, 38, 0.72) 100%);
  z-index: 0;
}

.hero-news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-news-card--banner .photo-shape {
  position: absolute;
  inset: 0;
}

.hero-news-card--banner .text-overlay {
  z-index: 1;
}

.hero-news-card--banner::after {
  content: none;
}

.hero-news-card .news-card-content {
  right: 3%;
  bottom: 3%;
  left: 3%;
  gap: 12px;
  z-index: 2;
}

.hero-news-card h3 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  color: #ffffff;
  max-width: 18ch;
}

.banner-slogan {
  width: 100%;
  max-width: none;
  font-size: clamp(42px, 5.8vw, 78px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.banner-slogan-wrap {
  top: 10%;
  right: auto;
  bottom: auto;
  left: 6%;
  width: 88%;
  gap: 0;
}

.hero-news-card p {
  max-width: 56ch;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.94);
}

.image-container {
  position: relative;
  width: 100%;
  max-width: 106.25rem;
  height: 540px;
  margin: 0 auto 20%;
  overflow: hidden;
}

.photo-shape {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
}



.text-overlay {
  position: absolute;
  top: 5%;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 4%;
  align-items: flex-start;
  padding-top: 5%;
}

.text-overlay h1 {
  color: white;
  font-family: 'GT Eesti Pro Display', Arial, sans-serif;
  font-size: 40pt;
  font-weight: 600;
  margin: 0;
  max-width: 80%;
}

.news {
  width: 100%;
  height: auto;
  max-width: 106.25rem;
  margin: 2% auto;
}

/* Обёртка для кнопок и трека */
.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.carousel-track-wrapper {
  flex: 1;
  overflow: hidden;
  border-radius: 1.5rem;
  perspective: 1400px;
}

.news-cards {
  display: flex;
  gap: 2.5%;
  will-change: transform;
}

.news-card {
  flex: 0 0 100%;
  position: relative;
  min-height: 148px;
  aspect-ratio: 1.95 / 1;
  border-radius: 24px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 14px 30px rgba(26, 48, 85, 0.08);
  transform-origin: center center;
  transform: scale(0.92) rotateY(10deg);
  opacity: 0.68;
  filter: saturate(0.85);
  transition: transform 0.9s ease, opacity 0.9s ease, filter 0.9s ease, box-shadow 0.9s ease;
}

.news-card.is-active {
  transform: scale(1) rotateY(0deg);
  opacity: 1;
  filter: saturate(1);
  box-shadow: 0 20px 42px rgba(26, 48, 85, 0.18);
}

.news-card.is-near {
  transform: scale(0.96) rotateY(6deg);
  opacity: 0.86;
  filter: saturate(0.94);
}

.news-card.is-left {
  transform: scale(0.96) rotateY(-6deg);
}

.news-card.is-far {
  transform: scale(0.9) rotateY(12deg);
  opacity: 0.56;
  filter: saturate(0.78);
}

.news-card.is-far-left {
  transform: scale(0.9) rotateY(-12deg);
}

.news-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.08) 0%, rgba(20, 28, 38, 0.62) 100%);
}

.news-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-content {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 1;
}

.news-card h3 {
  font-size: 16px;
  line-height: 1.12;
  color: #ffffff;
}

.news-card p {
  font-size: 12px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
}


.news-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(95deg, #5494cf);
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 2.5rem;
  transition: all 0.2s;
  font-size: 1rem;
}

.news-card-action:hover {
  background: linear-gradient(95deg, #4980b3);
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(193, 66, 22, 0.3);
}

/* Кнопки навигации */
.carousel-btn {
  background: transparent;
  border: none;
  width: 56px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ff8d5c;
  box-shadow: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  flex-shrink: 0;
  z-index: 2;
  opacity: 0.8;
  transition: transform 0.2s, box-shadow 0.2s;
}

.carousel-btn:hover {
  transform: scale(1.06);
  opacity: 1;
   transform: scale(1.04);
}

.carousel-arrow {
  display: block;
  width: 18px;
  height: 18px;
}

.carousel-arrow-left {
  border-left: 5px solid #ff8d5c;
  border-bottom: 5px solid #ff8d5c;
  transform: rotate(45deg);
}

.carousel-arrow-right {
  border-right: 5px solid #ff8d5c;
  border-top: 5px solid #ff8d5c;
  transform: rotate(45deg);
}

.news-card-action:hover {
  transform: translateY(-1px);
  background-color: #ffffff;
}

/* Адаптив: показываем разное количество карточек */
@media (min-width: 768px) {
  .news-card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

@media (min-width: 1024px) {
  .news-card {
    flex: 0 0 calc(33.333% - 1rem);
  }
}


.main-content {
  position: relative;
  width: 94%;
  max-width: 107.5rem;
  margin: -18px auto 0;
  padding: 5% 5% 5.5%;
  border-radius: 40px;
  background: rgba(226, 234, 241, 0.96) 100%;
  box-shadow: 0 18px 48px rgba(26, 48, 85, 0.08);
  margin-top: 5%;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 28px;
  width: 6px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5494cf 0%, #7eb2df 100%);
}

.main-content h1 {
  max-width: 12ch;
  margin-left: 0px;
  margin-bottom: 24px;
  font-size: 52px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #467fb2;
}

.main-content p {
  width: 100%;
  max-width: 76.25rem;
  font-size: 21px;
  padding: 0;
  color: #2d3c4f;
}

.intro-block {
  margin-bottom: 34px;
}

.text-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.text-card {
  min-height: 100%;
  padding: 28px 24px;
  border-radius: 24px;
  background-color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(84, 148, 207, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.text-card:hover{
  transform: scale(1.04);
}

.text-card h2,
.text-card h3 {
  margin-bottom: 14px;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #2C3E50;
}

.text-card p {
  max-width: 1180px;
  font-size: 17px;
  line-height: 1.8;
  color: #3c4b5e;
}

.text-card--mission,
.text-card--accent,
.text-card--list {
  background-color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(84, 148, 207, 0.12);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  align-items: start;
  gap: 32px;
  width: 94%;
  max-width: 107.5rem;
  margin: 48px auto 0;
}

.contact-form {
  max-width: 880px;
  width: 100%;
  margin: 0;
  padding: 36px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(84, 148, 207, 0.12), transparent 30%),
    linear-gradient(180deg, #EAF0F8);
  box-shadow: 0 20px 44px rgba(26, 48, 85, 0.08);
  font-family: 'GT Eesti Pro Display', sans-serif;
  margin-left: 0;
}

.contact-form-header {
  max-width: 680px;
  margin-bottom: 28px;
}

.contact-form-kicker {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5494cf;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-form-title {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.02em;
  line-height: 1.1;
}

.contact-form-lead {
  margin-top: 0;
  line-height: 1.1;
}

.contact-heading-line {
  display: block;
  white-space: nowrap;
}

.contact-heading-line--wide {
  font-size: 0.9em;
  letter-spacing: -0.05em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 15px;
  font-weight: 600;
  color: #35506f;
}

.contact-form input[type="text"],
.contact-form textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(84, 148, 207, 0.2);
  border-radius: 18px;
  background-color: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: #24384d;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  resize: vertical;
}

.contact-form input[type="text"]::placeholder,
.contact-form textarea::placeholder {
  color: #8a9aad;
}

.contact-form input[type="text"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #5494cf;
  box-shadow: 0 0 0 4px rgba(84, 148, 207, 0.16);
  transform: translateY(-1px);
}

.contact-form textarea {
  min-height: 180px;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.contact-form input[type="submit"] {
  min-width: 260px;
  padding: 16px 28px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #5494cf 0%, #467fb2 100%);
  color: #EAF0F8;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(84, 148, 207, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.contact-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(84, 148, 207, 0.34);
  filter: brightness(1.02);
}

.contact-form input[type="submit"]:active {
  transform: translateY(0);
}

.text-fotm-header {
  font-family: 'Marker Felt', fantasy;
  color: #5494cf;
  font-weight: bold;
  align-self: start;
  width: 100%;
  max-width: 520px;
  padding-top: 18px;
  font-size: clamp(42px, 5vw, 78px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin-left: 0;
}

.main-banner-carousel img,
.news-card img,
.contact-section img,
.contact-section svg,
.image-container img {
  max-width: 100%;
}

.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background-color: #5494cf;
  color: transparent;
  text-decoration: none;
  border-radius: 50%;
  font-family: 'GT Eesti Pro Display', sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  z-index: 1000;
}

.back-to-top::before,
.back-to-top::after {
  content: '';
  position: absolute;
}

.back-to-top::before {
  top: 18px;
  width: 14px;
  height: 14px;
  border-top: 10px solid #f8f3e7;
  border-left: 10px solid #f8f3e7;
  transform: rotate(45deg);
}

.back-to-top::after {
  top: 26px;
  width: 4px;
  height: 18px;
  background-color: #f8f3e7;
  border-radius: 999px;
}

.back-to-top:hover {
  background-color: #467fb2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 3px solid #EAF0F8;
  outline-offset: 4px;
}

.back-to-feedback {
  position: fixed;
  right: 32px;
  bottom: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background-color: #5494cf;
  color: transparent;
  text-decoration: none;
  border-radius: 50%;
  font-family: 'GT Eesti Pro Display', sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  z-index: 1000;
}

.back-to-feedback::before {
  content: "?";
  position: absolute;
  color: #f8f3e7;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-1px);
}

.back-to-feedback::after {
  content: none;
}

.back-to-feedback:hover {
  background-color: #467fb2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.back-to-feedback:focus-visible {
  outline: 3px solid #EAF0F8;
  outline-offset: 4px;
}



.site-footer {
  margin-top: 56px;
  padding: 32px 40px 24px;
  background-color: #5494cf;
  color: #f8f3e7;
  width: calc(100% + (var(--page-gutter) * 2));
  margin-left: calc(var(--page-gutter) * -1);
  margin-right: calc(var(--page-gutter) * -1);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.footer-brand-block h3 {
  margin-bottom: 10px;
  font-size: 28px;
  line-height: 1;
}

.footer-brand-block p,
.footer-contact p,
.footer-bottom p {
  font-size: 16px;
  line-height: 1.6;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
}

.footer-nav a,
.footer-contact a {
  color: #f8f3e7;
  text-decoration: none;
}

.footer-nav a {
  font-size: 17px;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s ease;
}

.footer-nav a:hover {
  transform: scale(1.08);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(248, 243, 231, 0.28);
}

@media (max-width: 1200px) {
  .main-banner-carousel {
    min-height: 500px;
  }

  .banner-image-container {
    height: 500px;
  }

  .nav-menu {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .nav-brand,
  .nav-links,
  .mail {
    justify-content: center;
  }

  .news {
    max-width: 900px;
  }

  .news-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .main-content {
    width: 94%;
    margin: -12px auto 0;
    padding: 40px 32px 56px;
  }

  .main-content::before {
    left: 18px;
    top: 32px;
    height: 96px;
  }

  .main-content h1 {
    margin-left: 18px;
    font-size: 42px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .main-baner-news {
    margin-bottom: 32px;
  }

  .main-banner-carousel {
    min-height: 420px;
    border-radius: 24px;
  }

  .banner-image-container {
    height: 420px;
  }

  .hero-news-card {
    left: 0;
    bottom: 0;
    width: 100%;
    min-height: 200px;
  }

  .hero-news-card .news-card-content {
    right: 18px;
    bottom: 18px;
    left: 18px;
  }

  .hero-news-card p {
    font-size: 14px;
    line-height: 1.4;
  }

  .nav-menu {
    padding: 18px;
  }

  .brand-name {
    font-size: 22px;
  }

  .brand-subtitle,
  .menu-item,
  .mail {
    font-size: 16px;
  }

  .news {
    margin: 0 auto 48px;
    width: 94%;
    max-width: 100%;
    height: auto;
  }

  .news-cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-card {
    min-height: 180px;
    margin-left: 0;
  }

  .news-card h3 {
    font-size: 24px;
  }

  .news-card p {
    font-size: 20px;
  }

  .back-to-top {
    right: 16px;
    width: 52px;
    height: 52px;
  }

  .back-to-top::before {
    top: 16px;
    width: 12px;
    height: 12px;
    border-top-width: 3px;
    border-left-width: 3px;
  }

  .back-to-top::after {
    top: 23px;
    width: 3px;
    height: 16px;
  }

  .back-to-feedback {
    right: 16px;
    bottom: 120px;
  }

  .mchs {
    right: 16px;
    bottom: 196px;
    width: 52px;
    height: 52px;
  }

  .mchs:hover {
    width: min(220px, calc(100vw - 32px));
  }

  .mchs:hover::before {
    font-size: 16px;
  }

  .main-content {
    width: 94%;
    margin: 16px auto 0;
    padding: 28px 20px 44px;
    border-radius: 30px;
  }

  .main-content::before {
    left: 20px;
    top: 24px;
    width: 5px;
    height: 72px;
  }

  .main-content h1 {
    margin-left: 16px;
    font-size: 34px;
  }

  .main-content p {
    font-size: 18px;
    line-height: 1.65;
  }

  .text-card {
    padding: 22px 18px;
  }

  .text-card h2,
  .text-card h3 {
    font-size: 24px;
  }

  .text-card p {
    font-size: 16px;
    line-height: 1.7;
  }

  .contact-section {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
  }

  .contact-form {
    padding: 28px 20px;
    border-radius: 24px;
    margin-left: 0;
  }

  .contact-form-lead {
    font-size: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 28px 20px 20px;
  }

  .contact-form input[type="submit"] {
    width: 100%;
    min-width: 0;
  }

  .footer-top,
  .footer-nav {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}



/*рандомайзер
/* ===== Модальное окно (фон) ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===== Карточка ===== */
.card {
  width: 100%;
  max-width: 360px;
  min-height: 400px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  padding: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


/* ===== Кнопка закрытия (крестик) ===== */
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f1f2f6;
  font-size: 24px;
  font-weight: 300;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 10;
}

.close-btn:hover {
  background: #ff6b6b;
  color: white;

}

.close-btn:active {
  transform: scale(0.95);
}

/* ===== Шапка и подвал карточки ===== */
.card-header,
.card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 24px;
  padding: 0 5px;
}

.card-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 10px;
  font-size: 1.3rem;
  font-weight: 500;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.symbol {
  color: #e74c3c;
  opacity: 0.8;

}

/* ===== Плавающая кнопка ===== */
.floating-btn {
  position: fixed;
  bottom: 200px;
  right: 30px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ff6b6b;
  border: none;
  font-size: 32px;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-btn:hover {
  transform: scale(1.1) rotate(10deg);

}

@media (max-width: 900px) {
  .nav-menu {
    padding: 10px 12px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .brand-text {
    min-width: 0;
    margin-left: 0;
  }

  .brand-name,
  .brand-subtitle {
    white-space: normal;
  }

  .brand-name {
    font-size: clamp(18px, 5vw, 24px);
  }

  .brand-subtitle {
    font-size: clamp(12px, 3vw, 14px);
  }

  .nav-menu .dropdown ul li ul {
    width: min(280px, calc(100vw - 24px));
    margin-top: 12px;
  }

  .quiz-header-btn {
    margin-right: 0;
  }

  .main-banner-carousel,
  .hero-news-card {
    min-height: 320px;
  }

  .hero-news-card .news-card-content {
    padding: 18px;
  }

  .main-content {
    padding: 28px 20px 36px;
    border-radius: 24px;
  }

  .contact-section {
    grid-template-columns: 1fr;
  }

  .contact-form {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .nav-menu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    row-gap: 10px;
  }

  .nav-brand {
    min-width: 0;
  }

  .dropdown {
    justify-self: end;
  }

  .nav-menu .dropdown ul li ul {
    position: fixed;
    top: 72px;
    right: 10px;
    width: min(320px, calc(100vw - 20px));
    max-height: calc(100vh - 92px);
    overflow-y: auto;
    margin-top: 0;
    padding: 8px;
    box-shadow: 0 18px 36px rgba(26, 48, 85, 0.22);
    z-index: 2000;
  }

  .logo img {
    width: 52px;
    height: 52px;
  }

  .text-overlay h1 {
    font-size: clamp(28px, 10vw, 52px);
  }

  .quiz-header-btn {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 14px;
    margin-right: 0;
  }

  .quiz-modal {
    padding: 10px;
  }

  .quiz-modal-container {
    width: 100%;
    max-height: 90vh;
  }

  .quiz-modal-header,
  .quiz-widget {
    padding-left: 16px;
    padding-right: 16px;
  }

  .quiz-question {
    font-size: 22px;
  }

  .main-banner-carousel,
  .hero-news-card {
    min-height: clamp(500px, 138vw, 640px);
  }

  .main-baner-news {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 24px;
  }

  .main-banner-carousel,
  .hero-news-card {
    width: 100%;
    border-radius: 0;
    margin-top: 0;
  }

  .main-baner-news:hover {
    transform: none;
  }

  .banner-slide {
    transform: translateY(3%);
  }

  .banner-slide.is-active {
    transform: translateY(0);
  }

  .hero-news-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #1A3055;
    box-shadow: none;
  }

  .hero-news-card--banner .photo-shape {
    position: relative;
    flex: 0 0 46%;
    min-height: 220px;
  }

  .hero-news-card .news-card-content {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 100%;
    margin-top: auto;
    gap: 10px;
    padding: 18px 16px 24px;
    background: linear-gradient(180deg, rgba(26, 48, 85, 0.08) 0%, rgba(26, 48, 85, 0.88) 18%, #1A3055 100%);
  }

  .hero-news-card h3 {
    max-width: none;
    font-size: clamp(24px, 6.2vw, 32px);
    line-height: 1.12;
  }

  .hero-news-card p {
    max-width: none;
    font-size: 14px;
    line-height: 1.5;
    line-clamp: 5;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
  }

  .hero-news-card .news-card-action {
    padding: 0.72rem 1.15rem;
    font-size: 0.95rem;
  }

  .news {
    width: 100%;
    max-width: none;
    margin: 0 auto 32px;
  }

  .carousel-container {
    gap: 8px;
    padding: 0 10px;
  }

  .carousel-track-wrapper {
    width: 100%;
  }

  .news-cards {
    gap: 16px;
  }

  .news-card,
  .news-card.is-active,
  .news-card.is-near,
  .news-card.is-left,
  .news-card.is-far,
  .news-card.is-far-left {
    flex: 0 0 100%;
    min-height: clamp(230px, 64vw, 320px);
    transform: none;
    opacity: 1;
    filter: none;
  }

  .news-card-content {
    right: 12px;
    bottom: 12px;
    left: 12px;
    gap: 8px;
  }

  .news-card h3 {
    font-size: 18px;
  }

  .news-card p {
    font-size: 14px;
    line-height: 1.4;
  }

  .news-card-action {
    padding: 0.7rem 1.1rem;
    font-size: 0.95rem;
  }

  .carousel-btn {
    width: 44px;
    height: 64px;
  }

  .carousel-arrow {
    width: 14px;
    height: 14px;
  }

  .carousel-arrow-left {
    border-left-width: 4px;
    border-bottom-width: 4px;
  }

  .carousel-arrow-right {
    border-right-width: 4px;
    border-top-width: 4px;
  }

  .back-to-top,
  .back-to-feedback,
  .floating-btn {
    right: 10px;
    width: 46px;
    height: 46px;
  }

  .back-to-top {
    bottom: 12px;
  }

  .back-to-feedback {
    bottom: 66px;
  }

  .back-to-feedback::before {
    font-size: 24px;
  }

  .floating-btn {
    bottom: 120px;
    font-size: 26px;
  }

  .main-content {
    padding: 22px 14px 30px;
    margin-top: 16px;
  }

  .main-content h1 {
    font-size: 34px;
  }

  .main-content p,
  .contact-form-lead {
    font-size: 15px;
  }
}

@media (max-width: 420px) {
  .main-banner-carousel,
  .hero-news-card {
    min-height: clamp(520px, 155vw, 680px);
  }

  .hero-news-card--banner .photo-shape {
    flex-basis: 42%;
    min-height: 190px;
  }

  .hero-news-card .news-card-content {
    padding: 16px 14px 22px;
  }

  .hero-news-card h3 {
    font-size: clamp(22px, 7vw, 28px);
  }

  .hero-news-card p {
    line-clamp: 6;
    -webkit-line-clamp: 6;
  }
}

@media (max-width: 480px) {
  .nav-menu {
    padding: 8px 10px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .nav-menu .dropdown ul li ul {
    width: calc(100vw - 20px);
    top: 68px;
  }

  .text-overlay h1 {
    font-size: 24px;
  }

  .quiz-modal-header h3 {
    font-size: 20px;
  }

  .quiz-question {
    font-size: 20px;
  }

  .main-content h1 {
    font-size: 28px;
  }

  .main-content::before {
    display: none;
  }

  .intro-block {
    margin-bottom: 22px;
  }

  .main-content h1 {
    max-width: none;
    margin-left: 0;
    margin-bottom: 14px;
    line-height: 1.05;
  }

  .main-content p {
    font-size: 14px;
    line-height: 1.65;
  }

  .back-to-top,
  .back-to-feedback,
  .floating-btn {
    right: 8px;
    width: 44px;
    height: 44px;
  }

  .back-to-feedback {
    bottom: 64px;
  }

  .floating-btn {
    bottom: 116px;
    font-size: 24px;
  }

  .hero-news-card .news-card-content,
  .main-content,
  .contact-form {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 375px) {
  .brand-name {
    font-size: 16px;
  }

  .brand-subtitle {
    font-size: 10px;
  }

  .quiz-header-btn {
    font-size: 13px;
    padding: 9px 12px;
  }

  .main-content {
    padding: 18px 14px 26px;
  }

  .main-content h1 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .main-content p {
    font-size: 13px;
    line-height: 1.6;
  }

  .text-card h2,
  .text-card h3 {
    font-size: 20px;
  }
}