/* ===== Приют «Добрый лап» ===== */
:root {
  --bg: #fff8f1;
  --card: #ffffff;
  --ink: #2b2440;
  --muted: #7d7692;
  --accent: #ff7a59;
  --accent-2: #ffb347;
  --green: #34c98a;
  --purple: #7c6cf0;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(43, 36, 64, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

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

/* ===== Шапка ===== */
.site-header {
  background: linear-gradient(135deg, #ff9a6c 0%, #ff7a59 45%, #ff6f91 100%);
  color: #fff;
  padding: 18px 0 90px;
  position: relative;
  overflow: hidden;
}
.site-header::after {
  content: "🐾";
  position: absolute;
  right: -30px;
  top: -50px;
  font-size: 230px;
  opacity: 0.15;
  transform: rotate(-15deg);
  pointer-events: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-paw { font-size: 34px; }
.logo-title { font-size: 22px; font-weight: 800; letter-spacing: 0.5px; }
.logo-sub { font-size: 13px; opacity: 0.85; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  opacity: 0.92;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { opacity: 1; border-bottom-color: #fff; }

.btn {
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-accent {
  background: #fff;
  color: var(--accent);
  box-shadow: var(--shadow);
}
.btn-wide { width: 100%; margin-top: 18px; background: var(--accent); color: #fff; }

/* ===== Hero ===== */
.hero { position: relative; z-index: 1; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: center;
}
.hero-text h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; margin-bottom: 14px; }
.hero .heart { color: #ffd7e0; animation: beat 1.2s infinite; display: inline-block; }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.hero-text p { font-size: clamp(16px, 2vw, 18px); max-width: 560px; opacity: 0.96; }

.hero-art { position: relative; height: 240px; }
.blob {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30% 70% 65% 35% / 40% 45% 55% 60%;
  box-shadow: var(--shadow);
  animation: float 4s ease-in-out infinite;
}
.blob.b1 { width: 150px; height: 150px; font-size: 74px; background: #ffe3c9; left: 10%; top: 10%; }
.blob.b2 { width: 120px; height: 120px; font-size: 60px; background: #e9e4ff; right: 12%; top: 0; animation-delay: 0.8s; }
.blob.b3 { width: 110px; height: 110px; font-size: 54px; background: #d9f7ec; right: 30%; bottom: 0; animation-delay: 1.6s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-14px) rotate(3deg); } }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: -58px;
  position: relative;
  z-index: 2;
}
.stat {
  background: var(--card);
  border-radius: 18px;
  padding: 16px 10px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 28px; color: var(--accent); }
.stat span { font-size: 13px; color: var(--muted); }

/* ===== Секции ===== */
main { padding: 46px 0 70px; }
main h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-head .sub { color: var(--muted); margin-bottom: 20px; }

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
}
.filters input[type="search"] {
  flex: 1;
  min-width: 210px;
  padding: 12px 20px;
  border: 2px solid #efe7e0;
  border-radius: 999px;
  font-size: 16px;
  background: #fff;
  outline: none;
}
.filters input[type="search"]:focus { border-color: var(--accent); }
.filters select {
  padding: 12px 16px;
  border: 2px solid #efe7e0;
  border-radius: 999px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
  outline: none;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 2px solid #efe7e0;
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.15s;
}
.chip:hover { border-color: var(--accent-2); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Карточки животных ===== */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 22px;
}
.pet-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}
.pet-card:hover, .pet-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(43, 36, 64, 0.16);
}
.pet-photo {
  height: 170px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pet-emoji {
  font-size: 76px;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.22));
  transition: transform 0.18s ease;
}
.pet-card:hover .pet-emoji { transform: scale(1.12) rotate(-6deg); }
.pet-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pet-status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}
.pet-info { padding: 16px 18px 18px; }
.pet-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pet-name-row h3 { font-size: 21px; }
.pet-type {
  font-size: 12px;
  font-weight: 700;
  background: #f3eefb;
  color: var(--purple);
  padding: 4px 10px;
  border-radius: 999px;
}
.pet-breed { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }
.pet-facts { list-style: none; display: grid; gap: 8px; }
.pet-facts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  border-bottom: 1px dashed #efe7e0;
  padding-bottom: 7px;
}
.pet-facts li:last-child { border-bottom: none; padding-bottom: 0; display: block; }
.pet-facts span { color: var(--muted); white-space: nowrap; }
.pet-facts b { text-align: right; }
.pet-facts li:last-child b { display: block; text-align: left; margin-top: 3px; font-weight: 600; }
.pet-more { display: inline-block; margin-top: 13px; color: var(--accent); font-weight: 700; font-size: 14px; }

.empty {
  text-align: center;
  padding: 50px 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--muted);
}

/* ===== О приюте / Как помочь ===== */
.info-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 36px;
  margin-top: 34px;
  border-left: 8px solid var(--accent);
  scroll-margin-top: 20px;
}
.info-card.alt { border-left-color: var(--purple); }
.info-card h2::before { content: "🏠"; }
.info-card.alt h2::before { content: "💚"; }
.info-card > p { font-size: 17px; max-width: 820px; margin-top: 8px; }
.info-card b { color: var(--accent); }
.help-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.help-list li {
  background: #fff6f0;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
}
.info-card.alt .help-list li { background: #f3eefb; }

/* ===== Подвал ===== */
.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 28px 0;
  text-align: center;
  font-size: 15px;
  opacity: 0.95;
}
.site-footer .container { opacity: 0.85; }

/* ===== Модальное окно ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 36, 64, 0.55);
  backdrop-filter: blur(3px);
}
.modal-dialog {
  position: relative;
  background: #fff;
  border-radius: 26px;
  max-width: 620px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: pop 0.22s ease;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}
@keyframes pop {
  from { transform: scale(0.9) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: var(--shadow);
}
.modal-close:hover { transform: rotate(90deg); }
.modal-photo {
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 92px;
  overflow: hidden;
}
.modal-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-photo > span { filter: drop-shadow(0 8px 10px rgba(0,0,0,0.25)); }
.modal-body { padding: 22px 26px 26px; }
.modal-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.modal-title-row h3 { font-size: 28px; }
.badge {
  font-size: 13px;
  font-weight: 700;
  background: #f3eefb;
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 999px;
}
.modal-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 18px;
}
.fact { background: #fff6f0; border-radius: 16px; padding: 12px; text-align: center; }
.fact span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.fact b { font-size: 15px; }
.fact-block { margin-bottom: 14px; }
.fact-block h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent);
  margin-bottom: 4px;
}
.fact-block p { font-size: 15px; }

/* ===== Уведомление ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 60;
  animation: pop 0.2s ease;
  max-width: 90vw;
  text-align: center;
}
.toast[hidden] { display: none; }

/* ===== Адаптив ===== */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); margin-top: 26px; }
  .modal-facts { grid-template-columns: 1fr; }
  .info-card { padding: 24px 20px; }
  .nav { order: 3; width: 100%; justify-content: center; }
}
