/* project_detail.css */

.project-detail{
  padding: 86px 0 90px;
}

/* базово: чтобы картинки не вылезали */
.project-detail img{
  max-width: 100%;
  height: auto;
  display: block;
}

.project-head{
  display:flex;
  gap:18px;
  align-items:flex-start;
  padding: 18px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31,41,55,0.9);
  background: linear-gradient(180deg, rgba(11,17,32,0.92), rgba(5,8,22,0.86));
  box-shadow: 0 18px 48px rgba(2,6,23,0.45);
}

.project-head-icon{
  width: 92px;
  height: 92px;
  border-radius: 22px;
  background: rgba(15,23,42,0.65);
  border: 1px solid rgba(55,65,81,0.7);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.project-head-icon img{
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(56,189,248,0.35));
}

.project-head-icon-fallback{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37,99,235,0.85), rgba(96,165,250,0.85));
  box-shadow: 0 12px 28px rgba(37,99,235,0.35);
}

.project-head-title{
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
}

.project-head-sub{
  margin-top: 6px;
  color: var(--text-muted);
  max-width: 72ch;
}

.project-head-actions{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.project-body{
  margin-top: 22px;
  display:flex;
  flex-direction:column;
  gap: 18px;
}

/* sections */

.psec{
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31,41,55,0.9);
  background: linear-gradient(180deg, rgba(11,17,32,0.92), rgba(5,8,22,0.86));
  box-shadow: 0 18px 48px rgba(2,6,23,0.45);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.phead{
  margin-bottom: 12px;
}

.ptitle{
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.psub{
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 78ch;
  font-size: 13px;
}

.pmuted{
  color: var(--text-muted);
  font-size: 13px;
}

/* hero */

.phero{
  padding: 22px;
}

.phero-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items:center;
}

.phero-title{
  font-size: 28px;
  font-weight: 800;
  line-height: 1.12;
}

.phero-sub{
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 70ch;
}

/* hero facts вместо chip */
.phero-facts{
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  margin-top: 16px;
}

.pfact{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(56,189,248,0.25);
  background: rgba(15,23,42,0.55);
  color:#e5e7eb;
  font-size:13px;
  backdrop-filter: blur(6px);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.pfact-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#38bdf8;
  box-shadow:
    0 0 6px rgba(56,189,248,0.9),
    0 0 14px rgba(37,99,235,0.8);
  flex-shrink:0;
}

.pfact-text{
  color: var(--text-muted);
}

.pfact:hover{
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.45);
  background: rgba(15,23,42,0.72);
}

.pfact:hover .pfact-dot{
  box-shadow:
    0 0 8px rgba(56,189,248,1),
    0 0 18px rgba(37,99,235,1);
}

.pfact:hover .pfact-text{
  color:#e5e7eb;
}

.chip{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.55);
  font-size: 16px;
  color: #e5e7eb;
}

.phero-actions{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.phero-right{
  position: relative;
  border-radius: 22px;
  overflow:hidden;
  border: 1px solid rgba(55,65,81,0.7);
  background: rgba(15,23,42,0.55);
  min-height: 220px;
}

.phero-cover{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.phero-cover--empty{
  width:100%;
  height: 320px;
  background:
    radial-gradient(circle at 25% 25%, rgba(56,189,248,0.20), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(37,99,235,0.28), transparent 60%),
    rgba(15,23,42,0.55);
}

.phero-glow{
  position:absolute;
  inset:-120px -160px auto auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(37,99,235,0.22), transparent 60%);
  filter: blur(12px);
  pointer-events:none;
}

/* 2 col */

.ptwocol-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items:start;
}

.ptwocol-grid.rev{
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
}

.prich{
  color: #e5e7eb;
  font-size: 16px;
}

.prich p{
  color: var(--text-muted);
}

.pimg{
  width:100%;
  height: 320px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(55,65,81,0.7);
  background: rgba(15,23,42,0.55);
}

.pimg--empty{
  background:
    radial-gradient(circle at 25% 25%, rgba(56,189,248,0.18), transparent 55%),
    radial-gradient(circle at 75% 70%, rgba(37,99,235,0.22), transparent 60%),
    rgba(15,23,42,0.55);
}

.pcap{
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ===== Center steps (no big card) ===== */

.psec.psteps{
  position: relative;
  padding: 60px 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: hidden;
}

.psec.psteps::before{
  content:"";
  position:absolute;
  left:50%;
  top:110px;
  width:min(980px, 92vw);
  height:420px;
  transform:translateX(-50%);
  background:
    radial-gradient(circle at 35% 35%, rgba(56,189,248,0.10), transparent 60%),
    radial-gradient(circle at 65% 55%, rgba(37,99,235,0.12), transparent 62%);
  filter: blur(10px);
  pointer-events:none;
  opacity: .9;
}

.psteps-head{
  position: relative;
  text-align: center;
  max-width: 860px;
  margin: 0 auto 26px;
}

.psteps-title{
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
}

.psteps-sub{
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
}

.psteps-list{
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.psteps-item{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;

  border: 1px solid rgba(56,189,248,0.28);
  background: rgba(15,23,42,0.34);
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.14) inset,
    0 12px 30px rgba(2,6,23,0.32);

  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
  transform: translateZ(0);
}

.psteps-item:hover{
  transform: scale(1.02);
  border-color: rgba(56,189,248,0.55);
  background: rgba(15,23,42,0.46);
  box-shadow:
    0 0 0 1px rgba(37,99,235,0.22) inset,
    0 18px 48px rgba(2,6,23,0.55),
    0 0 24px rgba(56,189,248,0.10);
}

.psteps-dot{
  margin-top: 8px;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    0 0 7px rgba(56,189,248,.95),
    0 0 16px rgba(37,99,235,.90);
}

.psteps-text{
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}

.psteps-bottom{
  position: relative;
  margin: 26px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  opacity: .9;
}

/* ===== Project bullets: 2 columns (pain) ===== */

.pbul2 {
  padding: 90px 0;
  background: transparent;
  border: none;
}

.pbul2 .phead-center{
  text-align: center;
  max-width: 860px;
  margin: 0 auto 34px;
}

.pbul2 .ptitle{
  font-size: 30px;
  font-weight: 600;
}

.pbul2 .psub{
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
}

.pbul2-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.pbul2-col{
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(31,41,55,0.75);
  background: linear-gradient(
    180deg,
    rgba(15,23,42,0.70),
    rgba(5,8,22,0.65)
  );
  box-shadow: 0 18px 50px rgba(2,6,23,0.45);
}

.pbul2-sub{
  margin-bottom: 14px;
  font-size: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #e5e7eb;
  opacity: .85;
}

.pbul2-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pbul2-item{
  position: relative;
  padding-left: 18px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
}

.pbul2-item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow:
    0 0 6px rgba(56,189,248,0.9),
    0 0 14px rgba(37,99,235,0.85);
}

.pbul2-bottom{
  margin-top: 36px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  font-size: 16px;
  line-height: 1.6;
  color: #c7d2fe;
  opacity: 0.9;
}

.psec.pbul2{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 90px 0 !important;
}

.psec.pbul2::before,
.psec.pbul2::after{
  content: none !important;
  display: none !important;
}

.psec.pbul2 > .container,
.psec.pbul2 > .pwrap,
.psec.pbul2 > .pinner{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* cards grid */

.pcards-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pcard{
  position:relative;
  overflow:hidden;
  border-radius: 18px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.55);
  padding: 14px;
  min-height: 120px;
}

.pcard-top{
  display:flex;
  align-items:center;
  gap: 10px;
}

.pcard-ic{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(55,65,81,0.7);
  background: rgba(2,6,23,0.45);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}

.pcard-ic img{
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(56,189,248,0.35));
}

.pcard-ic-fallback{
  width: 22px;
  height: 22px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(37,99,235,0.85), rgba(96,165,250,0.85));
  box-shadow: 0 10px 24px rgba(37,99,235,0.30);
}

.pcard-title{
  font-weight: 700;
  font-size: 16px;
}

.pcard-text{
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

.pcard-glow{
  position:absolute;
  inset:-80px -120px auto auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(56,189,248,0.14), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(37,99,235,0.18), transparent 60%);
  filter: blur(12px);
  pointer-events:none;
}

/* нижний текст по центру */
.psteps-bottom-rol{
  position: relative;
  margin: 26px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 16px;
  color: var(--text-muted);
  opacity: .9;
}

/* steps */

.psteps-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pstep{
  border-radius: 18px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.55);
  padding: 14px;
}

.pstep-n{
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(37,99,235,0.20);
  border: 1px solid rgba(96,165,250,0.35);
  color: #e5e7eb;
  font-size: 16px;
}

.pstep-title{
  margin-top: 10px;
  font-weight: 700;
  font-size: 16px;
}

.pstep-text{
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 16px;
}

/* ===== Gallery (stable center + fixed mobile) ===== */
/* важно: в шаблоне поменяй fill-1080x740 -> max-1600x1200 */

.psec.pgallery{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  position: relative;
  overflow: visible;
  /* НЕ даём секции свой левый/правый padding, иначе ломает центр */
  padding: 0;
}

.pgallery .phead{
  text-align: center;
  margin-bottom: 18px;
  /* центрируем заголовок по контейнеру */
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 18px;
}

.pgallery .ptitle{
  font-size: 34px;
  line-height: 1.15;
  font-weight: 650;
}

/* ключ: сетка на 100% ширины контейнера + max-width, без vw */
.pgallery-grid{
  max-width: 1100px;
  margin: 18px auto 0;
  padding: 0 18px;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.pgallery-item{
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  display: block;

  border: 1px solid rgba(96,165,250,0.35);
  background: rgba(2,6,23,0.35);
  box-shadow:
    0 18px 44px rgba(2,6,23,0.45),
    0 0 0 1px rgba(56,189,248,0.10) inset;

  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.pgallery-item img{
  width: 100%;
  height: 320px;        /* десктоп: одинаковые карточки */
  object-fit: cover;    /* десктоп: красиво */
  display: block;
  transform: translateZ(0);
  transition: transform .18s ease;
}

.pgallery-item:hover{
  transform: translateY(-2px) scale(1.01);
  border-color: rgba(56,189,248,0.60);
  box-shadow:
    0 22px 56px rgba(2,6,23,0.55),
    0 0 28px rgba(56,189,248,0.12);
}

.pgallery-item:hover img{
  transform: scale(1.03);
}

/* stats */

.pstats-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pstat{
  border-radius: 18px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.55);
  padding: 14px;
}

.pstat-val{
  font-size: 18px;
  font-weight: 800;
}

.pstat-lb{
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: .10em;
}

.pstat-note{
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 16px;
}

/* faq */

.pfaq-list{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
}

.pfaq-item{
  border-radius: 18px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.55);
  padding: 12px 14px;
}

.pfaq-q{
  cursor:pointer;
  font-weight: 700;
  font-size: 16px;
}

.pfaq-a{
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
}

/* cta */

.pcta-card{
  position:relative;
  overflow:hidden;
  border-radius: 22px;
  border: 1px solid rgba(31,41,55,0.9);
  background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(15,23,42,0.55));
  padding: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.pcta-title{
  font-size: 18px;
  font-weight: 800;
}

.pcta-text{
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 72ch;
}

.pcta-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
}

.pcta-glow{
  position:absolute;
  inset:-120px -160px auto auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(56,189,248,0.16), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(37,99,235,0.22), transparent 60%);
  filter: blur(12px);
  pointer-events:none;
}

section.psec.pcta{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  overflow: visible !important;
}

section.psec.pcta::before,
section.psec.pcta::after{
  content: none !important;
  display: none !important;
}

.pcta.psec{
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* ===== responsive ===== */

@media (max-width: 1024px){
  .phero-grid,
  .ptwocol-grid{
    grid-template-columns: 1fr;
  }

  .pcards-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psteps-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pstats-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pcta-card{
    flex-direction:column;
    align-items:flex-start;
  }

  .pgallery{
    padding: 0 36px;
  }

  .pgallery-item img{
    height: 280px;
  }
}

@media (max-width: 900px){
  .pbul2-grid{
    grid-template-columns: 1fr;
  }

  .pbul2{
    padding: 70px 0;
  }
}

@media (max-width: 820px){
  .pgallery{
    padding: 0 18px;
  }

  .pgallery-grid{
    width: min(560px, 92vw);
    grid-template-columns: 1fr;
  }

  .pgallery-item img{
    height: 320px;
  }
}

@media (max-width: 640px){
  .psteps{ padding: 76px 0; }
  .psteps-title{ font-size: 28px; }
  .psteps-list{ max-width: 92vw; }
  .psteps-item{ padding: 14px 16px; }

  /* ключевой фикс: на телефоне НЕ режем фото */
  .pgallery-item{
    background: rgba(2,6,23,0.55);
  }
  .pgallery-item img{
    height: auto;              /* убрали фикс высоту */
    max-height: 70vh;          /* чтобы не было гигантских полотен */
    width: 100%;
    object-fit: contain;       /* главное: без обрезки */
    background: rgba(2,6,23,0.55);
  }

  /* если у тебя pimg (картинка в 2-col блоках) тоже режет — на мобиле показываем полностью */
  .pimg{
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: rgba(2,6,23,0.55);
  }

  .phero-cover{
    object-fit: cover;
  }
}

@media (max-width: 520px){
  .pcards-grid,
  .psteps-grid,
  .pgallery-grid{
    grid-template-columns: 1fr;
  }
}
