/* ===========================
   RESPONSIVE STYLES (FIXED PAGINATION + NAV FIX)
   =========================== */

/* -------- до 1200px -------- */
@media (max-width: 1200px) {
  html, body {
    overflow-x: hidden;
  }

  .portfolio-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 20px;
  }

  .portfolio-filters {
    padding: 0 20px;
  }

  .portfolio-ownership {
    margin: 0 20px 30px;
    padding: 20px;
  }

  .portfolio-ownership-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mySwiper {
    height: auto;
  }

  .mySwiper .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 16px;
    position: relative;
  }

  .mySwiper .swiper-slide img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    order: 1;
  }

  /* Пагинация сразу после картинки */
  .mySwiper .swiper-pagination {
    order: 2;
    position: relative !important;
    margin: 10px auto 0 auto;
    display: flex;
    justify-content: center;
    z-index: 10;
  }

  .mySwiper .swiper-pagination-bullets {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .mySwiper .content-txt {
    order: 3;
    position: static;
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    background: rgba(0,0,0,0.85);
    padding: 18px;
    border-radius: 10px;
    overflow: visible;
  }

  .case-meta {
    gap: 6px;
  }

  .case-meta span {
    font-size: 0.82rem;
  }

  .mySwiper .content-txt .scrollable-list {
    overflow-y: auto;
    max-height: 45vh; /* Ограничиваем высоту, чтобы текст не вылетал за пределы экрана */
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
  }

  .button-container {
    order: 4;
  }

  .button-container .brand-cta-secondary {
    padding: 7px 3px;
    font-size: 12px;
    border-radius: 4px;
  }

  .mySwiper .swiper-button-prev.site-slider-nav {
    left: 10px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }

  .mySwiper .swiper-button-next.site-slider-nav {
    right: 10px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
  }
}

/* -------- до 992px -------- */
@media (max-width: 992px) {
  .mySwiper .content-txt {
    max-width: 100%;
    padding: 16px;
  }

  .button-container .brand-cta-secondary {
    padding: 6px 2px;
    font-size: 11px;
  }
}

/* -------- до 768px -------- */
@media (max-width: 768px) {
  .portfolio-proof-strip {
    grid-template-columns: 1fr;
  }

  .portfolio-ownership-list {
    grid-template-columns: 1fr;
  }

  .portfolio-ownership-list li {
    min-height: auto;
    padding: 16px 18px 16px 54px;
    font-size: 0.95rem;
  }

  .portfolio-ownership-list.card-list li::before {
    left: 16px;
    top: 18px;
    transform: none;
  }

  .mySwiper .swiper-slide {
    padding: 16px;
  }

  .mySwiper .content-txt {
    max-width: 96%;
    padding: 16px;
  }

  .mySwiper .content-txt .scrollable-list {
    max-height: 40vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 8px;
  }

  .button-container .brand-cta-secondary {
    font-size: 11px;
    padding: 5px 2px;
  }

  .mySwiper .swiper-button-prev.site-slider-nav {
    left: 8px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .mySwiper .swiper-button-next.site-slider-nav {
    right: 8px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

}

/* -------- до 576px -------- */
@media (max-width: 576px) {
  .mySwiper .content-txt {
    width: 100%;
    max-width: 100%;
    padding: var(--page-padding-x);
    border-radius: 8px;
  }

  .mySwiper .content-txt h2,
  .mySwiper .content-txt h3 {
    font-size: 1em;
  }

  .button-container .brand-cta-secondary {
    font-size: 10px;
    padding: 4px 1px;
  }

  .mySwiper .swiper-button-prev.site-slider-nav {
    left: 6px;
  }

  .mySwiper .swiper-button-next.site-slider-nav {
    right: 6px;
  }

}

/* -------- до 400px -------- */
@media (max-width: 400px) {
  .mySwiper .content-txt {
    width: 100%;
    padding: var(--page-padding-x);
  }

  .mySwiper .content-txt .scrollable-list {
    max-height: 55vh;
  }

  .button-container {
    flex-direction: column;
    gap: 8px;
  }

  .button-container .brand-cta-secondary {
    width: 100%;
    font-size: 10px;
    padding: 5px 0;
  }

  .mySwiper .swiper-button-prev.site-slider-nav {
    left: 4px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .mySwiper .swiper-button-next.site-slider-nav {
    right: 4px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

}
