/* =======================
   Адаптив только для мобильных
   ======================= */

/* Мобилки и планшеты — 768px и ниже */
@media (max-width: 768px) {
  html {
    -webkit-text-size-adjust: 100%;
  }
  body {
    overflow-x: hidden;
    min-width: 320px;
  }
  .container {
    padding: 0 12px;
    max-width: 100%;
  }
  /* Скрыть десктоп-меню, показать бургер */
  .nav-links, .header-buttons {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  section {
    padding: 40px 0;
  }
  /* Типографика */
  .section-title {
    font-size: 28px;
    margin-bottom: 20px;
  }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  p { font-size: 15px; line-height: 1.6; }

  /* Grid и карточки игроков */
  .players-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 8vw;
  }
  .player-card {
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    border-radius: 14px;
  }
  .player-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    min-height: 180px;
    max-height: 350px;
    background-size: cover;
    background-position: center center;
    border-radius: 14px 14px 0 0;
    display: block;
  }
  .player-info {
    padding: 18px 8px 22px;
    text-align: center;
  }
  .player-name {
    font-size: clamp(17px, 5vw, 23px);
    margin-bottom: 8px;
    line-height: 1.15;
    font-family: var(--heading-font);
    font-weight: bold;
  }

  /* Мобильное меню */
  .mobile-menu {
    width: 100%;
    padding: 50px 20px;
  }
  .mobile-menu-links a {
    font-size: 18px;
    padding: 15px 10px;
  }
  /* Футер */
  footer {
    padding: 20px 0;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .footer-title { font-size: 16px; }
  .footer-links { font-size: 14px; }
  .social-links { justify-content: center; }
  /* Секции */
  .features-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .feature-card {
    padding: 20px;
    margin: 0 auto;
    max-width: 100%;
  }
}

/* Смартфоны — 425px и ниже */
@media (max-width: 425px) {
  .container { padding: 0 8px; }
  section { padding: 30px 0; }
  header { padding: 12px 0; }
  .logo { font-size: 18px; }

  /* Hero */
  .hero {
    min-height: 100vh;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
  }
  .hero-content {
    margin: 0;
    padding: 20px 4px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    z-index: 1;
  }
  .hero-title {
    font-size: clamp(18px, 7vw, 28px);
    margin-bottom: 12px;
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
  }
  .hero-subtitle {
    font-size: clamp(12px, 4vw, 16px);
    margin-bottom: 20px;
    line-height: 1.4;
  }
  .hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("/images/hero-bg.jpg") center/cover no-repeat;
    background-color: rgba(0,0,0,0.5);
    background-blend-mode: darken;
    z-index: -1;
  }
  .hero-content { padding-top: 70px; }

  /* Игроки */
  .players-grid { gap: 14px; }
  .player-card { max-width: 98vw; border-radius: 8px; }
  .player-image {
    min-height: 140px;
    aspect-ratio: 4 / 5;
    border-radius: 8px 8px 0 0;
  }
  .player-info { padding: 14px 2px 18px; }
  .player-name { font-size: 16px; }

  /* Кнопки */
  .btn, .btn-outline {
    padding: 10px 18px;
    font-size: 14px;
    min-height: 38px;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .hero-buttons .btn {
    width: 100%;
    max-width: 200px;
  }
}

/* Для совсем маленьких (375px и ниже) */
@media (max-width: 375px) {
  .container { padding: 0 4px; }
  .player-card { border-radius: 6px; }
  .player-image { min-height: 90px; border-radius: 6px 6px 0 0; }
}

/* Фиксы для input на iOS (убрать zoom) */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Превент горизонтального скролла */
@media (max-width: 768px) {
  * { max-width: 100%; word-wrap: break-word; }
  img, iframe { max-width: 100%; height: auto; }
  body, html { max-width: 100vw; overflow-x: hidden; }
}

/* Убрать hover-эффекты на touch-устройствах */
@media (hover: none) and (pointer: coarse) {
  .btn:hover, .feature-card:hover, .player-card:hover,
  .guide-card:hover, .gallery-item:hover {
    transform: none;
    box-shadow: none;
  }
  .btn:active, .feature-card:active, .player-card:active,
  .guide-card:active, .gallery-item:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
  .btn, .mobile-menu-btn, .player-modal-close, .category-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

@media (max-width: 355px) {
  .btn, .btn-outline {
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
    min-width: 0;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 800px) and (min-width: 426px) {
    .hero-content, .page-hero .container {
        padding-left: 22px;
        padding-right: 22px;
        max-width: 98vw;
        margin-left: 0;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
}
