:root {
  --color-primary: #004080;
  --color-accent:  #ff6600;
  --color-bg:      #f5f5f5;
  --font-heading:  'Montserrat', sans-serif;
  --font-body:     'Roboto', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background:   var(--color-bg);
  color:        #111;
  line-height:  1.5;
}

h2 {
  text-align: center;
  margin-bottom: 1rem;
}

/* Убираем старый .grid для карточек */
.grid { display: none; }

/* Секция категорий */
.category-section {
  max-width: 900px;
  margin: 2rem auto;
}
.category-section h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 1rem;
}
.category-swiper .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
}
.category-swiper .swiper-slide {
  flex: 0 0 calc((100% - 16px*2) / 3) !important;
  margin-right: 16px;
}
.category-swiper .swiper-slide:nth-child(3n) {
  margin-right: 0;
}

/* == Hero == */
.hero {
  position: relative;
  height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0; /* видео — за контентом */
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2; /* текст и кнопка над затемнением */
  padding: 2rem 1rem;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: .5rem;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: .25rem;
  text-decoration: none;
  font-weight: 700;
  transition: background .2s;
}

.btn-primary:hover {
  background: #e65500;
}

/* == Общие карточки == */
.card-wrapper {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.card {
  background: #fff;
  padding: 1.5rem;
  border-radius: .5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* == «О нас» == */
.about-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: #fff;
  padding: 1.5rem;
  border-radius: .5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.about-logo {
  width: 120px;
  flex-shrink: 0;
}
.about-text {
  flex: 1;
  font-size: 1rem;
  line-height: 1.5;
}

/* Стили для Swiper-контейнера */
.all-events-swiper {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.all-events-swiper .swiper-wrapper {
  display: flex !important;
  flex-wrap: nowrap !important;
}
.swiper-slide {
  flex: 0 0 calc((100% - 32px*2) / 3) !important; /* ровно 3 слайда, учитывая 16px отступ */
  margin-right: 16px;
}
.swiper-slide:nth-child(3n) {
  margin-right: 0;
}

/* == Контакты / Форма == */
.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}
.contact-form input, .contact-form textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid #ccc;
  border-radius: .25rem;
  font-size: 1rem;
}
.contact-form button {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: .75rem;
  border-radius: .25rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s;
}
.contact-form button:hover {
  background: #003366;
}

/* == Footer == */
footer {
  text-align: center;
  padding: 1rem 0;
  background: #222;
  color: #fff;
  font-size: .9rem;
  margin-top: 2rem;
}

/* == Адаптив == */
@media (max-width: 768px) {
  .hero {
    height: auto;
    padding: 2rem 1rem;
  }
  .hero-content h1 { font-size: 2rem; }
  .hero-content p  { font-size: 1rem; }
  .about-wrapper {
    flex-direction: column;
    text-align: center;
  }
  .about-logo {
    margin: 0 auto 1rem;
  }
  /* Мобильные слайды */
  .all-events-swiper .swiper-wrapper,
  .category-swiper   .swiper-wrapper {
    display: flex !important;
    flex-wrap: nowrap !important;
  }

  .all-events-swiper .swiper-slide,
  .category-swiper   .swiper-slide {
    flex: 0 0 100% !important;
    margin-right: 0    !important;
  }
}

/* ====== Панель фильтров ====== */
.filter-bar {
  display: flex;
  justify-content: center;
  background: var(--color-bg);
  border-radius: 2rem;
  /* теперь видим выпадашку */
  overflow: visible;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.filter-item-wrapper {
  position: relative;
  flex: 1;
  display: flex;
}
.filter-item-wrapper:first-child .filter-item {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}
.filter-item-wrapper:last-child .filter-item {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.filter-item-wrapper + .filter-item-wrapper {
  border-left: 1px solid rgba(255,255,255,0.3);
}
.filter-bar .filter-item {
  flex: 1;
  padding: .75rem 1rem;
  border: none;
  background: var(--color-accent);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-heading);
  transition: box-shadow .2s;
}
.filter-bar .filter-item.active {
  background: var(--color-primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.filter-bar .filter-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* == Dropdown для ПВД == */
.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--color-bg);
  border-radius: 0 0 2rem 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  flex-direction: column;
  z-index: 10;
}
.has-dropdown:hover .dropdown {
  display: flex;
}
.has-dropdown .dropdown .filter-item {
  border-top: 1px solid rgba(255,255,255,0.3);
  background: var(--color-accent);
  color: #fff;
}
.has-dropdown .dropdown .filter-item.active {
  background: #003366; /* более тёмный синий — чтобы отличался от обычного */
  color: #fff;
  box-shadow: inset 0 0 0 1000px rgba(0,0,0,0.05); /* для эффекта нажатия */
}
.has-dropdown .dropdown .filter-item:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.has-dropdown .dropdown .filter-item.active:hover {
  background: var(--color-primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ====================
   Иконки соцсетей в контактах
   ==================== */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.social-link {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  transition: box-shadow .2s, transform .2s;
}
.social-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.social-link.vk { background: #1876d2; }
.social-link.tg { background: #29b6f6; }
.social-link svg { width: 60%; height: 60%; fill: #fff; }

/* ====================
   Равные высоты карточек
   ==================== */
.grid {
  align-items: start; /* ячейки выравниваются по верху */
}
.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.service-card-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.service-card-content p {
  line-height: 1.4;
  overflow-wrap: break-word;
}

/* == Карточка большого путешествия == */
.trip-card {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: box-shadow .2s;
  overflow: hidden;
  margin: 2rem auto;
  max-width: 400px;
  font-family: var(--font-body);
}

.trip-card:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.trip-card-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.trip-card-body {
  padding: 1.5rem;
  font-size: 0.95rem;
  color: #333;
}

.trip-date {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #444;
  line-height: 1.4;
}

.trip-title {
  font-family: var(--font-heading);
  color: var(--color-accent);
  font-size: 1.2rem;
  margin: 0.5rem 0 1rem;
}

.trip-desc {
  margin-bottom: 1rem;
}

.trip-program {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  list-style-type: disc;
}

.trip-program li {
  margin-bottom: 0.4rem;
}

.trip-price {
  color: #2e8b57;
  font-weight: bold;
}
