/* ==============================
   МегаполОС — Стили лендинга
   ============================== */

/* ==============================
   RESET & BASE
============================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #424242;
  background: #ffffff;
  line-height: 1.5;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #2659c7;
  text-align: center;
  margin-bottom: 3rem;
  line-height: 1.2;
}

@media (max-width: 1023px) {
  .section-title {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }
}
@media (max-width: 767px) {
  .section-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
  }
}

/* ==============================
   BUTTONS
============================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 23px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 3px;
  border: 1px solid #0854da;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.btn--primary {
  background: #3b8df1;
  color: #ffffff;
  border-color: #0854da;
}
.btn--primary:hover {
  background: #2670d0;
}

.btn--outline {
  background: #f0f7ff;
  color: #0854da;
  border-color: #0854da;
}
.btn--outline:hover {
  background: #dde9ff;
}

.btn--small {
  padding: 13px 23px;
  width: 162px;
}

/* ==============================
   HEADER
============================== */
.header {
  padding: 30px 0 0;
}
.header__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header__logo {
  flex-shrink: 0;
}
.header__nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
}
.header__nav-link {
  font-size: 1rem;
  color: #0854da;
  transition: color 0.2s;
}
.header__nav-link:hover,
.header__nav-link--active {
  color: #2659c7;
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .header {
    padding: 20px 0 0;
  }
  .header__nav-list {
    gap: 24px;
  }
}

/* Mobile: <768px */
@media (max-width: 767px) {
  .header__container {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .header__nav-list {
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
  }
}

/* ==============================
   HERO
============================== */
.hero {
  padding: 80px 0 60px;
}
.hero__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
}
.hero__content {
  flex: 1;
  max-width: 640px;
}
.hero__title {
  font-size: 3.125rem;
  font-weight: 700;
  color: #2659c7;
  line-height: 1.4;
  margin-bottom: 1.2rem;
}
.hero__subtitle {
  font-size: 1.25rem;
  line-height: 1.8;
  color: #033ba5;
  margin-bottom: 2rem;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero__illustration {
  flex-shrink: 0;
  width: 498px;
  height: 383px;
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .hero {
    padding: 60px 0 40px;
  }
  .hero__container {
    gap: 30px;
  }
  .hero__title {
    font-size: 2.5rem;
  }
  .hero__illustration {
    width: 380px;
    height: auto;
  }
}

/* Mobile: <768px */
@media (max-width: 767px) {
  .hero__container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero__title {
    font-size: 2rem;
  }
  .hero__subtitle {
    font-size: 1.125rem;
  }
  .hero__illustration {
    width: 100%;
    height: auto;
    max-width: 400px;
  }
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
  }
}

/* ==============================
   BENEFITS
============================== */
.benefits {
  padding: 40px 0;
  border-top: 0.5px solid #1b6dff;
  border-bottom: 0.5px solid #1b6dff;
}
.benefits__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.benefits__card {
  padding: 50px 24px;
  min-height: 237px;
}
.benefits__card--1 {
  background: #f9fbff;
  border-right: 0.5px solid #1b6dff;
}
.benefits__card--2 {
  background: #f4f8ff;
  border-right: 0.5px solid #1b6dff;
}
.benefits__card--3 {
  background: #e7f0ff;
  border-right: 0.5px solid #1b6dff;
}
.benefits__card--4 {
  background: #e7f0ff;
}
.benefits__text {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.5625;
  color: #424242;
}

@media (max-width: 1023px) {
  .benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .benefits__card {
    padding: 40px 20px;
    min-height: auto;
  }
  .benefits__card--2 {
    border-right: none;
  }
}
@media (max-width: 767px) {
  .benefits__grid {
    grid-template-columns: 1fr;
  }
  .benefits__card {
    padding: 30px 16px;
    min-height: auto;
    border-right: none;
    border-bottom: 0.5px solid #1b6dff;
  }
  .benefits__card:last-child {
    border-bottom: none;
  }
}

/* ==============================
   PROBLEMS
============================== */
.problems {
  padding: 80px 0 40px;
}
.problems__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.problems__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.problems__card {
  border: 0.5px solid #1b6dff;
  border-radius: 5px;
  overflow: hidden;
  background: #ffffff;
}
.problems__card--alt {
  background: #f4f8ff;
}
.problems__card-header {
  padding: 16px 24px;
  border-bottom: 0.5px solid #1b6dff;
}
.problems__card-title {
  font-size: 1.25rem;
  font-weight: 500;
  color: #2659c7;
  line-height: 1.35;
}
.problems__card-body {
  padding: 24px;
}
.problems__card-text {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.5625;
  color: #424242;
  text-align: justify;
  margin-bottom: 1rem;
}
.problems__card-text:last-child {
  margin-bottom: 0;
}
.problems__footer-text {
  font-size: 1.25rem;
  font-weight: 500;
  text-decoration: underline;
  color: #2659c7;
  text-align: center;
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .problems {
    padding: 60px 0 30px;
  }
}
/* Mobile: <768px */
@media (max-width: 767px) {
  .problems__grid {
    grid-template-columns: 1fr;
  }
  .problems {
    padding: 40px 0 20px;
  }
  .problems__card-header {
    padding: 12px 16px;
  }
  .problems__card-body {
    padding: 16px;
  }
}

/* ==============================
   DIAGRAM
============================== */
.diagram {
  padding: 60px 0;
}
.diagram__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.diagram__wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.diagram__box {
  width: 949px;
  max-width: 100%;
  border: 0.5px solid #1b6dff;
  border-radius: 5px;
  background: #f9fbff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.diagram__arrow svg {
  display: block;
}

@media (max-width: 1023px) {
  .diagram__box img {
    max-width: 100%;
    height: auto;
  }
}
@media (max-width: 767px) {
  .diagram__box {
    height: auto;
    padding: 20px;
  }
  .diagram__box img {
    max-width: 100%;
    height: auto;
  }
}

/* ==============================
   COMPONENTS (Сборка сервисов)
============================== */
.components {
  padding: 80px 0;
  background: #f9fbff;
}
.components__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.components__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.components__card {
  background: #ffffff;
  border: 0.5px solid #1b6dff;
  border-radius: 5px;
  padding: 30px 24px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.043);
}
.components__card-icon {
  width: 60px;
  height: 55px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.components__card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2659c7;
  line-height: 1.3;
  margin-bottom: 16px;
}
.components__card-text {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: #424242;
  text-align: justify;
  margin-bottom: 24px;
  flex-grow: 1;
}
.components__badge {
  display: inline-block;
  padding: 13px 23px;
  font-size: 1rem;
  font-weight: 600;
  color: #0854da;
  background: #f0f7ff;
  border: 0.5px solid #1b6dff;
  border-radius: 3px;
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .components__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .components {
    padding: 60px 0;
  }
}
/* Mobile: <768px */
@media (max-width: 767px) {
  .components__grid {
    grid-template-columns: 1fr;
  }
  .components {
    padding: 40px 0;
  }
  .components__card {
    padding: 24px 16px 32px;
  }
}

/* ==============================
   PRICING
============================== */
.pricing {
  padding: 80px 0;
}
.pricing__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pricing__card {
  background: #ffffff;
  border: 0.5px solid #1278f1;
  border-radius: 10px;
  padding: 30px 20px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pricing__card-icon {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pricing__card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2659c7;
  line-height: 1.4;
  margin-bottom: 24px;
  min-height: 80px;
}
.pricing__card-text {
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.75;
  color: #424242;
  text-align: justify;
  margin-bottom: 32px;
  flex-grow: 1;
}
.pricing__card-price {
  font-size: 1.5625rem;
  font-weight: 500;
  color: #2659c7;
  margin-bottom: 16px;
  font-family: 'Rubik', sans-serif;
}

@media (max-width: 1023px) {
  .pricing__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .pricing {
    padding: 60px 0;
  }
}
@media (max-width: 767px) {
  .pricing__grid {
    grid-template-columns: 1fr;
  }
  .pricing {
    padding: 40px 0;
  }
  .pricing__card {
    padding: 24px 16px 32px;
  }
  .pricing__card-title {
    min-height: auto;
    font-size: 1.125rem;
  }
  .pricing__card .btn {
    width: 100%;
  }
}

/* ==============================
   RESULTS
============================== */
.results {
  padding: 80px 0;
}
.results__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.results__card {
  max-width: 920px;
  margin: 0 auto;
  background: #f4f8ff;
  border: 0.5px solid #1278f1;
  border-radius: 5px;
  padding: 60px 40px 50px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.043);
}
.results__circle {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}
.results__intro {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2659c7;
  line-height: 1.2;
  margin-bottom: 24px;
}
.results__description {
  font-size: 1rem;
  line-height: 1.75;
  color: #1278f1;
  text-align: center;
  margin-bottom: 60px;
}
.results__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  border-top: 0.5px solid #1b6dff;
  padding-top: 40px;
}
.results__metric {
  padding: 0 8px;
  border-right: 0.5px solid #1b6dff;
}
.results__metric:last-child {
  border-right: none;
}
.results__metric-label {
  font-size: 1rem;
  line-height: 1.8;
  color: #2659c7;
  text-align: center;
  display: block;
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .results {
    padding: 60px 0;
  }
  .results__card {
    padding: 40px 30px;
  }
}
/* Mobile: <768px */
@media (max-width: 767px) {
  .results__metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .results__metric:nth-child(2) {
    border-right: none;
  }
  .results__metric:nth-child(3) {
    border-right: 0.5px solid #1b6dff;
  }
  .results__metric:nth-child(4) {
    border-right: none;
  }
  .results__card {
    padding: 30px 20px;
  }
  .results {
    padding: 40px 0;
  }
  .results__intro {
    font-size: 1.25rem;
  }
}

/* ==============================
   DOCUMENTATION
============================== */
.docs {
  padding: 60px 0;
}
.docs__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}
.docs__buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 1023px) {
  .docs {
    padding: 40px 0;
  }
}
@media (max-width: 767px) {
  .docs {
    padding: 30px 0;
  }
  .docs__buttons {
    flex-direction: column;
    align-items: center;
  }
  .docs__buttons .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* ==============================
   FORM
============================== */
.form-section {
  padding: 80px 0;
}
.form-section__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.form-section__title {
  font-size: 4rem;
  font-weight: 600;
  color: #2659c7;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 3rem;
}
.form-section__wrapper {
  background: #e7f0ff;
  border-radius: 5px;
  padding: 45px 60px 60px;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form__label {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2659c7;
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 15px 17px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.3;
  color: #2659c7;
  background: #ffffff;
  border: none;
  border-radius: 5px;
  font-family: inherit;
}
.form__input::placeholder,
.form__select::placeholder,
.form__textarea::placeholder {
  color: #2659c7;
  opacity: 0.6;
}
.form__textarea {
  resize: vertical;
  min-height: 80px;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.form__checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
}
.form__checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 5px;
  border: none;
  flex-shrink: 0;
}
.form__checkbox label {
  font-size: 1rem;
  line-height: 1.2;
  color: #0854da;
}
.form-section .btn--primary {
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .form-section {
    padding: 60px 0;
  }
  .form-section__title {
    font-size: 3rem;
  }
  .form-section__wrapper {
    padding: 35px 40px 50px;
  }
}
@media (max-width: 767px) {
  .form-section {
    padding: 40px 0;
  }
  .form-section__title {
    font-size: 2rem;
  }
  .form-section__wrapper {
    padding: 24px 16px;
  }
  .form__row {
    grid-template-columns: 1fr;
  }
  .form-section .btn--primary {
    align-self: stretch;
    width: 100%;
  }
}

/* ==============================
   ABOUT
============================== */
.about {
  padding: 80px 0;
}
.about__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.about__card {
  max-width: 920px;
  margin: 0 auto;
  background: #f4f8ff;
  border: 0.5px solid #1278f1;
  border-radius: 5px;
  padding: 50px 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.043);
  text-align: center;
}
.about__company {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2659c7;
  line-height: 1.2;
  margin-bottom: 1rem;
}
.about__description {
  font-size: 1rem;
  line-height: 1.8;
  color: #424242;
  opacity: 0.8;
  max-width: 531px;
  margin: 0 auto 2rem;
}
.about__mission {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 481px;
  margin: 0 auto;
  text-align: left;
}
.about__mission-line {
  width: 2px;
  min-height: 80px;
  background: #7fb9fd;
  flex-shrink: 0;
}
.about__mission-text {
  font-size: 1rem;
  line-height: 1.8;
  color: #2659c7;
  opacity: 0.8;
}

@media (max-width: 1023px) {
  .about {
    padding: 60px 0;
  }
  .about__card {
    padding: 40px 30px;
  }
}
@media (max-width: 767px) {
  .about {
    padding: 40px 0;
  }
  .about__card {
    padding: 30px 20px;
  }
  .about__company {
    font-size: 1.25rem;
  }
  .about__mission {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about__mission-line {
    width: 60px;
    min-height: 2px;
    height: 2px;
  }
}

/* ==============================
   FOOTER
============================== */
.footer {
  background: #e7f0ff;
  padding: 40px 0 30px;
}
.footer__container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}
.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}
.footer__links {
  display: flex;
  gap: 60px;
}
.footer__col-title {
  font-size: 1rem;
  line-height: 1.2;
  color: #2659c7;
  margin-bottom: 12px;
}
.footer__list li {
  font-size: 1rem;
  line-height: 1.8;
  color: #424242;
}
.footer__list a {
  color: #424242;
  transition: color 0.2s;
}
.footer__list a:hover {
  color: #2659c7;
}
.footer__bottom {
  border-top: 0.5px solid #1b6dff;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__requisites {
  font-size: 1rem;
  line-height: 1.8;
  color: #424242;
}
.footer__copyright {
  font-size: 1rem;
  text-align: center;
  line-height: 1.875;
  color: #919191;
}

@media (max-width: 1023px) {
  .footer__top {
    gap: 30px;
  }
  .footer__links {
    gap: 40px;
  }
}
@media (max-width: 767px) {
  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer__links {
    flex-direction: column;
    gap: 24px;
  }
  .footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==============================
   BURGER MENU (Mobile)
============================== */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}
.burger__line {
  width: 28px;
  height: 3px;
  background: #2659c7;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 767px) {
  .burger {
    display: flex;
  }
  .header__nav {
    display: none;
    width: 100%;
  }
  .header__nav--open {
    display: block;
  }
  .header__nav-list {
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
  }
  .header__container {
    flex-wrap: wrap;
    position: relative;
  }
  .header .btn--primary {
    display: none;
  }
}

/* ==============================
   FORM VALIDATION STYLES
============================== */
.form__input--error,
.form__select--error,
.form__textarea--error {
  outline: 2px solid #e74c3c;
  outline-offset: -2px;
}
.form__error-message {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 4px;
}
.form__success-message {
  color: #27ae60;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  padding: 16px;
  background: #e8f8e8;
  border-radius: 5px;
}

.form__checkbox--error label {
  color: #e74c3c;
}

/* ==============================
   SCROLL ANIMATIONS
============================== */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate--visible {
  opacity: 1;
  transform: translateY(0);
}
