:root {
  --bg: #0b0b0b;
  --text: #f5f5f5;
  --muted: #a9a9a9;
  --primary: #d1001f;
  --card: #1a1a1a;
  --border: #222;
  --shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  --padding-desktop: 5%;
  --padding-mobile: 4%;

  --btn-bg: var(--primary);
  --btn-bg-hover: #b30019;
  --btn-text: #ffffff;
  --btn-border: var(--primary);
  --btn-radius: 10px;
  --btn-pad: 12px 22px;
  --btn-font: 700 0.9rem/1.1 Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  --btn-shadow: 0 0 16px rgba(209,0,31,.35);
  --btn-shadow-hover: 0 0 18px rgba(209,0,31,.5);
  --btn-focus: 0 0 0 3px rgba(209,0,31,.35);
}

html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; scroll-behavior: smooth; min-width: 0; }
body {
  margin: 0;
  font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.5s, color 0.5s;
  font-size: 16px;
}
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
img, video { max-width: 100%; height: auto; display: block; }

/* нормальные переносы по словам, без "по одной букве" */
h1,
h2,
h3,
h4,
h5,
h6,
p,
li,
a {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

header {
  position: sticky; top: 0; z-index: 50;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--padding-desktop);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--text);
  font-size: clamp(18px, 2.5vw, 24px);
}
.logo-mark {
  width: 14px; height: 14px; background: var(--primary);
  border-radius: 3px; box-shadow: 0 0 8px var(--primary);
}
nav { display: flex; gap: 20px; }
nav a {
  color: var(--text); font-weight: 600; position: relative; font-size: 1rem;
}
nav a::after {
  content: ''; position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px; background: var(--primary); transition: 0.3s;
}
nav a:hover::after { width: 100%; }

.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 140px var(--padding-desktop); overflow: hidden; color: var(--text);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.4), rgba(0,0,0,.7)),
    url("img/truba.jpg") center center / cover no-repeat;
  filter: brightness(0.9) contrast(1.1) saturate(1.05);
  z-index: 0; pointer-events: none; background-attachment: fixed;
  animation: lightPulse 14s ease-in-out infinite alternate, moveBg 60s linear infinite;
}
@keyframes lightPulse {
  0% { filter: brightness(0.9) contrast(1.1) saturate(1.05); }
  50% { filter: brightness(1.03) contrast(1.15) saturate(1.1); }
  100% { filter: brightness(0.92) contrast(1.1) saturate(1.05); }
}
@keyframes moveBg {
  0% { background-position: center center; }
  50% { background-position: center right; }
  100% { background-position: center center; }
}
.hero:hover::before { filter: brightness(1) contrast(1.15) saturate(1.1); }
.hero-text {
  position: relative; z-index: 2; max-width: 1100px; margin: 0 auto; padding: 0 2rem;
  text-shadow: 0 0 20px rgba(0,0,0,.8);
}

.hero-title {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.22;
  letter-spacing: 1.3px;
  color: #fff;
  text-shadow: 0 0 25px rgba(0,0,0,.7);
  margin: 0 auto 25px;
  max-width: 900px;
}

/* Красная линия под заголовком */
.hero-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  margin: 20px auto 0;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(209,0,31,.8);
}

/* На мобильных убираем жесткие <br> в заголовке */
@media (max-width: 768px) {
  .hero-title br {
    display: none;
  }
}

.hero h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #fff;
  margin-bottom: 25px;
  text-shadow: 0 0 25px rgba(0,0,0,.7);
}
.hero h1::after {
  content: ""; display: block; width: 90px; height: 4px; margin: 20px auto 0;
  background: var(--primary); box-shadow: 0 0 20px rgba(209,0,31,.8); border-radius: 2px;
}
.hero p {
  color: var(--muted); font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.7; margin: 30px auto 0; max-width: 650px;
}
.btns { display: flex; justify-content: center; gap: 12px; margin-top: 40px; }

.btn,
.filter-btn,
.subfilter-btn,
.toggle-list,
button {
  appearance: none;
  -webkit-appearance: none;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 2px solid var(--btn-border);
  padding: var(--btn-pad);
  border-radius: var(--btn-radius);
  font: var(--btn-font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: var(--btn-shadow);
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .02s ease, border-color .2s ease;
  text-transform: uppercase;
}
.btn:hover,
.filter-btn:hover,
.subfilter-btn:hover,
.toggle-list:hover,
button:hover {
  background: var(--btn-bg-hover);
  box-shadow: var(--btn-shadow-hover);
}
.btn:active,
.filter-btn:active,
.subfilter-btn:active,
toggle-list:active,
button:active { transform: translateY(1px); }
.btn:focus-visible,
.filter-btn:focus-visible,
.subfilter-btn:focus-visible,
.toggle-list:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--btn-focus);
}

#about {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 120px calc(var(--padding-desktop) + 1%);
}
#about::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.96)),
    url("img/truba.jpg") center/cover no-repeat;
  background-attachment: fixed;
  filter: brightness(0.55) contrast(1.2);
  z-index: 0;
  pointer-events: none;
}
#about h2, #about p { position: relative; z-index: 2; }
#about h2 {
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 40px;
}

/* можно использовать при необходимости для длинных заголовков */
.responsive-title {
  word-break: keep-all;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.25;
}

#about p {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.8;
  max-width: 850px;
  margin: 60px auto 0;
  text-align: justify;
  text-justify: inter-word;
}

#catalog {
  padding: 100px var(--padding-desktop);
  background: #0c0c0c;
  text-align: left;
}
#catalog h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 50px;
  text-align: center;
  position: relative;
}
#catalog h2::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 110px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transform: translateX(-50%);
}
.catalog-grid {
  display: grid;
  gap: 40px;
  padding-top: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.catalog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(0,0,0,.4);
  padding: 30px;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.catalog-card:hover { transform: translateY(-5px); box-shadow: 0 0 25px rgba(209,0,31,.4); }
.catalog-card h3 { font-size: 20px; color: #fff; margin: 0 0 12px; }

.clamp-card{
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
}
.clamp-card::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0; height:2em;
  background: linear-gradient(to bottom, rgba(26,26,26,0), rgba(26,26,26,1));
  pointer-events:none;
}

.catalog-card .spec-list{
  margin: 8px 0 0 1rem;
  padding-left: 0;
  list-style: disc;
  line-height: 1.45;
  font-size: 14px;
  color: var(--muted);
  columns: 1 !important;
}
.catalog-card .spec-list li{
  margin: .28rem 0;
  word-break: break-word;
  hyphens: auto;
}
.catalog-card .spec-list li::marker{ opacity: .65 }

.catalog-card .btn { margin-top: auto; }

.catalog-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.partners-section {
  background: var(--bg);
  padding: 90px var(--padding-desktop) 70px;
  border-bottom: 2px solid var(--border);
}
.partners-inner { max-width: 1100px; margin: 0 auto; }
.partners-title {
  font-size: clamp(24px, 3vw, 28px);
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 70px;
  text-align: center;
  position: relative;
}
.partners-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 50%;
  width: 110px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
  transform: translateX(-50%);
}
.partner-logos-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 70px;
  max-width: 950px;
  margin: 0 auto;
}
.logo-item {
  width: 230px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  width: 100%;
}
.logo-item img {
  max-width: 180px;
  max-height: 100px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.3s, transform 0.3s ease;
}
.logo-item img:hover {
  opacity: 1;
  transform: scale(1.05);
}
.partner-description { margin-top: 18px; }
.company-name { color: var(--text); font-weight: 700; font-size: 15px; }
.company-slogan { color: var(--muted); font-size: 13px; line-height: 1.3; }

footer {
  background: var(--bg);
  color: var(--text);
  padding: 40px var(--padding-desktop) 30px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 40px;
}
.footer-column { display: flex; flex-direction: column; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
}
.footer-logo .logo-mark {
  width: 18px;
  height: 18px;
  background: var(--primary);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(209,0,31,.4);
}
.footer-tagline { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 380px; }
.footer-links a { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: 13px; letter-spacing: .5px; transition: color .3s; }
.footer-links a:hover { color: var(--primary); }
.footer-contact p { color: var(--text); font-size: 14px; margin: 4px 0; }
.footer-contact strong { font-weight: 600; color: var(--muted); margin-right: 5px; }
.footer-contact a { color: var(--primary); font-weight: 600; text-decoration: none; }
.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  opacity: .8;
}

.modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.show{ display: flex; }
.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.modal-dialog{
  position: relative;
  z-index: 1;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 0 28px rgba(0,0,0,.6);
  width: min(900px, calc(100% - 32px));
  max-height: min(80vh, 100%);
  display: flex;
  flex-direction: column;
  outline: none;
  animation: modalIn .18s ease-out;
}
@keyframes modalIn{
  from{ transform: translateY(8px); opacity: 0; }
  to  { transform: translateY(0);   opacity: 1; }
}
.modal-head{
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h4{
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.modal-close{
  appearance: none;
  background: transparent;
  color: var(--text);
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 8px;
}
.modal-close:hover{ background: rgba(255,255,255,.06); }
.modal-body{
  padding: 16px 18px 18px;
  overflow: auto;
}

.modal .spec-list{
  margin: 0 0 0 1rem;
  padding-left: 0;
  list-style: disc;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  columns: 1 !important;
}
.modal .spec-list li{
  margin: .3rem 0;
  break-inside: avoid;
}
.modal .spec-list li::marker{ opacity: .65 }

@media (max-width: 992px) {
  .footer-inner { flex-wrap: wrap; justify-content: space-around; }
  .footer-brand-info, .footer-links, .footer-contact { flex: 1 1 40%; }
  .modal-dialog{ width: min(720px, calc(100% - 24px)); }
}
@media (max-width: 768px) {
  body { font-size: 15px; }
  .topbar { flex-direction: column; gap: 15px; padding: 15px var(--padding-mobile); }
  nav { width: 100%; justify-content: center; gap: 15px; flex-wrap: wrap; } /* меню адекватно переносится */
  .hero { padding: 100px var(--padding-mobile); }
  .hero h1 { font-size: 32px; }
  .btns { flex-direction: column; }
  #catalog { padding: 60px var(--padding-mobile); }
  .footer { padding: 40px var(--padding-mobile) 20px; }
  .footer-inner { flex-direction: column; text-align: center; gap: 30px; }
  .footer-logo { justify-content: center; }
  .hero::before, #about::before { background-attachment: scroll; animation: none; }
  .modal-dialog{ width: calc(100% - 20px); }
}
@media (max-width: 400px) {
  .catalog-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.highlight{
  color: var(--primary);
  font-weight: 800;
  font-size: 1.20em;
  letter-spacing: 0.2px;
}
#about .highlight{
  text-shadow: 0 0 10px rgba(209,0,31,.25);
}

.catalog-card .card-contacts{
  margin-top: 10px;
  display: block;
  color: var(--muted);
  font-size: 14px;

  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .25s ease;
}
.catalog-card .card-contacts.is-open{
  max-height: 200px; 
  opacity: 1;
}
.catalog-card .card-contacts .contact{
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}
.catalog-card .card-contacts .email{
  color: var(--primary);
  font-weight: 700;
}
.catalog-card .card-contacts .phone{
  color: var(--text);
  font-weight: 600;
  opacity: .9;
}
.catalog-card .card-contacts .contact:hover{
  text-decoration: underline;
  text-underline-offset: 2px;
}
.catalog-card .card-contacts .sep{
  margin: 0 4px;
  opacity: .4;
  user-select: none;
}

.catalog-card .more-btn{
  margin-top: 8px !important;     
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: .9rem;
  box-shadow: var(--btn-shadow);
}

@media (max-width: 480px){
  .catalog-card .card-contacts{ font-size: 13px; }
  .catalog-card .more-btn{ font-size: .85rem; padding: 9px 14px; }
}

/* Мобильная оптимизация каталога: одна колонка на телефонах, многоколонка на ПК */
@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .catalog-card {
    padding: 20px 18px;
  }

  .catalog-card h3 {
    font-size: 18px;
    line-height: 1.3;
  }

  .clamp-card {
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 6;
  }
}

@media (max-width: 480px) {
  .catalog-grid {
    gap: 20px;
  }

  .catalog-card {
    padding: 18px 14px;
  }

  .catalog-card h3 {
    font-size: 16px;
  }

  .catalog-card .spec-list {
    font-size: 13px;
  }
}

/* ЛОГОТИПЫ ПАРТНЁРОВ — чуть крупнее и адаптивные */
.partner-logos-list { gap: 70px; }
.logo-item { width: 230px; }              
.logo-item a { height: 120px; }            
.logo-item img {
  max-width: 180px;                       
  max-height: 100px;                       
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.logo-item img:hover { transform: scale(1.08); opacity: 1; }

@media (max-width: 900px){
  .partner-logos-list { gap: 60px; }
  .logo-item { width: 240px; }
  .logo-item a { height: 140px; }
  .logo-item img { max-width: 200px; max-height: 110px; }
}
@media (max-width: 600px){
  .partner-logos-list { gap: 40px; }
  .logo-item { width: 200px; }
  .logo-item a { height: 120px; }
  .logo-item img { max-width: 170px; max-height: 95px; }
}
