/* =========================================================
   TRIGA – main.css (UPDATED, jitter-free header)
   MERGED WITH equipment.css (BASE + BUTTONS + EQUIPMENT PAGE)
   ========================================================= */

/* Optional: reduce layout shift when scrollbars appear/disappear */
html { scrollbar-gutter: stable; }

/* =========================
   BASE (global) — from equipment.css
   ========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-secondary);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* =========================
   BUTTONS (global) — from equipment.css
   ========================= */
   
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 20px;
  border-radius:4px;
  font-size:14px;
  font-weight:600;
  border:1px solid transparent; /* важно! */
  cursor:pointer;
  white-space:nowrap;
  line-height:1;

  /* из main.css: только transition (оставляем) */
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-primary{
  background-color: var(--color-accent);
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(255, 122, 0, 0.35);
}

.btn-primary:hover {
  background-color: #e46e00;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 122, 0, 0.45);
}

.btn-outline{
  background-color: transparent;
  color: var(--color-primary);
  border-color: rgba(10, 31, 68, 0.35); /* вот обводка */
  box-shadow: none;
}

.btn-outline:hover{
  background-color: rgba(10, 31, 68, 0.04);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* =========================
   HEADER (расширенные стили)
   ========================= */

/* базовые переменные для хедера (под твои размеры) */
:root {
  --color-primary: #0A1F44;
  --color-secondary: #2E3A45;
  --color-bg: #F5F7FA;
  --color-accent: #FF7A00;
  --color-dark: #1C252C;
  --color-white: #FFFFFF;

  --color-status-available: #1B9C5E;
  --color-status-unavailable: #A0A7B5;
  --color-status-hot: #D83A24;
  --color-status-sold: #7A1F3B;

  /* header vars (твои) */
  --header-pad-y: 14px;
  --header-logo-h: 100px;
  --header-logo-scale-desktop: 0.38;
}

/* ШАПКА: не анимируем padding/height, только визуальные эффекты */
.site-header {
  transition: background-color 0.2s ease, box-shadow 0.2s ease, backdrop-filter 0.2s ease;
  will-change: box-shadow, backdrop-filter;
}

/* ВАЖНО: padding ВСЕГДА одинаковый, чтобы не было дерганья sticky */
.header-inner {
  /* базовые свойства уже заданы в критическом CSS */
  padding: var(--header-pad-y) 0;
  transition: transform 0.2s ease;
  will-change: transform;
  transform: translateZ(0);
}

.logo img {
  height: var(--header-logo-h); /* ВСЕГДА одинаковый */
  transition: transform 0.2s ease;
  transform-origin: left center;
  will-change: transform;
}

/* уменьшенный хедер при скролле — ТОЛЬКО transform (без padding/height) */
.site-header.header-small {
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
  backdrop-filter: blur(10px);
}

.site-header.header-small .header-inner {
  transform: translateY(-4px);
}

.site-header.header-small .logo img {
  transform: scale(var(--header-logo-scale-desktop));
}

/* справа: меню + кнопка + бургер */
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
}

.main-nav a {
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  font-size: 13px;
  opacity: 0.9;
}

.lang-switch span {
  cursor: pointer;
}

.lang-switch span.active {
  font-weight: 600;
  opacity: 1;
}

/* (из main.css) — оставляем ховер, но без конфликтов с кнопками */
.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* BURGER */
.burger {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  cursor: pointer;
  z-index: 1201;
}

.burger span {
  width: 26px;
  height: 3px;
  background: var(--color-white);
  display: block;
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Overlay (если добавишь в HTML: <div class="nav-overlay" id="nav-overlay" hidden></div>) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1199;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.nav-overlay.is-open {
  opacity: 1;
}

/* Sentinel (если добавишь: <div id="header-sentinel"></div> после header) */
#header-sentinel {
  height: 1px;
}

/* =========================
   HERO — дополнительные элементы
   ========================= */

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

.hero-note {
  font-size: 13px;
  opacity: 0.8;
}

.hero-image {
  width: 100%;
  min-height: 220px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* =========================
   SECTION GENERIC
   ========================= */

.section {
  padding: 56px 0;
}

.section--light {
  background-color: var(--color-bg);
}

.section--white {
  background-color: var(--color-white);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.section-header {
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--color-secondary);
  max-width: 520px;
}

.section--dark .section-title {
  color: var(--color-white);
}

.section--dark .section-subtitle {
  color: rgba(255, 255, 255, 0.78);
}

/* =========================
   BENEFITS
   ========================= */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.benefit-card {
  background-color: var(--color-white);
  border-radius: 8px;
  padding: 18px 16px;
  box-shadow: 0 8px 18px rgba(10, 31, 68, 0.06);
}

.benefit-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-primary);
}

.benefit-text {
  font-size: 13px;
  color: var(--color-secondary);
}

/* =========================
   ABOUT
   ========================= */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 36px;
  align-items: flex-start;
}

.about-text p + p {
  margin-top: 10px;
}

.about-highlight {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--color-accent);
  background-color: #EEF1F6;
  font-size: 13px;
}

.about-aside {
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.08);
  font-size: 13px;
}

.about-aside h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.about-aside ul {
  list-style: none;
  padding-left: 0;
}

.about-aside li::before {
  content: "•";
  color: var(--color-accent);
  margin-right: 6px;
}

/* =========================
   EQUIPMENT CATEGORIES
   ========================= */
/* SEO text under equipment categories */
.categories-seo-text {
  margin-top: 28px;
  /*max-width: 760px;*/
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-secondary);
}

.categories-seo-text p + p {
  margin-top: 12px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.category-card {
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 16px 16px 18px;
  box-shadow: 0 10px 22px rgba(10, 31, 68, 0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(10, 31, 68, 0.10);
}

.category-link:focus-visible {
  outline: 3px solid rgba(255, 122, 0, 0.45);
  outline-offset: 2px;
  border-radius: 6px;
}

.category-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.category-text {
  font-size: 13px;
  color: var(--color-secondary);
  flex: 1;
}

.category-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent);
  margin-top: 4px;
}

/* =========================
   SERVICES
   ========================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  background-color: var(--color-white);
  border-radius: 10px;
  padding: 18px 16px;
  box-shadow: 0 10px 22px rgba(10, 31, 68, 0.07);
}

.service-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 6px;
}

.service-text {
  font-size: 13px;
  color: var(--color-secondary);
}

/* =========================
   PROJECTS
   ========================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  background-color: #1F2932;
  border-radius: 10px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.project-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.project-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
}

/* =========================
   FOOTER
   ========================= */

.site-footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.84);
  padding: 32px 0 18px;
  font-size: 13px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-white);
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li + li {
  margin-top: 4px;
}

.footer-links a {
  opacity: 0.84;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  opacity: 0.8;
}

/* =========================
   EQUIPMENT PAGE STYLES — from equipment.css
   ========================= */

/* HERO (equipment page) */
.hero {
  background: linear-gradient(135deg, var(--color-primary), var(--color-dark));
  color: var(--color-white);
  padding: 64px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}

.hero-title {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 16px;
  max-width: 560px;
  opacity: 0.9;
  margin-bottom: 18px;
}

/* FILTER BAR */
.filters-wrapper {
  background-color: #FFFFFF;
  border-bottom: 1px solid rgba(10,31,68,0.08);
  padding: 14px 0;
}

.filters-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(46,58,69,0.9);
  margin-bottom: 4px;
}

.filter-btn {
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(10,31,68,0.18);
  background-color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.filter-btn.active {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.filters-note {
  font-size: 12px;
  opacity: 0.8;
}

/* GRID */
.section {
  padding: 32px 0 56px;
}

.equipment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.equipment-card {
  background-color: #FFFFFF;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(10, 31, 68, 0.08);
  display: flex;
  flex-direction: column;
}

.equipment-image {
  position: relative;
  width: 100%;
  padding-top: 100%;
  background-color: #E1E5EE;
  overflow: hidden;
}

.equipment-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.equipment-status-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #FFFFFF;
  background-color: rgba(27,156,94,0.92);
}

.status-available { background-color: var(--color-status-available); }
.status-unavailable { background-color: var(--color-status-unavailable); }
.status-hot { background: linear-gradient(135deg, #FF7A00, #D83A24); }
.status-sold { background-color: var(--color-status-sold); }

.equipment-body {
  padding: 14px 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.equipment-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.equipment-force {
  font-size: 14px;
}

.equipment-meta {
  font-size: 12px;
  color: rgba(46,58,69,0.85);
}

.equipment-footer {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.equipment-link {
  font-weight: 600;
  font-size: 13px;
}

/* PAGINATION */
.pagination-wrapper {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}

.pagination-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(10,31,68,0.16);
  background-color: #FFFFFF;
  cursor: pointer;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.page-btn.active {
  background-color: var(--color-primary);
  color: #FFFFFF;
  border-color: var(--color-primary);
}

.page-btn.disabled {
  opacity: 0.45;
  cursor: default;
}

.pagination-info {
  opacity: 0.8;
}

/* RESPONSIVE — only equipment page */
@media (max-width: 1200px) {
  .equipment-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero { padding: 40px 0 26px; }
  .hero-title { font-size: 24px; }
  .equipment-grid { grid-template-columns: 1fr; }
  .filters-inner { gap: 10px; }
  .filters-note { margin-top: 4px; }
}

/* =========================
   RESPONSIVE — DESKTOP→TABLET
   ========================= */
@media (max-width: 960px) {
  .hero-inner,
  .about-layout,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .services-grid,
  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  /* ВАЖНО: больше НЕ трогаем height логотипа напрямую.
     Меняем "целевой" scale, чтобы на планшете не было слишком мелко. */
  :root {
    --header-logo-h: 72px;
    --header-logo-scale-desktop: 0.65;
  }

  /* меню в off-canvas */
  .main-nav {
    position: fixed;
    top: 0;
    right: -260px;
    width: 240px;
    height: 100vh;
    background: var(--color-primary);
    color: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 24px 24px;
    gap: 12px;
    font-size: 16px;
    transition: right 0.28s ease-out;
    box-shadow: -2px 0 18px rgba(0,0,0,0.35);
    z-index: 1200;
  }

  /* если в JS используешь класс .open — оставил поддержку */
  .main-nav.open {
    right: 0;
  }

  /* если перейдешь на .is-open — тоже будет работать */
  .main-nav.is-open {
    right: 0;
  }

  .burger {
    display: flex;
  }

  .header-right {
    gap: 12px;
  }

  .btn.btn-outline {
    padding: 8px 14px;
  }

  .btn.btn-outline a {
    font-size: 13px;
  }

  /* блокировка скролла при открытом меню (если добавишь body.nav-open в JS) */
  body.nav-open {
    overflow: hidden;
  }
}

/* =========================
   RESPONSIVE — SMALL MOBILE
   ========================= */
@media (max-width: 640px) {
  .hero {
    padding: 40px 0 46px;
  }

  .hero-title {
    font-size: 24px;
  }

  .benefits-grid,
  .services-grid,
  .categories-grid {
    grid-template-columns: 1fr;
  }

  :root {
    --header-logo-h: 56px;
    --header-logo-scale-desktop: 0.8;
  }

  .header-inner {
    gap: 12px;
  }

  .btn.btn-outline {
    padding: 6px 10px;
  }

  .btn.btn-outline a {
    font-size: 12px;
  }
}

/* =========================
   Elementor mobile helpers (как было)
   ========================= */
@media (max-width: 767px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  h1,
  .elementor-heading-title.elementor-size-xxl,
  .elementor-heading-title.elementor-size-xl {
    font-size: 26px !important;
    line-height: 1.25 !important;
  }

  h2,
  .elementor-heading-title.elementor-size-large {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  h3,
  .elementor-heading-title.elementor-size-medium {
    font-size: 18px !important;
    line-height: 1.35 !important;
  }

  h4,
  .elementor-heading-title.elementor-size-small {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }

  .elementor-widget-text-editor {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  .elementor-button {
    font-size: 14px !important;
    padding: 12px 18px !important;
    border-radius: 4px !important;
  }

  .elementor-widget-button .elementor-button,
  .triga-hero-buttons .elementor-button {
    width: 100% !important;
    display: block !important;
    text-align: center !important;
    margin-bottom: 10px !important;
  }

  .elementor-widget-button {
    margin-bottom: 8px !important;
  }

  .elementor-column,
  .elementor-column-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  .elementor-section .elementor-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .elementor-column .elementor-widget-wrap {
    align-items: stretch !important;
  }

  .elementor-section {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  .triga-tight {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }

  .triga-hero {
    text-align: left;
  }

  .triga-hero .elementor-heading-title {
    margin-bottom: 10px !important;
  }

  .triga-hero-subtitle {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 18px !important;
  }

  .triga-hero-note {
    font-size: 12px !important;
    opacity: 0.8;
  }

  .triga-hero .elementor-container {
    flex-direction: column !important;
  }

  .triga-cards-section .elementor-column {
    margin-bottom: 16px !important;
  }

  .triga-cards-section .elementor-widget-container {
    padding: 14px 14px !important;
  }

  .triga-hide-mobile {
    display: none !important;
  }
}

@media (max-width: 767px) {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .elementor-section .elementor-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .elementor-section {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .elementor-column,
  .elementor-column-wrap,
  .elementor-widget-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .header-inner,
  .logo img,
  .main-nav,
  .nav-overlay,
  .burger span,
  .btn {
    transition: none !important;
  }
}
