/* ===========================
   Technology_Page / style.css
   =========================== */

/* --------- Vars / Base --------- */
:root{
  --accent:#fc9928;
  --muted:#666;
  --text:#0b0b0b;
  --line:#eee;
  --bg:#fff;
}

*,*::before,*::after{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

/* --------- Layout --------- */
.container{
  max-width:1200px;
  margin:0 auto;
  padding:20px 24px 60px;
}

@media (max-width:768px){
  .container{ padding:16px; }
}

/* --------- Breadcrumbs --------- */
.tech-breadcrumbs{
  margin:10px 0 16px;
  font-size:14px;
  color:var(--muted);
}
.tech-breadcrumbs a{ color:inherit; text-decoration:underline; }

/* --------- Page header (title, tags) --------- */
.tech-header h1{
  margin:8px 0 10px;
  font-size:38px;
  line-height:1.15;
  font-weight:800;
}
.tech-header .tech-tags{
  color:var(--muted);
  margin-bottom:14px;
  font-size:15px;
}

@media (max-width:768px){
  .tech-header h1{ font-size:30px; }
}

/* --------- Cover image (wide) --------- */
.tech-cover img{
  width:100%;
  height:auto;
  display:block;          /* обложка остаётся блочной */
  margin:0 auto 16px;
  border-radius:12px;
}

/* --------- Article content (Word HTML) --------- */
.tech-body{
  font-size:16px;
  line-height:1.75;
}

.tech-body p{ margin:0 0 14px; }
.tech-body h2,.tech-body h3,.tech-body h4{ margin:18px 0 10px; }
.tech-body hr{ border:0; border-top:1px solid var(--line); margin:20px 0; }

/* Картинки из Word — СТРОЧНЫЕ, чтобы стояли «в линию» */
.tech-body img{
  max-width:100%;
  height:auto;
  display:inline;          /* ← критично: было block */
  vertical-align:middle;
  margin:0 8px 8px 0;
  border-radius:8px;
}

/* Если Word «заворачивает» изображения в figure */
.tech-body figure{ display:inline-block; margin:0 8px 8px 0; }
.tech-body figure img{ display:block; margin:0; }

/* Таблицы / медиа */
.tech-body table{ max-width:100%; border-collapse:collapse; }
.tech-body td, .tech-body th{ padding:6px 8px; border:1px solid var(--line); }
.tech-body iframe, .tech-body video{ max-width:100%; border:0; display:block; margin:10px 0; }

/* Списки / цитаты / код */
.tech-body ul, .tech-body ol{ margin:0 0 14px 20px; }
.tech-body li{ margin:6px 0; }
.tech-body blockquote{
  margin:12px 0;
  padding:12px 16px;
  background:#fafafa;
  border-left:4px solid var(--accent);
  color:#333;
}
.tech-body pre, .tech-body code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,"Liberation Mono",Consolas,"Courier New",monospace;
}
.tech-body pre{
  background:#f6f6f6;
  padding:10px 12px;
  overflow:auto;
  border-radius:8px;
}

/* Кнопки (если будут в контенте) */
.tech-body .btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:600;
  text-decoration:none;
  cursor:pointer;
}
.tech-body .btn-primary{
  background:var(--accent);
  color:#fff;
  border-color:transparent;
}

/* --------- Lightbox --------- */
.imgbox{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.85);
  z-index:9999;
}
.imgbox.is-open{ display:flex; }

.imgbox__img{
  max-width:92vw;
  max-height:92vh;
  border-radius:10px;
  background:#000;
}

.imgbox__close{
  position:absolute;
  top:16px;
  right:16px;
  width:44px;
  height:44px;
  border:0;
  border-radius:999px;
  background:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

/* --------- Utility --------- */
.hidden{ display:none !important; }
.muted{ color:var(--muted) !important; }
.center{ text-align:center; }
/* ===== 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;
  } */
}
