/**
 * HCP beyan kapisi + uygulama protokolu (site geneli).
 * - Giris bandi: sayfa icinde acik bir bant (sag TOC'ta gorunur, js-toc).
 * - Detay: sag slide-in PANEL (data-kt-relocate ile body'ye tasinir).
 * - Beyan popup'i: Bricks native popup (post 543); stiller burada.
 * Token'lar site.css :root'undan; hardcode edilmez.
 */

/* Gizli popup tetik yardimcisi (JS click ile Bricks popup'i acar) */
.js-kt-hcp-popup-open { display: none !important; }

/* ============================ GIRIS BANDI ============================ */
#rg-hcp-gate .second-section__shell { padding: clamp(56px, 5vw, 84px) var(--hero-content-x); }
#rg-hcp-gate .rg-hcp-gate__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(340px, 0.72fr);
  gap: clamp(40px, 4vw, 80px);
  align-items: stretch;
}
/* Sol kolon: baslik ustte, not section altina yasli */
#rg-hcp-gate .rg-hcp-gate__left { display: flex; flex-direction: column; }
#rg-hcp-gate .rg-hcp-gate__title { margin: 0; max-width: 100%; }
/* Sag kolon: paragraf (150px offset) + buton */
#rg-hcp-gate .rg-hcp-gate__right { display: flex; flex-direction: column; }
.rg-hcp-gate__desc {
  margin: 150px 0 0;
  color: rgba(0, 20, 66, .5);
  font: 300 18px/1.6 var(--font-primary);
}
.rg-hcp-gate__actions { margin-top: 52px; }

/* Bolum sonu ayraci: bol dikey white space + ince cizgi (arka plan rengi YOK) */
.rg-hcp-sep-section { padding: clamp(10px, 1.4vw, 22px) 0; }
.rg-hcp-sep-line { width: min(calc(100% - 120px), 1400px); height: 1px; margin: 0 auto; background: var(--surface-line); }

/* Tetik butonu: hero katalog butonu (hero-cta-third) ile ayni dil */
.rg-hcp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--brand-blue);
  color: var(--brand-white);
  border: 0;
  font: 500 15px/1 var(--font-primary);
  cursor: pointer;
  transition: background .3s ease;
}
.rg-hcp-trigger:hover, .rg-hcp-trigger:focus-visible { background: var(--brand-ink); }
.rg-hcp-trigger::after {
  content: "";
  width: 15px; height: 15px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.7 17.3 15.2 8.8H8V6h12v12h-2.8v-7.2l-8.5 8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.7 17.3 15.2 8.8H8V6h12v12h-2.8v-7.2l-8.5 8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .3s cubic-bezier(0.19, 1, 0.22, 1);
}
.rg-hcp-trigger:hover::after { transform: translateX(4px); }
/* Not: sol kolonda buyuk basligin altinda, section altina yasli */
.rg-hcp-gate__note { margin: auto 0 0; padding-top: 28px; font-size: 14px; color: rgba(0, 20, 66, .42); }

/* ============================ SLIDE-IN PANEL ============================ */
.rg-hcp-panel-root { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.rg-hcp-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 20, 66, .5);
  opacity: 0;
  transition: opacity .4s ease;
}
.rg-hcp-panel__sheet {
  position: absolute; top: 0; right: 0;
  display: flex; flex-direction: column;
  width: min(680px, 92vw);
  height: 100%;
  background: #fff;
  box-shadow: -30px 0 80px rgba(0, 20, 66, .18);
  transform: translateX(100%);
  transition: transform .45s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}
.rg-hcp-panel-root.is-open { pointer-events: auto; }
.rg-hcp-panel-root.is-open .rg-hcp-panel__backdrop { opacity: 1; }
.rg-hcp-panel-root.is-open .rg-hcp-panel__sheet { transform: translateX(0); }

.rg-hcp-panel__head {
  position: relative;
  flex: none;
  padding: clamp(28px, 3vw, 40px) clamp(28px, 3vw, 48px) 22px;
  border-bottom: 1px solid var(--surface-line);
}
/* Eyebrow: "#" kicker dili site.css ortak .vision-kicker blogundan gelir;
   burada yalniz yerlesim marji verilir (yazi stili BURADA tanimlanmaz). */
.rg-hcp-panel__eyebrow {
  display: block;
  margin: 0 0 12px;
}
.rg-hcp-panel__title {
  margin: 0;
  padding-right: 44px;
  color: var(--brand-navy);
  font: 500 clamp(30px, 2.6vw, 38px)/1.12 var(--font-primary);
  letter-spacing: -1.2px;
}
/* Kapat: site modal'i (rg-modal-close) ile ayni dil: duz X, daire yok */
.rg-hcp-panel__close {
  position: absolute; top: clamp(28px, 3vw, 40px); right: clamp(26px, 3vw, 40px);
  z-index: 10; padding: 4px;
  border: 0; background: none; color: #001334;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: color .15s ease;
}
.rg-hcp-panel__close:hover { color: var(--brand-blue); }
.rg-hcp-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: clamp(24px, 3vw, 40px) clamp(28px, 3vw, 48px) clamp(40px, 5vw, 64px);
  overscroll-behavior: contain;
}

/* Protokol icerik dili (panel govdesinde) */
.rg-hcp-h3 { margin: 38px 0 14px; color: var(--brand-navy); font: 500 20px/1.3 var(--font-primary); letter-spacing: -0.4px; }
.rg-hcp-h3:first-child { margin-top: 4px; }
.rg-hcp-prose { color: rgba(0, 20, 66, .5); font: 300 16px/1.72 var(--font-primary); }
.rg-hcp-prose h4 { margin: 18px 0 8px; color: var(--brand-navy); font: 600 16px/1.4 var(--font-primary); }
.rg-hcp-prose ol, .rg-hcp-prose ul { margin: 0 0 10px; padding-left: 22px; }
.rg-hcp-prose li { margin-bottom: 8px; }
.rg-hcp-prose strong { color: var(--brand-navy); font-weight: 500; }
.rg-hcp-hint { margin-top: 14px; padding: 14px 18px; border-radius: 12px; background: var(--surface-paper); font-size: 15px; color: var(--brand-navy); }
.rg-hcp-tablo { overflow-x: auto; margin: 6px 0 8px; }
.rg-hcp-tablo table { width: 100%; border-collapse: collapse; min-width: 480px; font: 300 15px/1.5 var(--font-primary); }
.rg-hcp-tablo th, .rg-hcp-tablo td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--surface-line); }
.rg-hcp-tablo th { font-weight: 500; color: var(--brand-navy); background: var(--surface-paper); }
.rg-hcp-tablo td { color: rgba(0, 20, 66, .5); }
.rg-hcp-foot { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--surface-line); font-size: 15px; color: rgba(0, 20, 66, .55); }

/* ============================ HCP BEYAN POPUP ============================ */
.rg-hcp-body { position: relative; padding: clamp(36px, 4vw, 46px); text-align: left; }
/* Baslik: sayfadaki buyuk basliklarin dili (navy + mavi span), popup olceginde.
   NOT: sayfa CSS'lerindeki 560 battaniye p kurali :not(.rg-hcp-title) istisnasi tasir. */
.rg-hcp-title {
  margin: 0 0 18px;
  padding-right: 60px;
  color: var(--brand-navy);
  font: 500 clamp(34px, 3.2vw, 46px)/1.08 var(--font-primary);
  letter-spacing: -1.8px;
}
.rg-hcp-title span { color: var(--brand-blue); }
.rg-hcp-sub {
  margin: 0 0 32px;
  color: rgba(0, 20, 66, .48);
  font: 300 16px/1.5 var(--font-primary);
  letter-spacing: -0.5px;
  text-align: left;
}
/* Butonlar: site CTA dili (hero-cta-third pill'i): birincil acik mavi, ikincil zarif kontur */
.rg-hcp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.rg-hcp-btn {
  font: 500 15px/1 var(--font-primary);
  min-height: 52px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s ease, color .2s ease, border-color .2s ease;
}
.rg-hcp-btn--yes {
  display: inline-flex; align-items: center;
  padding: 0 28px; border: 0;
  background: var(--brand-blue); color: #fff;
}
.rg-hcp-btn--yes:hover { background: var(--brand-ink); }
.rg-hcp-btn--no {
  display: inline-flex; align-items: center;
  padding: 0 24px;
  border: 1px solid var(--surface-line); background: none;
  color: rgba(0, 20, 66, .6);
}
.rg-hcp-btn--no:hover { color: var(--brand-navy); border-color: var(--brand-navy); }
/* Kapat: site modal'i (rg-modal-close) ile ayni: duz X navy, daire yok */
.rg-hcp-close {
  position: absolute; top: clamp(24px, 3vw, 34px); right: clamp(24px, 3vw, 34px);
  z-index: 10; padding: 4px;
  border: 0; background: none; color: #001334;
  font-size: 22px; line-height: 1; cursor: pointer;
  transition: color .15s ease;
}
.rg-hcp-close:hover { color: var(--brand-blue); }

/* Hub urun karti: "protokol" sinyali (kart body altinda mavi ipucu + ok).
   inline-block + inline ok: metin sarilirsa ok SON kelimenin yanina akar
   (inline-flex'te ok ilk satirin sagina dusuyordu, dar kartta bozuktu). */
.carousel-card__proto {
  display: inline-block;
  margin-top: 16px;
  font: 500 14px/1.35 var(--font-primary);
  color: var(--brand-blue);
}
.carousel-card__proto::after {
  content: "";
  display: inline-block;
  vertical-align: -2px;
  margin-left: 8px;
  width: 14px; height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.7 17.3 15.2 8.8H8V6h12v12h-2.8v-7.2l-8.5 8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.7 17.3 15.2 8.8H8V6h12v12h-2.8v-7.2l-8.5 8.5z'/%3E%3C/svg%3E") center/contain no-repeat;
  transition: transform .25s ease;
}
.js-kt-hcp-hub-card:hover .carousel-card__proto::after { transform: translateX(4px); }

/* ============================ POPUP ANIMASYONU ============================ */
/* Acilis: Bricks hide sinifini kaldirinca display degisir, keyframe otomatik oynar.
   Kapanis: kt-hcp-gate.js kt-pop-closing sinifini ekler, animasyon bitince
   bricksClosePopup cagirir (Bricks interaction'lari popup butonlarindan kaldirildi). */
@media (prefers-reduced-motion: no-preference) {
  .brx-popup:not(.hide):has(.rg-hcp-body) .brx-popup-content {
    animation: ktHcpPopIn .5s cubic-bezier(0.19, 1, 0.22, 1) both;
  }
  .brx-popup:not(.hide):has(.rg-hcp-body) .brx-popup-backdrop {
    animation: ktHcpFadeIn .4s ease both;
  }
  .brx-popup.kt-pop-closing:has(.rg-hcp-body) .brx-popup-content {
    animation: ktHcpPopOut .26s ease both;
  }
  .brx-popup.kt-pop-closing:has(.rg-hcp-body) .brx-popup-backdrop {
    animation: ktHcpFadeOut .26s ease both;
  }
}
@keyframes ktHcpPopIn {
  from { opacity: 0; transform: translateY(22px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes ktHcpPopOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(14px) scale(.97); }
}
@keyframes ktHcpFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ktHcpFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ============================ BUILDER + CAPA ============================ */
/* Mega menu / TOC capa linkleri fixed header altina kacmasin */
#rg-hcp-gate { scroll-margin-top: 130px; }

/* Bricks builder'da (body.bricks-is-frontend YOK) panel statik, akista ve
   duzenlenebilir gorunur; slide-in/fixed davranis yalniz gercek sitede. */
body:not(.bricks-is-frontend) .rg-hcp-panel-root { position: static; pointer-events: auto; }
body:not(.bricks-is-frontend) .rg-hcp-panel__backdrop { display: none; }
body:not(.bricks-is-frontend) .rg-hcp-panel__sheet {
  position: static;
  width: 100%;
  height: auto;
  transform: none;
  box-shadow: none;
  border: 1px dashed var(--surface-line);
  border-radius: 16px;
}

/* ============================ MOBIL ============================ */
@media (max-width: 860px) {
  #rg-hcp-gate .rg-hcp-gate__grid { grid-template-columns: 1fr; gap: 36px; }
  #rg-hcp-gate .second-section__shell { padding: 64px var(--hero-content-x); }
  .rg-hcp-gate__desc { margin-top: 8px; }
}
@media (max-width: 560px) {
  #rg-hcp-gate .second-section__shell { padding: 54px 30px; }
  .rg-hcp-gate__desc { font-size: 16px; }
  .rg-hcp-trigger { width: 100%; justify-content: center; }
  .rg-hcp-panel__sheet { width: 100%; }
  .rg-hcp-sub { font-size: 16px; }
  .rg-hcp-actions { flex-direction: column; }
  .rg-hcp-btn { width: 100%; justify-content: center; }
}
