/* ==========================================
   Zoo-KRIPER — Главный стилевой файл
   ========================================== */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600&display=swap');

/* ===== ПЕРЕМЕННЫЕ ===== */
:root {
  --brown:         #6B4226;
  --brown-light:   #A0714F;
  --brown-pale:    #D4A574;
  --green:         #4A7C59;
  --green-light:   #7DB88A;
  --green-pale:    #C4DEC9;
  --yellow:        #E8B84B;
  --yellow-light:  #F5D07A;
  --cream:         #F5EDD8;
  --bg:            #FAF6EE;
  --text:          #2C2017;
  --text-light:    #6B5744;
  --white:         #FFFFFF;

  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(107, 66, 38, 0.10);
  --shadow-md: 0 4px 20px rgba(107, 66, 38, 0.15);
  --shadow-lg: 0 8px 40px rgba(107, 66, 38, 0.22);

  --transition: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html { scroll-behavior: smooth; }

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

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== ТИПОГРАФИКА ===== */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 600; }

p { font-size: clamp(0.95rem, 1.5vw, 1.05rem); color: var(--text-light); }

/* ===== УТИЛИТЫ ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  color: var(--brown);
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--brown);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

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

.btn-yellow {
  background: var(--yellow);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.btn-yellow:hover {
  background: var(--yellow-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== АНИМАЦИИ ПОЯВЛЕНИЯ ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ==========================================
   ЛОГОТИП Zoo-KRIPER
   ========================================== */
.logo {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: clamp(1.4rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1px;
  letter-spacing: -1px;
  user-select: none;
}

.logo .ll {
  position: relative;
  display: inline-block;
  color: var(--brown);
  transition: var(--transition);
}

.logo .ll:hover { color: var(--green); transform: scale(1.1) rotate(-3deg); }

.logo .l-dash {
  color: var(--brown-pale);
  font-size: 0.8em;
  padding: 0 2px;
}

/* I — силуэт птицы в полёте (CSS clip-path) */
.logo .l-i {
  color: var(--green);
  padding-left: 6px;
}

.logo .l-i::after {
  content: '';
  position: absolute;
  width: 0.55em;
  height: 0.3em;
  background: var(--green-light);
  clip-path: polygon(50% 0%, 0% 100%, 25% 72%, 50% 100%, 75% 72%, 100% 100%);
  top: 0.1em;
  left: -0.6em;
}

/* ==========================================
   HEADER
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 246, 238, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: transform 0.35s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.header--hidden {
  transform: translateY(-100%);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-light);
  padding: 8px 16px;
  border-radius: var(--r-sm);
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover { color: var(--green); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--brown); font-weight: 600; }
.nav-links a.active::after { transform: scaleX(1); background: var(--brown); }

/* Бургер */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brown);
  border-radius: 2px;
  transition: var(--transition);
}

.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
  background: var(--brown);
  color: rgba(255,255,255,0.85);
  text-align: center;
  padding: 32px 24px;
  font-size: 0.9rem;
}

.footer strong {
  color: var(--yellow);
  font-family: 'Playfair Display', serif;
}

/* ==========================================
   ПЛАВАЮЩАЯ КНОПКА TELEGRAM
   ========================================== */
/* TELEGRAM: замени href на ссылку на бота в каждом HTML файле */
.float-telegram {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  box-shadow: 0 4px 20px rgba(74, 124, 89, 0.45);
  border: 2px solid var(--yellow);
  transition: var(--transition);
  white-space: nowrap;
}

.float-telegram:hover {
  background: var(--brown);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 30px rgba(107, 66, 38, 0.4);
}

.float-telegram .tg-icon {
  font-size: 1.2em;
  flex-shrink: 0;
}

/* ==========================================
   СТРАНИЦА — ГЛАВНАЯ (index.html)
   ========================================== */

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(44, 32, 23, 0.72) 0%,
    rgba(44, 32, 23, 0.45) 60%,
    rgba(44, 32, 23, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  padding: 60px 24px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(232, 184, 75, 0.25);
  border: 1px solid var(--yellow);
  color: var(--yellow-light);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-sub {
  color: rgba(255,255,255,0.88);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Фишки под hero */
.hero-badges {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 1;
}

.hero-badge {
  background: rgba(250, 246, 238, 0.15);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 99px;
}

/* Карточки преимуществ */
.features {
  background: var(--cream);
}

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

.feature-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(160, 113, 79, 0.1);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-pale);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 20px;
  display: block;
  color: var(--green);
}

.feature-card h3 {
  color: var(--brown);
  margin-bottom: 12px;
}

/* Блок "О зоопарке" */
.about {
  background: var(--bg);
}

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

.about-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cream);
}

.about-item .icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--brown);
  width: 22px;
  text-align: center;
}

.about-item p {
  font-size: 0.95rem;
}

.about-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  height: 400px;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.about-image:hover img { transform: scale(1.03); }

/* CTA секция */
.cta-section {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-light) 100%);
  text-align: center;
  padding: 80px 24px;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 36px;
  font-size: 1.05rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================
   СТРАНИЦА — БИЛЕТЫ (tickets.html)
   ========================================== */
.tickets-hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--green-pale) 100%);
  padding: 80px 24px 60px;
  text-align: center;
}

.tickets-hero h1 { color: var(--brown); margin-bottom: 12px; }

/* Карточки тарифов */
.tickets-section {
  padding: 60px 0 80px;
}

.tickets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: start;
}

.ticket-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}

.ticket-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--green-pale);
  transition: var(--transition);
}

.ticket-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-pale);
}

.ticket-card:hover::before {
  background: var(--green);
}

.ticket-card.featured {
  border-color: var(--yellow);
  background: linear-gradient(160deg, #fffdf5 0%, var(--cream) 100%);
}

.ticket-card.featured::before {
  background: var(--yellow);
}

.ticket-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ticket-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
  color: var(--green);
}

.ticket-card h3 {
  color: var(--brown);
  margin-bottom: 8px;
  font-size: 1.3rem;
}

/* PRICES: меняй цены в tickets.html */
.ticket-price {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.1;
  margin: 16px 0 8px;
}

.ticket-price sup {
  font-size: 1.2rem;
  vertical-align: super;
}

.ticket-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 28px;
  min-height: 48px;
}

.ticket-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 28px;
  text-align: left;
}

.ticket-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.ticket-feature::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
}

.disclaimer {
  background: var(--cream);
  border-left: 4px solid var(--brown-pale);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 16px 20px;
  margin-top: 48px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ==========================================
   СТРАНИЦА — ЖИВОТНЫЕ (animals.html)
   ========================================== */
.animals-hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--green-pale) 100%);
  padding: 80px 24px 60px;
  text-align: center;
}

.animals-hero h1 { color: var(--brown); margin-bottom: 12px; }

.animals-section {
  padding: 40px 0 80px;
}

/* Карусель */
.carousel-container {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 64px;
}

.carousel-wrapper {
  overflow: hidden;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.animal-card {
  flex: 0 0 100%;
  background: var(--white);
  border-radius: var(--r-xl);
  overflow: hidden;
  user-select: none;
}

.animal-img-wrap {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.animal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.animal-card:hover .animal-img-wrap img {
  transform: scale(1.04);
}

.animal-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(250, 246, 238, 0.92);
  color: var(--brown);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid var(--brown-pale);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

.animal-info {
  padding: 28px 32px 36px;
  background: var(--white);
}

.animal-name {
  color: var(--brown);
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.animal-desc {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* Стрелки карусели */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--green-pale);
  color: var(--green);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  z-index: 5;
  cursor: pointer;
}

.arrow:hover {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) scale(1.1);
}

.arrow-left  { left: 0; }
.arrow-right { right: 0; }

/* Точки карусели */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-pale);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--green);
  transform: scale(1.3);
}

/* Счётчик */
.carousel-counter {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ==========================================
   АДАПТИВНОСТЬ
   ========================================== */

/* Планшет */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    height: 320px;
    order: -1;
  }

  .tickets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tickets-grid .ticket-card:last-child {
    grid-column: 1 / -1;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Мобильный */
@media (max-width: 768px) {
  .section { padding: 56px 0; }

  .header-inner { padding: 14px 20px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--cream);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 12px 16px;
    border-radius: var(--r-sm);
  }

  .nav-links a:hover { background: var(--cream); }

  .burger { display: flex; }

  .hero { min-height: 80vh; }
  .hero-content { padding: 48px 20px; }
  .hero-badges { display: none; }

  .hero-cta { flex-direction: column; width: 100%; max-width: 300px; }
  .hero-cta .btn { text-align: center; }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .tickets-grid {
    grid-template-columns: 1fr;
  }

  .tickets-grid .ticket-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .carousel-container {
    padding: 0 52px;
  }

  .arrow {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .animal-img-wrap { height: 280px; }
  .animal-info { padding: 20px 24px 28px; }

  .float-telegram {
    bottom: 20px;
    right: 20px;
    font-size: 0.82rem;
    padding: 12px 16px;
  }
}

@media (max-width: 480px) {
  .carousel-container { padding: 0 44px; }
  .arrow { width: 36px; height: 36px; }
  .animal-img-wrap { height: 240px; }
}
