/**
 * ГЛАВ-ХИРУРГ — Работа на СВО
 * Все правила изолированы внутри .ghms
 */

.ghms{
  /* --- палитра (снята пипеткой с макета) --- */
  --ghms-black:    #080a0c;
  --ghms-card:     #0f1012;
  --ghms-hairline: rgba(255,190,160,.11);
  --ghms-red:      #ff3517;
  --ghms-gold:     #e7b965;
  --ghms-kicker:   #ffce6e;
  --ghms-title:    #ffffff;
  --ghms-text:     #cfd0cd;

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

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

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

.ghms ul,
.ghms ol{margin:0 !important;padding:0 !important;list-style:none !important;background:none}
.ghms li{margin:0 !important;list-style:none !important;background:none}
.ghms li::before,
.ghms li::after{content:none}
.ghms p{margin:0;padding:0;text-indent:0}
.ghms h1,.ghms h2,.ghms h3,.ghms h4,.ghms h5,.ghms h6{border:0;font-family:var(--ghms-font)}
.ghms a{text-decoration:none !important;color:inherit;border:0;box-shadow:none}
.ghms a:hover,
.ghms a:focus{text-decoration:none !important;color:inherit}
.ghms img{border:0 !important;border-radius:0;max-width:100%;height:auto}
.ghms svg{display:block;max-width:100%}
.ghms button{margin:0;padding:0;border:0;background:none;font:inherit;color:inherit;cursor:pointer}
/* защита от тем с svg{width/height:...!important} */
.ghms__btn-arrow svg{width:26px !important;height:14px !important}
.ghms__more-arrow svg{width:24px !important;height:14px !important}
.ghms__nav svg{width:14px !important;height:24px !important}

/* ============================================================
   ФОН
   ============================================================ */
.ghms__bg{
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background-color:var(--ghms-black);
  background-position:center;
  background-repeat:no-repeat;
  background-size:cover;
}
.ghms__bg--css::before{
  content:"";
  position:absolute;
  top:26%;
  right:-26%;
  width:84%;
  aspect-ratio:1/1;
  transform:translateY(-50%);
  background:radial-gradient(closest-side, rgba(255,53,23,.15), rgba(255,53,23,.05) 46%, transparent 72%);
  filter:blur(2px);
}
.ghms__bg--css::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(1.5px 1.5px at 87% 22%, rgba(255,150,110,.55), transparent 60%),
    radial-gradient(1px 1px   at 93% 30%, rgba(255,130,90,.45),  transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 36%, rgba(255,120,70,.40), transparent 60%),
    radial-gradient(1px 1px   at 96% 18%, rgba(255,170,130,.40), transparent 60%),
    radial-gradient(1px 1px   at 82% 28%, rgba(255,120,70,.30),  transparent 60%);
}
.ghms__arc{
  position:absolute;
  border:1px solid rgba(255,90,50,.05);
  border-radius:50%;
  pointer-events:none;
}
.ghms__arc--1{width:520px;height:520px;top:-190px;right:-160px}
.ghms__arc--2{width:340px;height:340px;left:-180px;bottom:20px;border-color:rgba(255,90,50,.03)}

.ghms__rail{
  position:absolute;
  top:0;
  bottom:0;
  left:12px;
  z-index:0;
  display:flex;
  align-items:center;
  pointer-events:none;
}
.ghms__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);
}
.ghms__rail-num{
  position:relative;
  padding:6px 0;
  background:var(--ghms-black);
  font-size:9px;
  letter-spacing:.2em;
  color:rgba(255,255,255,.2);
}

.ghms__vlabel,
.ghms__corner{
  position:absolute;
  z-index:0;
  display:none;
  font-size:11px;
  letter-spacing:.34em;
  text-transform:uppercase;
  color:rgba(255,255,255,.15);
  pointer-events:none;
  user-select:none;
}
.ghms__vlabel{
  left:calc(var(--ghms-pad-x) * .30);
  bottom:16%;
  writing-mode:vertical-rl;
  transform:rotate(180deg);
}
.ghms__corner{
  right:calc(var(--ghms-pad-x) * .34);
  bottom:4%;
  line-height:1.9;
  text-align:right;
}

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

/* ============================================================
   ШАПКА
   ============================================================ */
.ghms__head{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:22px;
  align-items:start;
  padding:14px 0 34px 26px;
}
.ghms__ghost{
  position:absolute;
  top:-34px;
  left:-4px;
  z-index:-1;
  display:block;
  font-weight:700;
  font-size:clamp(56px, 13vw, 158px);
  line-height:1;
  letter-spacing:.04em;
  text-transform:uppercase;
  white-space:nowrap;
  color:rgba(255,255,255,.035);
  user-select:none;
}
.ghms__kicker{
  display:block;
  margin-bottom:12px;
  font-weight:400;
  font-size:clamp(11px, .9vw, 15px);
  letter-spacing:.24em;
  text-transform:uppercase;
  color:var(--ghms-kicker);
}
.ghms__title{
  margin:0;
  font-weight:700;
  font-size:clamp(32px, 4vw, 64px);
  line-height:1.08;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--ghms-title);
}
.ghms__subtitle{
  max-width:52ch;
  margin-top:16px;
  font-weight:300;
  font-size:clamp(14px, 1.1vw, 18px);
  line-height:1.5;
  color:var(--ghms-text);
  text-wrap:pretty;
}
.ghms__head::before{
  content:"";
  position:absolute;
  top:8px;
  bottom:34px;
  left:0;
  width:2px;
  background:linear-gradient(to bottom, var(--ghms-red), rgba(255,53,23,.10));
}
.ghms__head::after{
  content:"";
  position:absolute;
  top:-2px;
  left:-2.5px;
  width:7px;
  height:7px;
  border-radius:50%;
  background:var(--ghms-red);
  box-shadow:0 0 10px 2px rgba(255,53,23,.5);
}

/* кнопка «все публикации» */
.ghms__btn{
  display:inline-grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
  justify-self:start;
  padding:16px 22px;
  border:1px solid rgba(255,53,23,.55);
  border-radius:2px;
  color:#fff;
  transition:border-color .3s ease, background-color .3s ease;
}
.ghms__btn:hover{border-color:var(--ghms-red);background:rgba(255,53,23,.08)}
.ghms__btn:focus-visible{outline:2px solid var(--ghms-red);outline-offset:3px}
.ghms__btn-text{
  font-weight:400;
  font-size:clamp(12px, .92vw, 15px);
  letter-spacing:.14em;
  text-transform:uppercase;
  white-space:nowrap;
}
.ghms__btn-arrow{
  display:flex;
  align-items:center;
  color:var(--ghms-red);
  transition:transform .3s ease;
}
.ghms__btn:hover .ghms__btn-arrow{transform:translateX(4px)}

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

.ghms__track{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:calc((100% - (var(--ghms-per-view) - 1) * var(--ghms-gap)) / var(--ghms-per-view));
  gap:var(--ghms-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;
}
.ghms__track::-webkit-scrollbar{display:none}

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

.ghms__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(--ghms-red);
  transition:opacity .25s ease, transform .25s ease;
}
.ghms__nav--prev{left:-52px}
.ghms__nav--next{right:-52px}
.ghms__nav:hover{transform:scale(1.15)}
.ghms__nav[disabled]{opacity:.25;cursor:default;transform:none}
.ghms__nav:focus-visible{outline:2px solid var(--ghms-red);outline-offset:2px;border-radius:4px}

/* ============================================================
   КАРТОЧКА
   ============================================================ */
.ghms__card{
  position:relative;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--ghms-hairline);
  border-radius:var(--ghms-radius);
  background:var(--ghms-card);
  scroll-snap-align:start;
  transition:border-color .35s ease, transform .35s ease;
}
.ghms__card:hover{border-color:rgba(255,53,23,.28)}

.ghms__media{
  position:relative;
  aspect-ratio:7/5;
  overflow:hidden;
  background:#0c0e10;
}
.ghms__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .55s ease;
}
.ghms__card:hover .ghms__media img{transform:scale(1.04)}
.ghms__media::after{           /* затемнение снизу под плашкой/градиент к тексту */
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:45%;
  background:linear-gradient(to bottom, transparent, rgba(8,10,12,.75));
  pointer-events:none;
}
.ghms__media--empty{
  background:
    linear-gradient(135deg, rgba(255,53,23,.10), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 6px, transparent 6px 12px),
    #0c0e10;
}

/* плашка-рубрика поверх фото */
.ghms__badge{
  position:absolute;
  top:17px;
  left:27px;
  z-index:1;
  max-width:calc(100% - 54px);
  padding:6px 12px;
  border:1px solid rgba(255,53,23,.65);
  border-radius:2px;
  background:rgba(10,10,12,.55);
  backdrop-filter:blur(2px);
  font-weight:400;
  font-size:clamp(9px, .68vw, 11px);
  letter-spacing:.14em;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#dcd9d7;
}

.ghms__body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  padding:22px clamp(20px, 2vw, 33px) 26px;
}

.ghms__date{
  font-weight:400;
  font-size:clamp(11px, .84vw, 13px);
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--ghms-gold);
}
.ghms__card-title{
  margin:14px 0 0;
  font-weight:700;
  font-size:clamp(18px, 1.6vw, 26px);
  line-height:1.28;
  color:var(--ghms-title);
  overflow-wrap:anywhere;
  transition:color .25s ease;
}
.ghms__card:hover .ghms__card-title{color:#fff}

.ghms__more{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:14px;
  margin-top:auto;
  padding-top:clamp(20px, 2.2vw, 34px);
  font-weight:400;
  font-size:clamp(11px, .84vw, 13px);
  letter-spacing:.13em;
  text-transform:uppercase;
  color:#fff;
}
.ghms__more-arrow{
  display:flex;
  align-items:center;
  color:var(--ghms-red);
  transition:transform .3s ease;
}
.ghms__card:hover .ghms__more-arrow{transform:translateX(4px)}

/* кликабельна вся карточка */
.ghms__link::after{
  content:"";
  position:absolute;
  inset:0;
}
.ghms__card:has(.ghms__link:focus-visible){outline:2px solid var(--ghms-red);outline-offset:3px}

.ghms__empty{
  padding:36px 0;
  color:rgba(255,255,255,.42);
  font-size:15px;
}

/* ============================================================
   ПЛАНШЕТ / ДЕСКТОП
   ============================================================ */
@media (min-width:640px){
  .ghms{--ghms-pad-x:40px;--ghms-per-view:2;--ghms-gap:16px}
  .ghms__head{padding:18px 0 36px 30px}
}

@media (min-width:1000px){
  .ghms{
    --ghms-pad-x:clamp(48px, 9.15vw, 153px);
    --ghms-per-view:3;
    --ghms-gap:18px;
    padding-top:54px;
    padding-bottom:64px;
  }
  .ghms__rail{left:calc(var(--ghms-pad-x) * .34)}
  .ghms__vlabel,
  .ghms__corner{display:block}

  /* заголовок слева, кнопка справа сверху — как в макете */
  .ghms__head{
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    padding:20px 0 42px 34px;
  }
  .ghms__head::before{top:12px;bottom:42px}
  .ghms__ghost{top:-52px;left:-6px;font-size:clamp(104px, 10vw, 176px)}
  .ghms__btn{justify-self:end;margin-top:6px;padding:18px 26px}

  .ghms__nav{display:flex}
  .ghms__card:hover{transform:translateY(-3px)}
}

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