@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@700&family=Nunito+Sans:wght@400;600;700&display=swap');

:root {
  --color-primary: #0D9488;
  --color-primary-light: #CCFBF1;
  --color-primary-dark: #0F766E;
  --color-secondary: #134E4A;
  --color-cta: #EF6461;
  --color-cta-hover: #DC4744;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFB;
  --color-dark: #1B2838;
  --color-text: #1E293B;
  --color-text-muted: #64748B;
  --color-success: #22C55E;
  --color-star: #FBBF24;
  --color-border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 50%;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito Sans', sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Comfortaa', cursive;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition);
}

button {
  cursor: pointer;
  border: none;
  font: inherit;
}

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

/* 2. HEADER (.header) */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.header__logo {
  font-family: 'Comfortaa', cursive;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-secondary);
}

.header__logo-accent {
  color: var(--color-primary);
}

.header__nav {
  display: flex;
  gap: 32px;
  list-style: none;
}

.header__nav a {
  color: var(--color-text-muted);
  font-weight: 600;
  transition: var(--transition);
}

.header__nav a:hover {
  color: var(--color-primary);
}

.header__cta {
  background: var(--color-cta);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  font-weight: 700;
  transition: var(--transition);
}

.header__cta:hover {
  background: var(--color-cta-hover);
  transform: scale(1.05);
}

.header__burger {
  display: none;
}

.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition);
}

/* 3. HERO (.hero) */
.hero {
  padding: 100px 0 60px;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-primary-light) 50%, var(--color-bg) 100%);
  overflow: hidden;
}

.hero__container {
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.hero__content {
  flex: 1;
  max-width: 550px;
}

.hero__title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.25;
  color: var(--color-secondary);
  margin-bottom: 20px;
}

span.hero__title-accent {
  color: var(--color-primary);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero__cta {
  background: var(--color-cta);
  color: white;
  padding: 18px 40px;
  border-radius: var(--radius-xl);
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: 0 8px 30px rgba(239,100,97,0.35);
  transition: var(--transition);
  animation: pulse 2s infinite;
  display: inline-block;
}

.hero__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(239,100,97,0.45);
}

.hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
}

.hero__stat {
  text-align: center;
}

.hero__stat-number {
  font-family: 'Comfortaa', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.hero__visual {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero__cat-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.hero__cat {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

.hero__float {
  position: absolute;
  font-size: 1.5rem;
  opacity: 0.6;
  animation: float var(--duration) ease-in-out infinite;
}

.hero__float--paw:nth-child(1) {
  top: 10%;
  left: 5%;
  --duration: 3s;
  animation-delay: 0s;
}

.hero__float--paw:nth-child(2) {
  bottom: 20%;
  right: 10%;
  --duration: 4s;
  animation-delay: 1s;
}

.hero__float--heart {
  top: 30%;
  right: 5%;
  --duration: 5s;
  animation-delay: 0.5s;
}

.hero__float--cross {
  bottom: 10%;
  left: 15%;
  --duration: 6s;
  animation-delay: 1.5s;
}

/* 4. SVG АНИМАЦИИ */
.cat-blink {
  animation: blink 4s ease-in-out infinite;
}
@keyframes blink {
  0%, 90%, 100% { transform: scaleY(0); }
  93%, 97% { transform: scaleY(1); }
}

.cat-tail {
  transform-origin: left center;
  animation: tailWag 3s ease-in-out infinite;
}
@keyframes tailWag {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(10deg); }
}

.cat-body {
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

/* 5. MARQUEE (.marquee) */
.marquee {
  background: var(--color-dark);
  padding: 16px 0;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
}

.marquee__group {
  display: flex;
  gap: 40px;
  padding-right: 40px;
  animation: marqueeScroll 35s linear infinite;
  flex-shrink: 0;
}

.marquee__item {
  color: white;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 600;
}

.marquee__separator {
  color: var(--color-primary);
  font-weight: bold;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 6. APP SECTION (.app-section) */
.app-section {
  background: var(--color-bg-alt);
  padding: 100px 0;
}

.app__container {
  display: flex;
  align-items: center;
  gap: 80px;
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.app__mockup {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.app__phone {
  width: 280px;
  height: 560px;
  background: var(--color-dark);
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.app__phone::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 10;
}

.app__phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: var(--color-dark);
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.app__phone-screen {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
}

.app__screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.5s;
}

.app__screen.active {
  opacity: 1;
}

.app__screen i, .app__screen svg {
  font-size: 3rem;
}

.app__screen h3 {
  font-family: 'Comfortaa', cursive;
  color: var(--color-secondary);
}

.app__notification {
  position: absolute;
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  animation: slideInNotification 3s ease-in-out infinite;
  z-index: 5;
}

.app__notification:nth-of-type(1) {
  top: 80px;
  right: -20px;
  animation-delay: 0s;
}

.app__notification:nth-of-type(2) {
  bottom: 120px;
  left: -20px;
  animation-delay: 1.5s;
}

@keyframes slideInNotification {
  0%, 100% { opacity: 0; transform: translateX(20px); }
  20%, 80% { opacity: 1; transform: translateX(0); }
}

.app__info {
  flex: 1;
}

.app__title {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: var(--color-secondary);
  margin-bottom: 16px;
}

.app__description {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
  line-height: 1.7;
}

.app__features {
  list-style: none;
  margin-bottom: 36px;
}

.app__feature {
  padding: 10px 0;
  font-size: 1rem;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

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

.app__store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: var(--color-dark);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
}

.app__store-btn:hover {
  transform: scale(1.05);
}

/* 7. VETS SECTION (.vets-section) */
.vets-section {
  padding: 100px 0;
  background: var(--color-bg);
}

.vets__container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.vets__title {
  text-align: center;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.vets__subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.vets__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}

.vets__filter-btn {
  padding: 10px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-weight: 600;
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.vets__filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.vets__filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.vets__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.vet-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vet-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary-light);
}

.vet-card[data-status='offline'] {
  opacity: 0.7;
}

.vet-card[data-status='offline']:hover {
  opacity: 1;
}

.vet-card__photo-wrap {
  position: relative;
  margin-bottom: 16px;
}

.vet-card__photo {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--color-primary-light);
}

.vet-card__status {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  border: 3px solid white;
}

.vet-card__status--online {
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.3);
}

.vet-card__status--offline {
  background: var(--color-text-muted);
}

.vet-card__name {
  font-family: 'Comfortaa', cursive;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 4px;
}

.vet-card__spec {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 12px;
}

.vet-card__rating {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.vet-card__stars {
  color: var(--color-star);
}

.vet-card__rating-num {
  font-weight: 700;
  color: var(--color-text);
}

.vet-card__meta {
  display: flex;
  gap: 16px;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.vet-card__cta {
  width: 100%;
  padding: 12px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  transition: var(--transition);
}

.vet-card__cta:hover {
  background: var(--color-primary-dark);
  transform: scale(1.02);
}

.vets__seo-text {
  margin-top: 60px;
  padding: 32px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  color: var(--color-text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* 8. FOOTER (.footer) */
.footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer__container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer__logo {
  font-family: 'Comfortaa', cursive;
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer__nav-col h4 {
  color: white;
  font-family: 'Comfortaa', cursive;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer__nav-col ul {
  list-style: none;
}

.footer__nav-col li {
  margin-bottom: 10px;
}

.footer__nav-col a {
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer__nav-col a:hover {
  color: white;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: white;
  transition: var(--transition);
}

.footer__social a:hover {
  background: var(--color-primary);
}

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__bottom p {
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer__links a:hover {
  color: white;
}

/* 9. CHAT WIDGET (.chat-widget) */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}

.chat-toggle {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-cta);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px rgba(239,100,97,0.4);
  transition: var(--transition);
  animation: pulse 2s infinite;
  cursor: pointer;
  position: relative;
}

.chat-toggle:hover {
  transform: scale(1.1);
}

.chat-toggle svg {
  width: 28px;
  height: 28px;
}

.chat-toggle__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  background: var(--color-success);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.open .chat-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat-widget.open .chat-toggle {
  animation: none;
  background: var(--color-text-muted);
}

.chat-header {
  background: var(--color-primary);
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header__avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.chat-header__text h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.chat-header__text span {
  font-size: 0.75rem;
  opacity: 0.8;
}

.chat-header__close {
  background: none;
  color: white;
  font-size: 1.3rem;
  opacity: 0.7;
}

.chat-header__close:hover {
  opacity: 1;
}

.chat-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--color-bg-alt);
}

.chat-message {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.chat-message--bot {
  flex-direction: row;
}

.chat-message--user {
  flex-direction: row-reverse;
}

.chat-message__avatar {
  width: 32px;
  height: 32px;
  background: var(--color-primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-message__content {
  background: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 75%;
}

.chat-message--user .chat-message__content {
  background: var(--color-primary);
  color: white;
}

.chat-message__content p {
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message__time {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 6px;
  display: block;
}

.chat-message--user .chat-message__time {
  text-align: right;
  color: rgba(255,255,255,0.8);
}

.chat-footer {
  padding: 16px 20px;
  background: white;
  border-top: 1px solid var(--color-border);
}

.chat-input-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--color-primary);
}

.chat-send {
  width: 44px;
  height: 44px;
  background: var(--color-cta);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.chat-send:hover {
  background: var(--color-cta-hover);
}

.chat-send svg {
  width: 20px;
  height: 20px;
}

/* 10. GLOBAL ANIMATIONS */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,100,97,0.4); }
  50% { box-shadow: 0 0 0 15px rgba(239,100,97,0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(5deg); }
  66% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 11. RESPONSIVE */
@media (max-width: 1024px) {
  .hero__container {
    flex-direction: column;
    text-align: center;
  }
  .hero__content {
    max-width: 100%;
  }
  .hero__stats {
    justify-content: center;
  }
  .hero__visual {
    max-width: 300px;
  }
  .app__container {
    flex-direction: column;
  }
  .vets__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header__nav {
    display: none; /* будет toggleться через JS */
  }
  .header__burger {
    display: flex;
    flex-direction: column;
  }
  .header__nav.open {
    display: flex;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
  }
  .hero__stats {
    flex-direction: column;
    gap: 16px;
  }
  .hero__cta {
    width: 100%;
  }
  .vets__grid {
    grid-template-columns: 1fr;
  }
  .app__phone {
    width: 240px;
    height: 480px;
  }
  .footer__top {
    grid-template-columns: 1fr;
  }
  .chat-window {
    width: calc(100vw - 32px);
    right: -8px;
    bottom: 76px;
    height: 70vh;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 1.5rem;
  }
  .vets__filters {
    gap: 8px;
  }
  .vets__filter-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
}
