/* ========== СТРАНИЦА СООБЩЕСТВО ========== */
.community-page {
  background: var(--dark);
  color: var(--white);
}

.community-container {
  width: min(1320px, calc(100% - 48px));
  margin: 0 auto;
}

/* Hero секция */
.community-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: -100px;
  padding-top: 100px;
}

.community-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(3,6,4,.96) 0%,
      rgba(3,6,4,.78) 42%,
      rgba(3,6,4,.28) 100%
    ),
    url("../img/community-hero.jpg") center right / cover no-repeat;
  z-index: 0;
}

.community-hero .community-container {
  position: relative;
  z-index: 2;
}

.community-hero .section-label {
  display: inline-block;
  margin-bottom: 16px;
}

.community-hero h1 {
  margin: 0 0 24px;
  font-size: clamp(52px, 7vw, 96px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: -.06em;
}

.community-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1.5;
}

/* Секция питомцев */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2,
.pet-month h2,
.social-community h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 50px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
}

.section-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.section-link:hover {
  color: var(--white);
}

.community-pets {
  padding: 90px 0 40px;
}

/* Слайдер — drag to scroll без привязки */
.pets-slider-wrap {
  position: relative;
}

.pets-slider {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  scroll-behavior: auto;
}

.pets-slider:active {
  cursor: grabbing;
}

.pets-slider::-webkit-scrollbar {
  display: none;
}

.pet-card {
  flex: 0 0 220px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(6,14,8,.78);
  border: 1px solid rgba(171,191,21,.12);
  transition: all 0.3s ease;
}

.pet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(171,191,21,.38);
}

.pet-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.pet-card:hover img {
  transform: scale(1.05);
}

.pet-card div {
  padding: 18px;
}

.pet-card h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 17px;
  line-height: 1.25;
  font-weight: 600;
}

.pet-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Кнопки навигации (опционально) */
.pets-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(171,191,21,.22);
  border-radius: 50%;
  background: rgba(3,6,4,.78);
  color: var(--green);
  font-size: 22px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
}

.pets-slider-btn:hover {
  background: var(--green);
  color: #071006;
  transform: scale(1.05);
}

.pets-slider-btn--prev {
  left: -22px;
}

.pets-slider-btn--next {
  right: -22px;
}

/* Питомец месяца */
.pet-month {
  padding: 52px 0 40px;
}

.pet-month__card {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(6,14,8,.78);
  border: 1px solid rgba(171,191,21,.14);
}

.pet-month__image img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}

.pet-month__content {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pet-month__content span {
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pet-month__content h3 {
  margin: 16px 0 8px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pet-owner {
  color: var(--green) !important;
  font-weight: 600;
}

.pet-month__content p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.outline-btn {
  margin-top: 18px;
  width: fit-content;
  padding: 16px 26px;
  border-radius: 12px;
  border: 1px solid rgba(171,191,21,.45);
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.outline-btn:hover {
  background: rgba(171,191,21,.1);
  border-color: var(--green);
}

/* Поделиться питомцем */
.share-pet {
  padding: 44px 0;
}

.share-pet__box {
  padding: 34px;
  border-radius: 26px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(171,191,21,.14);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.share-pet__icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: rgba(171,191,21,.12);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-pet__icon svg {
  width: 32px;
  height: 32px;
}

.share-pet p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.share-pet__button,
.share-pet__link {
  height: 56px;
  padding: 0 26px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s;
}

.share-pet__button {
  border: none;
  background: var(--green);
  color: #071006;
  cursor: pointer;
}

.share-pet__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(171,191,21,.3);
}

.share-pet__link {
  border: 1px solid rgba(171,191,21,.22);
  color: var(--white);
  background: rgba(6,14,8,.7);
}

.share-pet__link:hover {
  border-color: var(--green);
  color: var(--green);
}

/* Соцсети */
.social-community {
  padding: 54px 0;
}

.social-community__grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.social-card {
  min-height: 260px;
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 26px;
  background:
    linear-gradient(90deg, rgba(6,14,8,.94), rgba(6,14,8,.62)),
    url("../img/social-card-bg.jpg") center right / cover no-repeat;
  border: 1px solid rgba(171,191,21,.14);
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s;
}

.social-card:hover {
  transform: translateY(-4px);
  border-color: rgba(171,191,21,.38);
}

.social-card__icon {
  width: 58px;
  height: 58px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--green);
  color: #071006;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
}

.social-card--vk .social-card__icon {
  background: #2787f5;
  color: #fff;
}

.social-card--tg .social-card__icon {
  background: #229ed9;
  color: #fff;
}

.social-card--max .social-card__icon {
  background: var(--green);
  color: #071006;
  font-size: 13px;
}

.social-card h3 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.social-card p {
  max-width: 360px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.social-card strong {
  color: var(--green);
  transition: gap 0.3s;
}

.social-card:hover strong {
  gap: 8px;
  padding-left: 4px;
}

/* Финальный блок */
.community-final {
  padding: 30px 0 100px;
}

.community-final__box {
  padding: 46px;
  border-radius: 28px;
  background: url("../img/bga.png") center / cover no-repeat;
  border: 1px solid rgba(171,191,21,.14);
}

.community-final h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.6vw, 40px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
}

.community-final p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* Адаптив */
@media (max-width: 1100px) {
  .pet-card {
    flex: 0 0 calc((100% - 44px) / 3);
  }

  .social-community__grid {
    grid-template-columns: 1fr;
  }

  .share-pet__box {
    flex-direction: column;
    text-align: center;
  }
  
  .share-pet__button,
  .share-pet__link {
    width: 100%;
  }
}

@media (max-width: 980px) {
  .community-hero {
    min-height: 420px;
  }
  
  .community-hero h1 {
    font-size: clamp(40px, 6vw, 72px);
  }
  
  .community-hero p {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .community-hero {
    min-height: 380px;
    align-items: flex-end;
    padding-bottom: 40px;
  }
  
  .community-hero h1 {
    font-size: clamp(32px, 5vw, 48px);
  }
  
  .community-hero p {
    font-size: 18px;
  }
  
  .pet-card {
    flex: 0 0 76%;
  }

  .pets-slider-btn {
    display: none;
  }

  .pet-month__card {
    grid-template-columns: 1fr;
  }

  .pet-month__content {
    padding: 30px;
  }
}

@media (max-width: 480px) {
  .pet-card {
    flex: 0 0 85%;
  }
}