/*
 * =====================================================
 * responsive.css — Yetkin Sertifika
 * Mobil & Tablet için ÖZEL CSS
 * PC görünümüne DOKUNMAZ
 * =====================================================
 */

/* ─────────────────────────────────────────────────────
   TOPBAR  (en üst siyah bar)
───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    /* Tablette sol kısımdan 3. madde ve sonrasını gizle */
    .custom-topbar-left .tb-item:nth-child(n+3) { display: none; }
    /* Tablette sosyal medya yazılarını gizle, sadece ikon */
    .custom-topbar-right .tb-soc-txt { display: none; }
}

@media (max-width: 768px) {
    /* Mobilde sol kısımı gizle, sağı ortala */
    .custom-topbar-inner    { justify-content: center; }
    .custom-topbar-left     { display: none !important; }
    .custom-topbar-right    { width: 100%; justify-content: center; gap: 0; }
    /* Telefon: sadece ikon göster */
    .custom-topbar-right .tb-phone-txt { display: none; }
}

@media (max-width: 480px) {
    /* Küçük telefonda item boşluklarını daralt */
    .custom-topbar-right .tb-item { padding: 0 7px; font-size: 11px; gap: 3px; }
}

/* ─────────────────────────────────────────────────────
   NAVBAR  (logo + menü çubuğu)
───────────────────────────────────────────────────── */
@media (max-width: 992px) {
    /* Tablette arama kutusunu gizle */
    .header-search-form { display: none !important; }
}

@media (max-width: 768px) {
    .custom-navbar      { padding: 10px 0; }
    .custom-logo img    { height: 42px; }
    .custom-brand-name  { font-size: 19px; }
    .custom-brand-slogan{ display: none; }
}

/* ─────────────────────────────────────────────────────
   HERO SLIDER
───────────────────────────────────────────────────── */
@media (max-width: 992px) {
    /* Ok butonlarını gizle — sadece noktalar ve swipe */
    .slider-nav-arrows { display: none !important; }
}

@media (max-width: 768px) {
    /* Nokta boyutları küçülsün */
    .slider-dots        { bottom: 10px; gap: 6px; }
    .slider-dot         { width: 22px; height: 3px; }
    .slider-dot.active  { width: 36px; }
    /* Resimler tam genişlik */
    .slide img          { width: 100% !important; height: auto !important; display: block; }
}

/* ─────────────────────────────────────────────────────
   FLOATING STATS (istatistik kutusu)
───────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .floating-stats-container { margin-top: -10px; margin-bottom: 30px; }
    .floating-stats-inner {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        padding: 8px 16px 16px;
        text-align: center;
    }
    .f-stat-item {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
        padding: 20px 12px 16px;
        border-radius: 12px;
        transition: background .2s;
    }
    .f-stat-item:hover { background: #fafafa; transform: none; }
    .f-stat-icon-wrap {
        width: 48px !important; height: 48px !important;
        border-radius: 14px !important;
        margin: 0 auto;
    }
    .f-stat-icon-wrap i { font-size: 20px !important; }
    .f-stat-text strong { font-size: 24px !important; }
    .f-stat-text span   { font-size: 12px !important; }
    .f-stat-divider     { display: none !important; }
}

@media (max-width: 640px) {
    .floating-stats-container { 
        margin-top: -30px; 
        margin-bottom: 30px; 
        position: relative; 
        z-index: 10; 
    }
    .floating-stats-inner {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        padding: 0 10px !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .f-stat-item {
        background: #ffffff !important;
        padding: 20px 10px !important;
        border-radius: 20px !important;
        box-shadow: 0 10px 25px rgba(15,23,42,0.06) !important;
        border: 1px solid rgba(226,232,240,0.8) !important;
        gap: 10px !important;
        align-items: center !important;
        width: 100% !important;
    }
    .f-stat-item:hover { background: #ffffff !important; }
    .f-stat-icon-wrap {
        width: 48px !important; height: 48px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(212,175,55,0.05) 100%) !important;
        margin: 0 auto !important;
    }
    .f-stat-icon-wrap i  { font-size: 18px !important; color: var(--custom-gold) !important; }
    .f-stat-text { text-align: center; width: 100%; }
    .f-stat-text strong  { font-size: 20px !important; color: #0f172a !important; font-weight: 900 !important; letter-spacing: -0.5px; margin-bottom: 2px; display: block; }
    .f-stat-text span    { font-size: 11px !important; color: #64748b !important; font-weight: 600 !important; letter-spacing: 0.2px; display: block; line-height: 1.3; }
}

/* ─────────────────────────────────────────────────────
   KURS GRID — Tüm cihazlar
───────────────────────────────────────────────────── */

/* Base container */
.pop-course-container {
    max-width: 1700px;
    padding: 0 50px;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .pop-course-container { padding: 0 20px; }
    .pop-slider-arrow     { display: none !important; }
}

/* ── Tablet ── */
@media (max-width: 768px) {
    .pop-course-container { padding: 0 14px; }

    /* Section header fallback */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px;
    }
    .section-header h2   { font-size: 20px !important; }
    .section-header .btn { align-self: flex-start; padding: 8px 18px; font-size: 13px; }

    /* Kurs bölümü başlık */
    .ys-cs-header     { margin-bottom: 20px; }
    .ys-cs-title-wrap { gap: 10px; }
    .ys-cs-icon       { width: 36px !important; height: 36px !important; font-size: 15px !important; border-radius: 9px !important; flex-shrink: 0; }
    .ys-cs-title      { font-size: 18px !important; }

    /* Grid: 2 kolon */
    .ys-course-grid { gap: 12px; }

    /* Kart içi — daha sıkışık padding */
    .ys-gc .course-content  { padding: 12px !important; }
    .ys-gc .course-title    { font-size: 14px !important; min-height: 36px; }
    .ys-gc .new-price       { font-size: 16px !important; }
    .ys-gc .old-price       { font-size: 11px !important; }
    .ys-gc .ys-uni-row      { font-size: 10.5px; margin-bottom: 8px; }

    /* İncele butonu */
    .ys-incele-btn          { padding: 7px 10px !important; font-size: 11px; gap: 4px; }
    .ys-incele-btn i        { display: none; } /* Dar ekranda ok ikonu gizle */

    /* Tümünü Gör */
    .ys-course-cta          { margin-top: 24px; }
    .ys-tumunu-btn          { display: flex !important; width: 100% !important; max-width: 100% !important; justify-content: center; font-size: 14px; padding: 13px 20px !important; }
}

/* ── Küçük mobil ── */
@media (max-width: 480px) {
    .pop-course-container { padding: 0 10px; }

    /* 2 kolon korunuyor — tek kolona düşmüyor */
    .ys-course-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
}

/* ─────────────────────────────────────────────────────
   KURUMSAL BÖLÜM (premium-corp)
───────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .premium-corp-wrapper {
        flex-direction: column !important;
        padding: 40px 25px !important;
        text-align: center !important;
        gap: 30px;
    }
    .premium-corp-grid { grid-template-columns: 1fr !important; }
    .premium-corp-visual { margin-top: 10px; }
}

@media (max-width: 768px) {
    .premium-corp-heading { font-size: 26px !important; }
    .premium-corp-desc    { font-size: 15px; }
}

/* ─────────────────────────────────────────────────────
   REVIEWS (yorum slider)
───────────────────────────────────────────────────── */
@media (max-width: 992px) {
    /* % hesabı flex container'a göredir, !important ile zorla */
    .review-card {
        min-width: calc(46vw - 20px) !important;
        max-width: calc(46vw - 20px) !important;
        width:     calc(46vw - 20px) !important;
    }
}
@media (max-width: 768px) {
    .review-btn { display: none !important; }
    /* vw kullan — flex container genişliğinden bağımsız */
    .review-card {
        min-width: calc(80vw) !important;
        max-width: calc(80vw) !important;
        width:     calc(80vw) !important;
        padding: 18px !important;
    }
    .reviews-track {
        gap: 14px !important;
        scroll-snap-type: x mandatory;
        padding: 10px 0 !important;
    }
    /* Scroll bar boşluğu kaldır */
    .reviews-slider-section { overflow: hidden; }
}

/* ─────────────────────────────────────────────────────
   FOOTER — Desktop + Mobil
───────────────────────────────────────────────────── */

/* Desktop: eski inline stilin yerine geçer */
.ys-footer-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.5fr;
    gap: 20px;
    padding: 50px 0 30px 0;
}
@media (max-width: 768px) {
    /* Inline style override — 4 kolon → 2 kolon */
    .footer-grid,
    .footer-grid-4,
    .ys-footer-main-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 28px 14px !important;
        padding: 32px 0 20px 0 !important;
    }
    /* 1. kolon (logo+açıklama) tam genişlik */
    .footer-grid .footer-col:first-child,
    .ys-footer-main-grid .footer-col:first-child {
        grid-column: 1 / -1;
    }
    /* Footer logo kolonu: ETBİS QR küçült */
    .ys-footer-main-grid .footer-col:first-child img[alt="ETBİS QR Kod"] {
        width: 72px !important;
    }
    /* Alt sütunlar başlığı küçük */
    .footer-col h4 { font-size: 13px !important; margin-bottom: 12px !important; }
    .footer-col .footer-links li { margin-bottom: 6px !important; }
    .footer-col .footer-links a  { font-size: 12.5px !important; }
    /* Footer alt çizgi — bottom bar boşluğu (safe-area ile birlikte) */
    .footer { padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important; }
    .footer-bottom {
        padding-bottom: 16px;
        gap: 12px !important;
    }
    /* Ödeme rozetleri: taşmayı önle */
    .footer-bottom-right { flex-wrap: wrap !important; gap: 6px !important; justify-content: center !important; }
    .pay-badge { height: 26px !important; }
    /* Newsletter bölümü */
    #newsletter { padding: 20px 0 !important; }
}

@media (max-width: 480px) {
    /* Küçük mobil → tek kolon */
    .footer-grid,
    .footer-grid-4 {
        grid-template-columns: 1fr !important;
    }
    .footer-grid .footer-col:first-child {
        grid-column: auto;
    }
}

/* ─────────────────────────────────────────────────────
   CTA BANNER (alt büyük koyu alan)
───────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cta-banner { padding: 55px 0 !important; }
    .cta-banner-title {
        font-size: 26px !important;
        letter-spacing: -0.5px !important;
    }
    .cta-banner-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
    }
    .cta-banner-buttons a {
        width: 85% !important;
        max-width: 280px;
        justify-content: center !important;
        font-size: 13px !important;
        padding: 13px 20px !important;
    }
}

/* ═══════════════════════════════════════════════════════
   GENEL MOBİL UX İYİLEŞTİRMELERİ
   (touch targets, typography, spacing, accessibility)
═══════════════════════════════════════════════════════ */

/* ─── Genel ─── */
@media (max-width: 768px) {
    /* Yatay overflow'u mutlak engelle */
    html, body { overflow-x: hidden; max-width: 100vw; }

    /* Tüm butonlar/linkler en az 44px touch target */
    .btn, button, [role="button"],
    .course-action, .slider-btn, .faq-question {
        min-height: 44px;
    }

    /* Bölüm başlıkları — sola hizalı (mobilde ortadan okuması zor) */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    /* Step / process kartları tek sütun */
    .steps-grid { grid-template-columns: 1fr !important; gap: 20px; }

    /* Güven kartları 2'li grid (480px altında 1'li) */
    .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* ─── Newsletter (footer) mobil ─── */
@media (max-width: 768px) {
    /* Genel form → dikey sıralama */
    #newsletter form {
        flex-direction: column !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    /* Sol kısım (ikon + başlık) — yatay hizala */
    #newsletter form > div:first-child {
        align-items: center;
    }

    /* Sağ kısım (e-posta alanı) → tam genişlik, dikey sıra */
    #newsletter form > div:last-child {
        max-width: 100% !important;
        width: 100% !important;
        flex-direction: column !important;
        gap: 10px !important;
        justify-content: flex-start !important;
    }

    /* Email+buton kapsayıcı → tam genişlik row (yan yana kalır) */
    #newsletter form > div:last-child > div:first-child {
        flex-direction: row !important;
        width: 100% !important;
    }
    #newsletter form > div:last-child > div:first-child input {
        min-width: 0 !important;
        font-size: 14px !important;
    }
    #newsletter form > div:last-child > div:first-child button {
        white-space: nowrap;
        min-height: 44px;
        padding: 0 16px !important;
        font-size: 13px !important;
    }

    /* KVKK checkbox satırı */
    #newsletter form > div:last-child > label {
        width: 100%;
        justify-content: flex-start !important;
    }
}

@media (max-width: 480px) {
    /* Çok küçük ekranda buton tam genişlik, input üstte */
    #newsletter form > div:last-child > div:first-child {
        flex-direction: column !important;
    }
    #newsletter form > div:last-child > div:first-child input {
        border-radius: 8px 8px 0 0 !important;
    }
    #newsletter form > div:last-child > div:first-child button {
        border-radius: 0 0 6px 6px !important;
        width: 100%;
        padding: 12px 0 !important;
        min-height: 48px;
    }
}

/* ─── FAQ accordion ─── */
@media (max-width: 768px) {
    .faq-grid { grid-template-columns: 1fr !important; gap: 12px; }
    .faq-question { font-size: 15px; padding: 16px 18px; }
}

/* ─── Blog kartları ─── */
@media (max-width: 768px) {
    .blog-grid { grid-template-columns: 1fr !important; }
}

/* ─── Kurs detay & checkout sayfaları ─── */
@media (max-width: 768px) {
    /* İki sütunlu layout → tek sütun */
    .course-detail-grid,
    .checkout-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    /* Sidebar (sağ panel) üste çıksın */
    .course-detail-sidebar,
    .checkout-sidebar {
        order: -1;
    }
}

/* ─── Modal/drawer: iOS klavye açıkken düzeltme ─── */
@media (max-width: 768px) {
    .cdv2 {
        /* iOS Safari: dvh viewport desteği */
        height: 100dvh;
        /* Overflow alt kısmı gizlemesin */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .ys-mobile-nav {
        height: 100dvh;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* ─── Topbar: 480px altında sadece telefon numarasını gizle, login linkleri kalsın ─── */
@media (max-width: 480px) {
    /* Topbar görünür kalır — giriş linkleri mobilde topbar'da */
    .custom-topbar-right .tb-item.tb-phone { display: none !important; }
    .custom-topbar-right .tb-item { padding: 0 8px; font-size: 11px; gap: 4px; }

    /* Güven kartları tek sütun */
    .trust-grid { grid-template-columns: 1fr !important; }

    /* Step kartlar */
    .step-card { padding: 28px 20px; }
    .step-number { width: 32px; height: 32px; font-size: 14px; top: -10px; right: -10px; }
}

/* ─── Scroll snap: yatay kaydırılan içerikler ─── */
@media (max-width: 768px) {
    /* Marquee'yi mobilde daha hızlı oynat */
    .marquee-content { animation-duration: 18s !important; }

    /* Yorum slider — scroll göstergesi */
    .reviews-track {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
}

/* ─── Floating WhatsApp: küçük ekranlarda boyut ─── */
@media (max-width: 480px) {
    .whatsapp-float {
        width: 52px; height: 52px;
        font-size: 26px;
        right: 14px;
    }
}

/* ─── Accessibility: focus ring ─── */
@media (any-pointer: coarse) {
    /* Dokunmatik cihazlarda focus ring'i bastır (parmakla görünmez) */
    :focus:not(:focus-visible) { outline: none; }
    /* Klavye ile focus olduğunda göster */
    :focus-visible { outline: 2px solid #c9a54c; outline-offset: 2px; border-radius: 4px; }
}

/* ─── Reduced motion: tüm animasyonları azalt ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-content { animation: none !important; }
}

/* ─── Legal Pages Mobile Adjustments ─── */
@media (max-width: 768px) {
    .legal-page { padding: 40px 0 60px 0 !important; min-height: auto !important; }
    .legal-header { margin-bottom: 30px !important; }
    .legal-icon { font-size: 36px !important; margin-bottom: 15px !important; }
    .legal-header p { font-size: 14px !important; padding: 0 15px !important; }
    .legal-content { padding: 30px 20px !important; font-size: 14px !important; }
}
@media (max-width: 480px) {
    .legal-page { padding: 25px 0 40px 0 !important; }
    .legal-header { margin-bottom: 20px !important; }
    .legal-icon { font-size: 30px !important; margin-bottom: 10px !important; }
    .legal-header h1 { font-size: 24px !important; margin-bottom: 10px !important; }
    .legal-content { padding: 24px 16px !important; }
    .legal-content h3 { font-size: 16px !important; margin-top: 30px !important; }
    .legal-footer { margin-top: 40px !important; padding-top: 20px !important; flex-direction: column; text-align: center; }
}

/* ─── Global Mobile Overflow & Table Safeguards ─── */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

