/* ================== CSS Variables ================== */
:root{
  /* Colors */
  --accent-2: #fc9928;
  --accent:   #fc9928;
  --muted:    #777;
  --line:     #eee;
  --card-bg:  #fff;

  /* Radii & shadows */
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 6px 18px rgba(0,0,0,.06);
}
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; font-family: sans-serif; background: #fff; color: #000; }
a { text-decoration: none; color: inherit; }
ul, ol, menu { list-style: none; margin: 0; padding: 0; }

/* ================== HEADER ================== */
.header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 2px 64px;
  background:#fff; border-bottom:1px solid #eee;
}
.logo img{ height:120px; width:auto; display:block; }
.main-nav ul{ display:flex; gap:32px; }
.main-nav a{
  font-size:16px; font-weight:500; color:#333; transition:color .3s ease;
}
.main-nav a:hover{ color:var(--accent-2); }

/* CTA area: language select + button in one row */
.cta-header{ display:flex; align-items:center; gap:12px; }
.btn-contact{
  padding:12px 24px; font-size:16px; font-weight:700;
  background:var(--accent-2); border:0; border-radius:8px; color:#fff;
  cursor:pointer; transition:background-color .3s ease;
}
.btn-contact:hover{ background:#e3811f; color:#fff; }

/* Language switcher */
.lang-switch{ display:flex; align-items:center; }
.lang-select{
  height:44px; padding:0 12px;
  border:1px solid #ddd; border-radius:8px; background:#fff;
  font-weight:700; cursor:pointer;
}

/* Маленький знак ® */
.reg{ font-size:.6em; vertical-align:super; line-height:0; margin-left:2px; }

/* ================== FILTERS ================== */
.filters, .tech-filters{
  display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end;
  padding:14px 64px 10px;
  border-bottom:1px solid var(--line);
  background:#fff;
}
.tf{ display:flex; flex-direction:column; gap:6px; }
.filter-item{ display:grid; gap:6px; }
.filter-label, .tf > span{ font-size:12px; color:var(--muted); }

.filters input, .filters select,
.tech-filters input, .tech-filters select{
  height:44px; border:1px solid #ddd; border-radius:var(--radius-md);
  padding:0 12px; font-size:14px; background:#fff; outline:0;
}
.filters input:focus, .filters select:focus,
.tech-filters input:focus, .tech-filters select:focus{
  border-color:#bbb; box-shadow:0 0 0 3px rgba(0,0,0,.04);
}

.filter-actions, .tf-actions{ display:flex; align-items:end; gap:8px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:44px; padding:0 14px; border-radius:var(--radius-md);
  border:1px solid #ddd; background:#fff; color:#111; font-weight:600;
  text-decoration:none; cursor:pointer;
  transition: transform .02s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover{ box-shadow:var(--shadow-sm); }
.btn:active{ transform:translateY(1px); }

/* ⬇⬇⬇ ПРАВКА: добавлен белый текст */
.btn-primary{ background:var(--accent); border-color:transparent; color:#fff; }

.btn-ghost{ background:#fff; }

/* ================== PAGE WRAPPER (Technologies) ================== */
.tech-wrap{ max-width:1200px; margin:0 auto; padding:24px 16px; }
.tech-title{ font-size:clamp(24px,2.4vw,34px); margin:8px 0 16px; }

/* meta (map обоих вариантов классов) */
.tech-meta, .results-meta{ margin:8px 0 16px; color:#555; }

/* ================== GRID ================== */
.grid, .tech-grid{ display:grid; grid-template-columns:repeat(12,1fr); gap:16px; }
@media (max-width:1200px){ .grid, .tech-grid{ grid-template-columns:repeat(8,1fr); } }
@media (max-width:768px){  .grid, .tech-grid{ grid-template-columns:repeat(4,1fr); } }
@media (max-width:520px){  .grid, .tech-grid{ grid-template-columns:repeat(2,1fr); } }

/* ================== CARDS ================== */
.card, .tech-card{
  grid-column:span 4;
  border:1px solid var(--line); border-radius:var(--radius-lg);
  background:var(--card-bg); overflow:hidden;
  display:flex; flex-direction:column;
  transition: box-shadow .2s ease, transform .06s ease;
}
@media (max-width:768px){ .card, .tech-card{ grid-column:span 4; } }
@media (max-width:520px){ .card, .tech-card{ grid-column:span 2; } }
.card:hover, .tech-card:hover{ box-shadow:var(--shadow-sm); transform:translateY(-2px); }

/* media */
.card-media, .tc-media{
  display:block; width:100%; aspect-ratio:16/9; background:#f6f6f6; overflow:hidden;
}
.card-media img, .tc-media img{ width:100%; height:100%; object-fit:cover; display:block; }

/* body */
.card-body, .tc-body{ padding:12px; display:flex; flex-direction:column; gap:10px; }
.card-title, .tc-title{ font-size:18px; line-height:1.25; margin:0 0 6px; }
.card-title a, .tc-title a{ color:inherit; text-decoration:none; }
.card-title a:hover, .tc-title a:hover{ text-decoration:underline; }
.card-meta, .tc-type{ font-size:12px; color:var(--muted); margin-bottom:6px; }
.card-desc, .tc-desc{ font-size:14px; color:#333; }
.card-tags, .tc-tags{ display:flex; gap:6px; flex-wrap:wrap; margin:0 0 10px; padding:0; list-style:none; }
.tag, .tg{ font-size:12px; padding:4px 8px; border:1px solid #eee; border-radius:999px; background:#fafafa; color:#333; }
.card-actions, .tc-actions{ margin-top:auto; display:flex; gap:8px; }
/* замените старое правило .tc-btn */
.tc-btn{
  display:inline-flex;          /* было inline-block */
  align-items:center;
  justify-content:center;
  padding:8px 12px;
  border:1px solid var(--accent-2);
  border-radius:8px;
  text-decoration:none;
  line-height:1;
}

/* empty state */
.empty-state, .tc-empty{
  padding:24px; border:1px dashed #ddd; border-radius:12px;
  text-align:center; color:#666;
}

/* ================== PAGINATION ================== */
.pagination{
  display:flex; gap:8px; justify-content:center;
  margin:24px 0 40px;
}
.page-link{
  min-width:40px; height:40px; padding:0 10px;
  border:1px solid #ddd; border-radius:8px;
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none; color:#111; background:#fff;
}
.page-link:hover{ box-shadow:var(--shadow-sm); }
.page-link.active{ background:#111; color:#fff; border-color:#111; }
.page-link.prev, .page-link.next{ font-weight:700; }

/* ================== FOOTER ================== */
.footer{
  background:#111; color:#fff; padding:64px;
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:32px;
}
.footer__section{ flex:1 1 250px; }
.footer__title{ font-size:18px; font-weight:700; margin-bottom:8px; }
.footer__name, .footer__contacts{ font-size:16px; line-height:1.6; }
.footer__socials{ display:flex; gap:16px; align-items:center; }
.footer__socials .social-link img{
  width:24px; height:24px; filter:brightness(0) invert(1); transition:opacity .3s ease;
}
.footer__socials .social-link:hover img{ opacity:.7; }

.footer-bottom{
  background:#f8f8f8; color:#444; font-size:14px; text-align:center;
  padding:32px 16px; border-top:1px solid #ddd;
}
.footer-bottom__links{
  display:flex; flex-wrap:wrap; justify-content:center; gap:24px; margin-bottom:20px;
}
.footer-bottom__links a{ color:#444; text-decoration:none; transition:color .3s ease; }
.footer-bottom__links a:hover{ color:var(--accent-2); }
.footer-bottom__info{ margin-bottom:20px; }
.footer-bottom__info a{ color:#444; text-decoration:underline; }
.footer-bottom__socials{
  display:flex; justify-content:center; gap:28px; margin:16px 0 20px;
}
.footer-bottom__socials img{ width:24px; height:24px; filter:grayscale(60%); transition:filter .3s; }
.footer-bottom__socials img:hover{ filter:none; }

/* ================== MODAL (Contacts) ================== */
.modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.45); z-index:10000; padding:24px;
}
.modal.is-open{ display:flex; }
.modal__dialog{
  position:relative; width:min(560px,100%); background:#fff; border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.2); padding:24px 24px 20px;
  animation:modalIn .18s ease-out; outline:none;
}
@keyframes modalIn{ from{ transform:translateY(8px); opacity:.6; } to{ transform:translateY(0); opacity:1; } }
.modal__close{
  position:absolute; top:10px; right:12px; width:36px; height:36px;
  border:0; border-radius:50%; background:#f2f2f2; font-size:22px; line-height:1; cursor:pointer;
}
.modal__close:hover{ background:#e9e9e9; }
.modal__title{ margin:0 36px 8px 0; font-size:22px; line-height:1.25; }
.modal__content{ color:#333; }
.modal__phones{ margin:8px 0 12px; padding-left:18px; }
.modal__phones li{ margin:6px 0; }
.modal__phones a{ color:#111; text-decoration:none; font-weight:600; }
.modal__phones a:hover{ text-decoration:underline; }
.modal__extra{ color:#666; }
.modal__extra a{ color:inherit; }
.modal__extra a:hover{ color:inherit; text-decoration:underline; }
body.modal-open{ overflow:hidden; }

/* === КНОПКИ И ФИЛЬТРЫ — как на странице ТЕХНОЛОГІЇ === */

/* Переменные (если в файле ещё нет) */
:root{
  --accent:   #fc9928;
  --accent-2: #fc9928;
  --muted:    #777;
  --line:     #eee;
  --radius-md: 8px;
  --shadow-sm: 0 6px 18px rgba(0,0,0,.06);
}

/* Контейнер + заголовок */
.tech-wrap{ max-width:1200px; margin:0 auto; padding:24px 16px; }
.tech-title{ font-size:clamp(24px,2.4vw,34px); margin:8px 0 16px; }

/* Фильтры */
/* ⬇⬇⬇ ПРАВКА: как на Products — боковые отступы 64px */
.tech-filters{
  display:flex; gap:12px; flex-wrap:wrap; align-items:flex-end;
  padding:14px 64px 10px; /* как на Products */
  border-bottom:1px solid var(--line);
  background:#fff;
}
.tf{ display:flex; flex-direction:column; gap:6px; }
.tf > span{ font-size:12px; color:var(--muted); }

.tech-filters input,
.tech-filters select{
  height:44px; border:1px solid #ddd; border-radius:var(--radius-md);
  padding:0 12px; font-size:14px; background:#fff; outline:0;
}
.tech-filters input:focus,
.tech-filters select:focus{
  border-color:#bbb; box-shadow:0 0 0 3px rgba(0,0,0,.04);
}

/* Кнопки */
.tf-actions{ display:flex; align-items:end; gap:8px; }
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  height:44px; padding:0 14px; border-radius:var(--radius-md);
  border:1px solid #ddd; background:#fff; color:#111; font-weight:600;
  text-decoration:none; cursor:pointer;
  transition: transform .02s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:hover{ box-shadow:var(--shadow-sm); }
.btn:active{ transform:translateY(1px); }

.btn-primary{
  background:var(--accent); border-color:transparent; color:#fff;
}
.btn-primary:hover{ filter:brightness(.97); }

.btn-ghost{
  background:#fff; border:1px solid #ddd; color:#111;
}
.btn-ghost:hover{ box-shadow:var(--shadow-sm); }
/* ===== BURGER ===== */
.nav-toggle{
  display:none; position:relative; width:40px; height:32px;
  border:0; background:transparent; padding:0; cursor:pointer; color:#333;
}
.nav-toggle span{
  position:absolute; left:0; right:0; height:3px; border-radius:2px;
  background: currentColor; transition: transform .25s, top .25s, opacity .2s;
}
.nav-toggle span:nth-child(1){ top:6px; }
.nav-toggle span:nth-child(2){ top:14px; }
.nav-toggle span:nth-child(3){ top:22px; }
.nav-toggle.is-open span:nth-child(1){ top:14px; transform:rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ top:14px; transform:rotate(-45deg); }

/* ===== MOBILE HEADER: якоря — слева/центр/справа ===== */
@media (max-width:1024px){
  header, header .topbar, header .header, header .header-inner{
    position: relative !important; display:block !important;
    min-height:56px; padding:8px 0;
  }
  /* слева бургер */
  header .nav-toggle{
    display:block !important; position:absolute; left:12px; top:50%;
    transform:translateY(-50%); z-index:1001;
  }
  /* по центру логотип */
  header .logo{
    position:absolute; left:50%; top:50%; transform:translate(-50%, -50%);
    margin:0 !important; z-index:1000;
  }
  /* справа переключатель языка */
  #langSwitch{
    position:absolute; right:12px; top:50%; transform:translateY(-50%);
    z-index:1001;
  }
  /* десктоп-меню прячем */
  header .main-nav{ display:none !important; }
  /* большую шапочную кнопку прячем на мобилках — она будет в оверлее */
  #langSwitch .btn-contact{ display:none !important; }
}

/* при открытом меню: прячем бургер и переключатель языка */
body.menu-open .nav-toggle{ visibility:hidden; }
body.menu-open #langSwitch{ display:none !important; }

/* ===== MOBILE MENU OVERLAY ===== */
.mobile-menu[hidden]{ display:none; }
.mobile-menu{ position:fixed; inset:0; z-index:1000; }
.mobile-menu__backdrop{
  position:absolute; inset:0; background:rgba(0,0,0,.45); backdrop-filter:blur(6px);
  opacity:0; transition:opacity .25s;
}
.mobile-menu.is-open .mobile-menu__backdrop{ opacity:1; }
.mobile-menu__panel{ position:absolute; inset:0; display:flex; flex-direction:column; padding:16px 22px; color:#fff; }
.mobile-menu__top{ position:relative; display:flex; justify-content:center; align-items:center; padding-bottom:10px; margin-bottom:16px; border-bottom:1px solid rgba(255,255,255,.15); }
.mobile-menu__logo{ color:#ffd26a; font-weight:700; text-decoration:none; font-size:20px; }
.mobile-menu__close{ position:absolute; right:8px; top:0; font-size:28px; line-height:1; border:0; background:transparent; color:#fff; cursor:pointer; }
.mobile-menu__nav{ display:flex; flex:1 1 auto; }
.mobile-menu__list{ display:flex; flex-direction:column; gap:18px; margin:0 auto; padding:24px 0; list-style:none; width:100%; max-width:420px; text-align:center; }
.mobile-menu__list a{ color:#fff; text-decoration:none; font-size:22px; font-weight:500; }

/* CTA в мобильном меню */
.mobile-menu__cta{
  display:inline-flex; align-items:center; justify-content:center;
  height:44px; padding:12px 24px; font-size:18px; font-weight:700;
  background:#f39c12; color:#fff; border-radius:10px; margin-top:10px;
}
.mobile-menu__cta:active{ opacity:.9; }

/* блокировка скролла под оверлеем */
.body--lock{ overflow:hidden; }
/* ДЕСКТОП: бургер не показываем ни при каких условиях */
@media (min-width: 1025px){
  .nav-toggle{
    display: none !important;
    visibility: hidden !important;
  }
}
/* ЛОГО на телефонах — чуть крупнее и по центру */
@media (max-width: 1024px){
  /* чтобы логотип комфортно помещался по высоте шапки */
  header, header .topbar, header .header, header .header-inner{
    min-height: 64px; /* было ~56px; можно 60–66px */
  }

  /* размер логотипа: выбери один из вариантов ниже */
  /* ВАРИАНТ 1: фиксированный (рекомендую 40px) */
  header .logo > a > img{
    height: 74px !important;
    width: auto !important;
  }

  /* ВАРИАНТ 2: адаптивный (сам подстраивается под ширину экрана)
  header .logo > a > img{
    height: clamp(34px, 5.2vw, 44px) !important;
    width: auto !important;
  } */
}
