@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Armenian:wght@400;700&family=Russo+One&display=swap');

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden; /* Предотвращаем горизонтальную прокрутку при анимации собаки */
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Russo One', sans-serif;
  font-weight: 400;
}

/* Шрифт для армянского языка */
body.lang-am, body.lang-am h1, body.lang-am h2, body.lang-am h3, body.lang-am h4, body.lang-am h5, body.lang-am h6 {
  font-family: 'Noto Sans Armenian', sans-serif;
}

:root {
  --green: #CFF7DA;
  --green-hover: #88D498; /* Более темный и насыщенный зеленый для кнопок */
  --beige: #F6F2EC;
  --text: #2F2F2F;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.header {
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: left;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  text-align: left;
  width: 100%;
}

nav a {
  margin-left: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--green);
  padding: 8px 12px;
  border-radius: 12px;
  transition: background 0.3s;
  display: inline-block;
}

nav a.active {
  background: var(--green-hover);
  color: var(--text);
  text-shadow: none;
}

nav a:hover {
  background: var(--green-hover);
  color: var(--text);
  text-decoration: none;
}

.logo-container {
  display: flex;
  align-items: center;
}

.nav {
  margin-left: auto;
}

.header-socials {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 2px solid #f0f0f0;
}

.header-socials a {
  padding: 5px;
  margin-left: 5px;
}

/* Переключатель языков */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  gap: 5px;
}
.lang-btn {
  background: none;
  border: 1px solid var(--green);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}
.lang-btn.active {
  background: var(--green);
  color: var(--text);
}

/* Скрываем кнопку меню на больших экранах */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.hamburger span {
  display: block;
  width: 30px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--text); /* Темный цвет для видимости на светлом фоне */
  border-radius: 3px;
}

.logo {
  font-weight: 700;
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 80px; /* Ограничиваем высоту логотипа */
  width: auto;
  transform: scale(1.35); /* Увеличиваем логотип визуально на 35% */
  transform-origin: left center; /* Логотип растет вправо, не меняя высоту шапки */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-hover); /* Используем более темный цвет для кнопок */
  color: var(--text); /* Темный текст */
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s;
  line-height: normal;
}

.btn:hover {
  background: #66B076; /* Еще темнее при наведении */
  color: var(--text);
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--green);
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.social-subscribe-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.social-subscribe-buttons .btn {
  width: 220px;
}

.hero {
  padding: 60px 0;
  background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5l7-7Z' fill='%232F2F2F' fill-opacity='0.08'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  background-attachment: fixed;
  color: var(--text);
}

.hero-overlay {
  width: 100%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}


.hero-text h1 {
  font-size: 4rem;
  margin-bottom: 60px;
  margin-top: -30px;
  line-height: 1.2;
  color: var(--text);
}

.hero-buttons {
  margin-top: 30px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

@keyframes pulse-btn {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.hero-buttons .btn {
  background: var(--green-hover);
  color: var(--text);
  transition: background 0.3s, box-shadow 0.2s;
  animation: pulse-btn 2s infinite ease-in-out;
}

.hero-buttons .btn:hover {
  background: #66B076;
}

.hero-buttons .btn:active {
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.help-actions.hero-buttons {
  gap: 30px;
}

.help-actions.hero-buttons .btn {
  background: var(--green-hover);
  color: var(--text); /* Темный текст */
  padding: 15px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  width: 320px;
  max-width: 100%;
}

.help-actions.hero-buttons .btn:hover {
  background: #66B076;
  color: var(--text);
}

.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3; /* Соотношение сторон как у фото */
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
}

.hero-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slider img.active {
  opacity: 1;
  z-index: 1;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 2;
  font-size: 18px;
  border-radius: 50%;
  transition: background 0.3s;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev:hover, .slider-next:hover { background: rgba(0, 0, 0, 0.8); }

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.story {
  background: var(--beige);
  padding: 60px 0;
}

.story-gallery {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.story-img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.story-img:hover {
  transform: scale(1.05);
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.images-grid img {
  width: 100%;
  border-radius: 16px;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 40px 0;
}

.fact-card {
  padding: 20px;
  border: 1px solid var(--green);
  border-radius: 16px;
  text-align: center;
  background: #fff;
  transition: transform 0.3s;
}

.fact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.fact-card svg {
  width: 40px;
  height: 40px;
  fill: var(--green);
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.news {
  padding: 60px 0;
}

.cta {
  text-align: center;
  padding: 60px 0;
}

.footer {
  text-align: center;
  padding: 10px 20px;
  background: var(--text);
  color: #fff;
  margin-top: auto;
  border-top: 50px solid transparent;
  background-clip: padding-box;
}
.footer a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-contacts {
  margin: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-contacts a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Перенос длинных email */
a[href^="mailto"] {
  word-break: break-all;
  max-width: 100%;
}

.footer a:hover {
  color: var(--green-hover);
  text-decoration: underline;
}

@keyframes telegram-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  75% { transform: rotate(15deg); }
}

.footer a:hover svg,
.header-socials a:hover svg {
  animation: telegram-shake 0.5s ease-in-out infinite;
}
.footer a svg,
.header-socials a svg {
  animation: telegram-shake 2s ease-in-out infinite;
}

.dogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.dog-card {
  border: 1px solid var(--green);
  border-radius: 16px;
  padding: 16px;
  transition: 0.3s;
}

.dog-card:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transform: scale(1.02);
}

.dog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}

/* Стили для пасхалки (собака в углу) */
.corner-dog-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  cursor: pointer;
  margin-left: 45px;
  perspective: 1000px; /* Добавляем глубину для 3D-трансформаций */
}

.dog-shadow {
  position: absolute;
  bottom: 5px;
  left: 10%;
  width: 80%;
  height: 15px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  border-radius: 50%;
  transition: transform 0.2s;
  will-change: transform, opacity;
}

.corner-dog {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0); /* Включаем аппаратное ускорение */
  mix-blend-mode: multiply; /* Убирает белый фон изображения */
}

.click-counter {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  margin-left: 15px;
  background: #fff;
  color: var(--text);
  border: 2px solid var(--green);
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
  z-index: 10;
  cursor: pointer;
}

@keyframes attention-blink {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateY(-50%) scale(1.05); }
}

.click-counter.visible {
  opacity: 1;
  animation: attention-blink 2s infinite;
}

.flying-bone {
  position: absolute;
  font-size: 30px;
  pointer-events: none;
  z-index: 20;
  right: 0;
  bottom: 0;
  animation: feed-bone 0.6s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes feed-bone {
  0% { opacity: 0; transform: scale(0.5) translate(0, 0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: scale(1) translate(-60px, -60px) rotate(360deg); }
}

.heart-icon {
  position: absolute;
  font-size: 24px;
  z-index: 15;
  pointer-events: none;
  animation: heart-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  color: var(--green);
  will-change: transform;
}

@keyframes heart-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* Анимации для JS */
.corner-dog-wrapper.jump .corner-dog {
  animation: jump 0.4s ease;
}

.corner-dog-wrapper.jump .dog-shadow {
  animation: shadow-jump 0.4s ease;
}

@keyframes jump {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -15px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes shadow-jump {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

.corner-dog-wrapper.active .corner-dog,
.corner-dog-wrapper.active .dog-shadow {
  transition: transform 5s linear;
  transform: translate3d(100vw, 0, 0);
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  margin: auto;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}

.close-modal:hover {
  color: #000;
}

.prev-modal, .next-modal {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  user-select: none;
  z-index: 2001;
}
.prev-modal { left: 20px; }
.next-modal { right: 20px; }
.modal-img { width: 100%; border-radius: 8px; margin-bottom: 15px; }

/* Стили для форм */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
}

textarea.form-control {
  resize: vertical;
}

/* Админ-панель */
.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.admin-block {
  border: 2px solid var(--green);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
}

.admin-block:hover {
  background: var(--beige);
  transform: translateY(-5px);
}

.btn-back {
  background: none;
  border: none;
  color: var(--green);
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 20px;
  display: inline-block;
}

.btn-back:hover {
  text-decoration: underline;
}

.message-item {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 12px;
  background: #fff;
  text-align: left;
}

.message-item.unread {
  border-left: 4px solid var(--green);
  background-color: #f0fdf4;
}

.msg-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
    flex-direction: column;
  }

  .hero-buttons .btn,
  .help-actions.hero-buttons .btn {
    width: 100%;
    max-width: 100%;
  }

  /* Анимация появления кнопок */
  .btn-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  }
  .btn-animate.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .facts-grid, .images-grid {
    grid-template-columns: 1fr;
  }

  .hamburger {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 100;
    align-items: center;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    margin: 10px 0;
    font-size: 1.2rem;
  }

  .header-socials {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 10px;
  }

  .lang-switcher {
    margin-left: 0;
    margin-top: 10px;
  }

  .story-gallery {
    flex-direction: column;
    align-items: center;
  }

  .story-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .footer a svg,
  .header-socials a svg {
    animation: telegram-shake 2s ease-in-out infinite;
  }

  .msg-header {
    flex-direction: column;
  }

  .footer-contacts {
    flex-direction: column;
    gap: 10px;
  }

  .hero-text h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 30px;
  }

  /* Адаптация собаки и логотипа для мобильных */
  .corner-dog-wrapper {
    width: 90px;
    height: 90px;
    margin-left: 10px;
  }

  .click-counter {
    font-size: 11px;
    padding: 4px 8px;
  }

  .logo img {
    transform: scale(1.1); /* Немного уменьшаем логотип на мобильных */
    max-height: 60px;
  }
}

/* Кнопка "Наверх" */
#scrollTopBtn {
  display: none; /* Скрыта по умолчанию */
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  border: none;
  outline: none;
  background-color: var(--green-hover);
  color: var(--text); /* Темный текст */
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: background-color 0.3s, color 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  background-color: #66B076;
  color: var(--text);
  transform: translateY(-5px);
}

/* Стили для новостей */
.news-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0 50px;
}

.news-slider-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s ease-in-out;
  padding: 10px 0;
}

.news-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--green);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.3s, box-shadow 0.3s;
  flex: 0 0 calc((100% - 60px) / 3);
  flex-shrink: 0;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}

.news-card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.news-card-content {
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  margin-top: 0;
  margin-bottom: 5px;
  font-size: 1.5rem;
}

.news-card-date {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 15px;
}

.news-card-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
}

.news-prev, .news-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.news-prev { left: 0; }
.news-next { right: 0; }

@media (max-width: 900px) {
  .news-card {
    flex: 0 0 calc((100% - 30px) / 2);
  }
}

@media (max-width: 600px) {
  .news-card {
    flex: 0 0 100%;
  }
}