@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=IBM+Plex+Mono:wght@300;400;500;600&display=swap');
/* ═══════════════════════════════════════════════════
   ПОЖТЕХНИКА · Industrial Engineering · v3.0
   Prometei 2026
   ═══════════════════════════════════════════════════ */
:root {
  --red:        #E31E24;
  --red-dark:   #B01419;
  --red-muted:  #8A1015;
  --black:      #1E1E1E;
  --graphite:   #757575;
  --silver:     #E6E6E6;
  --white:      #FFFFFF;
  --bg-soft:    #F5F5F5;
  --grid-line:  rgba(227,30,36,0.07);
  --cad-stroke: rgba(117,117,117,0.25);
  --font-d:     'Bebas Neue', sans-serif;
  --font-m:     'IBM Plex Mono', monospace;
  --ease:       cubic-bezier(0.16,1,0.3,1);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-m);
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── MIN-FONT 13px BASELINE ───────────────────────── */
small, .filter-item label, .catalog-count, .product-sku,
.svc-link, .footer-col a, .footer-contact-item,
.footer-bottom span, .cert-sub, .cert-meta-item,
.process-step-title, .step-t, .nav-links a,
.contact-item, .header-email a, .captcha-error { font-size: 13px; }

.tech-label {
  font-family: var(--font-m); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--red); display: block; margin-bottom: 12px;
}

/* ── CONTAINER ────────────────────────────────────── */
.container { max-width: 1320px; margin: 0 auto; padding: 0 40px; }

/* ── CAD GRID OVERLAY ─────────────────────────────── */
.cad-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── BUTTONS ──────────────────────────────────────── */
.btn-primary, .btn-outline, .btn-ghost {
  display: inline-block; padding: 14px 32px;
  font-family: var(--font-m); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.12em;
  cursor: pointer; transition: all 0.15s var(--ease);
  border: 2px solid transparent;
}
.btn-primary { background: var(--red); color: white; border-color: var(--red); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-ghost { background: transparent; color: var(--black); border-color: var(--black); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

/* ── SECTION HEADERS ──────────────────────────────── */
.section-header { margin-bottom: 48px; }
.section-title {
  font-family: var(--font-d);
  font-size: clamp(32px, 4vw, 52px);
  color: var(--black); line-height: 1;
}
.section-title.white { color: var(--white); }

/* ════════════════════════════════════════════════════
   HEADER (white logo bar)
   ════════════════════════════════════════════════════ */
.site-header { position: sticky; top: 0; z-index: 1000; }

.header-top {
  background: var(--black); border-bottom: 1px solid rgba(227,30,36,0.3);
  padding: 8px 0;
}
.header-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.header-contacts {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.contact-item { color: #aaa; letter-spacing: 0.05em; }
.contact-item a { color: #ccc; transition: color 0.15s; }
.contact-item a:hover { color: var(--red); }
.contact-divider { color: #444; }
.header-email a { color: var(--red); letter-spacing: 0.08em; }

/* MAIN NAV — WHITE BACKGROUND */
.main-nav {
  background: var(--white);
  border-bottom: 2px solid var(--red);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 76px; }

.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 50px; width: auto; display: block; object-fit: contain; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  font-family: var(--font-m); text-transform: uppercase;
  letter-spacing: 0.12em; color: #555;
  padding: 8px 12px; transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); }

.burger {
  display: none; background: none; border: 1px solid #ddd;
  color: var(--black); padding: 8px 12px; font-size: 18px;
  cursor: pointer; margin-left: auto;
}

.mobile-menu {
  display: none; position: fixed; top: 0; right: 0;
  width: 280px; height: 100vh; background: var(--black);
  border-left: 2px solid var(--red); z-index: 2000;
  padding: 80px 32px 32px;
  transform: translateX(100%);
  transition: transform 0.3s var(--ease);
}
.mobile-menu.open { transform: translateX(0); display: block; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 16px; }
.mobile-menu a {
  font-family: var(--font-m); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #ccc; padding: 8px 0; border-bottom: 1px solid #333;
}
.mobile-menu a:hover { color: var(--red); }

/* ════════════════════════════════════════════════════
   HERO CAROUSEL — 60vh compact
   ════════════════════════════════════════════════════ */
.hero-carousel {
  position: relative; overflow: hidden;
  height: 60vh; min-height: 520px; max-height: 680px;
}
.carousel-track { display: flex; width: 200%; height: 100%; transition: transform 0.7s var(--ease); }
.carousel-slide {
  flex: 0 0 50%; height: 100%;
  background: var(--black); position: relative;
  display: flex; align-items: center; overflow: hidden;
}
.slide-corner {
  position: absolute; width: 20px; height: 20px; z-index: 2;
  border-color: var(--cad-stroke); border-style: solid;
}
.slide-corner.tl { top: 24px; left: 24px; border-width: 1px 0 0 1px; }
.slide-corner.tr { top: 24px; right: 24px; border-width: 1px 1px 0 0; }
.slide-corner.bl { bottom: 24px; left: 24px; border-width: 0 0 1px 1px; }
.slide-corner.br { bottom: 24px; right: 24px; border-width: 0 1px 1px 0; }

.slide-content {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 60px; width: 100%;
}
.slide-text { flex: 1; max-width: 580px; min-height: 570px;}

/* slide title — 60px max */
.slide-title {
  font-family: var(--font-d);
  font-size: clamp(36px, 4.2vw, 60px);
  color: var(--white); line-height: 1.05;
  margin-bottom: 20px; letter-spacing: 0.02em;
}
.slide-title .red { color: var(--red); }
.slide-desc { font-size: 15px; color: #aaa; line-height: 1.75; margin-bottom: 28px; max-width: 480px; }

.slide-stats { display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.stat-num { font-family: var(--font-d); font-size: 36px; color: var(--red); line-height: 1; }
.stat-label { font-size: 13px; color: var(--graphite); text-transform: uppercase; letter-spacing: 0.1em; }
.stat-div { width: 1px; height: 40px; background: #333; }

.slide-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.slide-visual-photo {
  flex-shrink: 0; width: 50%; position: relative;
  height: 100%; overflow: hidden;
}
.slide-visual-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.slide-visual-photo::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    rgba(30,30,30,1) 0%,
    rgba(30,30,30,0.7) 20%,
    transparent 72%);
  pointer-events: none;
}

/* service steps */
.service-steps { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.step { text-align: center; }
.step-n {
  font-family: var(--font-d); font-size: 22px; color: var(--red);
  width: 40px; height: 40px; border: 2px solid var(--red);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 4px;
}
.step-arrow { color: var(--red); font-size: 16px; margin-bottom: 14px; }

/* carousel controls */
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(30,30,30,0.8); border: 2px solid rgba(255,255,255,0.2);
  color: white; width: 52px; height: 52px; font-size: 20px;
  cursor: pointer; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.carousel-btn:hover { border-color: var(--red); background: rgba(227,30,36,0.2); }
.carousel-prev { left: 24px; }
.carousel-next { right: 24px; }

.carousel-dots {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%); display: flex; gap: 8px; z-index: 10;
}
.dot {
  width: 32px; height: 3px; background: rgba(255,255,255,0.3);
  border: none; cursor: pointer; padding: 0;
  transition: background 0.2s;
}
.dot.active { background: var(--red); }

/* ════════════════════════════════════════════════════
   CATEGORIES (homepage)
   ════════════════════════════════════════════════════ */
.section-categories { padding: 80px 0; background: var(--bg-soft); }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.cat-tile {
  background: var(--white); border: 1px solid var(--silver);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.cat-tile:hover {
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
  transform: translate(-2px,-2px);
}
.cat-tile-img {
  height: 160px; overflow: hidden; background: var(--bg-white);border: 1px solid var(--silver);
  display: flex; align-items: center; justify-content: center;
}
.cat-tile-img img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; transition: transform 0.4s var(--ease);
}
.cat-tile:hover .cat-tile-img img { transform: scale(1.05); }
.cat-tile-title { font-family: var(--font-d); font-size: 22px; line-height: 1.05; }
.cat-tile-desc { font-size: 13px; color: var(--graphite); line-height: 1.6; }
.cat-tile-link {
  font-family: var(--font-m); font-size: 13px; color: var(--red);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-top: auto; padding-top: 8px;
}

/* ════════════════════════════════════════════════════
   TOP PRODUCTS (homepage)
   ════════════════════════════════════════════════════ */
.section-top-products { padding: 80px 0; }

.products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
}
.product-card {
  background: var(--white); border: 1px solid var(--silver);
  position: relative; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.product-card:hover {
  border-color: var(--red);
  box-shadow: 4px 4px 0 var(--red);
  transform: translate(-2px,-2px);
}
.product-sku {
  position: absolute; top: 12px; left: 12px;
  color: var(--graphite); letter-spacing: 0.12em; text-transform: uppercase;
}
.product-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--red); color: white; font-size: 11px;
  padding: 3px 8px; letter-spacing: 0.1em; z-index: 2;
}
.product-img {
  height: 280px; overflow: hidden; background: var(--bg-white);
  border-bottom: 1px solid var(--silver);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.product-img img {
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  object-fit: contain; transition: transform 0.4s var(--ease);
}
.product-card:hover .product-img img { transform: scale(1.05); }
.product-body { padding: 24px; }
.product-name { font-family: var(--font-d); font-size: 22px; margin-bottom: 12px; line-height: 1.1; }
.product-specs { margin-bottom: 18px; }
.product-spec {
  font-size: 13px; color: var(--graphite);
  padding: 5px 0; border-bottom: 1px dashed #eee;
  display: flex; justify-content: space-between;
}
.product-spec span:last-child { color: var(--black); font-weight: 500; }
.product-actions { display: flex; gap: 8px; }
.product-actions .btn-primary,
.product-actions .btn-ghost {
  padding: 11px 18px; font-size: 12px;
}
.product-actions .btn-primary { flex: 1; text-align: center; }

/* ════════════════════════════════════════════════════
   "PEREZARYADKA: 6 OPERATIONS" (replaces WHY US)
   ════════════════════════════════════════════════════ */
.section-recharge6 {
  background: var(--black); padding: 80px 0;
  position: relative; overflow: hidden;
}
.recharge6-header { margin-bottom: 48px; max-width: 1100px; }
.recharge6-title {
  color: white; line-height: 1; margin-bottom: 20px; font-family: var(--font-d);
    font-size: clamp(32px, 4vw, 52px);
}
.recharge6-desc { color: #aaa; max-width: 900px; line-height: 1.75; }

.recharge6-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  border: 1px solid #2a2a2a;
}
.r6-step {
  padding: 32px 24px; border-right: 1px solid #2a2a2a;
  transition: background 0.15s;
}
.r6-step:last-child { border-right: none; }
.r6-step:hover { background: #161616; }
.r6-num {
  font-family: var(--font-d); font-size: 36px;
  color: var(--red); line-height: 1; margin-bottom: 8px;
}
.r6-title {
    font-size: 24px;
    line-height: normal;
  color: white; margin-bottom: 12px;
}
.r6-text { font-size: 14px; color: #888; line-height: 1.6; }

@media (max-width: 1100px) {
  .recharge6-grid { grid-template-columns: repeat(3, 1fr); }
  .r6-step:nth-child(3) { border-right: none; }
  .r6-step:nth-child(1),.r6-step:nth-child(2),.r6-step:nth-child(3) { border-bottom: 1px solid #2a2a2a; }
}
@media (max-width: 640px) {
  .recharge6-grid { grid-template-columns: 1fr; }
  .r6-step { border-right: none; border-bottom: 1px solid #2a2a2a; }
  .r6-step:last-child { border-bottom: none; }
}

/* ════════════════════════════════════════════════════
   CERTIFICATES PREVIEW
   ════════════════════════════════════════════════════ */
.section-certs { padding: 80px 0; background: var(--bg-soft); }
.certs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 36px;
}
.cert-card {
  background: white; border: 1px solid #ddd; cursor: zoom-in;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cert-card:hover { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.cert-photo {
  height: 240px; overflow: hidden; background: #f4f4f4;
  display: flex; align-items: center; justify-content: center; padding: 8px;
  border-bottom: 1px solid #ddd;
}
.cert-photo img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.cert-card:hover .cert-photo img { transform: scale(1.04); }
.cert-placeholder { padding: 20px; }
.cert-title { font-family: var(--font-d); font-size: 18px; margin-bottom: 6px; }
.cert-sub { color: var(--graphite); letter-spacing: 0.05em; }
.certs-more { text-align: center; }

/* ════════════════════════════════════════════════════
   CONTACTS
   ════════════════════════════════════════════════════ */
.section-contacts {
  background: var(--black); padding: 80px 0;
  position: relative; overflow: hidden;
}
.contacts-grid { display: flex; gap: 0; align-items: stretch; }
.contact-card { flex: 1; padding: 36px; border: 1px solid #2a2a2a; }
.contact-city { font-family: var(--font-d); font-size: 26px; color: white; margin-bottom: 24px; }
.contact-city.red { color: var(--red); }
.contact-row {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: #aaa; margin-bottom: 12px;
}
.contact-row a { color: #ccc; transition: color 0.15s; }
.contact-row a:hover { color: var(--red); }
.ci { font-size: 16px; flex-shrink: 0; }

.contact-divider-v {
  display: flex; flex-direction: column; align-items: center; padding: 36px 24px;
}
.contact-divider-line { flex: 1; width: 1px; background: #2a2a2a; }
.contact-divider-dot { color: var(--red); font-size: 12px; margin: 12px 0; }

/* ════════════════════════════════════════════════════
   FOOTER (with callback form)
   ════════════════════════════════════════════════════ */
.site-footer { background: #111; border-top: 2px solid var(--red); }
.footer-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  padding: 64px 0 48px;
}
.footer-left {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
}
.footer-about { color: #666; line-height: 1.7; max-width: 240px; margin-top: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col-title {
  font-family: var(--font-m); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--red); margin-bottom: 4px;
}
.footer-col a { color: #777; transition: color 0.15s; }
.footer-col a:hover { color: white; }
.footer-contact-item { color: #777; }
.footer-contact-item a { color: #888; transition: color 0.15s; }
.footer-contact-item a:hover { color: white; }

.footer-form-col { border-left: 1px solid #222; padding-left: 48px; }
.footer-form-title {
  font-family: var(--font-m); font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.18em; color: var(--red); margin-bottom: 20px;
}

.callback-form { display: flex; flex-direction: column; gap: 12px; }
.callback-form input,
.callback-form textarea {
  background: transparent; border: 1px solid #333; color: white;
  padding: 14px 16px; font-family: var(--font-m); font-size: 14px;
  letter-spacing: 0.05em; outline: none;
  transition: border-color 0.15s; width: 100%;
}
.callback-form input:focus, .callback-form textarea:focus { border-color: var(--red); }
.callback-form input::placeholder, .callback-form textarea::placeholder {
  color: #555; font-size: 13px;
}
.callback-form textarea { resize: vertical; min-height: 90px; }
.callback-form button[type=submit] {
  background: var(--red); border: 2px solid var(--red); color: white;
  padding: 14px 28px; font-family: var(--font-m); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.12em;
  cursor: pointer; transition: background 0.15s; width: 100%;
}
.callback-form button[type=submit]:hover { background: var(--red-dark); }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question {
  font-size: 14px; color: #aaa;
  white-space: nowrap; min-width: 110px;
}
.captcha-input { width: 80px !important; flex-shrink: 0; }
.captcha-error { color: #ff5555; display: none; margin-top: -4px; }
.form-success {
  display: none; text-align: center; padding: 28px;
  border: 1px solid #2a2a2a;
}
.form-success svg { margin: 0 auto 14px; display: block; }
.form-success h3 { font-family: var(--font-d); font-size: 24px; color: white; margin-bottom: 6px; }
.form-success p { color: #888; font-size: 13px; }

.footer-bottom { border-top: 1px solid #1e1e1e; padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-bottom span { color: #444; letter-spacing: 0.05em; }

/* ════════════════════════════════════════════════════
   PAGE BANNER
   ════════════════════════════════════════════════════ */
.page-banner {
  background: var(--black); padding: 70px 0 56px;
  position: relative; overflow: hidden;
  border-bottom: 2px solid var(--red);
}
.page-banner .cad-grid { opacity: 0.5; }
.page-banner-inner { position: relative; z-index: 2; }
.page-banner h1 {
  font-family: var(--font-d);
  font-size: clamp(36px, 5vw, 60px);
  color: white; line-height: 1;
}
.page-banner p {
  font-size: 15px; color: #888;
  max-width: 640px; margin-top: 14px; line-height: 1.7;
}

/* ════════════════════════════════════════════════════
   CATALOG PAGE
   ════════════════════════════════════════════════════ */
.catalog-cats {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px;
  padding: 40px 0;
}
.catalog-cat-card {
  background: white; border: 1px solid var(--silver);
  padding: 20px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.catalog-cat-card:hover {
  border-color: var(--red); box-shadow: 4px 4px 0 var(--red);
  transform: translate(-2px,-2px);
}
.catalog-cat-card img {
  height: 120px; width: auto; max-width: 100%;
  object-fit: contain; margin: 0 auto 12px;
}
.catalog-cat-card h3 { font-family: var(--font-d); font-size: 18px; margin-bottom: 6px; }
.catalog-cat-card p { font-size: 13px; color: var(--graphite); }

.catalog-section { margin-bottom: 60px; }
.catalog-section-title {
  font-family: var(--font-d); font-size: 28px;
  padding-bottom: 12px; border-bottom: 2px solid var(--red);
  margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.catalog-section-title span {
  font-family: var(--font-m); font-size: 13px; color: var(--graphite);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.catalog-filter {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 32px; padding-bottom: 24px;
  border-bottom: 1px solid var(--silver);
}
.filter-pill {
  font-family: var(--font-m); font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 8px 18px; border: 1px solid var(--silver);
  cursor: pointer; transition: all 0.15s;
  background: white; color: var(--black);
}
.filter-pill.active, .filter-pill:hover {
  background: var(--black); color: white; border-color: var(--black);
}

/* ──── PLACEHOLDER IMAGE (no real photo yet) ──── */
.product-img--placeholder {
  position: relative;
  background:
    repeating-linear-gradient(45deg, #f5f5f5 0 12px, #ececec 12px 24px);
  color: var(--graphite);
}
.product-img--placeholder::before {
  content: "";
  position: absolute; inset: 24px;
  border: 2px dashed #c9c9c9;
}
.product-img--placeholder::after {
  content: attr(data-placeholder);
  position: relative; z-index: 1;
  font-family: var(--font-m), monospace;
  font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center; padding: 0 16px;
  color: var(--graphite);
}

/* ──── COLLAPSIBLE OVERFLOW ROWS (real accordion) ──── */
/*
 * JS splits each .products-grid that has more than `columns` cards:
 *   the first row stays in the original grid,
 *   the rest are moved into <div class="products-collapse"><div class="products-grid">…overflow…</div><button class="products-collapse-toggle">…</button></div>.
 * Collapsed: shows ~25% of one product row, plus a gradient fade and the toggle button.
 * Expanded (.is-open): grows to natural height, fade hidden, button label flips.
 */
.products-collapse {
  position: relative;
  /* Peek = 25% of one card row. JS sets --row-h to measured row height. */
  --row-h: 480px;
  --peek: calc(var(--row-h) * 0.25);
  max-height: var(--peek);
  overflow: hidden;
  transition: max-height 0.45s var(--ease);
}
.products-collapse > .products-grid {
  /* Inner grid mirrors the outer products-grid layout */
  margin-top: 2px; /* match the 2px gap used by the main grid */
}
/* Gradient fade over the peeked strip */
.products-collapse::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.55) 35%,
    rgba(255,255,255,0.95) 75%,
    #ffffff 100%
  );
  transition: opacity 0.35s var(--ease);
  opacity: 1;
}
.products-collapse.is-open {
  max-height: var(--full-h, 5000px);
}
.products-collapse.is-open::after { opacity: 0; }

/* Toggle button — visible only while collapsed; sits over the fade */
.products-collapse-toggle {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--black);
  color: #fff;
  border: none;
  font-family: var(--font-m); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s var(--ease), box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.products-collapse-toggle:hover,
.products-collapse-toggle:focus-visible {
  background: var(--red);
  outline: none;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 6px 18px rgba(199,29,35,0.32);
}
.products-collapse-toggle .chev {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.products-collapse.is-open .products-collapse-toggle {
  position: static;
  transform: none;
  margin: 18px auto 0;
  display: flex;
  width: max-content;
}
.products-collapse.is-open .products-collapse-toggle:hover,
.products-collapse.is-open .products-collapse-toggle:focus-visible {
  transform: translateY(-2px);
}
.products-collapse.is-open .products-collapse-toggle .chev {
  transform: rotate(180deg);
}

/* DESKTOP HOVER: expand the whole section when the user hovers the section.
   The button still works as a keyboard/click toggle. */
@media (hover: hover) and (pointer: fine) {
  .catalog-section:hover .products-collapse {
    max-height: var(--full-h, 5000px);
  }
  .catalog-section:hover .products-collapse::after { opacity: 0; }
  .catalog-section:hover .products-collapse .products-collapse-toggle {
    /* When section is hovered, hide the floating button so it doesn't cover content;
       but keep it focusable via keyboard via :focus-within override below. */
    opacity: 0;
    pointer-events: none;
  }
  .catalog-section:focus-within .products-collapse .products-collapse-toggle {
    opacity: 1; pointer-events: auto;
  }
}

/* Reduced-motion: drop the height transition */
@media (prefers-reduced-motion: reduce) {
  .products-collapse,
  .products-collapse::after,
  .products-collapse-toggle,
  .products-collapse-toggle .chev { transition: none; }
}


/* ──── DOWNLOAD CTA ──── */
.catalog-download {
  display: flex; align-items: center; gap: 28px;
  margin: 60px 0 80px;
  padding: 32px 40px;
  background: var(--black); color: white;
  border-left: 6px solid var(--red);
  position: relative; overflow: hidden;
}
.catalog-download::before {
  content: ""; position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(255,255,255,0.025) 24px 25px);
  pointer-events: none;
}
.catalog-download-icon { color: var(--red); flex-shrink: 0; }
.catalog-download-body { flex: 1; min-width: 0; }
.catalog-download-label {
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.18em;
  color: var(--red); margin-bottom: 6px; text-transform: uppercase;
}
.catalog-download-body h3 {
  font-family: var(--font-d); font-size: 26px;
  margin: 0 0 6px; color: white; line-height: 1.15;
}
.catalog-download-body p {
  font-size: 14px; color: #bdbdbd; line-height: 1.5; margin: 0;
}
.catalog-download-btn {
  flex-shrink: 0; padding: 16px 28px !important;
  font-size: 13px !important; letter-spacing: 0.12em;
}
@media (max-width: 900px) {
  .catalog-download { flex-direction: column; align-items: flex-start; padding: 24px; gap: 18px; }
  .catalog-download-btn { width: 100%; text-align: center; }
}

/* ════════════════════════════════════════════════════
   SERVICES PAGE
   ════════════════════════════════════════════════════ */
.services-hero-block {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 60px;
}
.service-main-card {
  background: var(--black); padding: 56px 48px;
  position: relative; overflow: hidden;
}
.service-main-card .cad-grid { opacity: 0.4; }
.service-main-card-inner { position: relative; z-index: 2; }
.service-main-title {
  font-family: var(--font-d);
  font-size: clamp(30px, 4vw, 42px);
  color: white; margin-bottom: 18px; line-height: 1;
}
.service-main-desc { color: #888; line-height: 1.8; margin-bottom: 28px; }

.svc-hero-photo { height: 100%; min-height: 320px; overflow: hidden; position: relative; }
.svc-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.svc-hero-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30,30,30,0.85) 15%, transparent 40%);
  display: flex; align-items: flex-end; padding: 28px 32px;
}

.services-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
}
.service-list-card {
  border: 1px solid var(--silver); padding: 32px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.service-list-card:hover { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.svc-list-photo {
  height: 200px; overflow: hidden; margin: -32px -32px 24px;
  position: relative;
}
.svc-list-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.service-list-card:hover .svc-list-photo img { transform: scale(1.05); }
.svc-list-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(255,255,255,0.55), transparent 55%);
}
.service-list-title { font-family: var(--font-d); font-size: 24px; margin-bottom: 12px; }
.service-list-desc { color: var(--graphite); line-height: 1.7; }
.service-list-items { margin-top: 14px; }
.service-list-items li {
  font-size: 14px; color: var(--graphite);
  padding: 4px 0; border-bottom: 1px dashed var(--silver);
  display: flex; gap: 8px;
}
.service-list-items li::before { content: '—'; color: var(--red); flex-shrink: 0; }

.process-section { background: var(--bg-soft); padding: 70px 0; }
.process-steps { display: grid; grid-template-columns: repeat(11, 1fr); align-items: center; }
.process-step { text-align: center; padding: 16px 8px; grid-column: span 1; }
.process-step-n { font-family: var(--font-d); font-size: 36px; color: var(--red); margin-bottom: 4px; }
.process-arrow { font-size: 18px; color: var(--red); text-align: center; grid-column: span 1; }
@media (max-width: 900px) { .process-steps { grid-template-columns: repeat(2, 1fr); } .process-arrow { display: none; } }

.callback-section {
  background: var(--black); padding: 80px 0;
  position: relative; overflow: hidden;
}
.callback-section .cad-grid { opacity: 0.3; }
.callback-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}

/* ════════════════════════════════════════════════════
   CERTIFICATES PAGE
   ════════════════════════════════════════════════════ */
.section-certs-page { padding: 70px 0; }
.certs-full-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.cert-full-card {
  background: white; border: 1px solid var(--silver); cursor: zoom-in;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cert-full-card:hover { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.cert-full-img {
  height: 380px; overflow: hidden; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  padding: 12px; border-bottom: 1px solid #ddd;
}
.cert-full-img img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.cert-full-card:hover .cert-full-img img { transform: scale(1.04); }
.cert-full-body { padding: 24px; }
.cert-full-title { font-family: var(--font-d); font-size: 22px; margin-bottom: 12px; }
.cert-full-meta { font-size: 14px; color: var(--graphite); margin-top: 6px; }
.cert-full-meta strong { color: var(--black); }

.certs-note {
  background: var(--bg-soft); border-left: 4px solid var(--red);
  padding: 22px 28px; margin-top: 36px;
}
.certs-note p { font-size: 14px; color: var(--graphite); line-height: 1.7; }

/* ════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 60px 40px; opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open { display: flex; opacity: 1; }
.lightbox-content {
  position: relative; max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.lightbox-img {
  max-width: 100%; max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}
.lightbox.open .lightbox-img { transform: scale(1); }
.lightbox-caption {
  font-family: var(--font-m); font-size: 14px; color: #ddd;
  text-align: center; letter-spacing: 0.05em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); max-width: 700px;
}
.lightbox-close {
  position: absolute; top: 20px; left: 20px;
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.3);
  color: white; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  z-index: 10;
}
.lightbox-close:hover {
  background: var(--red); border-color: var(--red); transform: rotate(90deg);
}

/* ════════════════════════════════════════════════════
   REVEAL ANIMATION
   ════════════════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-form-col { border-left: none; padding-left: 0; border-top: 1px solid #222; padding-top: 32px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-cats { grid-template-columns: repeat(2, 1fr); }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .slide-visual-photo { display: none; }
  .slide-content { justify-content: flex-start; }
  .footer-left { grid-template-columns: 1fr 1fr; }
  .callback-inner { grid-template-columns: 1fr; }
  .services-hero-block { grid-template-columns: 1fr; }
  .services-list { grid-template-columns: 1fr; }
  .contacts-grid { flex-direction: column; }
  .contact-divider-v { flex-direction: row; padding: 16px 40px; }
  .contact-divider-line { flex: 1; height: 1px; width: auto; }
  .certs-full-grid { grid-template-columns: 1fr; }
  .hero-carousel { height: auto; min-height: 540px; }
}
@media (max-width: 640px) {
  .header-contacts { gap: inherit; }
  .nav-links { display: none; }
  .burger { display: block; }
  .site-header .btn-primary { display: none; }
  .footer-left { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .catalog-cats { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .footer-bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
  .lightbox { padding: 20px 12px; }
  .lightbox-close { top: 12px; left: 12px; width: 40px; height: 40px; font-size: 18px; }
  .slide-content { padding: 20px 20px  !important;}
}
