/**
 * ГЛАВ-ХИРУРГ — Аудиты и командировки
 * Все правила изолированы внутри .ghma
 */

.ghma{
  /* --- палитра (снята пипеткой с макета) --- */
  --ghma-black:    #0b0b0c;
  --ghma-card:     #101112;
  --ghma-hairline: rgba(255,180,150,.10);
  --ghma-red:      #fd5225;
  --ghma-text:     #e9e7e6;
  --ghma-muted:    #b9b4b1;

  --ghma-font:     'Roboto Condensed', 'Arial Narrow', 'DejaVu Sans Condensed', 'Segoe UI', system-ui, sans-serif;
  --ghma-radius:   10px;
  --ghma-pad-x:    20px;
  --ghma-gap:      14px;
  --ghma-per-view: 1.12;

  position:relative;
  overflow:hidden;
  isolation:isolate;
  padding:52px var(--ghma-pad-x) 60px;
  background:var(--ghma-black);
  color:var(--ghma-text);
  font-family:var(--ghma-font);
  font-size:16px;
  line-height:1.4;
  text-align:left;
  -webkit-font-smoothing:antialiased;
}

/* --- сброс стилей темы, только внутри секции --- */
.ghma,
.ghma *,
.ghma *::before,
.ghma *::after{box-sizing:border-box}

.ghma ul,
.ghma ol{margin:0 !important;padding:0 !important;list-style:none !important;background:none}
.ghma li{margin:0 !important;list-style:none !important;background:none}
.ghma li::before,
.ghma li::after{content:none}
.ghma p{margin:0;padding:0;text-indent:0}
.ghma h1,
.ghma h2,
.ghma h3,
.ghma h4,
.ghma h5,
.ghma h6{border:0;font-family:var(--ghma-font)}
.ghma a{text-decoration:none !important;color:inherit;border:0;box-shadow:none}
.ghma a:hover,
.ghma a:focus{text-decoration:none !important;color:inherit}
.ghma img{display:block;max-width:100%;height:auto;border:0;border-radius:0}
.ghma svg{display:block}
.ghma button{margin:0;padding:0;border:0;background:none;font:inherit;color:inherit;cursor:pointer}

/* ============================================================
   ФОН
   ============================================================ */
.ghma__bg{
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-color:var(--ghma-black);
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}
/* красная «туманность» справа сверху — рисуется, пока не задана картинка фона */
.ghma__bg--css::before{
  content:"";
  position:absolute;
  top:16%;
  right:-26%;
  width:92%;
  aspect-ratio:1/1;
  transform:translateY(-50%);
  background:radial-gradient(closest-side, rgba(253,82,37,.16), rgba(253,82,37,.05) 46%, transparent 72%);
  filter:blur(2px);
}
.ghma__bg--css::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1.5px 1.5px at 86% 12%, rgba(255,150,110,.55), transparent 60%),
    radial-gradient(1px 1px   at 93% 20%, rgba(255,130,90,.45),  transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 27%, rgba(255,120,70,.40), transparent 60%),
    radial-gradient(1px 1px   at 97% 8%,  rgba(255,170,130,.40), transparent 60%),
    radial-gradient(1px 1px   at 81% 18%, rgba(255,120,70,.30),  transparent 60%),
    radial-gradient(240px 80px at 93% 16%, rgba(253,82,37,.08), transparent 72%);
}
.ghma__arc{
  position:absolute;
  border:1px solid rgba(255,90,50,.05);
  border-radius:50%;
  pointer-events:none;
}
.ghma__arc--1{width:360px;height:360px;left:-190px;bottom:60px}
.ghma__arc--2{width:640px;height:640px;left:-380px;bottom:-120px;border-color:rgba(255,90,50,.03)}

/* левая техническая линейка */
.ghma__rail{
  position:absolute;
  top:0;
  bottom:0;
  left:12px;
  z-index:0;
  display:flex;
  align-items:center;
  pointer-events:none;
}
.ghma__rail::before{
  content:"";
  position:absolute;
  left:50%;
  top:5%;
  bottom:5%;
  width:1px;
  background:repeating-linear-gradient(to bottom, rgba(255,255,255,.13) 0 4px, transparent 4px 10px);
}
.ghma__rail-num{
  position:relative;
  padding:6px 0;
  background:var(--ghma-black);
  font-size:9px;
  letter-spacing:.2em;
  color:rgba(255,255,255,.2);
}
.ghma__rail-num::after{
  content:"";
  position:absolute;
  top:50%;
  left:calc(100% + 4px);
  width:12px;
  height:1px;
  background:rgba(255,255,255,.16);
}

.ghma__inner{
  position:relative;
  max-width:1600px;
  margin:0 auto;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.ghma__head{
  position:relative;
  padding:44px 0 30px 26px;
}
.ghma__ghost{
  position:absolute;
  top:-6px;
  left:-26px;
  z-index:-1;
  display:block;
  font-weight:700;
  font-size:clamp(40px, 11vw, 64px);
  line-height:1;
  letter-spacing:.02em;
  text-transform:uppercase;
  white-space:nowrap;
  color:rgba(255,255,255,.04);
  user-select:none;
}
.ghma__title{
  margin:0;
  font-weight:700;
  font-size:clamp(30px, 3.7vw, 64px);
  line-height:1.24;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:#fff;
}
.ghma__subtitle{
  max-width:60ch;
  margin-top:14px;
  font-weight:300;
  font-size:clamp(15px, 1.26vw, 22px);
  line-height:1.5;
  color:var(--ghma-text);
  text-wrap:pretty;
}
.ghma__head::before{           /* красная вертикальная линия */
  content:"";
  position:absolute;
  top:60px;
  bottom:30px;
  left:0;
  width:2px;
  background:linear-gradient(to bottom, var(--ghma-red), rgba(253,82,37,.12));
}
.ghma__head::after{            /* точка */
  content:"";
  position:absolute;
  top:44px;
  left:-2.5px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--ghma-red);
  box-shadow:0 0 9px 1px rgba(253,82,37,.45);
}

/* ============================================================
   КАРУСЕЛЬ
   ============================================================ */
.ghma__carousel{position:relative}

.ghma__track{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:calc((100% - (var(--ghma-per-view) - 1) * var(--ghma-gap)) / var(--ghma-per-view));
  gap:var(--ghma-gap);
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  scrollbar-width:none;
  -ms-overflow-style:none;
  padding-bottom:2px;   /* чтобы тень/рамка не обрезались */
}
.ghma__track::-webkit-scrollbar{display:none}

@media (prefers-reduced-motion:reduce){
  .ghma__track{scroll-behavior:auto}
}

/* --- стрелки --- */
.ghma__nav{
  position:absolute;
  top:50%;
  z-index:2;
  display:none;
  width:34px;
  height:44px;
  margin-top:-22px;
  align-items:center;
  justify-content:center;
  color:var(--ghma-red);
  transition:opacity .25s ease, transform .25s ease;
}
.ghma__nav svg{width:14px;height:24px}
.ghma__nav--prev{left:-54px}
.ghma__nav--next{right:-54px}
.ghma__nav:hover{transform:scale(1.15)}
.ghma__nav[disabled]{opacity:.25;cursor:default;transform:none}
.ghma__nav:focus-visible{outline:2px solid var(--ghma-red);outline-offset:2px;border-radius:4px}

/* ============================================================
   КАРТОЧКА
   ============================================================ */
.ghma__card{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:250px;
  padding:16px 16px 34px;
  border:1px solid var(--ghma-hairline);
  border-radius:var(--ghma-radius);
  background:var(--ghma-card);
  scroll-snap-align:start;
  transition:border-color .35s ease, transform .35s ease;
}
.ghma__card:hover{border-color:rgba(253,82,37,.24)}

.ghma__media{
  position:relative;
  overflow:hidden;
  aspect-ratio:2/1;
  border-radius:4px;
  background:#0d0e0f;
}
.ghma__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .5s ease, opacity .35s ease;
}
.ghma__card:hover .ghma__media img{transform:scale(1.04)}
.ghma__media--empty{
  background:
    linear-gradient(135deg, rgba(253,82,37,.10), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 6px, transparent 6px 12px),
    #0d0e0f;
}

.ghma__body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  padding:0 8px;   /* текст утоплен на 8px глубже фотографии — как в макете */
}

.ghma__date{
  margin-top:22px;
  font-weight:400;
  font-size:clamp(12px, .88vw, 14px);
  line-height:1.2;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ghma-red);
}
.ghma__card-title{
  margin-top:12px;
  font-weight:700;
  font-size:clamp(16px, 1.2vw, 20px);
  line-height:1.3;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:#fff;
  overflow-wrap:anywhere;
}
.ghma__excerpt{
  margin-top:14px;
  font-weight:300;
  font-size:clamp(14px, .96vw, 16px);
  line-height:1.6;
  color:var(--ghma-muted);
  text-wrap:pretty;
}
.ghma__link::after{           /* кликабельна вся карточка */
  content:"";
  position:absolute;
  inset:0;
  border-radius:var(--ghma-radius);
}
.ghma__link:focus-visible{outline:none}
.ghma__card:has(.ghma__link:focus-visible){outline:2px solid var(--ghma-red);outline-offset:3px}

/* --- нижняя светящаяся линия: тонкое ядро + мягкий ореол --- */
.ghma__glow{
  position:absolute;
  left:9.2%;
  right:9.2%;
  bottom:13px;
  height:1px;
  background:linear-gradient(90deg,
    rgba(253,82,37,0),
    rgba(253,82,37,.32) 18%,
    rgba(255,124,84,.95) 50%,
    rgba(253,82,37,.32) 82%,
    rgba(253,82,37,0));
}
.ghma__glow::after{
  content:"";
  position:absolute;
  left:-8%;
  right:-8%;
  top:-9px;
  height:19px;
  background:radial-gradient(50% 50% at 50% 50%, rgba(253,82,37,.30), rgba(253,82,37,.06) 55%, transparent 76%);
  filter:blur(4px);
  opacity:.85;
  transition:opacity .35s ease;
}
.ghma__card:hover .ghma__glow::after{opacity:1}

/* ============================================================
   КНОПКА
   ============================================================ */
.ghma__footer{
  display:flex;
  justify-content:center;
  margin-top:36px;
}
.ghma__button{
  display:grid;
  grid-template-columns:1fr 1px 62px;
  align-items:center;
  min-width:280px;
  height:58px;
  border:1px solid rgba(253,82,37,.35);
  border-radius:2px;
  color:#fff;
  transition:border-color .3s ease, background-color .3s ease;
}
.ghma__button:hover{
  border-color:rgba(253,82,37,.7);
  background:rgba(253,82,37,.07);
}
.ghma__button:focus-visible{outline:2px solid var(--ghma-red);outline-offset:3px}
.ghma__button-text{
  padding:0 18px;
  font-weight:400;
  font-size:clamp(13px, 1vw, 17px);
  letter-spacing:.1em;
  text-transform:uppercase;
  text-align:center;
}
.ghma__button-sep{
  align-self:stretch;
  width:1px;
  background:rgba(253,82,37,.3);
}
.ghma__button-arrow{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--ghma-red);
  transition:transform .3s ease;
}
.ghma__button-arrow svg{width:30px;height:16px}
.ghma__button:hover .ghma__button-arrow{transform:translateX(4px)}

/* пустая выдача */
.ghma__empty{
  padding:40px 0;
  color:rgba(255,255,255,.45);
  font-size:15px;
}

/* ============================================================
   ПЛАНШЕТ
   ============================================================ */
@media (min-width:640px){
  .ghma{--ghma-pad-x:40px;--ghma-per-view:2;--ghma-gap:16px}
  .ghma__head{padding:52px 0 34px 30px}
}

@media (min-width:900px){
  .ghma{--ghma-per-view:3}
}

/* ============================================================
   ДЕСКТОП
   ============================================================ */
@media (min-width:1000px){
  .ghma{
    --ghma-pad-x:clamp(48px, 9.2vw, 168px);
    --ghma-per-view:4;
    --ghma-gap:19px;
    padding-top:60px;
    padding-bottom:64px;
  }

  .ghma__bg--css::before{top:19%;right:-18%;width:62%}
  .ghma__rail{left:calc(var(--ghma-pad-x) * .38)}

  .ghma__head{padding:52px 0 38px 40px}
  .ghma__head::before{top:70px;bottom:38px}
  .ghma__head::after{top:52px}
  .ghma__ghost{
    top:-8px;
    left:-40px;
    font-size:clamp(72px, 7.6vw, 130px);
    line-height:1;
  }
  .ghma__subtitle{margin-top:10px}

  .ghma__nav{display:flex}
  .ghma__card{min-height:368px;padding:16px 16px 40px}
  .ghma__date{margin-top:24px}
  .ghma__card-title{margin-top:11px}
  .ghma__excerpt{margin-top:14px}

  .ghma__card:hover{transform:translateY(-3px)}

  .ghma__footer{margin-top:48px}
  .ghma__button{
    grid-template-columns:1fr 1px 76px;
    min-width:341px;
    height:66px;
  }
}

@media (prefers-reduced-motion:reduce){
  .ghma *{transition:none !important;animation:none !important}
}
