/*
 * Custom styles for manual development.
 * Keep Tilda-generated files untouched; add overrides here.
 */

:root {
  --site-max-width: 1200px;
  --sale-triangle-text-top-offset: -10px;
  --sale-triangle-text-side-offset: -4px;
  --section-title-fluid: clamp(30px, 4.4vw, 52px);
  --about-text-fluid: clamp(16px, 1.9vw, 22px);
  --service-title-fluid: clamp(22px, 2.1vw, 30px);
  --service-text-fluid: clamp(13px, 1.15vw, 16px);
  --service-price-fluid: clamp(18px, 1.8vw, 26px);
  --service-button-fluid: clamp(14px, 1.15vw, 18px);
}

/* Sections: make "Обо мне" and "Услуги" screen-height */
#rec1250900636 {
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  padding-top: clamp(52px, 12vh, 135px) !important;
  padding-bottom: clamp(44px, 10vh, 90px) !important;
}

#rec1250900636 .t467 {
  width: 100%;
}

#rec1250900636 .t467__title div {
  font-size: var(--section-title-fluid) !important;
  line-height: 1.08 !important;
}

#rec1250900636 .t467__descr div {
  font-size: var(--about-text-fluid) !important;
  line-height: 1.6 !important;
}

@media screen and (min-width: 960px) {
  #rec1252920106 {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
  }

  #rec1252920106 .t396__artboard,
  #rec1252920106 .t396__carrier,
  #rec1252920106 .t396__filter {
    min-height: calc(100vh - 60px) !important;
    min-height: calc(100dvh - 60px) !important;
  }
}


/* Services: replace bottom-right icon in "Сведение + Монтаж" card with red corner triangle */
#rec1252920106 .tn-group[data-group-id="175667661245879870"] .tn-elem[data-elem-id="1756676209082"] {
  top: auto !important;
  left: auto !important;
  right: 0 !important;
  bottom: 0 !important;
}

#rec1252920106 .tn-group[data-group-id="175667661245879870"] .tn-elem[data-elem-id="1756676209082"] .tn-atom {
  position: relative;
  display: block;
  width: 100%;
  height: 0;
  padding-top: 100%;
  overflow: hidden;
  clip-path: polygon(100% 100%, 0 100%, 100% 0);
  cursor: pointer;
}

#rec1252920106 .tn-group[data-group-id="175667661245879870"] .tn-elem[data-elem-id="1756676209082"] .tn-atom__img {
  display: none !important;
}

#rec1252920106 .tn-group[data-group-id="175667661245879870"] .tn-elem[data-elem-id="1756676209082"] .tn-atom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #F14843;
  z-index: 1;
  clip-path: polygon(100% 100%, 0 100%, 100% 0);
}

#rec1252920106 .tn-group[data-group-id="175667661245879870"] .tn-elem[data-elem-id="1756676209082"] .tn-atom::after {
  content: attr(data-sale-discount);
  position: absolute;
  top: calc(70% + var(--sale-triangle-text-top-offset));
  left: 70%;
  transform:
    translate(
      calc(-50% + var(--sale-triangle-text-side-offset)),
      calc(-50% - var(--sale-triangle-text-side-offset))
    )
    rotate(-45deg);
  z-index: 2;
  color: #ffffff;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  font-family: "Montserrat Alternates", Arial, sans-serif;
  pointer-events: none;
}

/* Services: strict centering for titles, descriptions, prices and CTA buttons */
#rec1252920106 [data-elem-id="1490289646296"],
#rec1252920106 [data-elem-id="175665956221832880"],
#rec1252920106 [data-elem-id="175665853267659090"],
#rec1252920106 [data-elem-id="1490347077580"],
#rec1252920106 [data-elem-id="1490289694305"],
#rec1252920106 [data-elem-id="1490347936048"],
#rec1252920106 [data-elem-id="175666002993771600"],
#rec1252920106 [data-elem-id="1490347941720"],
#rec1252920106 [data-elem-id="1490347939985"],
#rec1252920106 [data-elem-id="1490289915734"],
#rec1252920106 [data-elem-id="1490347484722"],
#rec1252920106 [data-elem-id="175665988138063400"],
#rec1252920106 [data-elem-id="175665861118533300"],
#rec1252920106 [data-elem-id="1490347489080"],
#rec1252920106 [data-elem-id="1490347493008"] {
  left: 50% !important;
  transform: translateX(-50%) !important;
}

#rec1252920106 [data-elem-id="1490289646296"] .tn-atom,
#rec1252920106 [data-elem-id="175665956221832880"] .tn-atom,
#rec1252920106 [data-elem-id="175665853267659090"] .tn-atom,
#rec1252920106 [data-elem-id="1490347077580"] .tn-atom,
#rec1252920106 [data-elem-id="1490347936048"] .tn-atom,
#rec1252920106 [data-elem-id="175666002993771600"] .tn-atom,
#rec1252920106 [data-elem-id="1490347941720"] .tn-atom,
#rec1252920106 [data-elem-id="1490347939985"] .tn-atom,
#rec1252920106 [data-elem-id="1490347484722"] .tn-atom,
#rec1252920106 [data-elem-id="175665988138063400"] .tn-atom,
#rec1252920106 [data-elem-id="175665861118533300"] .tn-atom,
#rec1252920106 [data-elem-id="1490347489080"] .tn-atom,
#rec1252920106 [data-elem-id="1490289694305"] .tn-atom__button-content,
#rec1252920106 [data-elem-id="1490289915734"] .tn-atom__button-content,
#rec1252920106 [data-elem-id="1490347493008"] .tn-atom__button-content {
  text-align: center !important;
  justify-content: center !important;
}

/* Services: make top icons larger and move them closer to the top edge */
#rec1252920106 [data-elem-id="1490351793191"],
#rec1252920106 [data-elem-id="1490351884357"],
#rec1252920106 [data-elem-id="1490351882281"] {
  top: 22px !important;
}

#rec1252920106 [data-elem-id="1490351793191"],
#rec1252920106 [data-elem-id="1490351884357"] {
  top: 30px !important;
}

#rec1252920106 [data-elem-id="1490351793191"] {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 92px !important;
  height: 90px !important;
}

#rec1252920106 [data-elem-id="1490351884357"] {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 92px !important;
  height: 90px !important;
}

#rec1252920106 [data-elem-id="1490351882281"] {
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 122px !important;
  height: 120px !important;
}

/* Services: make cards a bit more compact */
#rec1252920106 [data-elem-id="1490289361781"] .tn-atom,
#rec1252920106 [data-elem-id="1490289547312"] .tn-atom {
  min-height: calc(100% - 20px) !important;
}

#rec1252920106 [data-elem-id="1490346838675"] .tn-atom {
  min-height: calc(100% - 48px) !important;
}

#rec1252920106 [data-group-id="175667660087414230"],
#rec1252920106 [data-group-id="175667661245879870"],
#rec1252920106 [data-group-id="175667661601730180"] {
  transform: scale(0.88) !important;
  margin-top: 10px !important;
}

#rec1252920106 [data-group-id="175667660087414230"] {
  transform-origin: top right !important;
}

#rec1252920106 [data-group-id="175667661245879870"] {
  transform-origin: top center !important;
}

#rec1252920106 [data-group-id="175667661601730180"] {
  transform-origin: top left !important;
}

/* Services: middle card is slightly taller with extra bottom air */
@media screen and (min-width: 1200px) {
  #rec1252920106 [data-group-id="175667660087414230"] {
    left: calc(50% - 600px + 135px) !important;
  }

  #rec1252920106 [data-group-id="175667661245879870"] {
    left: calc(50% - 600px + 440px) !important;
    width: 320px !important;
    height: 570px !important;
  }

  #rec1252920106 [data-elem-id="1490346838675"] {
    width: 320px !important;
    height: 570px !important;
  }

  #rec1252920106 [data-group-id="175667661601730180"] {
    left: calc(50% - 600px + 765px) !important;
  }
}

@media screen and (max-width: 1199px) and (min-width: 960px) {
  #rec1252920106 [data-group-id="175667660087414230"] {
    left: calc(50% - 480px + 30px) !important;
  }

  #rec1252920106 [data-group-id="175667661245879870"] {
    left: calc(50% - 480px + 330px) !important;
    width: 300px !important;
    height: 620px !important;
  }

  #rec1252920106 [data-elem-id="1490346838675"] {
    width: 300px !important;
    height: 620px !important;
  }

  #rec1252920106 [data-group-id="175667661601730180"] {
    left: calc(50% - 480px + 650px) !important;
  }
}

@media screen and (max-width: 959px) and (min-width: 640px) {
  #rec1252920106 [data-group-id="175667661245879870"] {
    left: calc(50% - 320px + 90px) !important;
    width: 460px !important;
    height: 620px !important;
  }

  #rec1252920106 [data-elem-id="1490346838675"] {
    width: 460px !important;
    height: 620px !important;
  }
}

@media screen and (max-width: 639px) and (min-width: 480px) {
  #rec1252920106 [data-group-id="175667661245879870"] {
    width: 440px !important;
    height: 600px !important;
  }

  #rec1252920106 [data-elem-id="1490346838675"] {
    width: 440px !important;
    height: 600px !important;
  }
}

@media screen and (max-width: 479px) {
  #rec1252920106 [data-group-id="175667661245879870"] {
    width: 280px !important;
    height: 500px !important;
  }

  #rec1252920106 [data-elem-id="1490346838675"] {
    width: 280px !important;
    height: 500px !important;
  }
}

/* Services: keep cards in one row on mobile with horizontal scroll */
@media screen and (max-width: 960px) {
  #rec1252920106 {
    position: relative;
  }

  .services-title-mobile {
    display: block;
    text-align: center;
    font-family: "Montserrat Alternates", Arial, sans-serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 12px !important;
    padding-top: 170px !important;
    position: relative !important;
    top: 170px !important;
  }

  #rec1252920106 .t396 {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  #rec1252920106 .t396__artboard,
  #rec1252920106 .t396__carrier,
  #rec1252920106 .t396__filter {
    width: 1200px !important;
    min-width: 1200px !important;
    height: 703px !important;
  }

  /* Restore desktop layout values for mobile */
  #rec1252920106 .tn-group[data-group-id="175667660087414230"] {
    top: 148px !important;
    left: calc(50% - 600px + 117px) !important;
    width: 300px !important;
    height: 530px !important;
    transform: none !important;
    margin-top: 0 !important;
  }

  #rec1252920106 .tn-group[data-group-id="175667661245879870"] {
    top: 128px !important;
    left: calc(50% - 600px + 442px) !important;
    width: 317px !important;
    height: 575px !important;
    transform: none !important;
    margin-top: 0 !important;
  }

  #rec1252920106 .tn-group[data-group-id="175667661601730180"] {
    top: 148px !important;
    left: calc(50% - 600px + 783px) !important;
    width: 300px !important;
    height: 530px !important;
    transform: none !important;
    margin-top: 0 !important;
  }

  /* Hide original title inside scroll area */
  #rec1252920106 .tn-elem[data-elem-id="1490289265516"] {
    display: none !important;
  }

  #rec1252920106 .tn-elem[data-elem-id="1490289361781"] { top: 0 !important; left: 0 !important; width: 300px !important; height: 530px !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490289646296"] { top: 132px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="175665956221832880"] { top: 169px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="175665853267659090"] { top: 254px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347077580"] { top: 406px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490289694305"] { top: 446px !important; left: 86px !important; width: 129px !important; height: 43px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490351793191"] { top: 45px !important; left: 111px !important; width: 77px !important; height: 75px !important; transform: none !important; }

  #rec1252920106 .tn-elem[data-elem-id="1490346838675"] { top: 0 !important; left: 0 !important; width: 317px !important; height: 575px !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347484722"] { top: 150px !important; left: 12px !important; width: 293px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="175665988138063400"] { top: 188px !important; left: 43px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="175665861118533300"] { top: 293px !important; left: 43px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347489080"] { top: 435px !important; left: 32px !important; width: 254px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347493008"] { top: 475px !important; left: 80px !important; width: 158px !important; height: 48px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490351882281"] { top: 38px !important; left: 107px !important; width: 103px !important; height: 101px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1756676209082"] { top: 462px !important; left: 204px !important; width: 113px !important; height: 113px !important; transform: none !important; }

  #rec1252920106 .tn-elem[data-elem-id="1490289547312"] { top: 0 !important; left: 0 !important; width: 300px !important; height: 530px !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347936048"] { top: 132px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="175666002993771600"] { top: 169px !important; left: 17px !important; width: 270px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347941720"] { top: 294px !important; left: 34px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490347939985"] { top: 406px !important; left: 35px !important; width: 231px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490289915734"] { top: 446px !important; left: 86px !important; width: 129px !important; height: 43px !important; transform: none !important; }
  #rec1252920106 .tn-elem[data-elem-id="1490351884357"] { top: 45px !important; left: 111px !important; width: 77px !important; height: 75px !important; transform: none !important; }

  /* Scroll hint arrows */
  #rec1252920106::before,
  #rec1252920106::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 7;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
  }

  #rec1252920106::before {
    content: "‹";
    left: 8px;
  }

  #rec1252920106::after {
    content: "›";
    right: 8px;
  }
}

/* Services: force equal side-card heights */
#rec1252920106 [data-group-id="175667660087414230"],
#rec1252920106 [data-group-id="175667661601730180"] {
  height: 530px !important;
}

@media screen and (max-width: 1199px) {
  #rec1252920106 [data-group-id="175667660087414230"],
  #rec1252920106 [data-group-id="175667661601730180"] {
    height: 573px !important;
  }
}

@media screen and (max-width: 959px) {
  #rec1252920106 [data-group-id="175667660087414230"],
  #rec1252920106 [data-group-id="175667661601730180"] {
    height: 552px !important;
  }
}

@media screen and (max-width: 479px) {
  #rec1252920106 [data-group-id="175667660087414230"],
  #rec1252920106 [data-group-id="175667661601730180"] {
    height: 460px !important;
  }
}

/* Homepage: slightly enlarge logos on hover */
#rec1146661411 .t306__table-cell > a > .t306__img,
#rec1146747926 .t456__logowrapper > a > .t456__imglogo,
#rec1146846571 .t280__logo > .t280__logo__img {
  transition: transform 0.25s ease;
  transform-origin: center center;
}

@media (hover: hover) and (pointer: fine) {
  #rec1146661411 .t306__table-cell > a:hover > .t306__img,
  #rec1146747926 .t456__logowrapper > a:hover > .t456__imglogo,
  #rec1146846571 .t280__logo:hover > .t280__logo__img {
    transform: scale(1.05);
  }
}

/* Portfolio: show 2x2 grid on mobile */
@media screen and (max-width: 639px) {
  #rec1147038331 .t1029__row {
    display: grid !important;
    grid-template-columns: repeat(2, max-content) !important;
    justify-content: center !important;
    gap: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #rec1147038331 .t1029__row,
  #rec1147038331 .t1029__row * {
    float: none !important;
  }

  #rec1147038331 .t-card__col,
  #rec1147038331 .t1029__col {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #rec1147038331 .t1029__bgimg {
    margin: 0 auto !important;
    width: 10vh !important;
    height: 10vh !important;
  }

  #rec1147038331 .t1029__wrappercenter {
    margin-top: 6px !important;
  }

  #rec1147038331 .t-card__title {
    margin-top: 0 !important;
  }

  #rec1147038331 .t-card__title div {
    font-size: 14px !important;
  }
}

@media screen and (max-width: 479px) {
  #rec1147038331 .t1029__row {
    gap: 0 !important;
  }
  #rec1147038331 .t-card__col,
  #rec1147038331 .t1029__col {
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #rec1147038331 .t1029__bgimg {
    width: 7vh !important;
    height: 7vh !important;
  }
  #rec1147038331 .t-card__title div {
    font-size: 10px !important;
  }
}

/* 404: content + footer must match viewport height */
#allrecords[data-tilda-page-id="74738616"] {
  --error-content-height: 100vh;
  --error-block-width: 760px;
  --error-block-height: 450px;
  --error-block-x-offset: 0px;
  --error-block-y-offset: 0px;
  --error-logo-x-offset: 0px;
  --error-logo-y-offset: 0px;
  --error-logo-width: 607px;
  --error-text-base-y: 390px;
  --error-text-x-offset: 0px;
  --error-text-y-offset: 0px;
  --error-text-width: 385px;
  --error-button-base-y: 450px;
  --error-button-x-offset: 0px;
  --error-button-y-offset: 0px;
  --error-button-width: 200px;
  --error-button-height: 57px;
  --error-block-top: calc(
    (var(--error-content-height) - var(--error-block-height)) / 2 + var(--error-block-y-offset)
  );
  --error-block-center-x: calc(50% + var(--error-block-x-offset));
}

#allrecords[data-tilda-page-id="74738616"] #rec1255189341 .t396__artboard,
#allrecords[data-tilda-page-id="74738616"] #rec1255189341 .t396__filter,
#allrecords[data-tilda-page-id="74738616"] #rec1255189341 .t396__carrier {
  height: var(--error-content-height) !important;
  min-height: var(--error-content-height) !important;
}

/* 404: manual controls for logo and "На главную" button (without affecting footer) */
#rec1255189341 .tn-elem[data-elem-id="1756739610828"] {
  left: calc(var(--error-block-center-x) - (var(--error-logo-width) / 2) + var(--error-logo-x-offset)) !important;
  top: calc(var(--error-block-top) + var(--error-logo-y-offset)) !important;
  width: var(--error-logo-width) !important;
}

#rec1255189341 .tn-elem[data-elem-id="1756739633183"] {
  left: calc(var(--error-block-center-x) - (var(--error-text-width) / 2) + var(--error-text-x-offset)) !important;
  top: calc(var(--error-block-top) + var(--error-text-base-y) + var(--error-text-y-offset)) !important;
  width: var(--error-text-width) !important;
}

#rec1255189341 .tn-elem[data-elem-id="1756739757682"] {
  left: calc(var(--error-block-center-x) - (var(--error-button-width) / 2) + var(--error-button-x-offset)) !important;
  top: calc(var(--error-block-top) + var(--error-button-base-y) + var(--error-button-y-offset)) !important;
  width: var(--error-button-width) !important;
  height: var(--error-button-height) !important;
}
