/* ==============================
   RESET
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==============================
   GLOBAL
================================ */
:root {
  --container: 1440px;
  --pad: 125px; /* keep your figma padding on desktop */
}

html {
  scroll-behavior: smooth;
}

html, body {
  overflow-x: hidden;
}

body {
  background: #000;
  font-family: 'Outfit', sans-serif;
}

/* ==============================
   HERO BLOCK
================================ */
.hero {
  position: relative;
  width: 100%;
  height: 790px; /* figma */
  overflow: hidden;
}

/* HERO IMAGE — FIXED for real desktops */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  object-fit: cover;           /* IMPORTANT: was contain */
  object-position: right center;
  z-index: 1;
}

/* ==============================
   MAIN MENU (CENTERED CONTAINER)
================================ */
.main-menu {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
}

.menu-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: flex-end; /* right aligned like figma */
}

/* lines */
.menu-lines {
  width: 210px;
  height: auto;
  display: block;
}

/* items */
.menu-items {
  display: flex;
  gap: 40px;
  margin-left: 25px;
}

.menu-items a {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);

}

.main-menu a,
.main-menu a:visited,
.main-menu a:hover,
.main-menu a:active {
  color: #ffffff;
  text-decoration: none;
}

/* ==============================
   HERO LOGO / TEXT
================================ */
.hero-logo {
  position: absolute;
  left: var(--pad);
  top: 150px;
  width: 550px;
  height: 145px;
  z-index: 10;

  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.45));
}

.hero-bmw {
  position: absolute;
  left: var(--pad);
  top: 405px;

  font-size: 88px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;

  color: #ffffff;
  z-index: 10;

  text-shadow:
    0 3px 8px rgba(0, 0, 0, 0.6),
    0 0 14px rgba(0, 0, 0, 0.4);
}
.hero-subtitle {
  position: absolute;
  left: var(--pad);
  top: calc(405px + 88px);

  font-size: 35px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;

  color: #0BA2D3;
  z-index: 10;

  /* contrast / readability */
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(0, 0, 0, 0.35);
}

.hero-socials {
  position: absolute;
  left: var(--pad);
  top: 670px;
  display: flex;
  gap: 7px;
  z-index: 10;
}

.hero-socials img {
  width: 32px;
  height: 32px;
  display: block;
}

/* ==============================
   CHAIN OFFER (FIXED)
================================ */

.chain-offer {
  position: relative;
  height: 520px;
  background-color: #000;
  background-image: url("../img/chainbg.jpg");
  background-repeat: no-repeat;
  background-position: right top;
  background-size: 790px 520px; /* ФИКС: больше не растягивается */
  overflow: hidden;
}

/* градиент под текст */
.chain-offer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 42%,
    rgba(0,0,0,0.85) 58%,
    rgba(0,0,0,0.4) 72%,
    rgba(0,0,0,0) 100%
  );
  z-index: 1;
}


.chain-offer__inner {
  position: relative;
  z-index: 2;
  max-width: 1440px;
  padding: 80px 125px;
}

.chain-offer__content {
  max-width: 620px;
  color: #ffffff;
}

/* TITLE */
.chain-title {
  font-family: 'Outfit', sans-serif;
  font-size: 60px;
  font-weight: 500;
  line-height: 1.05;
  margin-bottom: 28px;
}

/* SUBTITLE */
.chain-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  color: #0BA2D3;
  margin-bottom: 22px;
}

.price-white {
  color: #ffffff;
  font-weight: 600;
  white-space: nowrap; /* € НЕ УБЕГАЕТ */
}

/* TEXT */
.chain-text {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 12px;
}

/* BUTTON */
.chain-offer__btn {
  display: inline-block;
  margin-top: 22px;
  padding: 14px 40px;
  border-radius: 30px;
  background: #0BA2D3;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}


/* ==============================
   SERVICES (TEENUSED)
================================ */
.second-block {
  width: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
}

.second-block__inner {
  position: relative;
  width: 100%;
  max-width: var(--container);
  height: 800px;
  display: flex;
  align-items: center;
  padding-left: 80px; /* keep your figma value */
}

/* LEFT */
.second-block__content {
  max-width: 600px;
  z-index: 2;
}

/* RIGHT IMAGE */
.second-block__image {
  position: absolute;
  bottom: 50px;

  /* key line: move it out of the 1440 container until it hits the viewport edge */
  right: min(0px, calc((var(--container) - 100vw) / 2));
}
/* Desktop: less push on wider screens */

.second-block__image img {
  width: 370px;
  height: 630px;
  object-fit: contain;
  display: block;
}

.services-title {
  position: absolute;
  left: var(--pad);
  top: 40px;
  font-weight: 800;
  font-size: 64px;
  line-height: 1;
  color: #0BA2D3;
  margin: 0;
}

.services-grid {
  position: absolute;
  left: var(--pad);
  top: 140px;
  display: flex;
  gap: 80px;
}

.services-column {
  width: 390px;
}

.service-item {
  margin-bottom: 40px;
}

.service-title {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: -0.2px;
  font-weight: 700;
  font-size: 23px;
  color: #0BA2D3;
  margin: 0 0 12px 0;
}

.service-title img {
  position: absolute;
  left: -48px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 17px;
}

.service-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: #000;
  margin: 0 0 8px 0;
}

.service-item ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.service-item ul li {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: #000;
  margin-bottom: 4px;
}

/* ==============================
   ABOUT (MINUST)
================================ */
.about-block {
  width: 100%;
  background: #ffffff;
  display: flex;
  justify-content: center;
}

.about-block__inner {
  width: 100%;
  max-width: var(--container);
  height: 425px;
  padding: 0 125px; /* keep exactly like you had */
  box-sizing: border-box;
  position: relative;
  overflow: visible;
}

/* line wrapper */
.about-line-wrapper {
  position: relative;
  height: 40px;
  margin-top: 40px;

  /* compensation for padding 125px */
  margin-left: -125px;
  margin-right: -125px;
}

.about-line {
  width: 100%;
  height: 40px;
  display: block;
}

.about-title {
  position: absolute;
  left: 380px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  font-size: 48px;
  line-height: 1;
  color: #0BA2D3;
  background: #ffffff;
  padding: 0 24px;
  margin: 0;
}

.about-content {
  margin-top: 48px;
}

.about-text {
  max-width: 720px;
}

.about-text p {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.45;
  color: #000;
  margin: 0 0 14px 0;
}

.about-logo {
  position: absolute;
  right: 120px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.about-logo img {
  width: 360px;
  height: auto;
  display: block;
}

/* ==============================
   CONTACTS
================================ */
.contacts-block {
  width: 100%;
  height: 680px;
  background-color: #0BA2D3;
  position: relative;
  overflow: hidden;
}

/* decorative lines */
.lines {
  position: absolute;
  width: 420px;
  height: 60px;
}

.lines-top {
  top: -5px;
  left: calc(50% + 180px);
}

.lines-bottom {
  left: 150px;
  bottom: -5px;
}

.contacts-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 60px 125px;
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
}

/* left part */
.contacts-info {
  width: 45%;
  color: #fff;
}

.contacts-info h2 {
  font-size: 48px;
  margin-bottom: 20px;
}

.contacts-info p {
  margin: 6px 0;
  font-size: 16px;
}

.contacts-info .company {
  margin-bottom: 20px;
}

/* ✅ THIS FIXES HUGE SOCIAL ICONS */
.socials {
  display: flex;
  gap: 14px;
  margin-top: 16px;
  align-items: center;
}

.socials a {
  display: inline-flex;
  width: 28px;
  height: 28px;
}

.socials img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.socials a:hover img {
  transform: scale(1.1);
  opacity: 0.85;
}

/* map */
.map {
  width: 520px;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  background: #eaeaea;
  margin-top: 24px;
}

.map iframe {
  width: 100%;
  height: 100%;
}

/* right part */
.contacts-form {
  width: 45%;
  color: #fff;
}

.form-title {
  font-size: 48px;
  margin-bottom: 24px;
  color: #fff;
}

.contacts-form .row {
  display: flex;
  gap: 20px;
}

.contacts-form input,
.contacts-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: none;
  margin-bottom: 16px;
  font-size: 14px;
  box-sizing: border-box;
}

.contacts-form textarea {
  height: 120px;
  resize: none;
}

.contacts-form button {
  margin-top: 10px;
  padding: 14px 40px;
  border-radius: 30px;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

/* anchors offset */
#services-anchor,
#about-anchor,
#contacts-anchor {
  position: relative;
  top: -120px;
}

/* ==============================
   ✅ MOBILE — ALL RULES INSIDE ONE MEDIA (FIXES YOUR OVERLAP)
================================ */
@media (max-width: 768px) {

  body {
    overflow-x: hidden;
  }

  /* HERO */
  .hero {
    position: relative;
    height: 230px;
    overflow: hidden;

    background-image: url("../img/hero.jpg");
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
  }

  .hero-bg {
    display: none;
  }

  .hero-logo {
    position: absolute;
    top: 5px;
    left: 20px;
    width: 200px;
    max-width: 80%;
    transform: translateY(-35px);
  }

  .hero-bmw {
    position: absolute;
    left: 20px;
    top: 120px;
    font-size: 32px;
    line-height: 1;
  }

  .hero-subtitle {
    position: absolute;
    left: 20px;
    top: 155px;
    font-size: 15px;
  }

  .hero-socials {
    position: absolute;
    left: 20px;
    top: 180px;
    display: flex;
    gap: 8px;
  }

  /* hide menu */
  .main-menu {
    display: none;
  }
  .menu-lines {
    display: none !important;
  }

  /* SERVICES — MOBILE */
  .second-block {
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .second-block__inner {
    width: 100%;
    height: auto;
    padding: 32px 16px 16px;
    display: block;
    max-width: 100%;
  }

  .services-title {
    position: static;
    font-size: 30px;
    margin: 0 0 24px 0;
    color: #0BA2D3;
  }

  .services-grid {
    position: static;
    display: block;
  }

  .services-column {
    width: 100%;
  }

  .service-item {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 16px 18px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
  }

  .service-item:last-child {
    margin-bottom: 0;
  }

  .service-title {
    font-size: 18px;
    line-height: 1.25;
    white-space: normal;
    margin-bottom: 10px;
    padding-left: 28px;
    position: relative;
  }

  .service-title img {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: auto;
  }

  .service-text {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .service-item ul {
    padding-left: 18px;
    margin: 6px 0 0 0;
  }

  .service-item ul li {
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 4px;
  }

  .second-block__image {
    display: none;
  }

  /* ABOUT — MOBILE */
  .about-block {
    margin-top: 0;
    padding-top: 0;
  }

  .about-line {
    display: none;
  }

  .about-line-wrapper {
    margin: 0;
    padding: 0;
    height: auto;
  }

  .about-block__inner {
    height: auto;
    padding: 16px 16px 20px;
  }

  .about-title {
    position: static;
    transform: none;
    font-size: 26px;
    text-align: center;
    margin-bottom: 6px;
    padding: 0;
  }

  .about-content {
    margin-top: 0;
  }

  .about-text {
    text-align: center;
    margin: 0;
  }

  .about-text p {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 10px 0;
  }

  .about-text p:last-child {
    margin-bottom: 0;
  }

  .about-logo {
    display: none;
  }

  /* CONTACTS — MOBILE */
  .contacts-block {
    height: auto;
    padding-bottom: 32px;
  }

  .contacts-inner {
    display: flex;
    flex-direction: column;
    padding: 32px 16px;
    gap: 32px;
    height: auto;
  }

  .contacts-form {
    order: 1;
    width: 100%;
  }

  .contacts-info {
    order: 2;
    width: 100%;
  }

  .contacts-info h2,
  .form-title {
    font-size: 32px;
  }

  .map {
    width: 100%;
    height: 220px;
    margin-top: 16px;
  }

  .contacts-form .row {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .contacts-form button {
    width: 100%;
    padding: 16px;
  }

  .lines {
    display: none;
  }

  /* anchors */
  #services-anchor,
  #about-anchor,
  #contacts-anchor {
    top: -60px;
  }
}

/* ==============================
   MOBILE — CHAIN OFFER
================================ */

@media (max-width: 768px) {

  .chain-offer {
    height: auto; /* НЕ фиксируем высоту */
    min-height: unset;
    padding: 60px 20px;
    background-position: center top;
    background-size: cover; /* на мобилке можно cover */
  }

  .chain-offer::before {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.95) 0%,
      rgba(0,0,0,0.9) 35%,
      rgba(0,0,0,0.75) 60%,
      rgba(0,0,0,0.5) 80%,
      rgba(0,0,0,0.3) 100%
    );
  }

  .chain-offer__inner {
    padding: 0;
    height: auto;
    display: block;
  }

  .chain-offer__content {
    max-width: 100%;
    text-align: center;
  }

  .chain-title {
    font-size: 36px;
    line-height: 1.15;
    margin-bottom: 20px;
  }

  .chain-subtitle {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .chain-text {
    font-size: 15px;
    line-height: 1.5;
  }

  .chain-offer__btn {
    margin-top: 26px;
    padding: 16px 42px;
    font-size: 15px;
  }

}
