/* ============================================
   WORKS PAGE - Pixel-Perfect Figma Implementation
   Design: 1440px x 2921px
   ============================================ */

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

/* ============================================
   HEADER
   Logo: left:65.5px top:66px
   Text: left:118.5px top:51px
   Burger: left:1343px top:63px
   ============================================ */
.works-header {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1440px;
  z-index: 10;
}

/* Logo container - Figma coordinates */
.works-header .header__logo-container {
  position: absolute;
  left: 65.5px;
  top: 51px;
}

.works-header .header__logo-container img {
  width: 42.95px;
  height: 44px;
}

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

/* Burger positioning for works page */
.works-header .header__burger {
  position: absolute;
  left: 1343px;
  top: 63px;
}

.works-header .header__burger-line {
  background: #C7C7C7;
}

/* ============================================
   MAIN CONTENT
   Height: 1876px (footer starts at 1876)
   ============================================ */
.works-main {
  position: relative;
  width: 1440px;
  height: 1876px;
  margin: 0 auto;
  background: #000000;
}

/* Vertical line (Vector 19): left:479px, height:1876px */
.works-line-left {
  position: absolute;
  left: 479px;
  top: 0;
  width: 1px;
  height: 1876px;
  background: #3C3C3C;
}

/* Horizontal decorative line: left:-0.25px, top:1372px */
.works-line-horizontal {
  position: absolute;
  left: -0.25px;
  top: 1372px;
  width: 389px;
  height: 1px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 5%,
    rgba(255, 255, 255, 0.2) 95%,
    rgba(255, 255, 255, 0) 100%
  );
  transform-origin: left center;
}

/* Decorative arcs - hidden by default, shown only on 1920px */
.works-decorative-arcs {
  display: none;
}

/* ============================================
   TITLE
   left:66px, top:284px
   ============================================ */
.works-title {
  position: absolute;
  left: 66px;
  top: 284px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 70px;
  line-height: 74px;
  letter-spacing: -0.05em;
  margin: 0;
  width: 473px;
  height: 74px;
}

/* ============================================
   CARDS
   Images: 286x286
   Positioned via inline styles
   ============================================ */
.works-card {
  position: absolute;
  width: 287px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.works-card__img {
  width: 286px;
  height: 286px;
  object-fit: cover;
  display: block;
}

.works-card__title {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 23.376px;
  line-height: 29.22px;
  letter-spacing: -1.1688px;
  color: #FFFFFF;
  margin: 8px 0 4px 0;
}

.works-card__desc {
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 15px;
  letter-spacing: -0.7px;
  color: #8A8A8A;
  margin: 0;
}

/* ============================================
   CONTACT SECTION
   y=1876px, height=1044.59px
   Background: #F6F8F9
   ============================================ */
.works-contact {
  position: relative;
  width: 1440px;
  height: 1044.59px;
  margin: 0 auto;
  background: #F6F8F9;
}

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

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

/* Headline: left:66px, top:396px */
.works-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 */
.works-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;
}

/* Social label: left:65px, top:616px */
.works-contact__social-label {
  position: absolute;
  left: 65px;
  top: 616px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 17.644px;
  line-height: 18.527px;
  letter-spacing: -0.8822px;
  color: #000000;
  margin: 0;
}

/* Social links container: top:651px */
.works-contact__social-links {
  position: absolute;
  top: 651px;
  left: 0;
}

.works-contact__social-links a {
  position: absolute;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 600;
  font-size: 24.061px;
  line-height: 25.264px;
  letter-spacing: -1.203px;
  color: #000000;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.works-contact__social-links a:hover {
  opacity: 0.7;
}

/* Address label: left:65px, top:775.71px */
.works-contact__address-label {
  position: absolute;
  left: 65px;
  top: 775.71px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 300;
  font-size: 17.644px;
  line-height: 18.527px;
  letter-spacing: -0.8822px;
  color: #000000;
  margin: 0;
}

/* Address value: left:65px, top:810.71px */
.works-contact__address-value {
  position: absolute;
  left: 65px;
  top: 810.71px;
  font-family: 'Proxima Nova', sans-serif;
  font-weight: 600;
  font-size: 17.644px;
  line-height: 18.527px;
  letter-spacing: -0.8822px;
  color: #000000;
  margin: 0;
}

/* ============================================
   CONTACT TOOLBAR (Grid-based like contacts page)
   Position: right side of contact section (720px to 1440px)
   Full height of section
   ============================================ */
.works-contact__toolbar {
  position: absolute;
  left: 720px;
  top: 0;
  width: 720px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

/* Cell styles */
.works-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;
}

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

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

/* Cell text */
.works-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;
}

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

/* Grid positioning */
.works-contact__cell--1 {
  grid-column: 1;
  grid-row: 1;
}

.works-contact__cell--2 {
  grid-column: 2;
  grid-row: 1;
}

.works-contact__cell--3 {
  grid-column: 1;
  grid-row: 2;
}

.works-contact__cell--4 {
  grid-column: 2;
  grid-row: 2;
}

/* Bottom right icon: right corner, top:979.74px */
.works-contact__bottom-icon {
  position: absolute;
  right: 20px;
  bottom: 50px;
}

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

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

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

.works-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;
}

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

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

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

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

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

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* ============================================
   ≤1439px — prevent horizontal scroll, scale down
   ============================================ */
@media (max-width: 1439px) {
  .works-page {
    overflow-x: hidden;
  }

  .works-header {
    width: 100%;
  }

  .works-header .header__logo-container {
    left: 24px;
    top: 24px;
  }

  .works-header .header__burger {
    left: auto;
    right: 24px;
    top: 24px;
  }

  .works-main {
    width: 100%;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 140px 24px 40px;
  }

  .works-line-left,
  .works-line-horizontal,
  .works-decorative-arcs {
    display: none !important;
  }

  .works-title {
    position: static !important;
    grid-column: 1 / -1;
    width: auto;
    height: auto;
    font-size: 56px;
    line-height: 60px;
    margin-bottom: 8px;
  }

  .works-card {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    transform: none !important;
  }

  .works-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  /* Contact */
  .works-contact {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
  }

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

  .works-contact__headline,
  .works-contact__headline-gradient {
    position: static;
    padding-left: 24px;
  }

  .works-contact__headline {
    padding-top: 60px;
    font-size: 48px;
    line-height: 54px;
  }

  .works-contact__headline-gradient {
    font-size: 48px;
    line-height: 56px;
    margin-bottom: 30px;
  }

  .works-contact__social-label,
  .works-contact__social-links,
  .works-contact__address-label,
  .works-contact__address-value {
    position: static;
    padding-left: 24px;
    margin-bottom: 4px;
  }

  .works-contact__social-label {
    margin-top: 20px;
  }

  .works-contact__social-links {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
  }

  .works-contact__social-links a {
    position: static;
  }

  .works-contact__address-value {
    margin-bottom: 30px;
  }

  .works-contact__toolbar {
    position: static;
    width: 100%;
    height: auto;
    grid-template-rows: auto auto;
  }

  .works-contact__cell {
    padding: 40px 24px;
  }

  .works-contact__bottom-icon {
    display: none;
  }

  /* Footer */
  .works-legal-footer {
    width: 100%;
    padding: 2rem 24px;
  }
}

/* ============================================
   ≤900px — smaller title, adjust grid
   ============================================ */
@media (max-width: 900px) {
  .works-title {
    font-size: 44px;
    line-height: 48px;
  }

  .works-contact__headline {
    font-size: 40px;
    line-height: 46px;
  }

  .works-contact__headline-gradient {
    font-size: 40px;
    line-height: 48px;
  }

  .works-contact__cell-text {
    font-size: 20px;
    line-height: 24px;
  }
}

/* ============================================
   ≤768px — single column cards, stacked toolbar
   ============================================ */
@media (max-width: 768px) {
  .works-main {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 120px 20px 30px;
  }

  .works-card {
    max-width: 400px;
  }

  .works-card__img {
    max-height: 300px;
    aspect-ratio: auto;
  }

  .works-title {
    font-size: 36px;
    line-height: 40px;
  }

  .works-contact__headline {
    font-size: 32px;
    line-height: 38px;
    padding-top: 40px;
  }

  .works-contact__headline-gradient {
    font-size: 32px;
    line-height: 38px;
  }

  .works-contact__toolbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .works-contact__cell--1,
  .works-contact__cell--2,
  .works-contact__cell--3,
  .works-contact__cell--4 {
    grid-column: 1;
    grid-row: auto;
  }

  .works-contact__cell {
    padding: 30px 20px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .works-contact__cell-icon {
    margin-bottom: 0;
  }

  .works-contact__cell-arrow {
    right: 20px;
  }

  .works-legal-footer {
    padding: 1.5rem 20px;
  }
}

/* ============================================
   ≤480px — compact mobile
   ============================================ */
@media (max-width: 480px) {
  .works-header .header__logo-container {
    left: 16px;
    top: 16px;
  }

  .works-header .header__burger {
    right: 16px;
    top: 16px;
  }

  .works-main {
    padding: 100px 16px 24px;
    gap: 16px;
  }

  .works-title {
    font-size: 30px;
    line-height: 34px;
  }

  .works-card__title {
    font-size: 18px;
    line-height: 22px;
    letter-spacing: -0.5px;
  }

  .works-card__desc {
    font-size: 12px;
    line-height: 14px;
  }

  .works-contact__headline,
  .works-contact__headline-gradient {
    padding-left: 16px;
    font-size: 26px;
    line-height: 32px;
    letter-spacing: -1.5px;
  }

  .works-contact__headline {
    padding-top: 30px;
  }

  .works-contact__social-label,
  .works-contact__social-links,
  .works-contact__address-label,
  .works-contact__address-value {
    padding-left: 16px;
  }

  .works-contact__cell {
    padding: 24px 16px;
  }

  .works-contact__cell-text {
    font-size: 18px;
    line-height: 22px;
  }

  .works-contact__cell-arrow {
    right: 16px;
  }

  .works-legal-footer {
    padding: 1.5rem 16px;
  }

  .works-legal-footer__links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   ≤360px — smallest screens
   ============================================ */
@media (max-width: 360px) {
  .works-main {
    padding: 90px 12px 20px;
    gap: 12px;
  }

  .works-title {
    font-size: 26px;
    line-height: 30px;
  }

  .works-card__title {
    font-size: 16px;
    line-height: 20px;
  }

  .works-card__desc {
    font-size: 11px;
    line-height: 13px;
  }

  .works-contact__headline,
  .works-contact__headline-gradient {
    font-size: 22px;
    line-height: 28px;
    letter-spacing: -1px;
  }

  .works-contact__cell-text {
    font-size: 16px;
    line-height: 20px;
  }

  .works-contact__social-links a {
    font-size: 18px;
  }
}

/* ============================================
   1920px RESOLUTION STYLES
   ============================================ */
@media (min-width: 1920px) {
  /* ============================================
     HEADER - 1920px
     ============================================ */
  .works-header {
    width: 1920px;
  }

  /* Logo container - same left offset */
  .works-header .header__logo-container {
    left: 65.5px;
    top: 51px;
  }

  .works-header .header__logo-container img {
    width: 42.95px;
    height: 44px;
  }

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

  /* Burger positioning for 1920px */
  .works-header .header__burger {
    left: 1823px; /* 1920 - 97 (same offset from right as 1440 - 97 = 1343) */
    top: 63px;
  }

  /* ============================================
     MAIN CONTENT - 1920px
     ============================================ */
  .works-main {
    width: 1920px;
    height: 1876px; /* Высота может измениться по макету */
  }

  /* Vertical line - позиция по Figma для 1920 */
  .works-line-left {
    left: 679px; /* 479 + 200 */
    height: 1876px;
  }

  /* Horizontal decorative line */
  .works-line-horizontal {
    left: -0.25px;
    top: 1372px;
    width: 389px;
  }

  /* Decorative arcs - показываем только на 1920px */
  .works-decorative-arcs {
    display: block;
    position: absolute;
    left: 108px;
    top: 853px;
    width: 486px;
    height: 471px;
    z-index: 0;
    pointer-events: none;
  }

  /* ============================================
     TITLE - 1920px
     ============================================ */
  .works-title {
    left: 66px;
    top: 284px;
    font-size: 70px;
    line-height: 74px;
    width: 473px;
  }

  /* ============================================
     CARDS - 1920px
     Позиции карточек задаются через inline styles
     Сдвигаем вправо через transform
     ============================================ */
  .works-card {
    width: 287px;
    transform: translateX(390px); /* Сдвиг вправо для 1920px */
  }

  .works-card__img {
    width: 286px;
    height: 286px;
  }

  .works-card__title {
    font-size: 23.376px;
    line-height: 29.22px;
    letter-spacing: -1.1688px;
  }

  .works-card__desc {
    font-size: 14px;
    line-height: 15px;
    letter-spacing: -0.7px;
  }

  /* ============================================
     CONTACT SECTION - 1920px
     ============================================ */
  .works-contact {
    width: 1920px;
    height: 1044.59px;
  }

  /* Vertical line - центр страницы */
  .works-contact__vertical-line {
    left: 960px; /* 1920 / 2 */
  }

  /* ============================================
     CONTACT SECTION LEFT CONTENT - 1920px
     ============================================ */

  /* Headline */
  .works-contact__headline {
    left: 66px;
    top: 396px;
    font-size: 65px;
    line-height: 76.299px;
  }

  /* Gradient text */
  .works-contact__headline-gradient {
    left: 66px;
    top: 456px;
    font-size: 65px;
    line-height: 83.41px;
  }

  /* Social label */
  .works-contact__social-label {
    left: 65px;
    top: 616px;
    font-size: 17.644px;
    line-height: 18.527px;
  }

  /* Social links container */
  .works-contact__social-links {
    top: 651px;
  }

  .works-contact__social-links a {
    font-size: 24.061px;
    line-height: 25.264px;
  }

  /* Address label */
  .works-contact__address-label {
    left: 65px;
    top: 775.71px;
    font-size: 17.644px;
  }

  /* Address value */
  .works-contact__address-value {
    left: 65px;
    top: 810.71px;
    font-size: 17.644px;
  }

  /* ============================================
     CONTACT TOOLBAR - 1920px
     ============================================ */
  .works-contact__toolbar {
    left: 960px; /* 1920 / 2 */
    width: 960px; /* 1920 / 2 */
  }

  /* Cell styles */
  .works-contact__cell {
    padding-left: 47px;
  }

  /* Cell icon */
  .works-contact__cell-icon {
    width: 21px;
    height: 21px;
    margin-bottom: 18px;
  }

  /* Cell text */
  .works-contact__cell-text {
    font-size: 24.39px;
    line-height: 26px;
  }

  /* Cell arrow */
  .works-contact__cell-arrow {
    right: 50px;
    width: 16px;
    height: 16px;
  }

  /* ============================================
     LEGAL FOOTER - 1920px
     ============================================ */
  .works-legal-footer {
    width: 1920px;
    padding: 2rem 66px;
  }

  .works-legal-footer__company-name {
    font-size: 14px;
  }

  .works-legal-footer__company-details {
    font-size: 12px;
  }

  .works-legal-footer__link {
    font-size: 12px;
  }

  .works-legal-footer__copyright {
    font-size: 12px;
  }
}
