/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #E8733A;
  --accent-dark: #C85A22;
  --green: #3A8A5A;
  --green-dark: #2A6A42;
  --bg: #FFF8F3;
  --bg-alt: #F5EDE6;
  --text: #2C2217;
  --text-light: #7A6055;
  --white: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(100,50,20,0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; margin: 8px 0; }
.section-header p { color: var(--text-light); font-size: 1.05rem; }

.section-label {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }

.btn-sm { padding: 8px 20px; font-size: 0.9rem; }

.btn-white {
  background: var(--white);
  color: var(--accent);
}
.btn-white:hover { background: var(--bg); transform: translateY(-2px); }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,248,243,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(232,115,58,0.12);
  padding: 12px 0;
}

.header .container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo img { height: 48px; width: auto; }
.logo span {
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text);
}
.logo small { font-size: 0.75rem; color: var(--text-light); font-weight: 600; }

.nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.nav a {
  padding: 8px 14px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  transition: all 0.2s;
}
.nav a:hover { background: var(--bg-alt); color: var(--accent); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30,15,5,0.75) 0%, rgba(50,20,5,0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 80px 20px;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  opacity: 0.9;
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-buttons .btn-outline {
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.hero-buttons .btn-outline:hover { background: var(--white); color: var(--accent); border-color: var(--white); }

/* ===== PATRONAGE ===== */
.patronage {
  background: var(--accent);
  color: var(--white);
  padding: 14px 0;
  font-size: 0.9rem;
}
.patronage .container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.patronage strong { font-weight: 900; }

/* ===== ABOUT ===== */
.about { background: var(--white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-images {
  position: relative;
  height: 420px;
}

.about-img {
  width: 65%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: absolute;
}

.about-img-1 { top: 0; left: 0; }
.about-img-2 { bottom: 0; right: 0; border: 4px solid var(--white); }

.about-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin: 8px 0 20px; }
.about-text p { color: var(--text-light); margin-bottom: 16px; }

.stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid var(--bg-alt);
}

.stat strong {
  display: block;
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}
.stat span { font-size: 0.85rem; color: var(--text-light); font-weight: 600; }

/* ===== PETS ===== */
.pets-section { background: var(--bg); }

.pets-filter {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 24px;
  border-radius: 100px;
  border: 2px solid var(--bg-alt);
  background: var(--white);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.pet-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.pet-card:hover { transform: translateY(-4px); }
.pet-card.hidden { display: none; }

.pet-photo {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.pet-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.pet-card:hover .pet-photo img { transform: scale(1.05); }

.pet-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--white);
}
.pet-badge.dog { background: var(--accent); }
.pet-badge.cat { background: var(--green); }

.pet-info {
  padding: 16px 20px 20px;
}
.pet-adoption {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.adoption-yes { background: #E8F5E9; color: #2E7D32; }
.adoption-no  { background: #F5F5F5; color: #9E9E9E; }

.pet-info h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.pet-info p { color: var(--text-light); font-size: 0.9rem; margin-bottom: 14px; }

.pets-more { text-align: center; margin-top: 40px; }

/* ===== NEWS ===== */
.news-section { background: var(--white); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 24px;
  border-left: 4px solid var(--accent);
  transition: transform 0.2s;
}
.news-card:hover { transform: translateY(-3px); }

.news-date {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.news-card p { color: var(--text); margin-bottom: 16px; line-height: 1.6; }
.news-link { font-weight: 800; color: var(--accent); font-size: 0.9rem; }
.news-link:hover { color: var(--accent-dark); }

.news-more { text-align: center; margin-top: 40px; }

/* Галерея новостей */
.news-gallery {
  position: relative;
  margin: -24px -24px 16px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  height: 220px;
  background: #000;
}

.gallery-track { height: 100%; }

.gallery-slide {
  display: none;
  height: 100%;
}
.gallery-slide.active { display: block; }

.gallery-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(0,0,0,0.7); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.gallery-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}
.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-dot.active { background: #fff; }

.pet-no-photo { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 3rem; background: var(--bg-alt); }

.loading { text-align: center; padding: 40px; color: var(--text-light); font-weight: 700; grid-column: 1/-1; }

/* ===== HELP ===== */
.help-section { background: var(--bg-alt); }

.help-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.help-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.help-card-accent {
  background: var(--accent);
  color: var(--white);
}
.help-card-accent p { color: rgba(255,255,255,0.85); }

.help-icon { font-size: 2.4rem; margin-bottom: 16px; }
.help-card h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 10px; }
.help-card p { font-size: 0.95rem; color: var(--text-light); margin-bottom: 20px; }

/* Реквизиты */
.requisites {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.requisites h3 { font-size: 1.3rem; font-weight: 900; margin-bottom: 24px; color: var(--accent); }

.requisites-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}
.requisites-grid p { margin-bottom: 8px; font-size: 0.95rem; color: var(--text-light); }
.requisites-grid strong { color: var(--text); }

.requisites-note {
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--bg-alt);
  padding-top: 16px;
}

/* ===== CONTACTS ===== */
.contacts-section { background: var(--white); }

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.contact-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.contact-icon { font-size: 2rem; margin-bottom: 10px; }
.contact-item strong { display: block; font-weight: 900; margin-bottom: 8px; font-size: 1rem; }
.contact-item p { color: var(--text-light); font-size: 0.95rem; }
.contact-item a { color: var(--accent); font-weight: 700; }
.contact-item a:hover { color: var(--accent-dark); }

.socials { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.social-link {
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 800;
  transition: opacity 0.2s;
  color: var(--white);
}
.social-link:hover { opacity: 0.85; }
.social-link.vk { background: #0077FF; }
.social-link.yt { background: #FF0000; }
.social-link.dz { background: #FF6600; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-photo {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.modal-no-photo {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: var(--bg-alt);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-body { padding: 24px 28px 28px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-title { font-size: 1.6rem; font-weight: 900; }
.modal-close {
  background: var(--bg-alt);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: #ddd; }

.modal-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.modal-tag {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--bg-alt);
  color: var(--text-light);
}
.modal-tag.adoption-yes { background: #E8F5E9; color: #2E7D32; }
.modal-tag.adoption-no  { background: #F5F5F5; color: #9E9E9E; }
.modal-tag.dog { background: #FFF0E6; color: var(--accent); }
.modal-tag.cat { background: #E8F5EE; color: var(--green); }

.modal-section { margin-bottom: 16px; }
.modal-section strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.modal-section p { color: var(--text); line-height: 1.6; }

.modal-actions { margin-top: 24px; }

/* ===== SPONSORS ===== */
.sponsors-section { background: var(--bg); }

.sponsors-grid { display: flex; flex-direction: column; gap: 24px; }

.sponsor-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.sponsor-logo-link {
  flex-shrink: 0;
  display: block;
  width: 160px;
}
.sponsor-logo-link img {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: opacity 0.2s;
}
.sponsor-logo-link:hover img { opacity: 0.8; }

.sponsor-info { flex: 1; }
.sponsor-info h3 { font-size: 1.2rem; font-weight: 900; margin-bottom: 10px; }
.sponsor-info h3 a { color: var(--text); }
.sponsor-info h3 a:hover { color: var(--accent); }
.sponsor-info > p { color: var(--text-light); margin-bottom: 16px; }

.sponsor-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
}
.sponsor-contacts a { color: var(--accent); font-weight: 700; }
.sponsor-contacts a:hover { color: var(--accent-dark); }

.sponsor-badge {
  display: inline-block;
  background: var(--bg-alt);
  color: var(--accent);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 5px 14px;
  border-radius: 100px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.85);
  padding: 40px 0 24px;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-logo img { height: 36px; opacity: 0.9; }
.footer-logo span { font-weight: 800; font-size: 0.95rem; color: var(--white); }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 0.9rem; color: rgba(255,255,255,0.65); font-weight: 600; }
.footer-links a:hover { color: var(--white); }

.footer-bottom p { font-size: 0.85rem; color: rgba(255,255,255,0.4); text-align: center; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .section { padding: 52px 0; }

  /* Header mobile */
  .nav {
    display: none;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 99;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; border-radius: 12px; font-size: 1rem; }
  .burger { display: flex; }

  /* Hero */
  .hero { min-height: 80vh; }
  .hero-content { padding: 60px 20px; }
  .hero-buttons { flex-direction: column; align-items: flex-start; }
  .hero-buttons .btn { width: 100%; text-align: center; }

  /* Patronage */
  .patronage .container { flex-direction: column; gap: 4px; font-size: 0.82rem; }

  /* About */
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-images { height: 260px; }
  .about-img { width: 60%; height: 180px; }
  .stats { gap: 20px; }
  .stat strong { font-size: 1.6rem; }

  /* Pets */
  .pets-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .pet-photo { height: 160px; }

  /* News */
  .news-grid { grid-template-columns: 1fr; }

  /* Help */
  .help-grid { grid-template-columns: 1fr; }
  .requisites { padding: 24px 20px; }
  .requisites-grid { grid-template-columns: 1fr; gap: 0; }

  /* Contacts */
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }

  /* Sponsors */
  .sponsor-card { flex-direction: column; gap: 24px; padding: 24px 20px; }
  .sponsor-logo-link { width: 120px; }

  /* Footer */
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 12px; }
}

@media (max-width: 480px) {
  .pets-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; }
  .stats { flex-direction: column; gap: 16px; }
}
