:root {
  --purple: #523b74;
  --purple-dark: #44305f;
  --purple-soft: #705c93;
  --text: #1f1f1f;
  --muted: #666;
  --bg: #f8f8fb;
  --white: #fff;
  --footer-1: #43add7;
  --footer-2: #1486bf;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.site-header {
  background: #fff;
}

.header-top {
  position: relative;
  overflow: hidden;
  padding: 16px 0 14px;
  background: #fff url("./img/new-header-bg.png") center center / cover no-repeat;
}

.header-top::before,
.header-top::after {
  content: none;
}

.header-top-content {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-content: center;
  text-align: center;
}

.site-logo {
  width: min(320px, 100%);
  height: auto;
  display: block;
  margin-inline: auto;
}

.header-banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #2fa8d5 url("./img/header-bg.jpg") center center / cover no-repeat;
}

.header-banner::before,
.header-banner::after {
  content: none;
}

.header-banner .container {
  position: relative;
  z-index: 1;
  padding: 44px 0;
}

.header-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero-section {
  padding: 22px 0 36px;
}

.forum-card {
  background: var(--purple);
  color: var(--white);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 8px 24px rgb(39 20 62 / 20%);
}

.forum-card h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.12;
  max-width: 920px;
}

.forum-card p {
  margin: 18px 0 0;
  font-size: clamp(0.97rem, 1.4vw, 1.03rem);
  color: #ebe4f7;
  max-width: 920px;
}

.forum-meta {
  margin-top: 26px;
  font-weight: 600;
  color: var(--white);
}

.form-section {
  padding: 4px 0 56px;
}

.form-wrapper {
  background: var(--white);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 36px);
  box-shadow: 0 8px 24px rgb(24 24 24 / 8%);
}

.form-wrapper h2 {
  margin: 0 0 20px;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  color: var(--purple-dark);
}

.apply-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.apply-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 1.06rem;
  font-weight: 500;
  color: #3a3350;
}

.apply-form input,
.apply-form select,
.apply-form textarea {
  width: 100%;
  border: 1px solid #ddd7eb;
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.apply-form input:focus,
.apply-form select:focus,
.apply-form textarea:focus {
  outline: 2px solid rgb(112 92 147 / 18%);
  border-color: #baadd7;
}

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

.consent {
  display: block;
}

.consent-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  max-width: 100%;
  cursor: pointer;
}

.apply-form .consent-line input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  margin-top: 2px;
}

.consent-line span {
  display: inline;
  line-height: 1.3;
}

.submit-button {
  border: none;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--purple);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: var(--purple-dark);
}

.success-message {
  min-height: 1.2em;
  margin: 14px 0 0;
  color: #2e9d58;
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(12 22 35 / 55%);
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  border-radius: 14px;
  background: #fff;
  color: #243046;
  padding: 24px 22px 22px;
  box-shadow: 0 20px 40px rgb(20 24 45 / 26%);
}

.modal-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--purple-dark);
}

.modal-text {
  margin: 12px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  white-space: pre-line;
}

.modal-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 16px auto 0;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5f4590, #3f5daa);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgb(51 67 133 / 28%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.modal-download-btn::before {
  content: "⬇";
  font-size: 0.9rem;
  line-height: 1;
}

.modal-download-btn:hover,
.modal-download-btn:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 26px rgb(51 67 133 / 35%);
}

.modal-download-btn:focus-visible {
  outline: 2px solid rgb(74 95 170 / 35%);
  outline-offset: 2px;
}

.modal-download-btn.is-disabled,
.modal-download-btn.is-disabled:hover,
.modal-download-btn.is-disabled:focus-visible {
  transform: none;
  filter: saturate(0.45);
  opacity: 0.72;
  box-shadow: 0 8px 18px rgb(51 67 133 / 22%);
  cursor: not-allowed;
}

.modal-download-btn.is-disabled:focus-visible {
  outline: none;
}

.modal-download-note {
  margin: 14px 0 0;
  font-size: 0.95rem;
  color: #4b5a72;
}

.modal-close-icon {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: #586377;
  background: transparent;
  cursor: pointer;
}

.modal-close-icon:hover,
.modal-close-icon:focus-visible {
  background: #edf1f8;
  color: #2e3a50;
}

.site-footer {
  position: relative;
  overflow: hidden;
  color: #d9eff8;
  background: #2eaad4 url("./img/footer-bg.png") center center / cover no-repeat;
  padding: 48px 0 42px;
  min-height: 285px;
}

.site-footer::before,
.site-footer::after {
  content: none;
}

.footer-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  align-items: start;
  gap: 12px;
}

.footer-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.3vw, 26px);
  flex-wrap: nowrap;
  width: 100%;
}

.footer-roscongress-logo {
  width: clamp(190px, 24vw, 330px);
  height: auto;
  display: block;
}

.footer-gov-logo {
  width: auto;
  height: clamp(44px, 6vw, 82px);
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.footer-minenergo-logo {
  width: auto;
  height: clamp(44px, 6vw, 82px);
  display: block;
}

.footer-moscow-logo {
  width: auto;
  height: clamp(44px, 6vw, 82px);
  display: block;
}

.footer-copy,
.footer-legal {
  margin: 0;
  color: #d8f2ff;
}

.footer-copy {
  margin-top: 4px;
  font-size: 0.95rem;
  width: 100%;
}

.footer-legal {
  width: 100%;
  max-width: none;
  font-size: 0.86rem;
  line-height: 1.42;
  text-align: justify;
}

.footer-legal a {
  color: #effbff;
  text-decoration: underline;
}

@media (max-width: 820px) {
  .header-banner .container {
    padding: 30px 0;
  }

  .header-title {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
  }

  .footer-content {
    gap: 12px;
  }

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

  .footer-logos {
    gap: 10px;
  }
}
