/* =========================================================
   RUSECOAUDIT — Охрана труда (Legal Strict)
   Файл: assets/css/ot-legal.css
   Важно:
   - База привязана к body.ot-page, чтобы не "ломать" хедер/меню.
   - Отдельный блок фикса для выпадающего меню HFE (Elementor Header Footer)
     — только на этой странице.
   ========================================================= */

/* =========================
   FIX: Dropdown menu (HFE / Elementor)
   =========================
   Симптом: выпадашка прозрачная/без фона на странице OT.
   Решение: задаём фон/бордер/тень для sub-menu и ссылок, но ТОЛЬКО при body.ot-page.
*/
body.ot-page nav.hfe-dropdown ul.sub-menu,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu,
body.ot-page ul.sub-menu{
  background: #fff !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  box-shadow: 0 14px 32px rgba(15,23,42,.10) !important;
}

body.ot-page nav.hfe-dropdown ul.sub-menu li,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu li,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu li,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu li,
body.ot-page ul.sub-menu li{
  background: transparent !important;
}

body.ot-page nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item,
body.ot-page nav.hfe-dropdown ul.sub-menu a.hfe-menu-item,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu a.hfe-sub-menu-item,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu a.hfe-menu-item,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu a.hfe-sub-menu-item,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu a.hfe-menu-item,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu a.hfe-sub-menu-item,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu a.hfe-menu-item,
body.ot-page ul.sub-menu a.hfe-sub-menu-item,
body.ot-page ul.sub-menu a.hfe-menu-item{
  background: #fff !important;
  color: inherit !important;
}

body.ot-page nav.hfe-dropdown ul.sub-menu a.hfe-sub-menu-item:hover,
body.ot-page nav.hfe-dropdown ul.sub-menu a.hfe-menu-item:hover,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu a.hfe-sub-menu-item:hover,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu a.hfe-menu-item:hover,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu a.hfe-sub-menu-item:hover,
body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu a.hfe-menu-item:hover,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu a.hfe-sub-menu-item:hover,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu a.hfe-menu-item:hover,
body.ot-page ul.sub-menu a.hfe-sub-menu-item:hover,
body.ot-page ul.sub-menu a.hfe-menu-item:hover{
  background: rgba(30,58,138,.06) !important;
}

body.ot-page .hfe-nav-menu__layout-horizontal ul.sub-menu,
body.ot-page .hfe-nav-menu__layout-vertical ul.sub-menu,
body.ot-page nav.hfe-dropdown ul.sub-menu,
body.ot-page nav.hfe-dropdown-expandible ul.sub-menu{
  z-index: 99999 !important;
}

/* =========================
   Variables
   ========================= */
:root{
  --ot-bg:#f6f8fb;
  --ot-surface:#ffffff;
  --ot-surface-2:#f2f5fa;
  --ot-border:rgba(15,23,42,.12);

  --ot-ink:#0f172a;
  --ot-ink-muted:#475569;
  --ot-ink-soft:#334155;

  --ot-accent:#1e3a8a;    /* строгий синий */
  --ot-accent-2:#0f172a;  /* графит */
  --ot-success:#0f766e;

  --ot-radius-lg:18px;
  --ot-radius-md:14px;
  --ot-radius-sm:10px;

  --ot-shadow:0 14px 32px rgba(15,23,42,.10);
  --ot-shadow-soft:0 10px 22px rgba(15,23,42,.08);

  --ot-max:1120px;
  --ot-pad:72px;
}

/* =========================
   Base (важно: на body, не на .ot-page div)
   ========================= */
body.ot-page{
  background: var(--ot-bg);
  color: var(--ot-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  overflow-x:hidden;
}

.ot-page{
  padding-bottom:32px;
}

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

.ot-wrap{
  max-width: var(--ot-max);
  margin:0 auto;
  padding:0 20px;
}

/* =========================
   Headings
   ========================= */
.ot-kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--ot-ink-muted);
  margin-bottom:12px;
}
.ot-kicker::before{
  content:"";
  width:26px;height:1px;
  background: linear-gradient(90deg, rgba(30,58,138,.55), transparent);
}

.ot-h1{
  margin:0 0 12px;
  font-size:34px;
  line-height:1.18;
  letter-spacing:-.02em;
}
.ot-sub{
  margin:0;
  font-size:15px;
  line-height:1.7;
  color: var(--ot-ink-muted);
  max-width: 760px;
}

/* =========================
   Sections
   ========================= */
.ot-section{
  padding: var(--ot-pad) 0;
  border-top:1px solid var(--ot-border);
  background: var(--ot-surface);
}
.ot-section:first-of-type{border-top:none;}
.ot-section--soft{background: var(--ot-surface-2);}

.ot-section-title{
  margin:0 0 10px;
  font-size:26px;
  line-height:1.25;
  letter-spacing:-.01em;
}
.ot-section-sub{
  margin:0;
  font-size:14px;
  line-height:1.65;
  color: var(--ot-ink-muted);
  max-width: 820px;
}

/* =========================
   Hero
   ========================= */
.ot-hero{
  padding: 64px 0 56px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fd 100%);
  border-bottom:1px solid var(--ot-border);
}
.ot-hero-grid{
  display:grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 22px;
  align-items: start;
}
.ot-hero-card{
  border:1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  background: var(--ot-surface);
  box-shadow: var(--ot-shadow-soft);
  padding: 18px 18px 16px;
}
.ot-hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border:1px solid rgba(30,58,138,.20);
  background: rgba(30,58,138,.06);
  color: var(--ot-accent);
  font-size:12px;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  margin-bottom:14px;
}
.ot-hero-meta{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.ot-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--ot-border);
  background: #fff;
  color: var(--ot-ink-soft);
  font-size:13px;
}
.ot-chip-dot{
  width:8px;height:8px;border-radius:999px;
  background: var(--ot-accent);
  box-shadow: 0 0 0 4px rgba(30,58,138,.10);
}

/* =========================
   Buttons
   ========================= */
.ot-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:44px;
  padding: 10px 18px;
  border-radius: 999px;
  border:1px solid transparent;
  font-size:14px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-decoration:none;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space:nowrap;
}
.ot-btn-primary{
  background: var(--ot-accent);
  color:#fff;
  box-shadow: 0 12px 28px rgba(30,58,138,.24);
}
.ot-btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(30,58,138,.32);
}
.ot-btn-secondary{
  background:#fff;
  border-color: rgba(30,58,138,.28);
  color: var(--ot-accent);
}
.ot-btn-secondary:hover{
  transform: translateY(-2px);
  border-color: rgba(30,58,138,.45);
  box-shadow: var(--ot-shadow-soft);
}
.ot-hero-cta{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:18px;
}

/* =========================
   Cards / grids
   ========================= */
.ot-grid-3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-top: 22px;
}
.ot-card{
  border:1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  background: #fff;
  padding: 14px 14px 12px;
  box-shadow: var(--ot-shadow-soft);
}
.ot-card-title{
  margin:0 0 6px;
  font-size:15px;
  font-weight:700;
  letter-spacing:-.01em;
}
.ot-card-text{
  margin:0;
  font-size:13px;
  line-height:1.6;
  color: var(--ot-ink-muted);
}
.ot-ul{
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--ot-ink-soft);
  font-size:13px;
  line-height:1.65;
}
.ot-ul li{margin: 4px 0;}

/* =========================
   Process
   ========================= */
.ot-steps{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-top: 22px;
}
.ot-step{
  border:1px solid var(--ot-border);
  border-radius: var(--ot-radius-md);
  background: #fff;
  padding: 14px 14px 12px;
  box-shadow: var(--ot-shadow-soft);
}
.ot-step-num{
  font-weight:900;
  color: var(--ot-accent);
  letter-spacing:.08em;
  font-size:12px;
}
.ot-step-title{
  margin:8px 0 6px;
  font-size:15px;
  font-weight:800;
}
.ot-step-text{
  margin:0;
  font-size:13px;
  color: var(--ot-ink-muted);
  line-height:1.6;
}

/* =========================
   Callout / Trust
   ========================= */
.ot-callout{
  margin-top: 18px;
  border:1px solid rgba(15,118,110,.22);
  background: rgba(15,118,110,.06);
  border-radius: var(--ot-radius-md);
  padding: 14px 14px 12px;
}
.ot-callout-title{
  margin:0 0 6px;
  font-size:14px;
  font-weight:800;
  color: #0f3d36;
}
.ot-callout-text{
  margin:0;
  font-size:13px;
  line-height:1.6;
  color: #0f3d36;
}

/* =========================
   CTA
   ========================= */
.ot-cta{
  border:1px solid rgba(30,58,138,.22);
  background: linear-gradient(135deg, rgba(30,58,138,.06) 0%, #fff 55%);
  border-radius: var(--ot-radius-lg);
  padding: 18px 18px 16px;
  box-shadow: var(--ot-shadow);
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  margin-top: 22px;
}
.ot-cta-title{
  margin:0 0 6px;
  font-size:18px;
  font-weight:900;
}
.ot-cta-sub{
  margin:0;
  font-size:13px;
  line-height:1.6;
  color: var(--ot-ink-muted);
  max-width: 640px;
}

/* =========================
   FAQ
   ========================= */
.ot-faq{
  border:1px solid var(--ot-border);
  border-radius: var(--ot-radius-lg);
  background:#fff;
  box-shadow: var(--ot-shadow-soft);
  overflow:hidden;
  margin-top: 22px;
}
.ot-faq-item + .ot-faq-item{border-top:1px solid rgba(15,23,42,.08);}
.ot-faq-q{
  width:100%;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding: 14px 14px;
  background:#fff;
  border:none;
  text-align:left;
  cursor:pointer;
  font: inherit;
}
.ot-faq-q span{
  font-size:14px;
  font-weight:800;
  color: var(--ot-ink);
}
.ot-faq-arrow{
  flex-shrink:0;
  width:24px;height:24px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(30,58,138,.28);
  color: var(--ot-accent);
  font-weight:900;
  transition: transform .25s ease, background .2s ease;
}
.ot-faq-a{
  max-height:0;
  overflow:hidden;
  opacity:0;
  transform: translateY(-4px);
  padding: 0 14px;
  transition: max-height .45s ease, opacity .35s ease, transform .35s ease, padding-bottom .35s ease;
}
.ot-faq-a p{
  margin:0;
  padding-top: 2px;
  font-size:13px;
  line-height:1.65;
  color: var(--ot-ink-muted);
}
.ot-faq-item.is-open .ot-faq-a{
  max-height: 1000px; /* важно: не none, чтобы анимация работала */
  opacity:1;
  transform: translateY(0);
  padding-bottom: 14px;
}
.ot-faq-item.is-open .ot-faq-arrow{
  transform: rotate(45deg);
  background: rgba(30,58,138,.08);
}

/* =========================
   Reveal (тихо, без шоу)
   ========================= */
.ot-reveal{
  opacity:0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.ot-reveal.is-visible{
  opacity:1;
  transform: translateY(0);
}

/* =========================
   Accessibility
   ========================= */
.ot-btn:focus-visible,
.ot-faq-q:focus-visible{
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(30,58,138,.28);
  border-radius: 14px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .ot-reveal{opacity:1 !important; transform:none !important; transition:none !important;}
  .ot-faq-a{transition:none !important;}
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 980px){
  .ot-hero-grid{grid-template-columns: minmax(0,1fr); }
  .ot-steps{grid-template-columns: repeat(2, minmax(0,1fr));}
  .ot-grid-3{grid-template-columns: repeat(2, minmax(0,1fr));}
  .ot-cta{flex-direction:column; align-items:flex-start;}
}
@media (max-width: 640px){
  :root{--ot-pad:48px;}
  .ot-wrap{padding:0 14px;}
  .ot-h1{font-size:28px;}
  .ot-grid-3{grid-template-columns: minmax(0,1fr);}
  .ot-steps{grid-template-columns: minmax(0,1fr);}
}
