* {
  font-family: 'Poppins', sans-serif;
}
:root {
  --primary-pink: #ec008c;
  --dark-text: #000000;
  --light-bg: #ffffff;
}
body {
    background-color: var(--light-bg);!important;
    height: 100%;
    margin: 0;
    padding: 0;
}
h1, h2, h3, h4, h5 {
    font-weight: 600;
    line-height: 1.5;
    color: #0b0a12;
}
h1, h2, h3 {
    font-size: 1.75rem;
}
.logo-title-purple {
    color: #ec008c;
}
/*************** Navigation ********************/

/* Десктоп меню */
@media (min-width: 992px) {
  .navbar-collapse {
    background-color: transparent !important;
  }
  .navbar-collapse .nav-item {
    margin-right: 1rem; /* відстань між пунктами меню */
  }
}

.offcanvas .nav-link,
.offcanvas .dropdown-item,
.offcanvas .offcanvas-title {
    color: #fff;
    line-height: 2.2;
}

.offcanvas .nav-link:hover,
.offcanvas .dropdown-item:hover {
  color: #0b0a12;
}


/******************** Navigation End ******************/
p, li {
    font-size: 16px;
}
input, textarea {
    padding: 4px;
}
a {
    text-decoration: none!important;
}
a:hover {
    opacity: 0.8;
}

select {
padding: 2px 4px;
}

/* sticky footer */
html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1; /* займає всю доступну висоту */
}

footer {
  background: #f8f9fa;  /* світлий фон */
  padding: 1rem;
  text-align: center;
}

.bg-gray {
    background-color: #f8f9fa;
}

.btn-primary {
  background-color: var(--primary-pink);
  border-color: var(--primary-pink);
}

.btn-primary:hover {
  background-color: #c60078;
  border-color: #c60078;
}
.btn.disabled, .btn:disabled, fieldset:disabled .btn {
    color: #fff;
    pointer-events: none;
    background-color: #fd9ad5;
    border-color: #fd9ad5;
    opacity: var(--bs-btn-disabled-opacity);
    }

/* Button for image removal start */
.btn-delete {
  right: -12px;
  top: -12px;
  background: rgba(220, 53, 69, 0.85);
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  max-width: 28px;
  z-index: 99;
}
.btn-delete:hover {
  background: rgba(220, 53, 69, 1);
}

/************** Footer start *****************/
footer {
    background-color: #eeeeee;
    text-align: center;
    padding: 48px 24px 24px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}
footer i {
    transition: transform 0.3s, color 0.3s;
}

footer i:hover {
    transform: scale(1.2);
    color: #ec008c;
}
/************ Footer end *****************/

.container {
    box-sizing: border-box;
}

.badge {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.8px;
    width: fit-content;
}

/* Toast сповіщення */
.toast.fade-out-right {
animation: slideOutRight 0.6s forwards;
}

@keyframes slideOutRight {
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(100%); }
}

/************ Tour cards *************/

/** new card styles **//
/* Ефекти для карток турів */
.tour-card .transition-transform {
    transition: transform 0.4s ease;
}

.tour-card:hover .transition-transform {
    transform: scale(1.05); /* Збільшення картинки */
}

.tour-card .hover-primary:hover {
    color: var(--bs-primary) !important; /* Зміна кольору заголовка */
}

.tour-img-wrap {
    height: 220px;
    background-color: #f8f9fa; /* Сірий фон поки вантажиться */
}

/* end of new card styles */
.tour-img {
  height: 240px;
  object-fit: cover;
  filter: brightness(70%);
  width: 100%;
}

/* Hover для фото */
.tour-img-container {
  overflow: hidden;
  border-radius: 0.75rem;
}

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

.tour-card:hover .tour-img {
  transform: scale(1.05);
}

.favorite-mobile {
    display: none;
}
.favorite-desktop {
    display: block;
}

@media (max-width: 767.98px) {
    .favorite-mobile {
        display: block;
        top: 8px;
        right: 8px;
        background-color: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(5px);
        z-index: 10; /* щоб бути поверх каруселі */
    }
    .favorite-desktop {
        display: none;
    }
}

/******** Home page start *********************************/

/* Slider */
body #heroCarousel.home-slider.carousel {
  height: 65vh; /* Висота слайдера (65% від висоти екрану) */
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

#heroCarousel .carousel-item {
  height: 100%; /* Внутрішні слайди заповнюють висоту батька */
}

#heroCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(60%);
  border-radius: 0;
}

/* --- Позиціонування тексту на ДЕСКТОПІ (вирівнювання по правому краю) --- */
#heroCarousel .carousel-caption {
  top: 50%;
  transform: translateY(-50%);
  right: 10%;
  text-align: right;
  max-width: 45%;
  bottom: auto;
  left: auto;
}

#heroCarousel .carousel-caption h5 {
  font-size: 2.5rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

#heroCarousel .carousel-caption p {
  font-size: 1.2rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}


/* --- Адаптація для МОБІЛЬНИХ пристроїв (екрани менше 768px) --- */
@media (max-width: 768px) {
  body #heroCarousel.home-slider.carousel {
    height: 50vh; /* Робимо слайдер нижчим на мобільних */
    min-height: 300px;
  }

  /* Повертаємо текст в центр для мобільних */
  #heroCarousel .carousel-caption {
    top: auto;
    transform: none;
    bottom: 10%;
    left: 5%;
    right: 5%;
    text-align: center;
    max-width: 90%;
  }
  #heroCarousel .carousel-caption h5 {
    font-size: 1.5rem;
  }
  #heroCarousel .carousel-caption p {
    font-size: 1rem;
  }
}
/* Slider (end) */

    .country-grid {
      display: grid;
      grid-template-columns: 2fr 1fr;
      gap: 1.5rem;
      grid-template-rows: repeat(2, 1fr);
      height: 500px;
    }

    /* Стилі для великої країни (зліва) */
    .country-card-wrapper.featured {
      grid-row: 1 / span 2;
    }

    /* Друга країна (правий верхній кут) */
    .country-card-wrapper.small .card {
        display: block;
    }
    .country-card-wrapper.small:nth-child(2) {
      grid-row: 1;
    }

    /* Третя країна (правий нижній кут) */
    .country-card-wrapper.small:nth-child(3) {
      grid-row: 2;
    }

    .country-card {
      height: 100%;
      border-radius: 1rem;
      overflow: hidden;
    }

    .card-img {
      height: 100%;
      object-fit: cover;
      filter: brightness(70%);
      transition: transform 0.3s ease;
    }

    .country-card:hover .card-img {
      transform: scale(1.05);
    }

    /*  Адаптивність для мобільних */
    @media (max-width: 768px) {
      .country-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
      }

      .country-card-wrapper.featured,
      .country-card-wrapper.small {
        grid-row: auto;
      }

      .country-card {
        height: 300px;
      }
    }

/* Transition for category card on Home **/
.transition-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}
.transition-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}
/******** Home page end  *******************/

/************* Tours page **************************/

/* Large Tour cards */
.air-icon {
    height: 12px;
    fill: #0dcaf0;
}

.hot-tour-badge {
    position: absolute;
    bottom: 5%;
    left: 2%;
}

/* Контейнер з фіксованим співвідношенням сторін */
.carousel-inner {
  aspect-ratio: 4/3; /* або 4/3, якщо хочеш трохи вищі */
  width: 100%;
  overflow: hidden;
}

/* Зображення всередині */
.carousel-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* обрізає краї, але картинка не "стрибає" */
  border-radius: 8px;
}



.bi-heart, .bi-heart-fill {
    color: #ec008c
}
#tourDates + input.flatpickr-input {
  margin-top: 4px;
}

.tours .form-check {
    position: relative;
    top: 8px;
}
.tour-card-col {
  height: 100%; /* або фіксована висота, наприклад: 350px */
}
.carousel-inner,
.carousel-item {
  height: 100%;
  max-height: 100%;
}

.slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
.carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    padding: 0 !important;
    border-radius: 50%;
    margin: 0 3px;
    background-color: rgba(255, 255, 255, 0.7);
}

.carousel-indicators .active {
  background-color: #ffffff;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    background-size: 50% 50%;
}

/********** Gallery Detail (start) ****************/
.gallery-item {
  display: block;
}
.tour-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-tile-large {
  grid-column: span 2;
  grid-row: span 2;
}

.lg-toolbar .lg-icon {
    color: #ffffff;
}
.lg-toolbar .lg-close {
  display: block !important;
  opacity: 1 !important;
}
/* Текст поверх фото */
.view-all-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  font-weight: bold;
  font-size: 1.2rem;
}

.tour-gallery-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
}
.gallery-tile {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-tile-large {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-tile:hover img {
  transform: scale(1.03);
}

.hover-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
  z-index: 2;
}

.gallery-tile:hover .hover-overlay {
  background-color: rgba(0, 0, 0, 0.3);
}

.view-all-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
}

/* Адаптивність */
@media (max-width: 768px) {
  /* Ховаємо 2,3 та 6+ */
  .tour-gallery-grid > :nth-child(2),
  .tour-gallery-grid > :nth-child(3),
  .tour-gallery-grid > :nth-child(n+6) {
    display: none !important;
  }

  .tour-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* дві колонки */
    gap: 8px;
    grid-auto-rows: auto;
  }

  /* Перше фото – на всю ширину */
  .tour-gallery-grid > :nth-child(1) {
    grid-column: 1 / -1; /* розтягуємо на 2 колонки */
  }

  /* Фото 4 і 5 – по 50% ширини */
  .tour-gallery-grid > :nth-child(4),
  .tour-gallery-grid > :nth-child(5) {
        grid-column: span 1;
        height: 150px;
        width: 182px;
  }

  /* Якщо у першого є клас великої плитки */
  .gallery-tile-large {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

/********** Gallery Detail (end) ****************/
.copy-message {
    display:none;
    position:fixed;
    top:20px;
    right:20px;
    background:#198754;
    color:white;
    padding:10px 15px;
    border-radius:5px;
    box-shadow:0 2px 8px rgba(0,0,0,0.2);
    z-index:1055;
}

.route-visual {
  margin-top: 20px;
}

.route-visual img {
  transition: transform 0.3s;
}

.route-visual img:hover {
  transform: scale(1.05);
}

.flatpickr-calendar {
    z-index: 2000 !important;
}

/*************** Bus Route Line ************************/
.route-visual-wrapper {
    padding-top: 15px;
}
.route-steps-container {
    position: relative;
}
/* Створюємо лінію маршруту як псевдо-елемент контейнера */
.route-steps-container::before {
    content: '';
    position: absolute;
    bottom: 13px; /* Вертикальне центрування без transform */
    left: 50px; /* Збільшили відступ на 1px */
    width: calc(100% - 100px);
    height: 4px;
    background-color: #6C7585;
    z-index: 1;
}
/* Кожен крок маршруту (фото + маркер) */
.route-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-basis: 120px;
    flex-shrink: 0;
    position: relative;
    z-index: 2; /* Кроки знаходяться над лінією */
}
/* Обгортка для маркера */
.route-marker-wrapper {
    margin-top: 12px;
    height: 30px;
    display: flex;
    align-items: center;
}
.route-marker {
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    border: 4px solid #6C7585;
    border-radius: 50%;
    transition: transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}


/* --- СТИЛІ ДЛЯ ІНТЕРАКТИВНОСТІ --- */
.country-item:hover .img-thumbnail {
    transform: scale(1.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}
.country-item .img-thumbnail {
    transition: transform 0.3s ease;
}
.route-marker.hovered {
    transform: scale(1.3);
    border-color: #ec008c;
}

/*************** Bus Route Line (Mobile - Timeline Style) ************************/
@media (max-width: 768px) {

    /* 1. Головний контейнер: залишаємо відступ зліва для лінії */
    .route-steps-container {
        display: block !important;
        padding-left: 50px;
        position: relative;
    }

    /* 2. Вертикальна лінія */
    .route-steps-container::before {
        content: '';
        position: absolute;
        left: 18px;
        top: 81px;
        width: 4px;
        height: 83%;
        background-color: #6C7585;
        z-index: 1;
        bottom: auto;
        transform: none;
    }
/* Стилі для кроку маршруту, який потрапив у зону видимості */
.route-step.is-visible .route-marker {
    border-color: #ec008c; /* Робимо рамку крапки рожевою */
    transform: scale(1.3) !important; /* Трохи збільшуємо крапку */
}

.route-step.is-visible .country-item img {
    transform: scale(1.05); /* Трохи збільшуємо фото */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Додаємо тінь для виділення */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
    /* 3. Кожен крок маршруту */
    .route-step {
        position: relative;
        padding-bottom: 30px;
        display: block;
        flex-basis: auto;
        align-items: initial;
    }

    .route-step:last-child {
        padding-bottom: 0;
    }
    .route-marker-wrapper {
        position: absolute;
        /* Нова позиція: 90px - це половина висоти фото (180px) */
        top: 90px;
        transform: translateY(-50%); /* Точне центрування відносно точки 90px */
        left: -40px;
        z-index: 2;
        margin-top: 0;
    }

    .route-marker {
        width: 20px;
        height: 20px;
    }
    .country-item {
        display: block;
        width: 100%;
    }

    .country-item img {
        width: 90% !important; /* На всю доступну ширину */
        height: 170px !important; /* Встановлюємо фіксовану висоту */
        object-fit: cover; /* Зберігає пропорції, обрізаючи зайве */
    }

    .country-item .text-center {
        text-align: center;
    }
    .country-item:hover .img-thumbnail,
    .route-marker.hovered {
        transform: none;
    }
    .route-marker.hovered {
        transform: translateY(-50%) scale(1.3);
    }
}
/********** Details Tour page (end)  **********************************/

/* Анімація для navbar dropdown */
@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    animation: dropdownFadeIn 0.3s ease-out;
}

/*********** Кнопка перегляду пароля */
.password-toggle-btn {
    border: none;
    background: transparent;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease-in-out;
    user-select: none;
    bottom: -3px;
}

.password-toggle-btn:hover {
    opacity: 0.75;
}

.password-toggle-btn.active {
    background-color: rgba(0, 0, 0, 0.15);
}

/************ Country page **************/
.country-regions li {
    line-height: 2.2;
}
.fi {
  border-radius: 1px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.text-shadow {
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* Базові стилі для контейнера та зображення */
.hero-container, .hero-image, .hero-placeholder {
    min-height: 400px;
    max-height: 400px;
    width: 100%;
}

/* Стиль для заглушки за замовчуванням */
.hero-placeholder {
    background-color: #e9ecef; /* Світло-сірий фон */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стиль, який застосовується, якщо посилання на зображення виявилося "битим" */
.hero-container.image-broken {
    background-color: #e9ecef;
}

/******* Partners on Home * Start *********/
.partners-slider {
  overflow: hidden;
  position: relative;
}

.partners-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: scroll 45s linear infinite;
  width: max-content;
}

.partners-track img {
  height: 60px;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: 0.3s;
}

.partners-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Рухаємось на всю ширину (100%), бо трек складається з 2 наборів */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@media (max-width: 768px) {
  .partners-track {
    gap: 20px;
    animation-duration: 45s; /* трішки повільніше, щоб лого встигали показатися */
  }

  .partners-track img {
    height: 40px;
  }
}
/******* Partners on Home * end *********/

/* Forms */
.form-label {
    font-weight: 600;
}
.form-check {
    padding: 4px;
}

/* Favorites */
.btn-favorite .bi.animate-pop {
  animation: pop-effect 0.3s ease-in-out;
}

@keyframes pop-effect {
  0% { transform: scale(1); }
  50% { transform: scale(1.5) rotate(10deg); }
  100% { transform: scale(1); }
}