/**
 * Ön yüz mobil düzenlemeleri (max-width: 1023.98px).
 * Ana tema: style.css — burada yalnızca dar ekran yamaları.
 */

@media (max-width: 1023.98px) {
  /* Kategori / öne çıkanlar blokları: yalnızca alt boşluk */
  .cat-slider-section {
    padding: 0 0 20px;
  }

  /* Bugünkü Resmi İlanlar: manşet satırından sonra üst boşluk */
  .home-resmi-ilanlar-module {
    margin-top: 1.25rem;
  }

  /* ─── Anasayfa: üst manşet #newsSlider ─── */
  #newsSlider.news-slider {
    height: 160px;
    min-height: 160px;
    max-height: none;
    overflow: hidden;
  }

  #newsSlider .slide {
    position: absolute;
    inset: 0;
  }

  #newsSlider .slide img {
    width: 100%;
    height: 160px;
    max-height: 160px;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  #newsSlider .slide-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  #newsSlider .slide-content {
    bottom: 46px;
    left: 12px;
    right: 12px;
  }

  #newsSlider .slide-category {
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    margin-bottom: 6px;
    letter-spacing: 0.06em;
  }

  #newsSlider .slide-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    max-width: none;
  }

  #newsSlider .slide-meta {
    font-size: 10px;
    margin-top: 6px;
  }

  #newsSlider .slider-nav {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 8px;
    transform: translateX(-50%);
    flex-direction: row;
    gap: 6px;
  }

  #newsSlider .slider-nav-dot {
    width: 8px;
    height: 8px;
    border-width: 1.5px;
  }

  #newsSlider .slider-nav-dot.active {
    transform: scale(1.35);
  }

  /* ─── Anasayfa: galeri + video blok (.gv-section) ─── */
  .gv-section {
    flex-direction: column;
  }

  .gv-half {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 24px 20px 28px;
  }

  /* ─── Footer ─── */
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
  }

  .footer-col--menu .footer-menus-inner {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 1.25rem 1rem;
  }

  .footer-col--featured,
  .footer-col--social {
    width: 100%;
    max-width: 100%;
  }

  .footer-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem 0.3rem;
    width: 100%;
  }

  .footer-quick-link {
    margin: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.4rem 0.25rem;
    min-width: 0;
    max-width: 100%;
    text-align: left;
    font-size: 0.65rem;
    line-height: 1.25;
  }

  .footer-quick-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-self: center;
  }

  .footer-quick-icon svg {
    width: 14px;
    height: 14px;
  }

  .footer-quick-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
  }

  .footer-social {
    flex-wrap: wrap;
    max-width: 100%;
    gap: 0.5rem;
  }

  .footer-social-btn {
    flex-shrink: 0;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .footer-bottom .copyright {
    max-width: 100%;
  }

  .footer-signature {
    white-space: normal;
    max-width: 100%;
    line-height: 1.45;
  }

  .footer-brand-logo-img {
    max-width: min(220px, 100%);
  }

  .footer-grid-col ul li a {
    overflow-wrap: anywhere;
  }

  /* Manşet satırı: mobilde üst boşluk (~Bootstrap mt-3) */
  .thumb-slider-section {
    margin-top: 1rem;
  }

  /* Ana manşet (col-8) ile sağ manşet (col-4) alt alta iken aralarında boşluk */
  .thumb-slider-section .col-md-8 + .col-md-4 {
    margin-top: 1rem;
  }

  /* Resmi ilanlar / öne çıkanlar: viewport’ta 2 kart; 768px+ dar tablette 3 (1024+ tema: 4) */
  .cat-slider-track .cat-card {
    flex: 0 0 calc((100% - 16px) / 2);
  }

  @media (min-width: 768px) {
    .cat-slider-track .cat-card {
      flex: 0 0 calc((100% - 32px) / 3);
    }
  }

  /* İlan / öne çıkanlar ile tab+yan sütun satırı arası (mobil) */
  .below-sliders-section {
    margin-top: 1.75rem;
  }

  /* Tab sütunundan sonra sağ sütun (Çok Okunanlar) — üst boşluk */
  .below-sliders-section > .col-md-4 {
    margin-top: 1.25rem;
  }

  /* Tab Haberler: başlıklar tek satır, yatay kaydırma (parmak) */
  .tabs-section .category-tabs-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs-section .category-tabs-scroll::-webkit-scrollbar {
    display: none;
  }

  .tabs-section .category-tabs-scroll .nav-tabs {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
  }

  .tabs-section .category-tabs-scroll .nav-item {
    flex-shrink: 0;
  }

  .tabs-section .category-tabs-scroll .nav-link {
    white-space: nowrap;
  }

  /* Tab haber şeridi (yalnızca mobil blok): parmak kaydırma, scrollbar gizli */
  .tabs-section .tab-news-mobile-slider .tab-news-slider-viewport {
    scrollbar-width: none;
  }

  .tabs-section .tab-news-mobile-slider .tab-news-slider-viewport::-webkit-scrollbar {
    display: none;
    height: 0;
  }

  /* Sol ana manşet: "T" (tüm manşetler) yalnızca geniş ekranda; mobilde gizli */
  #thumbPagLeft.thumb-pagination a.btn-all {
    display: none !important;
  }

  /* Sol + sağ manşet: sayfalama çizgi göstergesi (rakam yerine), mobil — kompakt yükseklik */
  #thumbPagLeft.thumb-pagination,
  #thumbPagRight.thumb-pagination {
    justify-content: center;
    align-items: center;
    gap: 0.28rem;
    flex-wrap: wrap;
    padding: 0.3rem 0.45rem;
    min-height: 0;
    background-color: #0f0f0f;
    border-color: #2a2a2a;
    border-top: 1px solid #2a2a2a;
  }

  /* Masaüstü .thumb-pagination a { height: 38px } mobilde kaldırılsın */
  #thumbPagLeft.thumb-pagination a[data-page],
  #thumbPagRight.thumb-pagination a[data-page] {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0.65rem;
    width: auto;
    height: auto !important;
    min-height: 0 !important;
    max-height: none;
    padding: 3px 2px !important;
    margin: 0;
    border: none !important;
    background: transparent !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px;
    overflow: visible;
    white-space: nowrap;
    box-shadow: none;
  }

  #thumbPagLeft.thumb-pagination a[data-page]::after,
  #thumbPagRight.thumb-pagination a[data-page]::after {
    content: '';
    display: block;
    width: clamp(0.85rem, 3.8vw, 1.2rem);
    height: 2px;
    border-radius: 1px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.2s ease;
  }

  #thumbPagLeft.thumb-pagination a[data-page].active::after,
  #thumbPagRight.thumb-pagination a[data-page].active::after {
    background-color: var(--red-primary);
  }

  #thumbPagLeft.thumb-pagination a[data-page]:hover::after,
  #thumbPagRight.thumb-pagination a[data-page]:hover::after {
    background-color: rgba(255, 255, 255, 0.78);
  }

  #thumbPagLeft.thumb-pagination a[data-page].active:hover::after,
  #thumbPagRight.thumb-pagination a[data-page].active:hover::after {
    background-color: var(--red-primary);
  }

  /* ─── Anasayfa spor modülü ─── */
  .sports-section {
    padding: 22px 12px 28px;
    border-radius: 10px;
  }

  .match-slider-wrap {
    padding: 0 38px;
    margin-bottom: 18px;
  }

  .match-arrow {
    width: 32px;
    height: 32px;
  }

  .match-arrow svg {
    width: 14px;
    height: 14px;
  }

  .match-arrow-prev {
    left: 0;
  }

  .match-arrow-next {
    right: 0;
  }

  .match-slider-viewport {
    container-type: inline-size;
    container-name: matchhome;
  }

  .match-slider-track .match-card {
    flex: 0 0 calc((100cqi - 12px) / 2);
    padding: 10px 8px;
  }

  @container matchhome (min-width: 400px) {
    .match-slider-track .match-card {
      flex: 0 0 calc((100cqi - 24px) / 3);
    }
  }

  .match-week {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .match-teams {
    gap: 6px;
    margin-bottom: 6px;
  }

  .match-logo {
    width: 34px;
    height: 34px;
  }

  .match-score {
    font-size: 18px;
    min-width: 44px;
  }

  .match-date {
    font-size: 10px;
  }

  .sports-content {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }

  .sports-tab-slider {
    border-radius: 8px;
    min-height: 0;
  }

  .sports-tab-slide .sports-tab-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0) 52%);
  }

  .sports-tab-nav {
    left: 8px;
    right: 8px;
    top: auto;
    bottom: 10px;
    transform: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  .sports-tab-btn {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

  .sports-tab-caption {
    top: 10px;
    bottom: auto;
    left: 10px;
    right: 10px;
    padding: 10px 12px;
    border-width: 1.5px;
  }

  .sports-tab-caption a {
    font-size: 14px;
    line-height: 1.3;
  }

  .league-panel {
    width: 100%;
    max-width: none;
    border-radius: 8px;
  }

  .league-panel-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px 8px 0 0;
  }

  .league-panel-header h3 {
    font-size: 12px;
  }

  .league-panel-header select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    font-size: 11px;
    padding: 6px 10px;
  }

  .league-table-wrap {
    max-height: min(340px, 52vh);
  }

  .sports-section .league-table {
    table-layout: fixed;
  }

  .league-table th,
  .league-table td {
    padding: 7px 6px;
    font-size: 11px;
  }

  .league-table th:nth-child(2),
  .league-table td:nth-child(2) {
    max-width: 42vw;
  }
}
