/* Tecnoambienti — восстановление оригинального дизайна (Duda/Italiaonline, 2021–2026).
   Все размеры сняты с живой вёрстки оригинала на ширине 1366px:
   шапка 100→88px, контейнер 960px, карточки 536/633/663px, кнопки 240×65, красный #C3262F, текст #4C4C4C. */

:root {
  --red: #c3262f;
  --text: #4c4c4c;
  --line: #dfdfdf;
  --head-font: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --body-font: Arial, Helvetica, sans-serif;
  --header-h: 100px;
  --container: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0; overflow-x: clip;
  font: 16px/2 var(--body-font);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--head-font); font-weight: 700; line-height: 1.5; margin: 0; }
h1 { font-size: 36px; color: var(--text); }
h2 { font-size: 30px; color: var(--red); }
h3 { font-size: 26px; color: var(--text); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 1000; background: #fff; padding: 8px 12px; }

/* ---------- кнопки (Duda «default gradient»: нижняя половина темнее на 15%) ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 196px; min-height: 52px; padding: 10px 27px;
  background: var(--red); color: #fff;
  font: 700 16px/1.3 var(--body-font); text-decoration: none; text-align: center;
  border: 0; border-radius: 0; cursor: pointer; transition: background-color .2s;
}
.btn::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50%;
  background: rgba(0, 0, 0, .15); pointer-events: none;
}
.btn > * { position: relative; }
.btn:hover, .btn:focus-visible { background-color: #000; }
.btn .icon { width: 22px; height: 22px; fill: currentColor; flex: none; }
.btn-lg { width: 240px; min-height: 65px; }

/* ---------- шапка: 100px, при прокрутке 88px и логотип 87% ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: #fff;
  box-shadow: rgba(0, 0, 0, .25) 0 3px 11px 0;
}
.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: var(--header-h); padding: 6px 20px 5px 25px; transition: min-height .3s;
}
.brand { justify-self: start; margin-top: 4px; }
.brand img { width: 137px; transition: width .3s; }
.site-header.is-scrolled .header-inner { min-height: 88px; }
.site-header.is-scrolled .brand img { width: 120px; }
.main-nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.main-nav li { margin: 0 1px; }
.main-nav a {
  display: block; padding: 12px 5px; font-size: 14px; letter-spacing: .03em; line-height: 1.2;
  text-decoration: none; color: var(--text); transition: color .2s;
}
.main-nav a span { display: block; }
.main-nav a span::after {
  content: ""; display: block; height: 3px; margin-top: .2em; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--red); }
.main-nav a:hover span::after, .main-nav a[aria-current="page"] span::after { transform: scaleX(1); }
.header-call { justify-self: end; width: 179px; min-width: 0; padding: 8px 10px 8px 50px; white-space: nowrap; }
.header-call .icon, .footer-call .icon { position: absolute; left: 14px; top: 50%; margin-top: -11px; }
.footer-call .btn { padding-left: 50px; }
.nav-toggle { display: none; }

/* ---------- общие секции ---------- */
.section { padding: 100px 40px; position: relative; }
.container { max-width: var(--container); margin: 0 auto; position: relative; }
.center { text-align: center; }

/* фото на фоне (fixed, как в оригинале) */
.photo-bg { position: relative; background-size: cover; background-position: 50% 50%; background-attachment: fixed; }

/* hero: белая карточка 85% с красной полосой */
.hero { padding: 120px 40px; }
.hero .card-hero h1 { text-align: center; }
.hero-home { position: relative; padding: 120px 40px; }
.hero-home .slides { position: absolute; inset: 0; overflow: hidden; }
.hero-home .slides div {
  position: absolute; inset: 0; background-size: cover; background-position: 50% 50%;
  background-attachment: fixed; opacity: 0; transition: opacity .75s ease-in-out;
}
.hero-home .slides div.on { opacity: 1; }
.card-hero {
  position: relative; width: 41.6667%; min-width: 300px;
  background: rgba(255, 255, 255, .85); padding: 30px; border-bottom: 4px solid var(--red);
}
.hero-home .card-hero { padding: 40px 30px; }
.card-hero h1 { margin: 8px 0; }
.card-hero .btn { margin: 4px 0 10px; min-width: 219px; padding: 10px 20px; gap: 10px; }

/* вступление: текстура 22% + знак TA 90×90 */
.intro { text-align: center; background: #fff; }
.intro::before {
  content: ""; position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background: url(/assets/img/texture.png) 50% 50% / auto repeat;
}
.intro .container > * { position: relative; }
.mark { width: 90px; height: 90px; object-fit: contain; margin: 10px auto 20px; }
.intro .text { margin: 0 auto 27px; }
.intro .btn { margin: 0 0 10px; }

/* фото-секция: карточка 50% с тёмной нижней полосой */
.photo-section { padding: 150px 40px 150px 60px; }
.card {
  position: relative; width: 50%; max-width: 633px; min-width: 300px;
  background: rgba(255, 255, 255, .9); padding: 30px; border-bottom: 4px solid var(--text);
}
.card h2 { margin: 10px 0 22px; }
.card > p:last-child { margin-bottom: 10px; }

/* фото + текст: колонки 480/480 внутри 960 */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.split.wide { grid-template-columns: 563fr 397fr; }
.split-media {
  border-left: 4px solid var(--red); padding: 0 0 5px 5px;
  justify-self: stretch;
}
.split-media > img, .split-media .slider { width: 100%; height: var(--h, 518px); object-fit: cover; }
.split-text { padding-left: 40px; }
.split-text h2 { margin: 2px 0 22px; }
.split-text .subtitle { font-size: 20px; color: var(--text); margin-bottom: 22px; }

/* слайдер (flexslider: fade 600ms, 7s) */
.slider { position: relative; overflow: hidden; background: #f4f4f4; }
.slider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .6s;
}
.slider img.on { opacity: 1; }
.slider button {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border: 0; background: rgba(255, 255, 255, .8); color: var(--text);
  font-size: 28px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .3s;
}
.slider:hover button, .slider button:focus-visible { opacity: 1; }
.slider .prev { left: 10px; }
.slider .next { right: 10px; }

/* плитки категорий: тёмная вуаль 23% и белая подпись */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); padding: 20px 0 40px; }
.tile { position: relative; display: block; aspect-ratio: 1; padding: 2px; text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile span {
  position: absolute; inset: 2px; display: flex; align-items: flex-end; justify-content: center;
  padding: 15px 15px 8px; background: rgba(0, 0, 0, .23); text-align: center;
  font: 700 18px/1.3 var(--head-font); color: #fff;
}

/* галереи */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); }
.gallery.cols-3 { grid-template-columns: repeat(3, 1fr); }
.gallery a { display: block; aspect-ratio: 1; padding: 1.5px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery-home { padding: 50px 0; }
.gallery.is-collapsed a:nth-child(n+5) { display: none; }
.gallery-more {
  display: block; margin: 12px auto 0; background: none; border: 0; padding: 4px 8px;
  font: 16px/2 var(--body-font); color: var(--red); cursor: pointer;
}
.gallery-more:hover { text-decoration: underline; }

/* марки: строка на категорию — подпись слева, одинаковые карточки логотипов справа */
.brands { background: #f5f5f5; }
.brands .inner { max-width: 1200px; margin: 0 auto; }
.brands h2 { text-align: center; margin: 0 0 50px; }
.brands h2::after { content: ""; display: block; width: 60px; height: 3px; background: var(--red); margin: 14px auto 0; }
.brand-group {
  display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: start;
  padding: 24px 0; border-top: 1px solid #e2e2e2;
}
.brand-group:first-of-type { border-top: 0; padding-top: 0; }
.brand-group h3 {
  margin-top: 34px; padding-left: 14px; border-left: 3px solid var(--red);
  font: 700 14px/1.4 var(--body-font); letter-spacing: .08em; text-transform: uppercase; color: var(--text);
}
.brand-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.brand-grid li {
  height: 96px; padding: 18px 22px; background: #fff; border: 1px solid #e6e6e6;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.brand-grid li:hover { border-color: var(--red); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.brand-grid img { width: auto; height: auto; max-width: 100%; max-height: 52px; object-fit: contain; }

/* CTA: карточка 663px на фото, под фото — красная подложка */
.cta { padding: 180px 40px 0 0; background-color: var(--red); }
.cta .card { width: 50%; max-width: none; border-bottom: 0; padding: 30px; text-align: center; }
.cta-icon { width: 70px; height: 70px; fill: var(--red); margin: 10px auto; display: block; }
.cta p { font: 700 25px/1.5 var(--head-font); color: var(--text); max-width: 509px; margin: 12px auto 27px; }
.cta .btn { margin: 0 auto 10px; }

/* контакты: красная полоса с двумя белыми карточками, форма на сером */
.contact-band { background: var(--red); }
.contact-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.contact-cols > div { background: #fff; padding: 30px; min-height: 455px; }
.contact-cols h3 { font-size: 26px; color: var(--text); margin: 8px 0 20px; }
.contact-cols .hours { width: 216px; margin: 0 auto; color: #333; }
.contact-cols .icon70 { width: 60px; height: 60px; fill: var(--text); margin: 16px auto 22px; display: block; }
.contact-cols > div:last-child .icon70 { width: 85px; height: 85px; margin: 0 auto 22px; }
.contact-cols .address { font-weight: 700; font-size: 20px; line-height: 40px; margin-bottom: 10px; }
.form-band { background: #f2f2f2; padding-bottom: 70px; }
.form-wrap { max-width: var(--container); margin: 0 auto; }
.form-wrap h2 { margin-bottom: 10px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 24px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-size: 16px; line-height: 1.6; margin-bottom: 4px; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form textarea {
  width: 100%; height: 40px; padding: 0 10px; font: 16px/1.4 var(--body-font); color: var(--text);
  border: 1px solid var(--text); border-radius: 0; background: #fff;
}
.form textarea { height: 80px; min-height: 80px; padding: 8px 10px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--red); outline-offset: -1px; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.6; }
.form .check input { margin-top: 5px; }
.form .hp { position: absolute; left: -9999px; }
.form-note { font-size: 16px; }
.btn-submit { width: 280px; margin-top: 40px; }
.alert { padding: 14px 18px; margin-top: 20px; border-left: 4px solid var(--red); background: #fff; }
.map { display: block; width: 100%; height: 320px; border: 0; }

/* часы работы (как виджет Duda: день слева, время справа) */
.hours { margin: 0; text-align: left; }
.hours div { display: flex; justify-content: space-between; gap: 20px; }
.hours dt { font-weight: 400; }
.hours dd { margin: 0; text-align: right; }

/* текстовые страницы */
.prose { max-width: var(--container); margin: 0 auto; }
.prose h1 { margin-bottom: 20px; }
.prose h2 { font-size: 24px; margin: 1.4em 0 .4em; }
.prose h1 { font-size: 30px; scroll-margin-top: 110px; }
.prose h3 { font-size: 18px; margin: 1.2em 0 .3em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .3em; }
.prose a { color: var(--red); word-break: break-word; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 60px 0; }
.prose .updated { margin-top: 40px; font-style: italic; }

/* ---------- подвал ---------- */
.site-footer { background: #fff; }
.footer-call { display: none; padding: 30px 20px; text-align: center; }
.footer-logo { padding: 50px 40px 20px; }
.footer-logo img { width: 152px; margin: 0 auto; }
.footer-pdf { padding: 34px 40px; text-align: center; }
.footer-pdf .btn { width: 280px; min-height: 56px; padding: 8px 20px; line-height: 1.2; }
.footer-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  max-width: var(--container); margin: 0 auto; padding: 20px 0 50px; text-align: center;
}
.footer-cols > div { padding: 0 20px; }
.footer-cols h4 { color: var(--red); font-size: 20px; line-height: 30px; margin: 8px 0 18px; }
.footer-cols p { margin: 0 0 10px; }
.footer-cols a { text-decoration: none; }
.footer-cols a.strong { font-weight: 700; color: var(--red); text-decoration: underline; }
.footer-cols .hours { width: 257px; margin: 0 auto; }
.social { display: flex; justify-content: center; gap: 0; margin-top: 4px; }
.social a { padding: 4px; display: block; }
.social span {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  transition: transform .2s ease-out;
}
.social a:hover span { transform: scale(.85); }
.social .fb { background: #1877f2; }
.social .ig { background: radial-gradient(circle at 30% 107%, #fdf497 0, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social svg { width: 20px; height: 20px; fill: #fff; }
.footer-bottom {
  background: var(--red); color: #fff; text-align: center; padding: 20px 40px; font-size: 16px; line-height: 32px;
}
.footer-bottom a, .footer-bottom .link { color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

/* баннер cookie */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 760px; margin: 0 auto;
  background: #fff; color: var(--text); border-top: 4px solid var(--red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); padding: 18px 22px;
  display: flex; gap: 20px; align-items: center; font-size: 15px; line-height: 1.5;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner a { color: var(--red); }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-actions .btn { min-width: 120px; min-height: 46px; padding: 8px 18px; }
.btn-ghost { min-height: 46px; padding: 8px 18px; background: #fff; border: 2px solid var(--text); color: var(--text); font: 700 16px/1.2 var(--body-font); cursor: pointer; }
.btn-ghost:hover { background: var(--text); color: #fff; }
@media (max-width: 767px) { .cookie-banner { flex-direction: column; align-items: stretch; gap: 12px; } .cookie-actions > * { flex: 1; } }

/* модалка и лайтбокс */
.modal { border: 0; padding: 40px; max-width: 480px; width: calc(100% - 32px); box-shadow: 0 0 10px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(0, 0, 0, .6); }
.modal h3 { margin-bottom: 10px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #eee; font-size: 26px; cursor: pointer; }
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(11, 11, 11, .8); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100% - 140px); max-height: calc(100% - 80px); object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 54px; cursor: pointer; padding: 10px 20px; opacity: .65; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 4px; right: 8px; font-size: 44px !important; }
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-count { position: absolute; top: 16px; right: 70px; color: #ccc; font-size: 12px; }

/* ---------- анимации появления (animate.css, как в Duda: 1s, при входе в экран) ---------- */
.js [data-anim] { visibility: hidden; }
.js [data-anim].animated { visibility: visible; animation-duration: 1s; animation-fill-mode: both; }
.animated.fadeIn { animation-name: fadeIn; }
.animated.fadeInLeft { animation-name: fadeInLeft; }
.animated.fadeInRight { animation-name: fadeInRight; }
.animated.fadeInUp { animation-name: fadeInUp; }
.animated.zoomIn { animation-name: zoomIn; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } }

/* видимость по устройствам (как hide-for-* в Duda) */
@media (min-width: 768px) { .only-mobile { display: none !important; } }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .header-inner { display: flex; flex-wrap: wrap; gap: 12px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px; order: 3;
    width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; height: 3px; background: var(--text); }
  .header-call { order: 2; margin-left: auto; }
  .main-nav { display: none; order: 4; flex-basis: 100%; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding-bottom: 12px; }
  .main-nav a { font-size: 16px; padding: 12px 6px; border-top: 1px solid #eee; }
  .main-nav a span::after { display: none; }
}
@media (max-width: 1000px) {
  .card-hero, .card, .cta .card { width: auto; max-width: 633px; }
  .split, .split.wide { grid-template-columns: 1fr; gap: 36px; }
  .split-text { padding-left: 0; }
  .split-media > img, .split-media .slider { height: auto; aspect-ratio: 4 / 5; }
  .tiles, .gallery { grid-template-columns: repeat(2, 1fr); }
  .brand-group { grid-template-columns: 1fr; gap: 14px; }
  .brand-group h3 { margin-top: 0; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-cols, .footer-cols { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767px) {
  :root { --header-h: 72px; }
  h1 { font-size: 28px; }
  h2 { font-size: 25px; }
  .section { padding: 60px 16px; }
  .hero, .hero-home { padding: 80px 16px; }
  .photo-section { padding: 80px 16px; }
  .photo-bg, .hero-home .slides div { background-attachment: scroll; }
  .card, .card-hero { min-width: 0; padding: 24px 20px; }
  .cta { padding: 160px 16px 0; }
  .cta p { font-size: 20px; }
  .header-inner { padding: 6px 16px; }
  .brand img, .site-header.is-scrolled .brand img { width: 96px; }
  .header-call { width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; }
  .header-call .icon { position: static; margin: 0; width: 24px; height: 24px; }
  .header-call span { display: none; }
  .form { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .brand-grid li { height: 80px; padding: 14px; }
  .brands h2 { margin-bottom: 30px; }
  .footer-call { display: block; }
  .lightbox img { max-width: 100%; }
  .js [data-anim] { visibility: visible; }
  .js [data-anim].animated { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .js [data-anim] { visibility: visible; }
  .js [data-anim].animated { animation: none; }
}
