/* ============================================================
    * Yades İç Sayfa Stilleri (anasayfa hariç tüm sayfalar)
    * ============================================================
    * Hedef: /hakkimizda, /iletisim, /demo-talep, /kvkk, /gizlilik,
    *        /kullanim-sartlari, /akademi, /yardim ve tüm alt sayfalar
    *
    * Yerleştirme: WP Admin → Görünüm → Özelleştir → Ek CSS
    * (veya Customizer → Additional CSS)
    * ============================================================ */

    /* ====================================================
     * 2026-05-15: 2-font sistem (Brand-Kit Bölüm 3 evrime girdi)
     * Body: Inter (mevcut korunur)
     * Heading: Manrope (yeni — distinctive ama subtle)
     * font-display: swap query parametresinde
     * NOT: preconnect optimizasyonu Faz 1.6 kapsamında
     * (şu an @import sequential load ~50-100ms ek bekleme,
     *  font-display: swap ile FOIT yerine FOUT — kabul edilebilir)
     * ==================================================== */
    /* @import kaldirildi 2026-06-06 — font yuklemesi 'Yades — Font Loader' snippet'inde (preload+swap) */

    /* ============================================================
     * FAZ 1.6 — Design Token System (2026-05-15)
     * 8 color + 8 font-size + 8 spacing + 4 z-index tokens
     * Brand-Kit Bölüm 2-3 ile sync. A11y AAA hedef (#1f2937, #4b5563).
     * Mevcut hex değerler kademeli token'a çevriliyor.
     * ============================================================ */
    :root {
      /* === Color (8 token) === */
      --color-primary:        #00236f;  /* Lacivert ana */
      --color-primary-dark:   #1e3a8a;  /* Gradient stop koyu */
      --color-secondary:      #fd761a;  /* Turuncu accent */
      --color-secondary-dark: #ea6800;  /* Turuncu hover/koyu */
      --color-bg:             #ffffff;  /* Beyaz */
      --color-surface:        #f0f5ff;  /* Açık mavi yüzey */
      --color-foreground:     #1f2937;  /* Metin (saf siyah yerine WCAG AAA) */
      --color-muted:          #4b5563;  /* İkincil metin (WCAG AA 4.5:1+ beyaza karşı) */
      --color-border:         #e2e8f0;  /* Kart/separator */

      /* === Font size (8 token, 1.25× modular scale base 16) === */
      --font-size-xs:   12px;  /* eyebrow/caption */
      --font-size-sm:   14px;  /* küçük UI */
      --font-size-base: 16px;  /* body */
      --font-size-lg:   18px;  /* lead paragraf */
      --font-size-xl:   22px;  /* H4 */
      --font-size-2xl:  28px;  /* H3 */
      --font-size-3xl:  36px;  /* H2 / entry-title */
      --font-size-4xl:  48px;  /* hero display */

      /* === Spacing (8 token, 4/8 base) === */
      --space-1: 4px;
      --space-2: 8px;
      --space-3: 16px;
      --space-4: 24px;
      --space-5: 32px;
      --space-6: 48px;
      --space-7: 64px;
      --space-8: 96px;

      /* === Z-index (4 layer) === */
      --z-base:     1;
      --z-overlay:  100;
      --z-modal:    1000;
      --z-toast:    10000;

      /* === Font families (Faz 0.2'den sync) === */
      --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
      --font-heading: 'Manrope', var(--font-body);
    }


    /* Genel — anasayfa hariç tüm sayfalar */
    body:not(.home) .entry-content,
    body:not(.home) .ast-page-builder-template .entry-content {
        max-width: 920px;
        margin: 0 auto;
        padding: 2rem 1.5rem 4rem;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-base);
        line-height: 1.7;
        color: var(--color-foreground);
    }

    /* Sayfa başlığı (entry-title) — Manrope ExtraBold */
    body:not(.home) .entry-title,
    body:not(.home) .ast-page-builder-template .entry-title {
        max-width: 920px;
        margin: 2.5rem auto 0.5rem;
        padding: 0 1.5rem;
        font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-3xl);
        font-weight: 800;
        color: var(--color-primary);
        line-height: 1.15;
        letter-spacing: -0.02em;
    }

    /* H1 — sayfada yoksa entry-title bunu üstlenir; varsa orijinali stille */
    body:not(.home) .entry-content h1 {
        font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-3xl);
        font-weight: 800;
        color: var(--color-primary);
        margin: 2.5rem 0 1rem;
        line-height: 1.2;
        letter-spacing: -0.01em;
    }

    /* WP entry-title üstte zaten görünüyor, içerikteki ilk H1'i gizle
    (md'lerin başında # Başlık olduğundan duplicate olur).
    :first-of-type — hero-wrap div'i önde olsa bile ilk h1'i yakalar */
    body:not(.home) .entry-content&gt;h1:first-of-type {
        display: none;
    }

    /* Header'da logo yanındaki dikey "Yades" site title text'ini gizle —
    logo görseli zaten markayı taşıyor. Tüm sayfalarda (anasayfa dahil) */
    .ast-site-title-wrap,
    .site-title,
    .site-description {
        display: none !important;
    }

    /* Logo boyutu — anasayfa ve iç sayfalarda aynı görünsün
    (anasayfa inline CSS de 50px uyguluyor, iç sayfalar için global tanım) */
    .site-header .custom-logo,
    .site-header .site-logo-img img,
    .site-logo-img img {
        max-height: 50px !important;
        width: auto !important;
        height: auto !important;
    }

    .site-header .site-logo-img,
    .site-header .ast-site-identity {
        display: flex;
        align-items: center;
    }

    /* Sticky header — aşağı scroll edildiğinde üst menü kaybolmasın */
    .site-header,
    #masthead {
        position: sticky !important;
        top: 0 !important;
        z-index: 999 !important;
        background: #ffffff !important;
        box-shadow: 0 2px 12px rgba(0, 35, 111, 0.08);
        transition: box-shadow 0.2s ease;
    }
    /* NOT: z-index: 999 — Faz 1.6 z-index token (1/100/1000/10000) ile uyumlu değil,
       ama Astra'nın sticky header z-index'i `999`'a sabitlenmiş; token (--z-modal: 1000)
       kullanmak modal'ı üst-üst bindirir. Bilinçli literal kalır. */

    /* WP Admin Bar varsa altına yapıştır */
    body.admin-bar .site-header,
    body.admin-bar #masthead {
        top: 32px !important;
    }

    @media (max-width: 782px) {

        body.admin-bar .site-header,
        body.admin-bar #masthead {
            top: 46px !important;
        }
    }

    /* H2 — Bölüm başlığı (turuncu altında ince çizgi ile vurgu) */
    body:not(.home) .entry-content h2 {
        font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-2xl);
        font-weight: 700;
        color: var(--color-primary);
        margin: 2.5rem 0 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-secondary);
        line-height: 1.3;
        letter-spacing: -0.01em;
        display: inline-block;
    }

    /* H3 — Alt başlık */
    body:not(.home) .entry-content h3 {
        font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-lg);
        font-weight: 600;
        color: var(--color-primary-dark);
        margin: 2rem 0 0.75rem;
        line-height: 1.35;
    }

    /* H4 */
    body:not(.home) .entry-content h4 {
        font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        font-size: var(--font-size-lg);
        font-weight: 600;
        color: var(--color-primary-dark);
        margin: 1.5rem 0 0.5rem;
    }

    /* Paragraf */
    body:not(.home) .entry-content p {
        margin: 0 0 1rem;
        color: var(--color-foreground);
    }

    /* Strong vurgu */
    body:not(.home) .entry-content strong {
        color: var(--color-primary);
        font-weight: 700;
    }

    /* Linkler — Yades turuncu, hover'da koyulaşır */
    body:not(.home) .entry-content a {
        color: var(--color-secondary-dark);
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
        transition: color 0.15s ease;
    }

    body:not(.home) .entry-content a:hover {
        color: var(--color-primary);
        text-decoration-thickness: 2px;
    }

    /* Listeler */
    body:not(.home) .entry-content ul,
    body:not(.home) .entry-content ol {
        margin: 0 0 1.25rem;
        padding-left: 1.5rem;
    }

    body:not(.home) .entry-content li {
        margin: 0.4rem 0;
        color: var(--color-foreground);
        line-height: 1.6;
    }

    /* Sıralanmamış liste — turuncu bullet */
    body:not(.home) .entry-content ul {
        list-style: none;
        padding-left: 0;
    }

    body:not(.home) .entry-content ul&gt;li {
        position: relative;
        padding-left: 1.25rem;
    }

    body:not(.home) .entry-content ul&gt;li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0.7em;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--color-secondary);
    }

    /* Sayılı liste — turuncu sayı */
    body:not(.home) .entry-content ol {
        list-style: none;
        counter-reset: yades-counter;
        padding-left: 0;
    }

    body:not(.home) .entry-content ol&gt;li {
        counter-increment: yades-counter;
        position: relative;
        padding-left: 2.25rem;
    }

    body:not(.home) .entry-content ol&gt;li::before {
        content: counter(yades-counter) '.';
        position: absolute;
        left: 0;
        top: 0;
        font-weight: 700;
        color: var(--color-secondary);
        width: 1.75rem;
        text-align: right;
    }

    /* İç içe liste */
    body:not(.home) .entry-content li&gt;ul,
    body:not(.home) .entry-content li&gt;ol {
        margin-top: 0.4rem;
        margin-bottom: 0.4rem;
    }

    /* Blockquote — yumuşak vurgu kutusu */
    body:not(.home) .entry-content blockquote {
        background: var(--color-surface);
        border-left: 4px solid var(--color-secondary);
        margin: 1.5rem 0;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        color: var(--color-foreground);
        font-size: var(--font-size-sm);
    }

    body:not(.home) .entry-content blockquote p {
        margin: 0 0 0.5rem;
    }

    body:not(.home) .entry-content blockquote p:last-child {
        margin-bottom: 0;
    }

    body:not(.home) .entry-content blockquote strong {
        color: var(--color-primary);
    }

    /* Tablolar */
    body:not(.home) .entry-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5rem 0;
        font-size: var(--font-size-sm);
        background: #ffffff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    body:not(.home) .entry-content thead {
        background: var(--color-primary);
        color: #ffffff;
    }

    body:not(.home) .entry-content th {
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        color: #ffffff;
        border: none;
    }

    body:not(.home) .entry-content td {
        padding: 0.7rem 1rem;
        border-bottom: 1px solid #e5e7eb;
        color: var(--color-foreground);
    }

    body:not(.home) .entry-content tbody tr:nth-child(even) {
        background: #f8f9ff;
    }

    body:not(.home) .entry-content tbody tr:hover {
        background: #fff5eb;
    }

    /* HR — bölüm ayracı */
    body:not(.home) .entry-content hr {
        margin: 2.5rem 0;
        border: none;
        height: 1px;
        background: linear-gradient(to right, transparent, var(--color-border), transparent);
    }

    /* Code &amp; Pre */
    body:not(.home) .entry-content code {
        background: #f3f4f6;
        color: var(--color-secondary-dark);
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 0.9em;
        font-family: 'Fira Code', 'Consolas', monospace;
    }

    body:not(.home) .entry-content pre {
        background: #0b1c30;
        color: #e5e7eb;
        padding: 1rem 1.25rem;
        border-radius: 8px;
        overflow-x: auto;
        margin: 1.5rem 0;
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }

    body:not(.home) .entry-content pre code {
        background: transparent;
        color: inherit;
        padding: 0;
    }

    /* İmage */
    body:not(.home) .entry-content img {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
        margin: 1.5rem 0;
        box-shadow: 0 4px 12px rgba(0, 35, 111, 0.08);
    }

    /* Mobil */
    @media (max-width: 768px) {

        body:not(.home) .entry-content,
        body:not(.home) .ast-page-builder-template .entry-content {
            padding: 1.5rem 1rem 3rem;
            font-size: var(--font-size-sm);
        }

        body:not(.home) .entry-title {
            font-size: var(--font-size-2xl);
            padding: 0 1rem;
        }

        body:not(.home) .entry-content h2 {
            font-size: var(--font-size-xl);
        }

        body:not(.home) .entry-content h3 {
            font-size: var(--font-size-lg);
        }

        body:not(.home) .entry-content table {
            font-size: var(--font-size-sm);
        }

        body:not(.home) .entry-content th,
        body:not(.home) .entry-content td {
            padding: 0.5rem 0.6rem;
        }
    }

    /* Inline SVG ikonları (yades_icon shortcode) — metin satırında düzgün hizala */
    .yds-inline-icon {
        display: inline-block;
        vertical-align: middle;
        margin-right: var(--space-2);
        flex-shrink: 0;
    }

    /* Hero illüstrasyon (yades_hero shortcode) — iç sayfa üst kısımda sağa float */
    .yades-hero-wrap {
        float: right;
        max-width: 380px;
        width: 40%;
        margin: 0 0 1.5rem 2rem;
        shape-outside: ellipse(50% 50% at 50% 50%);
    }

    .yades-hero-wrap svg.yades-hero-svg {
        width: 100%;
        height: auto;
        display: block;
    }

    @media (max-width: 768px) {
        .yades-hero-wrap {
            float: none;
            width: 100%;
            max-width: 380px;
            margin: 0 auto 1.5rem;
        }
    }

    /* WPForms — iç sayfalardaki formlara biraz marj/breath */
    body:not(.home) .entry-content .wpforms-container {
        margin: 1.5rem 0;
        padding: 1.5rem;
        background: #f8f9ff;
        border: 1px solid var(--color-border);
        border-radius: 12px;
    }

    body:not(.home) .entry-content .wpforms-submit {
        background: var(--color-secondary) !important;
        color: #ffffff !important;
        padding: 12px 28px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        border: none !important;
        transition: all 0.2s ease;
    }

    body:not(.home) .entry-content .wpforms-submit:hover {
        background: var(--color-secondary-dark) !important;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(253, 118, 26, 0.3);
    }

    /* ============================================================
     * FAZ 1.5 — Scroll-triggered Reveal Animations (Native IO)
     * JS tarafı: Code Snippets "Yades — Scroll Reveal (Footer)"
     * snippet'i wp_footer hook'una inline script enjekte eder.
     * CSS: opacity + transform only → no layout shift, no CLS.
     * prefers-reduced-motion: reduce → animasyon kapanır.
     * ============================================================ */
    body:not(.home) [data-yades-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition:
            opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: opacity, transform;
    }

    body:not(.home) [data-yades-reveal].yades-revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* fade-left — iç sayfa hero illüstrasyonu (sağdan kayarak gelir) */
    body:not(.home) [data-yades-reveal="fade-left"] { transform: translateX(40px); }
    body:not(.home) [data-yades-reveal="fade-left"].yades-revealed { transform: translateX(0); }

    /* Otomatik reveal — yades-hero-wrap her zaman fade-left */
    body:not(.home) .yades-hero-wrap {
        opacity: 0;
        transform: translateX(40px);
        transition:
            opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: opacity, transform;
    }
    body:not(.home) .yades-hero-wrap.yades-revealed {
        opacity: 1;
        transform: translateX(0);
    }

    /* Otomatik reveal — iç sayfa H2 subtle fade-up */
    body:not(.home) .entry-content h2 {
        opacity: 0;
        transform: translateY(16px);
        transition:
            opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
            transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: opacity, transform;
    }
    body:not(.home) .entry-content h2.yades-revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger delay'ler — kart/listeler için */
    body:not(.home) [data-yades-reveal][data-yades-delay="60"]  { transition-delay: 60ms; }
    body:not(.home) [data-yades-reveal][data-yades-delay="120"] { transition-delay: 120ms; }
    body:not(.home) [data-yades-reveal][data-yades-delay="180"] { transition-delay: 180ms; }
    body:not(.home) [data-yades-reveal][data-yades-delay="240"] { transition-delay: 240ms; }
    body:not(.home) [data-yades-reveal][data-yades-delay="100"] { transition-delay: 100ms; }
    body:not(.home) [data-yades-reveal][data-yades-delay="200"] { transition-delay: 200ms; }

    /* Erişilebilirlik — reduce motion */
    @media (prefers-reduced-motion: reduce) {
        body:not(.home) [data-yades-reveal],
        body:not(.home) .yades-hero-wrap,
        body:not(.home) .entry-content h2 {
            opacity: 1 !important;
            transform: none !important;
            transition: none !important;
        }
    }

    /* ============================================================
     * FAZ 1.6.4 — A11y mikro fix'ler (Lighthouse 94 -&gt; 95+)
     * - Global focus-visible (klavye navigasyonu görünür)
     * - WP entry-title duplicate H1 (md başında # X varsa) gizle
     *   (gotcha #12 zaten yukarıda var, burada güçlendiriyoruz)
     * - Yades hero SVG bg desen pattern dekorlarini aria-hidden
     * ============================================================ */

    /* Global focus-visible (WCAG 2.4.7 — Focus Visible) */
    body:not(.home) a:focus-visible,
    body:not(.home) button:focus-visible,
    body:not(.home) [role="button"]:focus-visible,
    body:not(.home) input:focus-visible,
    body:not(.home) select:focus-visible,
    body:not(.home) textarea:focus-visible,
    body:not(.home) summary:focus-visible,
    body:not(.home) [tabindex]:focus-visible {
        outline: 2px solid var(--color-secondary);
        outline-offset: 2px;
        border-radius: 4px;
    }
    body:not(.home) *:focus:not(:focus-visible) { outline: none; }

    /* WPForms input/textarea focus-visible — :focus default override edilmesin */
    body:not(.home) .wpforms-container input:focus-visible,
    body:not(.home) .wpforms-container textarea:focus-visible,
    body:not(.home) .wpforms-container select:focus-visible {
        outline: 2px solid var(--color-secondary) !important;
        outline-offset: 2px !important;
    }