/* ==========================================================================
   100% MOBILE-RESPONSIVE 2-COLUMN GRID & LAYOUT SYSTEM
   Applies cleanly to all sections on mobile (<= 767.98px) without breaking desktop
   ========================================================================== */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, video, iframe {
  max-width: 100%;
}

@media (max-width: 767.98px) {
  /* Prevent any horizontal overflow across containers & rows */
  .container, .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
    overflow-x: clip;
  }

  /* Top header & navbar compact mobile alignment */
  .topHeader {
    padding: 6px 0 !important;
    font-size: 0.78rem !important;
  }
  .topHeader .d-flex {
    flex-wrap: wrap !important;
    gap: 6px !important;
    justify-content: center !important;
  }
  .navbar-brand img, .navbar img[src*="logo"] {
    max-height: 40px !important;
    width: auto !important;
  }

  /* Hero slider responsive height */
  .carousel .carousel-item img,
  .swiper .swiper-slide img {
    max-width: 100% !important;
  }

  /* 1. ALL HOMEPAGE VITRIN SECTIONS (VIP, Platinium, Gold, Gümüş, Bronz) -> 2-COLUMN GRID */
  .experts-carousel-section {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }
  .experts-carousel-section h2,
  .experts-carousel-section h3,
  .experts-carousel-section .section-title {
    font-size: 1.15rem !important;
    margin-bottom: 12px !important;
  }
  .experts-summary-swiper {
    padding-bottom: 10px !important;
    overflow: visible !important;
  }
  .experts-summary-swiper .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    transform: none !important;
    transition: none !important;
    width: 100% !important;
  }
  .experts-summary-swiper .swiper-slide {
    width: 100% !important;
    margin-right: 0 !important;
    height: auto !important;
  }
  .experts-summary-swiper .swiper-button-next,
  .experts-summary-swiper .swiper-button-prev,
  .experts-summary-swiper .swiper-pagination {
    display: none !important;
  }

  /* Expert cards crisp 2-column sizing */
  .expert-summary-card .card,
  .row-cols-1.row-cols-sm-3 .card {
    border-radius: 10px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    height: 100% !important;
  }
  .expert-summary-card .card-title,
  .row-cols-1.row-cols-sm-3 .card-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 6px 8px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .expert-summary-card .card-body,
  .row-cols-1.row-cols-sm-3 .card-body {
    padding: 8px !important;
    font-size: 0.78rem !important;
  }
  .expert-summary-card .btn,
  .row-cols-1.row-cols-sm-3 .btn {
    font-size: 0.75rem !important;
    padding: 5px 8px !important;
  }

  /* 2. CATEGORY & DIRECTORY LISTING PAGES -> 2-COLUMN GRID */
  .row.row-cols-1.row-cols-sm-3 {
    --bs-gutter-x: 10px !important;
    --bs-gutter-y: 10px !important;
  }
  .row.row-cols-1.row-cols-sm-3 > .col {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }

  /* 3. BLOG CARDS (Homepage, /blog-yazilari, and SEO Rehberleri) -> 2-COLUMN GRID */
  .blogPage .blogs.row {
    --bs-gutter-x: 10px !important;
    --bs-gutter-y: 10px !important;
  }
  .blogPage .blogs.row > .col-lg-12 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
  .blogPage .blogItem .row.g-0 {
    flex-direction: column !important;
  }
  .blogPage .blogItem .col-md-5,
  .blogPage .blogItem .col-md-7 {
    width: 100% !important;
    max-width: 100% !important;
  }
  .blogPage .blogItem .card-body {
    padding: 8px !important;
  }
  .blogPage .blogItem .card-title,
  .blogPage .blogItem h2,
  .blogPage .blogItem h5 {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .blogPage .blogItem .card-text {
    font-size: 0.74rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 4. SEO GUIDE & KEYWORD GRIDS -> 2-COLUMN GRID */
  .seo-mobile-grid {
    --bs-gutter-x: 10px !important;
    --bs-gutter-y: 10px !important;
  }
  .seo-mobile-grid > [class*="col-"] {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
  .seo-mobile-grid .card-body {
    padding: 10px !important;
  }
  .seo-mobile-grid h3 {
    font-size: 0.86rem !important;
    line-height: 1.3 !important;
  }
  .seo-mobile-grid p {
    font-size: 0.75rem !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 5. PROFILE DETAIL, FAQ, ANNOUNCEMENTS & FOOTER MOBILE POLISH */
  .breadcrumb {
    font-size: 0.78rem !important;
    flex-wrap: wrap !important;
  }
  footer .row > [class*="col-"] {
    margin-bottom: 18px !important;
  }
  footer .row > .col-lg-2.col-md-6 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    width: 50% !important;
  }
  .btn-whatsapp, .btn-telegram {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }
}
