:root {
  --color-primary: #002d41;
  --color-accent: #006ab1;
  --color-secondary: #7cb342;
  --color-text: #003459;
  --color-text-muted: #5a7184;
  --color-white: #ffffff;
  --color-surface: #f4f7f9;
  --color-border: #d8e3ea;
  --radius: 8px;
  --radius-lg: 12px;
  --container: 960px;
  --font: "Lato", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.view {
  display: none;
  flex-direction: column;
  animation: view-in 0.2s ease;
}

.view.is-active {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

/* Заполняем экран: hero/section растягивается, media-bar прижат к футеру */
#view-home.is-active .hero,
#view-thumbs-down.is-active .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#view-thumbs-up.is-active .hero {
  flex-shrink: 0;
}

#view-thumbs-up.is-active .section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@keyframes view-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hero — header lives inside, no separate bar */
.hero {
  position: relative;
  padding: 1.25rem 0 2rem;
  background:
    linear-gradient(rgba(0, 30, 50, 0.55), rgba(0, 30, 50, 0.55)),
    url("../images/testiBg.jpg") center / cover no-repeat;
  color: var(--color-white);
  text-align: center;
}

.hero > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 640px;
  width: 100%;
  margin-inline: auto;
}

.hero__top {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.hero__top .logo,
.hero__phone {
  display: inline-flex;
  align-items: center;
  height: 41px;
  flex-shrink: 0;
}

.hero__top .logo img {
  height: 41px;
  width: auto;
  max-width: min(180px, 42vw);
  filter: brightness(0) invert(1);
  object-fit: contain;
}

.hero__phone {
  margin: 0;
  line-height: 1.2;
  font-size: clamp(0.72rem, 2.8vw, 1rem);
  color: rgba(255, 255, 255, 0.9);
  text-align: right;
}

.hero__phone a {
  color: var(--color-white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero__phone a:hover {
  color: #a8d4f5;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.3;
}

.hero p {
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.hero--form {
  text-align: left;
}

.hero__body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 0;
}

.hero--form .hero__content {
  flex: 1;
  max-width: none;
  margin: 0;
  text-align: left;
  justify-content: center;
}

.hero--form .hero__content p {
  margin: 0;
}

.hero--form h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.hero--form .feedback-card {
  flex: 0 0 380px;
  max-width: 100%;
}

/* Vote buttons */
.vote-grid {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.vote-card {
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.vote-card:hover {
  transform: scale(1.06);
  opacity: 0.9;
}

.vote-card img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  margin-inline: auto;
}

/* Review platforms */
.section {
  padding: 2.5rem 0;
  background: var(--color-surface);
}

.section__title {
  margin: 0 0 0.4rem;
  text-align: center;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.section__subtitle {
  margin: 0 auto 2rem;
  max-width: 560px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.review-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.review-card {
  transition: opacity 0.2s ease;
}

.review-card:hover {
  opacity: 0.8;
}

.review-card img {
  width: min(180px, 42vw);
  height: auto;
}

/* Media logos strip */
.media-bar {
  margin-top: auto;
  flex-shrink: 0;
  padding: 1rem 0;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  overflow: hidden;
}

.media-bar .container {
  width: min(100% - 1.25rem, var(--container));
}

.media-bar img {
  max-width: 100%;
  width: 100%;
  height: auto;
  margin-inline: auto;
}

/* Feedback form */
.feedback-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  color: var(--color-text);
}

.feedback-card h2 {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.form-group {
  margin-bottom: 0.85rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font: inherit;
  color: var(--color-text);
  background: var(--color-white);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0, 106, 177, 0.15);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.btn {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-white);
}

.btn:hover {
  background: #005a96;
}

.form-message {
  min-height: 1.2rem;
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-message--success {
  color: var(--color-secondary);
}

.form-message--error {
  color: #c62828;
}

/* Footer */
.site-footer {
  padding: 1rem 0;
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  text-align: center;
}

.site-footer a {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .hero {
    padding: 1rem 0 1.5rem;
  }

  .hero__top {
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
  }

  .hero__top .logo,
  .hero__phone {
    height: auto;
    min-height: 28px;
  }

  .hero__top .logo img {
    height: 28px;
    max-width: min(150px, 38vw);
  }

  .hero__body {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }

  .hero--form .hero__content {
    text-align: center;
    justify-content: flex-start;
  }

  .hero--form .feedback-card {
    flex: none;
  }

  .vote-grid {
    gap: 0.75rem;
  }

  .vote-card img {
    width: min(110px, 28vw);
    height: min(110px, 28vw);
  }

  .review-card img {
    width: min(140px, 40vw);
  }

  .section {
    padding: 1.75rem 0;
  }

  .site-footer {
    font-size: 0.75rem;
  }

  .site-footer p {
    padding-inline: 0.5rem;
    line-height: 1.45;
  }
}
