/* =========================================================
  Egechem Slider (NEW)
  - eg- prefix
  - Square format (aspect-ratio: 1/1)
  - Uses main.css fonts (Sora/Manrope)
========================================================= */

.eg-slider{ padding: 22px 0 14px; }

.eg-slider__wrap{
  position: relative;
  width: 100%;
  border-radius: clamp(18px, 2vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 20px 60px rgba(11, 42, 62, .14);
  background: linear-gradient(135deg, rgba(30,89,137,.16), rgba(11,42,62,.06));
  isolation: isolate;
}

/* Kare format: yükseklik = genişlik */
.eg-slider__viewport{
  overflow: hidden;
  width: 100%;
  height: clamp(460px, calc(100vh - var(--eg-header-h) - 140px), 660px);
  background: #000; /* kaydırmada seam görünmesin */
}

/* Track */
.eg-slider__track{
  display: flex;
  will-change: transform;
  transform: translate3d(0,0,0);
  backface-visibility: hidden;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  height: 100%;
}

/* Slide */
.eg-slide{
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  height: 100%;
  display: grid;
  place-items: stretch;
}

/* Image */
.eg-slide__img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none; /* seam riskini sıfırlıyoruz */
}

/* Shade / overlay (Egechem mavi-lacivert) */
.eg-slide__shade{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 700px at 18% 18%, rgba(30,89,137,.30) 0%, transparent 60%),
    linear-gradient(90deg, rgba(2,6,23,.72) 0%, rgba(2,6,23,.36) 55%, rgba(2,6,23,.08) 100%),
    linear-gradient(180deg, rgba(0,0,0,.22) 0%, rgba(0,0,0,.06) 80%);
}

/* Content */
.eg-slide__content{
  position: relative;
  z-index: 2;
  color: #fff;
  display: grid;
  gap: 10px;

  /* mevcut slider hissi: içerik solda, ama okla çakışmasın */
  width: min(720px, 92%);
  margin-left: clamp(18px, 5vw, 84px);
  margin-right: clamp(14px, 4vw, 42px);
  align-content: center;
  height: 100%;
}

.eg-slide__kicker{
  display: inline-block;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--eg-blue-900);
  border: 1px solid rgba(30,89,137,.28);
  width: fit-content;
}

.eg-slide__title{
  margin: 0;
  font-family: var(--eg-font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(26px, 4.6vw, 56px);
  line-height: 1.08;
  text-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.eg-slide__desc{
  margin: 0;
  max-width: 70ch;
  color: rgba(255,255,255,.86);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.55;
}

/* CTA (main.css butonlarını kullanıyoruz) */
.eg-slide__cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.eg-slide__cta .eg-btn{
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

/* Nav */
.eg-slider__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  z-index: 5;
}
.eg-slider__nav:hover{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.35);
}
.eg-slider__prev{ left: 14px; }
.eg-slider__next{ right: 14px; }

/* Dots */
.eg-slider__dots{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  display: flex;
  gap: 8px;
  z-index: 6;
}
.eg-slider__dots button{
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,.55);
  transition: all .2s ease;
}
.eg-slider__dots button[aria-selected="true"]{
  width: 28px;
  background: #fff;
}

/* Text entrance animation (aktif slide) */
.eg-slide[data-eg-active] .eg-slide__kicker{ animation: eg_in .6s ease .08s both; }
.eg-slide[data-eg-active] .eg-slide__title{  animation: eg_in .7s ease .16s both; }
.eg-slide[data-eg-active] .eg-slide__desc{   animation: eg_in .7s ease .26s both; }
.eg-slide[data-eg-active] .eg-slide__cta{    animation: eg_in .7s ease .36s both; }

@keyframes eg_in{
  from{ opacity:0; transform: translateY(18px); filter: blur(10px); }
  to{ opacity:1; transform: none; filter: none; }
}

/* Mobile */
@media (max-width: 700px){
  .eg-slide__content{
    margin-left: 16px;
    margin-right: 16px;
    width: min(720px, calc(100% - 32px));
  }
  .eg-slider__nav{
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

@media (max-width: 900px){
  .eg-slider__nav{ display:none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .eg-slider__track{ transition: none; }
  .eg-slide[data-eg-active] .eg-slide__kicker,
  .eg-slide[data-eg-active] .eg-slide__title,
  .eg-slide[data-eg-active] .eg-slide__desc,
  .eg-slide[data-eg-active] .eg-slide__cta{ animation: none; }
}