/* ==========================================================================
   Kâbe Ekosistemi — Native Mobile App Experience (≤ 780px)
   Masaüstü görünümüne hiç dokunmaz; yalnızca mobil ekranlarda (≤780px)
   iOS / Android yerel uygulama hissi verir.
   ========================================================================== */

.kb-app-tabbar {
    display: none;
}

.kb-hdr-company-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.kb-hdr-company-ico {
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 780px) {
    html, body {
        overflow-x: clip;
        -webkit-tap-highlight-color: transparent;
    }

    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        background: #faf9f5;
    }

    .container {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* ── 1. İNCE APP DURUM ŞERİDİ (TEK SATIR, TAŞMASIZ) ──────────────────── */
    .top-strip {
        padding: 5px 0 !important;
        border-bottom: 1px solid rgba(20, 19, 17, .06);
    }

    .top-strip-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        min-height: 26px;
    }

    .top-strip-inner > div:first-child {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        width: 100%;
        gap: 6px !important;
        min-width: 0;
    }

    /* Uzun link listesini mobilde gizle — hepsi alt menü & çekmecede */
    .prayer-strip-items {
        display: none !important;
    }

    .top-strip .live-pill {
        font-size: 9.5px !important;
        padding: 3px 8px !important;
        border-radius: 999px !important;
        white-space: nowrap;
        flex-shrink: 0;
        letter-spacing: .04em;
    }

    .top-strip .top-prayer-pill,
    .top-strip .top-clock-chip {
        font-size: 11px !important;
        padding: 3px 9px !important;
        border-radius: 999px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 64%;
    }

    .top-strip .top-clock-chip.is-ist {
        display: none !important;
    }

    /* ── 2. STICKY BUZLU CAM APP ÜST BARI ────────────────────────────────── */
    .site-header {
        position: sticky !important;
        top: 0;
        z-index: 1200;
        background: rgba(255, 255, 255, .92) !important;
        backdrop-filter: blur(18px) saturate(160%);
        -webkit-backdrop-filter: blur(18px) saturate(160%);
        border-bottom: 1px solid rgba(20, 19, 17, .07) !important;
        box-shadow: 0 4px 18px rgba(20, 19, 17, .04);
    }

    .header-inner {
        min-height: 56px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
        gap: 8px !important;
    }

    .brand-logo img,
    .brand-logo-img {
        height: 32px !important;
        width: auto !important;
        max-width: 122px;
        object-fit: contain;
    }

    .header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
    }

    .kb-hdr-cart-btn {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
        background: #faf8f3 !important;
        border: 1px solid #ebe5d5 !important;
    }

    .header-actions .btn.btn-primary.btn-sm,
    .header-actions .kb-hdr-company-btn {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        border-radius: 11px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #26231e 0%, #141311 100%) !important;
        color: #f5c84c !important;
        border: 1px solid #3c362c !important;
        box-shadow: 0 4px 12px rgba(20, 19, 17, .16) !important;
    }

    .header-actions .kb-hdr-company-btn:active {
        transform: scale(.94);
        background: linear-gradient(135deg, #f5c84c 0%, #e2a417 100%) !important;
        border-color: #e2a417 !important;
        color: #141311 !important;
    }

    .kb-hdr-company-label {
        display: none !important;
    }

    .kb-hdr-company-ico {
        display: block !important;
    }

    .mobile-toggle {
        width: 38px !important;
        height: 38px !important;
        border-radius: 11px !important;
        background: #faf8f3 !important;
        border: 1px solid #ebe5d5 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ── 3. MOBİL APP HERO (KABE.COM.TR & KABE.TR) ───────────────────────── */
    .kb-hero {
        padding: 16px 0 38px !important;
    }

    .kb-hero-grid {
        gap: 16px !important;
    }

    .kb-ed-kicker {
        font-size: 11.5px !important;
        padding: 5px 11px !important;
        margin-bottom: 10px !important;
        border-radius: 999px !important;
        box-shadow: 0 3px 10px rgba(20, 19, 17, .05);
    }

    .kb-ed-title {
        font-size: 27px !important;
        line-height: 1.14 !important;
        letter-spacing: -0.6px !important;
        margin-bottom: 6px !important;
    }

    .kb-hero-grid > div:first-child > div[style*="font-size:18px"] {
        font-size: 14px !important;
        line-height: 1.35 !important;
        margin-bottom: 8px !important;
        color: #3f3829 !important;
    }

    .kb-ed-lead {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-bottom: 14px !important;
        color: #5c5444 !important;
    }

    /* Yan yana 2'li tam genişlikli uygulama butonları */
    .kb-ed-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 9px !important;
        margin-bottom: 14px !important;
    }

    .kb-ed-btn-primary,
    .kb-ed-btn-soft {
        width: 100% !important;
        min-height: 44px !important;
        padding: 10px 12px !important;
        border-radius: 13px !important;
        font-size: 12.5px !important;
        font-weight: 800 !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap;
    }

    .kb-ed-btn-primary:active,
    .kb-ed-btn-soft:active {
        transform: scale(.97);
    }

    /* Tek satırda 3'lü kompakt cam KPI şeridi */
    .kb-ed-metrics {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0 !important;
        padding: 10px 6px !important;
        border-radius: 15px !important;
        background: rgba(255, 255, 255, .9) !important;
        border: 1px solid rgba(213, 158, 18, .22) !important;
        box-shadow: 0 6px 18px rgba(20, 19, 17, .05) !important;
        margin-top: 0 !important;
    }

    .kb-ed-sep {
        display: none !important;
    }

    .kb-ed-metric {
        text-align: center !important;
        padding: 2px 4px !important;
        border-right: 1px solid #efe9da;
    }

    .kb-ed-metric:last-child {
        border-right: 0;
    }

    .kb-ed-metric strong {
        display: block;
        font-size: 18px !important;
        line-height: 1.15 !important;
    }

    .kb-ed-metric span {
        display: block;
        font-size: 10px !important;
        line-height: 1.25 !important;
        margin-top: 2px;
    }

    /* Canlı Yayın Kartı — Native Video Player Kartı */
    .kb-live-card {
        border-radius: 18px !important;
        overflow: hidden !important;
        box-shadow: 0 12px 28px rgba(20, 19, 17, .1) !important;
    }

    .kb-live-head {
        padding: 10px 12px !important;
    }

    .kb-live-prayer-bar {
        padding: 11px 12px !important;
    }

    .kb-mini-prayers {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin-top: 8px !important;
    }

    .kb-mini-p {
        padding: 7px 6px !important;
        border-radius: 10px !important;
    }

    /* ── 3B. KABE.TR PRO HERO & BÖLÜMLER MOBİL UYGULAMA UYUMU ─────────────── */
    .pro-hero {
        padding: 18px 0 24px !important;
    }

    .pro-kandil,
    .pro-nur-beam {
        display: none !important;
    }

    .pro-hero-split {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }

    .pro-hero-copy {
        gap: 11px !important;
    }

    .pro-hero-status {
        font-size: 11.5px !important;
        padding: 5px 11px !important;
    }

    .pro-hero-h1 {
        font-size: 26px !important;
        line-height: 1.14 !important;
    }

    .pro-verse-card {
        padding: 12px 14px !important;
        border-radius: 14px !important;
    }

    .pro-verse-ar {
        font-size: 18px !important;
        line-height: 1.5 !important;
    }

    .pro-verse-tr {
        font-size: 12.5px !important;
        line-height: 1.5 !important;
    }

    .pro-sec {
        padding: 34px 0 !important;
    }

    .pro-head {
        margin-bottom: 18px !important;
        gap: 10px !important;
    }

    .pro-h2 {
        font-size: 20px !important;
    }

    .pro-lead {
        font-size: 13px !important;
    }

    /* ── 4. 4 SÜTUNLU APP KISAYOL İKON GRİDİ (HUB) ───────────────────────── */
    .kb-hub-section {
        padding: 14px 0 18px !important;
    }

    .kb-hub-grid {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .kb-hub-tile {
        padding: 11px 6px 10px !important;
        border-radius: 15px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        border: 1px solid #efe9da !important;
        box-shadow: 0 4px 12px rgba(20, 19, 17, .04) !important;
        transition: transform .15s ease;
    }

    .kb-hub-tile:active {
        transform: scale(.94);
    }

    .kb-hub-icon {
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
        margin-bottom: 6px !important;
        font-size: 18px !important;
    }

    .kb-hub-title {
        font-size: 11px !important;
        line-height: 1.2 !important;
        font-weight: 800 !important;
    }

    .kb-hub-sub {
        display: none !important;
    }

    .kb-hub-badge {
        top: 5px !important;
        right: 5px !important;
        font-size: 8px !important;
        padding: 1px 4px !important;
    }

    /* Sağ scroll çubuğunu mobilde gizle — alt tab bar temiz kalsın */
    .kb-scroll-rail {
        display: none !important;
    }

    /* Kur'an dinleme çubuğunu alt tab barın üstüne taşı */
    .kb-qbar {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        right: 12px !important;
        left: 12px !important;
    }

    /* ── 5. NATIVE ALT GEZİNTİ ÇUBUĞU (FIXED BOTTOM TAB BAR) ─────────────── */
    .kb-app-tabbar {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        align-items: end;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1850;
        background: rgba(255, 255, 255, .95);
        backdrop-filter: blur(22px) saturate(180%);
        -webkit-backdrop-filter: blur(22px) saturate(180%);
        border-top: 1px solid rgba(20, 19, 17, .09);
        box-shadow: 0 -8px 28px rgba(20, 19, 17, .09);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    }

    .kb-tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 48px;
        padding: 4px 2px;
        border: 0;
        background: transparent;
        color: #6f685b;
        text-decoration: none !important;
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        border-radius: 12px;
        transition: color .16s ease, transform .14s ease, background-color .16s ease;
    }

    .kb-tab-item:active {
        transform: scale(.92);
    }

    .kb-tab-item svg {
        width: 21px;
        height: 21px;
        stroke-width: 2;
    }

    .kb-tab-item.is-active {
        color: #9c6a04;
    }

    .kb-tab-item.is-active svg {
        stroke-width: 2.3;
    }

    .kb-tab-item.is-active .kb-tab-dot {
        width: 18px;
        height: 3px;
        border-radius: 99px;
        background: linear-gradient(90deg, #e2a417, #9c6a04);
        margin-top: 1px;
    }

    /* Orta Yükseltilmiş CANLI FAB Sekmesi */
    .kb-tab-item.is-center {
        position: relative;
        color: #141311;
        font-weight: 800;
    }

    .kb-tab-live-fab {
        width: 48px;
        height: 48px;
        margin-top: -22px;
        margin-bottom: 2px;
        border-radius: 16px;
        background: linear-gradient(145deg, #26231e 0%, #141311 100%);
        color: #f5c84c;
        border: 2px solid #f5c84c;
        box-shadow: 0 8px 20px rgba(20, 19, 17, .28), 0 0 0 4px rgba(255, 255, 255, .94);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        transition: transform .16s ease;
    }

    .kb-tab-item.is-center:active .kb-tab-live-fab {
        transform: scale(.92);
    }

    .kb-tab-live-pulse {
        position: absolute;
        top: 5px;
        right: 5px;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ef4444;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, .75);
        animation: kbTabPulse 1.6s infinite;
    }

    @keyframes kbTabPulse {
        0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .75); }
        70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
        100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    }
}
