/* ============ MEDIA.CSS ============ */

/* 📱 Планшеты ( до 1024px) */
@media (max-width: 1024px) {

  .scrollToTop {
    width: 10vw;
  }

  .center-text {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 45%;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: white;
    background: linear-gradient(to right, #ff69b4, #8a2be2, #1e90ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: calc(0.5px + 0.15vw) #ffffff;
    text-align: center;
  }

  .text-container {
    width: 50%;
  }

  .round-button {
    width: 8rem;
    height: 8rem;

  }

}

/* 📱 Мобильные устройства до 768px */
@media (max-width: 768px) {

  .wrap {
    padding: 0 5px;
  }

  /* Шапка */
  .header-top {
    height: auto;
    padding: 0.5rem 1rem;
    flex-wrap: wrap;
  }

  /* Логотип и текст в линию */
  .brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .brand-text {
    margin-bottom: 0;
  }

  .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.4);
    width: 100%;
    height: 40vh;
    padding: 0;
    margin: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    border-top: 3px solid #1e90ff;
    /* верхняя граница в фирменном цвете */
  }

  .menu.active {
    display: flex;
  }

  .menu li {
    min-width: 80%;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    /* разделители */
    transition: background 0.3s ease;
  }

  .menu li:last-child {
    border-bottom: none;
    /* убираем лишний разделитель */
  }

  .menu li:hover {
    background: #f0f8ff;
    /* нежно-голубой при наведении */
  }

  .menu li:active {
    background: #1e90ff;
    /* фирменный синий при клике */
  }

  .menu li:active a {
    color: #fff;
    /* белый текст на синем фоне */
  }

  .menu a {
    font-size: 1.5rem;
    width: 100%;
    text-align: center;
    display: block;
    color: #054c93;
    text-decoration: none;
  }

  .menu a:hover {
    color: #1e90ff;
  }

  /* Показываем бургер */
  #burgerToggle {
    display: block;
    z-index: 1000;
  }

  /* Языки вниз */
  nav {
    position: relative;
    flex-direction: column;
  }

  .header-video-container {
    position: relative;
    margin-top: 7rem;
    height: calc(100vh - 7rem);
    overflow: hidden;
  }

  .header-video-container video {
    position: absolute;
    width: 100%;
    height: 50vh;
    object-fit: cover;
  }

  .center-text {
    top: 10%;
    left: 5%;
    width: 80%;
    font-size: clamp(2rem, 5vw, 4em);
  }

  .center-text p {
    margin: 0.5rem 0;
  }

  .round-button {
    top: calc(50vh - 5rem);
    left: 1rem;
    width: 5rem;
    height: 5rem;
  }

  .text-container {
    display: none;
  }

  .text-container-mini {
    display: block;
    position: absolute;
    /* вынести под видео */
    width: 100%;
    top: calc(50vh);
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    font-size: 1.1rem;
    color: #1e90ff;
    backdrop-filter: blur(5px);
    background: rgb(240, 197, 161, 0.4);
    /* чуть светлее */
    padding: 1.2rem;
    overflow-y: auto;
    /* включаем прокрутку */
  }

  /* Стили для контейнера всплывающего окна */
  .popover-container {
    position: relative;
    left: 5%;
    width: 65%;
    background: transparent;
    text-align: center;
  }

  .close-button {
    font-size: 12px;
    height: 32px;
  }

  .popover-container {
    width: 90%;
  }

  /* Центрируем и растягиваем видео на ширину экрана */
  .video-carousel-section video,
  .video-carousel-section iframe {
    width: 95%;
    max-width: 95%;
    height: auto;
    margin: 0 auto;
    display: block;
  }

  /* Вертикальные видео пусть занимают большую часть экрана */
  .swiper-slide video.vertical {
    width: auto;
    max-height: 50vh;
    max-width: 90%;
  }

  /* Чтобы стрелки не налезали на видео */
  .swiper-button-next,
  .swiper-button-prev {
    top: 45%;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
  }

  /* Отступы у пагинации для мобильных */
  .swiper-pagination {
    display: none;
    bottom: 15px;
  }

  .home-intro {
    flex-direction: column;
    text-align: center;
  }

  .home-text h2 {
    font-size: 2.2rem;
  }

  .home-text h3 {
    font-size: 1.3rem;
  }

  .home-section h3 {
    font-size: 1.4rem;
  }

  .home-section ul {
    margin-left: 18px;
  }

  .community-top {
    flex-direction: column;
    align-items: center;
  }

  .community-image,
  .community-header {
    flex: 1 1 100%;
    text-align: center;
  }

  .community_container {
    flex-direction: column;
    align-items: center;
  }

  .community_image img {
    max-width: 100%;
  }

  .community-benefits h2 {
    text-align: center;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
  }

  .community-benefits article {
    padding: 18px;
  }

  .contact-us {
    flex-direction: column;
  }

  .contact-icons {
    width: 95%;
    height: 100px;
    flex-direction: row;
    justify-content: space-around;
    margin-top: 2%;
    margin-bottom: 2%;
    margin-right: auto;
    margin-left: auto;
    padding: 0;
    gap: 0;
  }

  .contact-icons a {
    margin: 0;
    flex-direction: column;
    align-items: center;
    gap: 0;
    font-size: 12px;
  }

  .contact-icons img {
    width: 50px;
    height: 50px;
    border-width: 0;
    border-bottom: 4px solid #547b80;
    border-radius: 0.4em;
    cursor: pointer;
    margin: 5px 2px;
    box-shadow: 5px 5px 10px 1px #000000;
    transition: box-shadow 0.2s 0.3s;
  }

  .contact-form-container {
    width: 90%;
    padding: 1.5rem;
  }




  .footer {
    padding: 2px 10px;
    justify-content: space-around;
  }

  .logo_footer {
    height: 2rem;
    width: 2rem;
    margin-left: 5px;
  }

  .footer__copy {
    width: 25%;
    font-size: 8px;
    letter-spacing: 0.95px;
    line-height: 16px;
    color: #FFF;
    padding: 5px 0 5px 5px;
    margin: 0;
  }

  .footer__copy-text {
    font-size: 8px;
    font-style: bold;
  }

  .footer__contacts {
    margin: 0;
    padding: 0 5px;
    width: auto;
  }

  .footer__contacts-item {
    padding-right: 5px;
  }

  .footer__contacts-whatsapp,
  .footer__contacts-messenger,
  .footer__contacts-telegram,
  .footer__contacts-email {
    width: 10vw;
    border-width: 0;
  }

}




/* 📱 Очень маленькие экраны до 480px */
@media (max-width: 480px) {
  .center-text {
    font-size: clamp(1.2rem, 6vw, 2rem);
    width: 90%;
    left: 5%;
    text-align: center;
  }

  .text-container {
    width: 90%;
    font-size: 1rem;
    top: 8rem;
  }

  .round-button {
    width: 5rem;
    height: 5rem;
  }

  .video-carousel-section video,
  .video-carousel-section iframe {
    width: 100%;
    border-radius: 10px;
  }

  .swiper-slide video.vertical {
    height: 65vh;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 2rem;
    height: 2rem;
  }
}