/* ============================================
   SERVICES PAGE - Pixel-Perfect Figma Implementation
   Design: 1440px width, background #F6F8F9
   Figma node: 98:1420
   ============================================ */

/* ============================================
   PAGE BASE
   ============================================ */
.services-page {
  background: #F6F8F9;
  color: #000000;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ============================================
   HEADER
   Logo: left:65px top:66px (mask 43x44)
   Text: left:118px top:51px (30px extrabold)
   Burger: left:1343px top:63px (3 lines)
   ============================================ */
.services-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1440px;
  z-index: 10;
}

.services-header .header__logo-container {
  position: absolute;
  left: 65px;
  top: 51px;
}

.services-header .header__logo-container img {
  width: 43px;
  height: 44px;
}

.services-header .header__logo-text {
  font-weight: 800;
  font-size: 30px;
  line-height: 74px;
  letter-spacing: 0.01em;
}

.services-header .header__burger {
  position: absolute;
  left: 1343px;
  top: 63px;
}

.services-header .header__burger-line {
  background: #000000;
}

/* ============================================
   MAIN CONTENT
   Height: 1400px (contact section starts at 1400)
   ============================================ */
.services-main {
  position: relative;
  width: 1440px;
  height: 1400px;
  margin: 0 auto;
  background: #F6F8F9;
}

/* ============================================
   TITLE SECTION
   "Наши услуги": left:66px, top:257px, 90px
   "Чем мы занимаемся": left:66px, top:351px, 90px, gradient
   ============================================ */
.services-title {
  position: absolute;
  left: 66px;
  top: 257px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 90px;
  line-height: 73.5px;
  letter-spacing: -4.5px;
  color: #000000;
  margin: 0;
}

.services-subtitle {
  position: absolute;
  left: 66px;
  top: 351px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 90px;
  line-height: 73.5px;
  letter-spacing: -4.5px;
  margin: 0;
}

/* ============================================
   CARDS SECTION
   Top: 600px, 4 columns (each 360px = 1440/4)
   Images: 444px height, full width of column
   Content: below images
   Lines: full horizontal top+bottom, vertical between columns
   ============================================ */
.services-cards {
  position: absolute;
  top: 600px;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.services-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid rgba(199, 199, 199, 0.5);
  border-bottom: 1px solid rgba(199, 199, 199, 0.5);
  border-right: 1px solid rgba(199, 199, 199, 0.5);
}

.services-card:first-child {
  border-left: 1px solid rgba(199, 199, 199, 0.5);
}

.services-card__img {
  width: 100%;
  height: 444px;
  object-fit: cover;
  display: block;
}

.services-card__content {
  padding: 30px 67px 40px;
}

.services-card__title {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 30px;
  line-height: 73.5px;
  letter-spacing: -1.5px;
  color: #000000;
  margin: 0;
}

.services-card__desc {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.95px;
  color: #000000;
  margin: 0;
}

/* Decorative gradient lines at top:1342px */
.services-line-decorative-1 {
  position: absolute;
  left: 70.5px;
  top: 1342px;
  width: 585px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(199, 199, 199, 0) 0%,
    rgba(199, 199, 199, 0.3) 5%,
    rgba(199, 199, 199, 0.3) 95%,
    rgba(199, 199, 199, 0) 100%
  );
}

.services-line-decorative-2 {
  position: absolute;
  left: 655px;
  top: 1342px;
  width: 882px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(199, 199, 199, 0) 0%,
    rgba(199, 199, 199, 0.3) 5%,
    rgba(199, 199, 199, 0.3) 95%,
    rgba(199, 199, 199, 0) 100%
  );
}

/* ============================================
   CONTACT SECTION
   Height: 1044.59px
   Background: #F6F8F9
   Same structure as works-contact
   ============================================ */
.services-contact {
  position: relative;
  width: 1440px;
  height: 1044.59px;
  margin: 0 auto;
  background: #F6F8F9;
  border-top: 1px solid rgba(199, 199, 199, 0.3);
}

/* Vertical center line at x=720 */
.services-contact__vertical-line {
  position: absolute;
  left: 720px;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(199, 199, 199, 0.3);
}

/* ============================================
   CONTACT LEFT CONTENT
   ============================================ */

/* Headline: left:66px, top:396px */
.services-contact__headline {
  position: absolute;
  left: 66px;
  top: 396px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 65px;
  line-height: 76.299px;
  letter-spacing: -3.25px;
  color: #000000;
  margin: 0;
}

/* Gradient text: left:66px, top:456px */
.services-contact__headline-gradient {
  position: absolute;
  left: 66px;
  top: 456px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 65px;
  line-height: 83.41px;
  letter-spacing: -3.25px;
  background: linear-gradient(89.33deg, #DC0000 0%, #8F857E 57.33%, #FFD197 105.77%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

/* ============================================
   CONTACT TOOLBAR (Grid 2x2)
   Position: right half (720px to 1440px)
   Full height of section
   ============================================ */
.services-contact__toolbar {
  position: absolute;
  left: 720px;
  top: 0;
  width: 720px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.services-contact__cell {
  position: relative;
  background: transparent;
  border: 1px solid rgba(199, 199, 199, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 47px;
  text-decoration: none;
  color: #000000;
  transition: background-color 0.2s ease;
}

.services-contact__cell:hover {
  background: rgba(199, 199, 199, 0.1);
}

.services-contact__cell-icon {
  width: 21px;
  height: 21px;
  margin-bottom: 18px;
  color: #000000;
  flex-shrink: 0;
}

.services-contact__cell-text {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 24.39px;
  line-height: 26px;
  letter-spacing: -0.05em;
  color: #000000;
}

.services-contact__cell-arrow {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #000000;
}

/* ============================================
   LEGAL FOOTER
   ============================================ */
.services-legal-footer {
  width: 1440px;
  margin: 0 auto;
  background: #F6F8F9;
  border-top: 1px solid rgba(199, 199, 199, 0.3);
  padding: 2rem 66px;
}

.services-legal-footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.services-legal-footer__company {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.services-legal-footer__company-name {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.services-legal-footer__company-details {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  color: #6C757D;
  margin: 0;
}

.services-legal-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2rem;
}

.services-legal-footer__link {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  color: #6C757D;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.services-legal-footer__link:hover {
  color: #000000;
}

.services-legal-footer__copyright {
  font-family: 'Proxima Nova', sans-serif;
  font-size: 12px;
  color: #6C757D;
  margin: 0;
}

/* ============================================
   RESPONSIVE: 1920px
   Все секции растягиваются до 1920px
   Контакт-тулбар делится по 960px
   ============================================ */
@media (min-width: 1920px) {
  /* Header */
  .services-header {
    width: 1920px;
  }

  .services-header .header__burger {
    left: 1823px;
  }

  /* Main content */
  .services-main {
    width: 1920px;
    height: 1500px;
  }

  /* Title stays at same left position */

  /* Cards: 4 columns now 480px each */
  .services-card__img {
    height: 500px;
  }

  .services-card__content {
    padding: 30px 80px 45px;
  }

  .services-card__title {
    font-size: 34px;
  }

  .services-card__desc {
    font-size: 21px;
  }

  /* Decorative lines scale */
  .services-line-decorative-1 {
    top: 1440px;
    width: 750px;
  }

  .services-line-decorative-2 {
    left: 820px;
    top: 1440px;
    width: 1100px;
  }

  /* Contact section */
  .services-contact {
    width: 1920px;
    height: 1044.59px;
  }

  .services-contact__vertical-line {
    left: 960px;
  }

  .services-contact__toolbar {
    left: 960px;
    width: 960px;
  }

  .services-contact__cell {
    padding-left: 60px;
  }

  .services-contact__cell-arrow {
    right: 70px;
  }

  /* Footer */
  .services-legal-footer {
    width: 1920px;
  }
}

/* ============================================
   RESPONSIVE: 1200px - 1439px (small desktop/laptop)
   Пропорциональное масштабирование
   ============================================ */
@media (max-width: 1439px) {
  .services-page {
    overflow-x: hidden;
  }

  .services-header {
    width: 100%;
    transform: none;
    left: 0;
  }

  .services-header .header__logo-container {
    left: clamp(30px, 4.5vw, 65px);
    top: clamp(30px, 3.5vw, 51px);
  }

  .services-header .header__burger {
    left: auto;
    right: clamp(30px, 4.5vw, 65px);
    top: clamp(40px, 4.4vw, 63px);
  }

  .services-main {
    width: 100%;
    height: auto;
    min-height: 1000px;
    padding-bottom: 80px;
  }

  .services-title {
    position: relative;
    left: auto;
    top: auto;
    padding: clamp(140px, 18vw, 257px) 0 0 clamp(30px, 4.5vw, 66px);
    font-size: clamp(48px, 6.25vw, 90px);
    line-height: 1;
    letter-spacing: -0.05em;
  }

  .services-subtitle {
    position: relative;
    left: auto;
    top: auto;
    padding: 10px 0 clamp(40px, 5vw, 80px) clamp(30px, 4.5vw, 66px);
    font-size: clamp(48px, 6.25vw, 90px);
    line-height: 1;
    letter-spacing: -0.05em;
  }

  .services-cards {
    position: relative;
    top: auto;
    grid-template-columns: repeat(2, 1fr);
  }

  .services-card__img {
    height: clamp(250px, 30vw, 444px);
  }

  .services-card__content {
    padding: 20px clamp(20px, 4vw, 67px) 30px;
  }

  .services-card__title {
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.5;
  }

  .services-card__desc {
    font-size: clamp(14px, 1.4vw, 19px);
  }

  .services-line-decorative-1,
  .services-line-decorative-2 {
    display: none;
  }

  .services-contact {
    width: 100%;
    height: auto;
    min-height: 600px;
  }

  .services-contact__vertical-line {
    left: 50%;
  }

  .services-contact__headline {
    left: clamp(30px, 4.5vw, 66px);
    top: clamp(150px, 30%, 396px);
    font-size: clamp(36px, 4.5vw, 65px);
    line-height: 1.2;
    letter-spacing: -0.05em;
  }

  .services-contact__headline-gradient {
    left: clamp(30px, 4.5vw, 66px);
    top: clamp(210px, 38%, 456px);
    font-size: clamp(36px, 4.5vw, 65px);
    line-height: 1.3;
    letter-spacing: -0.05em;
  }

  .services-contact__toolbar {
    left: 50%;
    width: 50%;
  }

  .services-contact__cell {
    padding-left: clamp(25px, 3.2vw, 47px);
  }

  .services-contact__cell-text {
    font-size: clamp(16px, 1.7vw, 24.39px);
  }

  .services-contact__cell-arrow {
    right: clamp(25px, 3.5vw, 50px);
  }

  .services-legal-footer {
    width: 100%;
    padding: 2rem clamp(30px, 4.5vw, 66px);
  }
}

/* ============================================
   RESPONSIVE: 900px - 1199px (tablet landscape)
   ============================================ */
@media (max-width: 1199px) {
  .services-title {
    font-size: clamp(40px, 5.5vw, 60px);
  }

  .services-subtitle {
    font-size: clamp(40px, 5.5vw, 60px);
  }

  .services-card__img {
    height: clamp(200px, 25vw, 350px);
  }

  .services-contact {
    min-height: 500px;
  }

  .services-contact__headline {
    font-size: clamp(32px, 4vw, 50px);
    top: clamp(120px, 25%, 300px);
  }

  .services-contact__headline-gradient {
    font-size: clamp(32px, 4vw, 50px);
    top: clamp(175px, 33%, 370px);
  }
}

/* ============================================
   RESPONSIVE: до 900px (tablet portrait)
   Карточки в 1 колонку, контакт стэк
   ============================================ */
@media (max-width: 900px) {
  .services-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-card__img {
    height: clamp(180px, 22vw, 300px);
  }

  .services-card__content {
    padding: 15px clamp(15px, 3vw, 30px) 25px;
  }

  .services-card__title {
    font-size: clamp(18px, 2.5vw, 24px);
    line-height: 1.4;
  }

  .services-card__desc {
    font-size: clamp(13px, 1.6vw, 16px);
  }

  .services-contact {
    min-height: auto;
    height: auto;
  }

  .services-contact__vertical-line {
    display: none;
  }

  .services-contact__headline {
    position: relative;
    left: auto;
    top: auto;
    padding: clamp(40px, 6vw, 80px) 0 0 clamp(30px, 4.5vw, 66px);
    font-size: clamp(28px, 4.5vw, 42px);
  }

  .services-contact__headline-gradient {
    position: relative;
    left: auto;
    top: auto;
    padding: 5px 0 clamp(30px, 4vw, 50px) clamp(30px, 4.5vw, 66px);
    font-size: clamp(28px, 4.5vw, 42px);
  }

  .services-contact__toolbar {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 120px 120px;
  }

  .services-contact__cell {
    padding-left: clamp(20px, 3vw, 40px);
  }

  .services-contact__cell-text {
    font-size: clamp(15px, 2vw, 20px);
    line-height: 1.3;
  }

  .services-contact__cell-icon {
    width: 19px;
    height: 19px;
    margin-bottom: 12px;
  }

  .services-contact__cell-arrow {
    right: clamp(20px, 3vw, 40px);
    width: 14px;
    height: 14px;
  }
}

/* ============================================
   RESPONSIVE: до 768px (mobile landscape)
   ============================================ */
@media (max-width: 768px) {
  .services-title {
    font-size: clamp(32px, 6vw, 44px);
    padding-top: clamp(110px, 16vw, 160px);
  }

  .services-subtitle {
    font-size: clamp(32px, 6vw, 44px);
  }

  .services-card__img {
    height: clamp(150px, 25vw, 250px);
  }

  .services-card__title {
    font-size: clamp(17px, 2.5vw, 22px);
    line-height: 1.3;
    letter-spacing: -0.5px;
  }

  .services-card__desc {
    font-size: clamp(12px, 1.8vw, 15px);
  }

  .services-contact__headline {
    font-size: clamp(24px, 4vw, 34px);
  }

  .services-contact__headline-gradient {
    font-size: clamp(24px, 4vw, 34px);
  }

  .services-contact__toolbar {
    grid-template-rows: 100px 100px;
  }

  .services-contact__cell-text {
    font-size: clamp(14px, 2.2vw, 18px);
  }
}

/* ============================================
   RESPONSIVE: до 480px (mobile)
   Карточки в 1 колонку
   ============================================ */
@media (max-width: 480px) {
  .services-header .header__logo-container {
    left: 1rem;
    top: 1.5rem;
  }

  .services-header .header__burger {
    right: 1rem;
    top: 1.75rem;
  }

  .services-title {
    font-size: 1.75rem;
    padding: 100px 0 0 1rem;
  }

  .services-subtitle {
    font-size: 1.75rem;
    padding: 8px 0 30px 1rem;
  }

  .services-cards {
    grid-template-columns: 1fr;
  }

  .services-card {
    border-left: none;
    border-right: none;
  }

  .services-card:first-child {
    border-left: none;
  }

  .services-card__img {
    height: 55vw;
    min-height: 180px;
    max-height: 300px;
  }

  .services-card__content {
    padding: 12px 1rem 20px;
  }

  .services-card__title {
    font-size: 1.125rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
  }

  .services-card__desc {
    font-size: 0.875rem;
    line-height: 1.3;
  }

  .services-contact__headline {
    padding-left: 1rem;
    font-size: 1.5rem;
  }

  .services-contact__headline-gradient {
    padding-left: 1rem;
    font-size: 1.5rem;
  }

  .services-contact__toolbar {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 75px);
  }

  .services-contact__cell {
    padding-left: 1rem;
    padding-right: 3rem;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .services-contact__cell-text {
    font-size: 15px;
    line-height: 1.3;
  }

  .services-contact__cell-text br {
    display: none;
  }

  .services-contact__cell-icon {
    width: 18px;
    height: 18px;
    margin-bottom: 0;
  }

  .services-contact__cell-arrow {
    right: 1rem;
    width: 14px;
    height: 14px;
  }

  .services-legal-footer {
    padding: 1.5rem 1rem;
  }
}

/* ============================================
   RESPONSIVE: до 360px (small mobile)
   ============================================ */
@media (max-width: 360px) {
  .services-title {
    font-size: 1.5rem;
    padding-top: 90px;
  }

  .services-subtitle {
    font-size: 1.5rem;
  }

  .services-card__img {
    min-height: 160px;
  }

  .services-card__content {
    padding: 10px 0.75rem 16px;
  }

  .services-card__title {
    font-size: 1rem;
  }

  .services-card__desc {
    font-size: 0.8125rem;
  }

  .services-contact__headline {
    padding-left: 0.75rem;
    font-size: 1.25rem;
  }

  .services-contact__headline-gradient {
    padding-left: 0.75rem;
    font-size: 1.25rem;
  }

  .services-contact__toolbar {
    grid-template-rows: repeat(4, 65px);
  }

  .services-contact__cell {
    padding-left: 0.75rem;
    padding-right: 2.5rem;
    gap: 10px;
  }

  .services-contact__cell-text {
    font-size: 13px;
  }

  .services-contact__cell-icon {
    width: 16px;
    height: 16px;
  }

  .services-contact__cell-arrow {
    right: 0.75rem;
    width: 12px;
    height: 12px;
  }

  .services-legal-footer {
    padding: 1.25rem 0.75rem;
  }
}
