/*
Theme Name: TraceWay
Theme URI: https://traceway.ru
Description: Корпоративная тема TraceWay (Оригинал Софт). Дизайн-система: coal/terra, Manrope + JetBrains Mono. Страницы собираются из блоков Gutenberg.
Author: Original Group
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.1
*/

/* ==== WP-совместимость ==== */
body.admin-bar .tw-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .tw-header { top: 46px; } }
body { padding-top: 0; }

/* ==== Выпадающие меню (десктоп) ==== */
.tw-nav .menu-item-has-children { position: relative; }
.tw-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 230px; z-index: 60;
  display: none; flex-direction: column; padding: 8px;
  background: #17181B; border: 1px solid rgba(245,245,240,.12); border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,.45); list-style: none; margin: 0;
}
.tw-nav .menu-item-has-children:hover > .sub-menu,
.tw-nav .menu-item-has-children:focus-within > .sub-menu { display: flex; }
.tw-nav .sub-menu a {
  display: block; border-radius: 6px; padding: 8px 12px;
  font-size: 12.5px; line-height: 1.35; color: rgba(245,245,240,.7);
}
.tw-nav .sub-menu a:hover { background: rgba(245,245,240,.05); color: #D97757; }
.tw-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor;
}
.tw-nav a.current, .tw-nav .current-menu-item > a, .tw-nav .current-menu-ancestor > a { color: #D97757 !important; }

/* ==== Мобильное меню ==== */
.tw-mobile-panel { display: none; }
.tw-mobile-panel.open { display: block; }
.tw-mobile-panel .sub-menu { padding-left: 16px; list-style: none; }
.tw-burger span { display: block; width: 22px; height: 2px; background: #F5F5F0; margin: 5px 0; transition: .25s; }
.tw-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.tw-burger.open span:nth-child(2) { opacity: 0; }
.tw-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==== FAQ details ==== */
.tw-faq summary { list-style: none; }
.tw-faq summary::-webkit-details-marker { display: none; }
.tw-faq summary .tw-faq-plus { transition: transform .2s; }
.tw-faq details[open] summary .tw-faq-plus, .tw-faq[open] summary .tw-faq-plus { transform: rotate(45deg); }

/* ==== Gutenberg-выравнивания ==== */
.alignwide { max-width: 1280px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; }
.wp-block-image img { height: auto; }

/* ==== Скролл к якорям под фиксированной шапкой ==== */
section[id], div[id] { scroll-margin-top: 96px; }
