/* --- Глобальные переменные --- */
:root {
  --primary: #0066ff;
  --dark: #0f172a;
  --gray: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
}
::selection {
  background: var(--primary);
  color: white;
}
/* --- Сброс стилей --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.header {
  height: 80px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Этот класс можно добавлять через JS при скролле более 50px */
.header.scrolled {
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -1px; text-decoration: none; color: inherit; }
.logo span { color: var(--primary); }

.nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  margin-left: 30px;
  transition: 0.3s;
}

.btn-nav {
  background: var(--dark);
  color: white !important;
  padding: 10px 20px;
  border-radius: 8px;
}


.hero h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { color: var(--primary); }

.hero-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: 15px 35px;
    border-radius: 12px;
    font-weight: 700;
    transition: 0.3s;
}

.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
              url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; 
  padding: 150px 0;
  color: white;
  text-align: center;
}
.tours { padding: 80px 0; }

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

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

.filter-btn {
  padding: 10px 22px;
  border: 2px solid #e2e8f0;
  background: #fff;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s;
  color: var(--gray);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/*  4. Сетка туров  */
.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  align-items: stretch;
}

.tour-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  position: relative;
}

.tour-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

.tour-badge {
  position: absolute; top: 15px; left: 15px;
  background: rgba(255,255,255,0.95);
  padding: 4px 12px; border-radius: 6px; font-weight: 700; font-size: 0.75rem;
}

.tour-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tour-info h3 { margin-bottom: 12px; font-size: 1.3rem; }
.tour-info p { color: var(--gray); margin-bottom: 20px; }

.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 15px;
}

.price { font-weight: 800; font-size: 1.25rem; }

.book-tour-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
/* Эффект блика */
.tour-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
      to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.3) 50%,
      rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: 0.75s;
  z-index: 2;
}

.tour-card:hover::before {
  left: 125%;
}

/* Стили для параллакс-эффекта на кнопках */
.hero-btn:hover {
  box-shadow: 0 10px 25px rgba(0, 102, 255, 0.4);
  transform: translateY(-2px);
}
/* --- 5. Форма бронирования --- */
.booking { padding: 80px 0; }

.booking-wrapper {
  background: var(--dark);
  border-radius: 24px;
  padding: 50px;
  display: flex;
  color: white;
  gap: 40px;
  align-items: center;
}

.booking-form {
  flex: 1;
  display: grid;
  gap: 15px;
}

.booking-form input, .booking-form select {
  padding: 15px;
  border-radius: 10px;
  border: none;
  width: 100%;
  font-size: 1rem;
}

.booking-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}

.booking-form button:hover { opacity: 0.9; }

/* --- 6. Секция отзывов --- */
.reviews {
  padding: 100px 0;
  background-color: var(--bg);
}

.reviews-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 50px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.review-card {
  background: var(--white);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.review-card:hover { transform: translateY(-5px); }

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.review-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.stars { color: #fbbf24; font-size: 0.9rem; margin-top: 5px;}

.review-text {
  color: var(--gray);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.review-tour-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 102, 255, 0.1);
  padding: 5px 12px;
  border-radius: 6px;
  align-self: flex-start;
}

/* --- 7. Адаптивность --- */
@media (max-width: 900px) {
  .booking-wrapper { flex-direction: column; text-align: center; padding: 30px; }
  .hero h1 { font-size: 2.5rem; }
  .nav { display: block; }
}

@media (max-width: 768px) {
  .reviews-title { font-size: 2rem; }
  .reviews { padding: 60px 0; }
  .hero h1 { font-size: 2.2rem; }
}

/* --- 8. Футер --- */
.footer {
    background: var(--dark);
    color: white;
    padding: 50px 0;
    text-align: center;
    margin-top: 100px;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.footer-socials a {
    color: white;
    text-decoration: none;
}
/* --- Обновленные стили модального окна --- */
.modal {
  display: none; 
  position: fixed;
  z-index: 2000; /* Выше шапки */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 40px;
  border-radius: 28px;
  width: 95%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Настройка формы внутри модального окна (чтобы не была как в темном блоке) */
.modal-content .booking-form {
  gap: 20px;
}

.modal-content .booking-form input, 
.modal-content .booking-form select, 
.modal-content .booking-form textarea {
  background: #f1f5f9;
  border: 2px solid transparent;
  color: var(--dark);
  transition: 0.3s;
}

.modal-content .booking-form input:focus, 
.modal-content .booking-form select:focus, 
.modal-content .booking-form textarea:focus {
  border-color: var(--primary);
  background: white;
  outline: none;
}

/* Стили для звезд внутри формы */
.stars-input span {
  transition: transform 0.2s, color 0.2s;
  display: inline-block;
}

.stars-input span:hover {
  transform: scale(1.2);
}

/* Анимация появления новой карточки отзыва */
@keyframes reviewEntry {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.review-card {
  animation: reviewEntry 0.5s ease forwards;
}

/* Исправляем отступы в блоке отзывов */
.reviews-controls {
  display: flex;
  justify-content: center;
  margin-top: 60px; /* Больше воздуха перед кнопкой */
}

/* Стили самой кнопки */
.write-review-btn {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: white;
  padding: 18px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(0, 102, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.write-review-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 102, 255, 0.4);
  background: linear-gradient(135deg, #0077ff 0%, #0066ff 100%);
}

.write-review-btn:active {
  transform: translateY(-1px);
}

.write-review-btn .icon {
  font-size: 1.3rem;
}

/* Если кнопка вдруг прилипает к футеру — добавь отступ секции */
.reviews {
  padding-bottom: 80px;
}
.price {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem; /* Увеличиваем размер */
  font-weight: 900;  /* Максимальная жирность */
  letter-spacing: -1px;
  color: #1a1a1a;
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

/* Красивый символ валюты */
.price::after {
  content: 'SOM'; 
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  background: #ff4e00; /* Яркий акцент */
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  transform: translateY(-10px); /* Поднимаем чуть выше текста */
}

/* Эффект "живого" подчеркивания при наведении на карточку */
.tour-card {
  transition: all 0.3s ease;
}

.tour-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.tour-card .price {
  transition: transform 0.3s ease;
}

.tour-card:hover .price {
  transform: scale(1.05); /* Цена немного увеличивается */
  color: #ff4e00; /* И меняет цвет на акцентный */
}

/* Оформление футера карточки для баланса */
.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  background: #f8f9fa; /* Легкая подложка под цену и кнопку */
  padding: 10px;
  border-radius: 12px;
}
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 2. Делаем карточки "объемными" */
.tour-card {
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: #fff;
  border: 1px solid #f0f0f0;
}

.tour-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
  border-color: #000;
}

/* 3. Улучшенные "Особенные" ценники */
.tour-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 15px;
  border-top: 1px dashed #eee;
}

.price {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -1px;
  position: relative;
}

.price::before {
  content: 'от';
  font-size: 0.7rem;
  color: #999;
  text-transform: uppercase;
  position: absolute;
  top: -12px;
  left: 0;
}

/* 4. Анимированные кнопки фильтров */
.filter-btn {
  border: 1px solid #eee;
  background: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active {
  background: #000;
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
/* Bento Grid Layout */
.bento-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 320px;
  gap: 25px;
}

/* Большая карточка */
.tour-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}

/* Эффект стекла (Glassmorphism) */
.glass-effect {
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white !important;
  font-weight: 800;
}

/* Стили Аккордеона */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item {
  background: white;
  margin-bottom: 15px;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  overflow: hidden;
}

.accordion-header {
  padding: 25px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  transition: 0.3s;
}

.accordion-header:hover { background: #f8fafc; }

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 25px;
  color: var(--gray);
}

.accordion-item.active .accordion-content {
  max-height: 200px;
  padding-bottom: 25px;
}

.accordion-item.active .icon { transform: rotate(45deg); color: var(--primary); }

/* --- Валидация форм --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.booking-form input.invalid,
.booking-form select.invalid,
.booking-form textarea.invalid {
  border: 2px solid #ef4444 !important;
  background: #fff5f5;
}

.modal-content .booking-form input.invalid,
.modal-content .booking-form select.invalid,
.modal-content .booking-form textarea.invalid {
  border-color: #ef4444 !important;
  background: #fff5f5;
}

.field-error {
  display: none;
  color: #ef4444;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 1em;
}

.field-error.show {
  display: block;
  animation: shakeError 0.3s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-status {
  margin-top: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  display: none;
}

.form-status.show {
  display: block;
  animation: reviewEntry 0.3s ease forwards;
}

.form-status.success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.modal-content .form-status.success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.form-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.booking-form button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-card.is-new {
  border: 2px solid var(--primary);
}
