/* ==================================================
   FOUNDATION MODULE
================================================== */

.foundation-module {
  --foundation-cyan: #00f7ff;
  --foundation-lime: #d5ff35;
  --foundation-white: rgba(255, 255, 255, 0.95);
  --foundation-panel-fill: rgba(0, 0, 0, 0.28);
  --foundation-chamfer: 12px;

  position: absolute;

  right: 400px;
  bottom: 250px;

  z-index: 238;

  font-family: "Rajdhani", sans-serif;
}

.foundation-module,
.foundation-module *,
.foundation-module *::before,
.foundation-module *::after {
  box-sizing: border-box;
}


/* ==================================================
   KÜÇÜK FOUNDATION BUTONU
================================================== */

.foundation-trigger {
  --hud-chamfer: 10px;
  --foundation-trigger-fill: #000000;

  position: relative;

  width: 215px;
  height: 46px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;

  padding: 0 10px 0 14px;

  border: none;

  /* Kenarlık rengi; içi siyah ::before */
  background: #e0fe5f;

  color: #e0fe5f;
  font-family: "Rajdhani", sans-serif;

  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    var(--hud-chamfer) 100%,
    0 calc(100% - var(--hud-chamfer))
  );

  cursor: pointer;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.35);

  opacity: 0.78;
  filter: none;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease,
    visibility 0.22s ease,
    filter 0.22s ease;
}

.foundation-trigger::before {
  content: "";

  position: absolute;
  inset: 1.5px;

  background: var(--foundation-trigger-fill);

  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    calc(var(--hud-chamfer) - 1.5px) 100%,
    0 calc(100% - (var(--hud-chamfer) - 1.5px))
  );

  pointer-events: none;
  transition: background 0.22s ease;
}

.foundation-trigger > * {
  position: relative;
  z-index: 1;
}

.foundation-trigger::after {
  content: "";

  position: absolute;

  left: 12px;
  right: -100px;
  bottom: -4px;

  height: 1px;

  background: linear-gradient(
    to right,
    var(--foundation-cyan),
    transparent
  );

  box-shadow:
    0 0 2px rgba(0, 247, 255, 0.22);
}

.foundation-trigger:hover,
.foundation-trigger:focus-visible {
  transform: translateX(-5px);
  outline: none;
  opacity: 1;
  filter: none;
  color: #000000;
}

.foundation-trigger:hover::before,
.foundation-trigger:focus-visible::before,
.foundation-trigger:active::before {
  background: #e0fe5f;
}

.foundation-trigger:hover .foundation-trigger__label,
.foundation-trigger:focus-visible .foundation-trigger__label {
  color: #000000;
  text-shadow: none;
}

.foundation-trigger:hover .foundation-trigger__icon img,
.foundation-trigger:focus-visible .foundation-trigger__icon img {
  filter: brightness(0);
}

.foundation-trigger:active {
  transform: translateX(-5px) translateY(1px) scale(0.98);
  background: #e0fe5f;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.35);
}

.foundation-trigger.is-active {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.foundation-trigger__icon {
  width: 27px;
  height: 27px;

  flex: 0 0 27px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.foundation-trigger__icon img {
  width: 24px;
  height: 24px;

  display: block;
  object-fit: contain;

  filter:
    brightness(0)
    saturate(100%)
    invert(90%)
    sepia(47%)
    saturate(458%)
    hue-rotate(19deg)
    brightness(104%)
    contrast(101%)
    drop-shadow(0 0 2px rgba(224, 254, 95, 0.45))
    drop-shadow(0 0 4px rgba(224, 254, 95, 0.18));
}

.foundation-trigger__label {
  color: #e0fe5f;

  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1.1px;

  text-shadow:
    0 0 3px rgba(224, 254, 95, 0.38),
    0 0 6px rgba(224, 254, 95, 0.14);
}


/* ==================================================
   FOUNDATION PANEL
================================================== */

.foundation-panel {
  --foundation-cyan: #00f7ff;
  --foundation-lime: #d5ff35;
  --foundation-white: rgba(255, 255, 255, 0.95);
  --foundation-panel-fill: rgba(0, 0, 0, 0.28);

  font-family: "Rajdhani", sans-serif;

  position: absolute;

  right: -40px;
  bottom: -90px;

  width: 520px;
  height: 720px;

  z-index: 275;
  isolation: isolate;
  overflow: visible;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform:
    translateX(25px)
    scale(0.975);

  transform-origin: right bottom;

  transition:
    opacity 0.28s ease,
    transform 0.34s ease,
    visibility 0.28s ease;
}

.foundation-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform:
    translateX(0)
    scale(1);
}

.foundation-panel .panel-scan-line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--foundation-cyan) 18%,
    #ffffff 50%,
    var(--foundation-cyan) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 16px 3px var(--foundation-cyan),
    0 0 32px 6px rgba(0, 247, 255, 0.55);
}

.foundation-panel.is-scan-open .panel-scan-line {
  animation: panelScanLineOpen 0.4s ease-out forwards;
}

.foundation-panel.is-scan-close .panel-scan-line {
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--foundation-cyan) 18%,
    #ffffff 50%,
    var(--foundation-cyan) 82%,
    transparent 100%
  );
  box-shadow:
    0 0 16px 3px var(--foundation-cyan),
    0 0 32px 6px rgba(0, 247, 255, 0.55);
  animation: panelScanLineClose 0.4s ease-out forwards;
}


/* ==================================================
   PANEL ZEMİNİ VE NEON ÇERÇEVE
================================================== */

.foundation-panel__outline {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  z-index: 0;

  overflow: visible;
  pointer-events: none;
}

.foundation-panel__outline .panel-shell {
  fill: rgba(0, 10, 14, 0.22);

  stroke: #e0fe5f;
  stroke-width: 1.5;

  vector-effect: non-scaling-stroke;

  filter:
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55))
    drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}


/* ==================================================
   ÜST BAŞLIK
================================================== */

.foundation-panel__header {
  position: absolute;

  left: -58px;
  right: -100px;
  top: -65px;

  z-index: 7;

  height: 58px;
}

.foundation-panel__title {
  position: relative;

  width: 100%;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;

  padding-right: 20px;

  border-bottom: 1px solid var(--foundation-cyan);
}

.foundation-panel__title h2 {
  margin: 0;

  color: var(--foundation-cyan);

  font-size: 31px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 1px;

  text-shadow:
    0 0 5px rgba(0, 247, 255, 0.75),
    0 0 13px rgba(0, 247, 255, 0.22);
}

.foundation-panel__cube {
  width: 43px;
  height: 43px;

  display: block;
  object-fit: contain;

  flex: 0 0 43px;

  fill: none;

  stroke: var(--foundation-cyan);
  stroke-width: 1.5;
  stroke-linejoin: round;

  filter:
    drop-shadow(0 0 3px rgba(0, 247, 255, 0.8))
    drop-shadow(0 0 8px rgba(0, 247, 255, 0.22));
}

.foundation-panel__stripe {
  width: 39px;
  height: 13px;

  background: var(--foundation-cyan);

  transform: skewX(-42deg);

  box-shadow:
    0 0 5px rgba(0, 247, 255, 0.85),
    0 0 12px rgba(0, 247, 255, 0.25);
}

.foundation-panel__title-dot {
  position: absolute;

  right: -5px;
  bottom: -4px;

  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: var(--foundation-cyan);

  box-shadow:
    0 0 5px var(--foundation-cyan),
    0 0 11px rgba(0, 247, 255, 0.55);
}

/* ==================================================
   FOUNDATION — SARI KAPATMA İŞARETİ
================================================== */

.foundation-panel__close {
  position: absolute;

  right: 8px;
  top: 8px;
  left: auto;

  z-index: 80;

  width: 42px;
  height: 42px;

  padding: 0;
  border: 0;
  outline: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  color: var(--foundation-lime);

  filter:
    drop-shadow(0 0 4px rgba(213, 255, 53, 0.85))
    drop-shadow(0 0 10px rgba(213, 255, 53, 0.35));

  cursor: pointer;
}

.foundation-panel__close svg {
  display: block;
  width: 32px;
  height: 32px;
}

.foundation-panel__close:hover {
  transform: scale(1.08);
  color: #ffffff;
}

.foundation-panel__close:active {
  transform: scale(0.94);
}


/* ==================================================
   PANEL İÇERİĞİ
================================================== */

.foundation-panel__content {
  position: absolute;
  inset: 0;

  z-index: 3;

  width: 100%;
  height: 100%;

  /*
    Referanstaki gibi metin alanı panelin büyük bölümünü kaplar.
  */
  padding: 44px 52px 28px;

  text-align: center;

  overflow: hidden;
}


/* ==================================================
   TEMEL FOUNDATION BÖLÜMLERİ
================================================== */

.foundation-section {
  position: relative;

  width: 100%;
  max-width: 500px;

  margin: 0 auto 16px;
}

.foundation-section h3 {
  margin: 0 0 4px;

  color: var(--foundation-lime);

  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.12px;
  text-transform: uppercase;

  text-shadow:
    0 0 5px rgba(213, 255, 53, 0.40),
    0 0 11px rgba(213, 255, 53, 0.12);
}

.foundation-section h4 {
  margin: 0 0 7px;

  color: var(--foundation-lime);

  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.08;
}

.foundation-section p {
  max-width: 495px;

  margin: 0 auto;

  color: var(--foundation-white);

  font-size: 13px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: 0;

  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.82);
}


/* ==================================================
   BACHELOR İKONU
================================================== */

.foundation-panel__knowledge-badge,
.foundation-panel__knowledge-badge--bachelor {
  position: absolute;

  right: -7px;
  top: 30px;

  z-index: 8;

  width: 58px;
  height: 58px;

  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 0;
  border-radius: 0;

  box-shadow: none;

  transform: none;
}

.foundation-panel__knowledge-badge::before,
.foundation-panel__knowledge-badge::after,
.foundation-panel__knowledge-badge--bachelor::before,
.foundation-panel__knowledge-badge--bachelor::after {
  content: none;
  display: none;
}

.foundation-panel__knowledge-badge .knowledge-person,
.foundation-panel__knowledge-badge--bachelor .knowledge-person {
  display: none;
}

.foundation-panel__knowledge-badge--bachelor img,
.foundation-panel__knowledge-badge img {
  width: 54px;
  height: 54px;

  display: block;
  object-fit: contain;

  transform: none;

  filter:
    drop-shadow(0 0 3px rgba(217, 255, 63, 0.95))
    drop-shadow(0 0 10px rgba(217, 255, 63, 0.32));
}


/* ==================================================
   ADVANCED MODULES BAŞLIĞI
================================================== */

.foundation-panel__advanced-title {
  position: relative;

  width: 250px;

  margin: 5px auto 16px;
  padding: 7px 12px 6px;

  border: 1px solid var(--foundation-cyan);

  background: rgba(0, 0, 0, 0.22);

  clip-path: polygon(
    0 0,
    100% 0,
    100% 100%,
    var(--foundation-chamfer, 12px) 100%,
    0 calc(100% - var(--foundation-chamfer, 12px))
  );

  box-shadow:
    0 0 5px rgba(0, 247, 255, 0.35),
    inset 0 0 10px rgba(0, 247, 255, 0.05);
}

.foundation-panel__advanced-title h3 {
  margin: 0;

  color: var(--foundation-cyan);

  font-size: 17px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0.8px;

  text-shadow:
    0 0 5px rgba(0, 247, 255, 0.72),
    0 0 12px rgba(0, 247, 255, 0.20);
}


/* ==================================================
   ORTADAKİ NOKTA + ÇİZGİ HUD ŞEKLİ
================================================== */

.foundation-panel__advanced-dots {
  position: absolute;

  right: 65px;
  top: -14px;

  display: flex;
  align-items: center;
  gap: 5px;
}

.foundation-panel__advanced-dots span {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--foundation-lime);

  box-shadow:
    0 0 5px rgba(213, 255, 53, 0.85);
}

.foundation-panel__advanced-line {
  position: absolute;

  right: 9px;
  top: -13px;

  width: 48px;
  height: 5px;

  border-radius: 3px;

  background: repeating-linear-gradient(
    90deg,
    var(--foundation-lime) 0 7px,
    transparent 7px 10px
  );

  filter:
    drop-shadow(0 0 4px rgba(213, 255, 53, 0.60));
}


/* ==================================================
   ADVANCED METİNLER
================================================== */

.foundation-section--advanced {
  margin-bottom: 14px;
}

.foundation-section--advanced h3 {
  margin-bottom: 4px;

  font-size: 13.5px;
}

.foundation-section--advanced p {
  max-width: 485px;

  font-size: 12.5px;
  line-height: 1.21;
}


/* ==================================================
   ALT SARI-SİYAH DEKOR
================================================== */

.foundation-panel__hazard {
  position: absolute;

  left: 67px;
  bottom: 10px;

  z-index: 5;

  display: flex;
  gap: 3px;

  padding: 3px 6px;

  background: rgba(0, 0, 0, 0.65);
}

.foundation-panel__hazard span {
  width: 17px;
  height: 6px;

  background: var(--foundation-lime);

  transform: skewX(-36deg);

  box-shadow:
    0 0 4px rgba(213, 255, 53, 0.4);
}

/* Responsive: sol radiusa yakın + siyah arka plansız */
html.has-mobile-menu-stack .foundation-panel__hazard,
html.is-mobile.is-portrait .foundation-panel__hazard,
html.is-tablet.is-portrait .foundation-panel__hazard {
  left: 18px;
  padding: 0;
  background: transparent;
}
/* ==================================================
   FOUNDATION — METİNLERİ AŞAĞI AL VE PANELİ DOLDUR
================================================== */

.foundation-panel__content {
  position: absolute;
  inset: 0;

  z-index: 3;

  width: 100%;
  height: 100%;

  /*
    Üst boşluk artırıldı:
    bütün içerik biraz aşağı iner.
  */
  padding: 66px 52px 25px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;

  text-align: center;

  overflow: hidden;
}


/* Her metin bloğu tam genişlikte kalsın */

.foundation-section {
  position: relative;

  width: 100%;
  max-width: 500px;

  /*
    Eski margin-bottom değerlerini kaldırıyoruz.
    Aralıkları space-between yönetiyor.
  */
  margin: 0 auto;
}


/* Advanced kutusu da akışta dengeli dursun */

.foundation-panel__advanced-title {
  flex: 0 0 auto;

  width: 250px;

  margin: 3px auto;
  padding: 7px 12px 6px;
}


/* Advanced metin bloklarında fazladan boşluk olmasın */

.foundation-section--advanced {
  margin: 0 auto;
}


/* Bachelor ikonu yazı akışına girmez */

.foundation-panel__knowledge-badge--bachelor {
  position: absolute;

  right: 20px;
  top: 40px;

  z-index: 8;
}


/* Alt dekor yazılara çarpmasın */

.foundation-panel__hazard {
  bottom: 7px;
}
