/* ===============================
   AJANS SU 2.0 — AFFILIATE PAGE
   RESPONSIVE.CSS (MOBILE-FIRST)
   =============================== */

/* 1024px ve altı */
@media (max-width: 1024px){

  /* Hero iki sütundan tek kolona */
  .affiliate-hero {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }
  .affiliate-content { text-align: center; }
  .affiliate-orbit {
    margin-top: 60px;
    display: flex;
    justify-content: center;
  }

  /* Ana grid tek kolon */
  .affiliate-container { grid-template-columns: 1fr; }

  /* Avantajlar: 2 kolon */
  .affiliate-benefits .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* 3 Adım: dikey hizalama */
  .affiliate-steps .steps-grid{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .affiliate-steps .step-card{
    flex: none;
    width: 100%;
    max-width: 360px;
    margin: 0;
    text-align: center;
    padding: 20px 18px;
  }
  .affiliate-steps .step-number{
    width: 26px; height: 26px; line-height: 26px;
    font-size: 14px; top: -8px;
  }
  .affiliate-steps h3{ font-size: 20px; line-height: 1.25; }
  .affiliate-steps p { font-size: 15px; line-height: 1.4; }

  /* Panel bloğu */
  .panel-grid { grid-template-columns: 1fr; gap: 24px; }
  .panel-text h2{ font-size: 32px; }
  .panel-image img{ max-width: 92%; }
  .panel-kpis{ gap: 10px; flex-wrap: wrap; }

  /* Dekor */
  .fc-1{ right: 10%; top: 4%; }
  .fc-2{ right: 4%; bottom: 10%; }
}

/* 768px ve altı — tek kaynak burası */
@media (max-width: 768px){
  /* Hero içeriği */
  .affiliate-hero{
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;                 /* daha sıkı */
    padding-top: 8px;
  }

  /* Sol içerik */
  .affiliate-hero .affiliate-content{
    max-width: 26rem;          /* ~416px → satırlar kısalır, okunurluk artar */
    padding-inline: 16px;
    margin: 0 auto;
    margin-top: 170px;
  }
  .affiliate-hero .affiliate-content h1{
    font-size: clamp(22px, 6.4vw, 28px);
    line-height: 1.15;
    margin: 0 0 8px;
    letter-spacing: .2px;
    word-break: break-word;
  }
  .affiliate-hero .hero-subtitle{
    font-size: 15px;
    margin: 4px 0 8px;
    opacity: .9;
  }
  .affiliate-hero .affiliate-content p{
    font-size: 14.5px;
    line-height: 1.5;
    margin: 0 0 12px;
  }
  
  /* CTA */
  .affiliate-hero .btn-primary{
    display: inline-block;
    width: 88vw;               /* tam genişlik hissi, taşmadan */
    max-width: 480px;
    padding: 12px 14px;
    border-radius: 22px;
    text-align: center;
    margin-inline: auto;
  }

  /* İstatistikler — sade 2x2 grid */
  .affiliate-hero .hero-stats{
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px;
    margin: 14px auto 6px;
    max-width: 420px;
  }
  .affiliate-hero .hero-stats > div strong{ font-size: 18px; }
  .affiliate-hero .hero-stats > div span{ font-size: 12px; opacity:.85; }

  /* CTA (panel) */
  .panel-cta{
    font-size: 14px;
    padding: 11px 16px;
    border-radius: 28px;
    background: linear-gradient(90deg, #ff0000, #b30000);
  }
  .panel-cta:hover{
    background: linear-gradient(90deg, #ff2a2a, #cc0000);
    transform: translateY(-2px);
  }
  .benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 kolon */
  gap: 16px; /* kartlar arası boşluk */
}
  /* Testimonial & Who */
  .who-grid-v2{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .who-card-v2{
    text-align: center;
    padding: 16px;
  }
  .who-card-v2 { text-align: center; }
  .affiliate-who-v2 .who-grid-v2{
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  /* SSS */
  .affiliate-faq .faq-grid{
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .affiliate-faq .faq-column{ width: 100%; }
  .affiliate-faq .faq-question{
    font-size: 18px;
    line-height: 1.25;
    padding: 16px 56px 16px 18px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
    position: relative;
  }

/* ==== Orbit - Mobile hard fix ==== */
  /* Konteyner 3D yüzeyi açık ve kendi düzleminde kalsın */
  .affiliate-orbit{
    display:flex !important; 
    justify-content:center !important; 
    align-items:center !important;
    margin-inline:auto !important;
    --logo-nudge-x: 150px;   /* +sağ / -sol */
    --logo-nudge-y: 145px;
    transform: translateY(24px);
  }

  .affiliate-orbit .center-logo{
    position:absolute !important; 
    inset:0 !important;
    display:flex !important; 
    align-items:center !important; 
    justify-content:center !important;
    translate: var(--logo-nudge-x) var(--logo-nudge-y) !important;
    z-index:2 !important; 
    pointer-events:none !important; 
    padding-left: 100px;
    margin-top: 55px;
  }
  .affiliate-orbit .center-logo img{ 
    width:clamp(46px,22%,60px) !important; 
    height:auto !important; }

  
  .affiliate-orbit .orbit-comment-box{
    position:absolute !important;
    /* kritik düzeltme: SOLDAN KİLİT YOK */
    left:auto; right:auto;            /* hiçbir !important yok */
    top:auto; bottom:auto;            /* height şişmesin */
    transform:translateY(4px);        /* sadece küçük giriş ofseti */
    width:min(70vw,160px) !important; max-width:160px !important;
    height:auto !important; min-height:0 !important; max-height:none !important;
    padding:6px 8px !important; border-radius:10px !important; overflow:hidden !important;
    opacity:0; pointer-events:none;
    transition: opacity .18s ease, transform .18s ease;
    z-index:4;
  }
  .affiliate-orbit .orbit-comment-box.show{
    opacity:1; transform:translateY(0);
    pointer-events:auto;
  }
  .affiliate-orbit .orbit-comment-text{
    font-size:11.5px !important; line-height:1.35 !important; margin:0 0 4px !important;
    display:-webkit-box !important; -webkit-line-clamp:2 !important; -webkit-box-orient:vertical !important; overflow:hidden !important; text-align:center !important;
  }
  .affiliate-orbit .orbit-comment-author{
    font-size: 11px !important;
    opacity: .95 !important;
    text-align: center !important;
  }
  .affiliate-orbit .orbit-comment-arrow{
    width: 8px !important;
    height: 8px !important;
    bottom: -4px !important;
  }
}




/* Güvenlik: yatay taşmayı kes */
  .affiliate-hero{ overflow-x: hidden; }



/* 640px ve altı */
@media (max-width: 640px){

  /* Avantajlar: 2 kolon x 2 satır */
  .affiliate-benefits .benefits-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
  .affiliate-benefits .benefit-card{
    text-align: center;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 160px;
  }
  .affiliate-benefits .benefit-card img{
    width: 48px; height: auto; margin: 0 auto 10px; opacity: .9;
  }
  .affiliate-benefits .benefit-card h3{
    font-size: 18px; margin: 6px 0 6px;
  }
  .affiliate-benefits .benefit-card p{
    font-size: 14px; line-height: 1.45; margin: 0;
  }
}

/* 480px ve altı */
@media (max-width: 480px){
  .panel-kpis .kpi{ flex: 1 1 100%; }
  .hero-stats > div strong{ font-size: 1.4rem; }

  /* Avantajlar: tek kolon */
  .affiliate-benefits .benefits-grid{ grid-template-columns: 1fr; }
}

/* 420px ve altı */
@media (max-width: 420px){
  .hero-stats{ grid-template-columns: repeat(2,1fr); }
  .orbit-container{ width: 280px; height: 280px; }
  .orbit1{ width: 175px; height: 175px; }
  .orbit2{ width: 245px; height: 245px; }
  .orbit-item{ width: 36px; height: 36px; }
  .orbit-comment-box{ width: min(86vw, 280px); bottom: -10px; }
  .affiliate-hero .hero-stats{
    grid-template-columns: repeat(2,1fr);
  }
}

/* 360px ve altı */
@media (max-width: 360px){
  .affiliate-content h1{ font-size: 24px; }
  .orbit-container{ width: 260px; height: 260px; }
  .orbit1{ width: 165px; height: 165px; }
  .orbit2{ width: 230px; height: 230px; }
  .orbit-item{ width: 34px; height: 34px; }
  .orbit-comment-box{ width: min(88vw, 260px); padding: 9px 10px; }

}
/* =========================
   TABLET (769–1024) — 2 kart, snap yok
   ========================= */
@media (min-width: 769px) and (max-width: 1024px){
  .affiliate-testimonials #tTrack{
    display: flex;
    flex-wrap: wrap;          /* sadece tablet aralığında */
    gap: 16px;
    justify-content: center;
    overflow: visible;
  }

  .affiliate-testimonials .testimonial-card{
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
    box-sizing: border-box;
    padding: 18px 16px;
  }

  .affiliate-testimonials .testimonial-text{
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
  }

  .affiliate-testimonials .testimonial-author{
    font-size: 13px;
    text-align: center;
  }
}

/* =========================
   MOBİL (<=768) — tek kart, scroll-snap
   ========================= */
@media (max-width: 768px){
  .affiliate-testimonials h2,
  .affiliate-testimonials .section-subtext{
    text-align: center !important;
    margin-left: 10px !important;
    max-width: 95vw !important;
    width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    display: block;
  }
  .affiliate-testimonials{ padding-left: 0 !important; padding-right: 0 !important; }

  /* Full-bleed: slider'ı viewport genişliğine sabitle (ortalamayı şaşırmasın) */
  .affiliate-testimonials .t-slider{
    inline-size: 100vw;
    margin-inline: calc(50% - 50vw); /* kapsayıcı paddinglerini nötrler */
  }

  /* Track: TEK SIRA + sabit kart genişliği
     - is-mobile-snap varsa onu kullan, yoksa #tTrack fallback çalışsın */
  #tTrack.is-mobile-snap,
  .affiliate-testimonials #tTrack{
    --cardW: 320px;                         /* 300–336px arası deneyebilirsin */
    --gap: 12px;

    display: flex !important;
    flex-wrap: nowrap !important;           /* tek sıra */
    justify-content: flex-start;
    width: 100%;
    inline-size: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-snap-type: x mandatory !important;
    gap: var(--gap);

    /* İlk/son kart merkeze otursun */
    padding-inline: calc((100% - var(--cardW)) / 2) !important;
    scroll-padding-inline: calc((100% - var(--cardW)) / 2) !important;

    box-sizing: border-box;                 /* ölçüm tutarlılığı */
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;

    /* 🔧 kritik: yatay kaydırmaya izin ver */
    touch-action: pan-x pinch-zoom !important;

    margin: 0 !important;
  }

  /* Kart: sabit genişlik + snap (diğer kuralları ez) */
  #tTrack.is-mobile-snap .testimonial-card,
  .affiliate-testimonials #tTrack .testimonial-card{
    width: var(--cardW) !important;
    max-width: var(--cardW) !important;
    min-width: var(--cardW) !important;
    flex: 0 0 var(--cardW) !important;

    display: flex;
    flex-direction: column;
    align-items: center;

    box-sizing: border-box;
    padding: 16px 14px;
    margin: 0;
    align-self: center;

    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  /* Metinler mutlaka sarılsın, satır uzunluğu kontrolü */
  #tTrack.is-mobile-snap .testimonial-card .testimonial-text,
  .affiliate-testimonials #tTrack .testimonial-card .testimonial-text{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;

    max-width: 28ch;                /* okunur satır uzunluğu */
    width: 100%;
    margin: 0 auto 10px;
    text-align: center;
    font-size: 15.5px;
    line-height: 1.5;
  }

  /* Yazar da taşmasın */
  #tTrack.is-mobile-snap .testimonial-card .testimonial-author,
  .affiliate-testimonials #tTrack .testimonial-card .testimonial-author{
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    text-align: center;
    font-size: 13px;
  }

  #tTrack.is-mobile-snap .testimonial-card .quote-icon,
  .affiliate-testimonials #tTrack .testimonial-card .quote-icon{
    width: 18px; height: auto;
  }

  /* Masaüstü drag modu etkilenmesin */
  #tTrack.is-dragging{ scroll-snap-type: none; }

  /* Görsel temizlik */
  #tTrack::-webkit-scrollbar{ display: none; }
  .t-nav{ display: none; }
}

