/* ==========================================================================
   BOLU VATAN — MOBİL DENEYİM & DÜZENİ
   Sıralama: 1. Logo | 2. Menü Çubuğu | 3. Reklam Alanı | 4. Ana Haber Banneri
   ========================================================================== */

/* 1. MASAÜSTÜNDE MOBİL ÖĞELERİ GİZLE */
@media (min-width: 993px) {
  .biz-mobile-ad-section,
  .mobile-bottom-bar,
  .mobile-drawer,
  .mobile-drawer-overlay,
  .mobile-search-modal {
    display: none !important;
  }
}

/* 2. MOBİL DÜZEN (<= 992px) */
@media (max-width: 992px) {
  /* Sabit Alt Bar için sayfa altına pay bırak */
  body {
    padding-bottom: 64px !important;
  }

  body.mobile-drawer-locked {
    overflow: hidden !important;
  }

  /* 2.1. ÜST HEADER BARI (Minimal Tek Satır) */
  .top-header-bar {
    padding: 4px 0 !important;
    font-size: 0.75rem !important;
  }
  .top-header-flex {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 10px;
    padding: 0 10px;
  }
  .top-header-flex::-webkit-scrollbar {
    display: none;
  }
  .top-header-right {
    margin-left: auto;
    flex-shrink: 0;
  }

  /* 2.2. SIRALAMA #1: LOGO */
  .biz-header-middle {
    padding: 0.75rem 0 0.5rem 0 !important;
    background: #ffffff;
  }
  .biz-header-row {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0 !important;
  }
  .biz-header-logo-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  .biz-header-logo-wrap .site-main-logo {
    height: 48px !important;
    width: auto !important;
    max-width: 200px;
    margin: 0 auto;
    display: block;
  }
  /* Masaüstündeki tepe reklamını logonun yanından gizle (menü altına inecek) */
  .biz-desktop-ad-wrap {
    display: none !important;
  }

  /* 2.3. SIRALAMA #2: MENÜ ÇUBUĞU (Kırmızı Bar & Gri Alt Bar) */
  .biz-red-nav {
    position: sticky;
    top: 0;
    z-index: 990;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  .biz-red-nav-container {
    padding: 0 8px;
    gap: 6px;
  }
  .biz-nav-list {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    flex-grow: 1;
    white-space: nowrap;
    padding: 2px 0;
  }
  .biz-nav-list::-webkit-scrollbar {
    display: none;
  }
  .biz-nav-link {
    padding: 0.65rem 0.8rem !important;
    font-size: 0.85rem !important;
  }
  .biz-red-nav .nav-search-wrap {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }
  .biz-red-nav .nav-search-form {
    display: none !important;
  }
  .biz-red-nav .mobile-nav-search-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    margin-right: 2px;
  }
  .biz-red-nav .mobile-nav-search-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.92);
  }

  /* İkinci Satır Gri Menü */
  .biz-sub-nav {
    background: #f1f5f9;
  }
  .biz-sub-nav-container {
    padding: 0 8px;
  }
  .biz-sub-nav-list {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    white-space: nowrap;
    gap: 0;
  }
  .biz-sub-nav-list::-webkit-scrollbar {
    display: none;
  }
  .biz-sub-nav-link {
    padding: 0.4rem 0.65rem !important;
    font-size: 0.78rem !important;
  }
  .biz-sub-social-list {
    display: none !important;
  }

  /* 2.4. SIRALAMA #3: REKLAM ALANI (Menü Çubuğunun Hemen Altında) */
  .biz-mobile-ad-section {
    display: block !important;
    margin: 0.65rem auto 0.75rem auto;
    padding: 0 10px;
  }
  .biz-mobile-ad-section .biz-header-ad-box {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 60px;
    max-height: 95px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
  }
  .biz-mobile-ad-section .biz-header-ad-box img {
    width: 100%;
    height: auto;
    max-height: 95px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
  }

  /* 2.5. SIRALAMA #4: ANA HABER BANNERİ (Ana Manşet Slider) */
  .portal-main-flow {
    display: flex !important;
    flex-direction: column !important;
    padding-top: 0 !important;
  }
  .hero-slider-section {
    order: -10 !important; /* 4. GENEL SIRA: Ana Haber Banneri (Logo -> Menü -> Reklam -> Slider) */
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
  }
  .biz-breaking-section {
    order: -8 !important; /* 5. GENEL SIRA: Son Dakika Flaş Akış */
    margin: 0.5rem 0 1rem 0 !important;
  }
  .features-area {
    order: -6 !important; /* 6. GENEL SIRA: 4'lü Sürmanşet Vitrini */
    margin-bottom: 1rem !important;
  }
  .sub-banner-container {
    order: -4 !important; /* 7. GENEL SIRA: Yatay Kaydırmalı Alt Manşet */
    margin-bottom: 1rem !important;
  }
  .local-ad-banner-strip {
    order: -2 !important;
  }
  .news-layout-grid {
    order: 1 !important;
  }
  .secondary-grid-section {
    order: 2 !important;
  }
  .vefat-ilanlari-section {
    order: 3 !important;
  }
  .yazarlar-carousel-section {
    order: 4 !important;
  }
  .twitter-feed-section {
    order: 5 !important;
  }

  /* 2.6. Ekranın Altında Sabit Mobil Uygulama Barı (Bottom App Bar) */
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .m-bottom-item {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #64748b;
    background: none;
    border: none;
    padding: 2px 0;
    cursor: pointer;
    transition: color 0.15s;
    touch-action: manipulation;
  }
  .m-bottom-item:active,
  .m-bottom-item.active {
    color: #ea0029;
  }
  .m-bottom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
  }
  .m-bottom-icon svg {
    width: 22px;
    height: 22px;
  }
  .m-bottom-label {
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.2px;
  }

  /* 2.7. Soldan Açılan Çekmece Menü (Off-Canvas Drawer) */
  .mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  }
  .mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #ffffff;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
  }
  .mobile-drawer.open {
    transform: translateX(320px);
  }

  .mobile-drawer-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
  }
  .mobile-drawer-close {
    background: none;
    border: none;
    color: #64748b;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
  }
  .mobile-drawer-close:active {
    color: #0f172a;
    background: #e2e8f0;
  }
  .mobile-drawer-search {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
  }
  .mobile-drawer-search-form {
    display: flex;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
  }
  .mobile-drawer-search-form input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.84rem;
    color: #1e293b;
    outline: none;
  }
  .mobile-drawer-search-form button {
    border: none;
    background: transparent;
    padding: 0 10px;
    color: #64748b;
    cursor: pointer;
  }
  .mobile-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 40px 16px;
  }
  .mobile-drawer-group-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin: 16px 0 8px 4px;
  }
  .mobile-drawer-group-title:first-child {
    margin-top: 4px;
  }
  .mobile-drawer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .m-drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #1e293b;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
  }
  .m-drawer-link:active {
    background: #f1f5f9;
    color: #ea0029;
  }
  .m-drawer-link.highlight-red {
    color: #ea0029;
    font-weight: 700;
    background: #fef2f2;
  }
  .mobile-drawer-cta {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
  }
  .mobile-drawer-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3);
  }

  .side-ranked-card {
    height: auto !important;
    margin-top: 1rem;
  }
  .ranked-card {
    flex: none !important;
    padding: 0.65rem 0.85rem !important;
  }

  /* 2.10. MOBİL HABER SAYFASI — SONSUZ HABER AKIŞI (INFINITE STREAM) */
  /* Kullanıcı Talebi: Mobilde "Bunlar da ilginizi çekebilir" blokunu gizle, yerine masaüstündeki gibi sıradaki haber sayfası kesintisiz aksın */
  .related-news-box,
  .desktop-only-related {
    display: none !important;
  }

  .stream-article-node {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    border: none !important;
    padding: 0 !important;
  }

  .stream-article-header {
    padding: 16px 14px 12px !important;
    border-radius: 6px 6px 0 0 !important;
  }

  .stream-article-header .koroglu-headline {
    font-size: 1.35rem !important;
    line-height: 1.35 !important;
  }

  .stream-article-header .koroglu-lead-desc {
    font-size: 0.95rem !important;
    line-height: 1.45 !important;
  }

  .stream-limit-notice-card {
    margin: 1.5rem 0.5rem !important;
    padding: 1.5rem 1rem !important;
  }
}

@media (max-width: 640px) {
  .koroglu-section-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .koroglu-section-header > .koroglu-header-left {
    flex: 1 1 100%;
    min-width: 0;
  }

  .koroglu-section-header .koroglu-widget-title {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .koroglu-section-header .koroglu-title-line {
    display: none;
  }

  .koroglu-section-header > .koroglu-more-link {
    margin-left: auto;
  }

  .sub-banner-container .koroglu-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .sub-banner-container .koroglu-section-header > .koroglu-header-left {
    grid-column: 1;
    width: auto;
    flex: none;
  }

  .sub-banner-container .koroglu-section-header .sub-banner-nav-arrows {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .koroglu-authors-header {
    flex-wrap: wrap;
  }

  .koroglu-authors-header .koroglu-title-line {
    display: none;
  }

  .koroglu-authors-sub {
    flex: 1 1 auto;
    min-width: 0;
  }

  .koroglu-authors-header > .koroglu-more-link {
    margin-left: auto;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }
}
