/* BakuCenterTours Custom Styles */

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --dark-color: #343a40;
  --light-color: #f8f9fa;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  padding-top: 56px; /* Account for fixed navbar */
}

/* Navbar Styles */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-brand i {
  font-size: 1.8rem;
}

/* Hero Section with Carousel */
/* Smaller hero/carousel to match a compact look similar to example site */
.hero-section {
  position: relative;
  height: 480px; /* reduced from 700px */
  overflow: hidden;
  min-height: 300px;
}

#heroCarousel {
  height: 100%;
}

#heroCarousel .carousel-inner {
  height: 100%;
}

#heroCarousel .carousel-item {
  height: 100%;
}

#heroCarousel .carousel-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  pointer-events: none; /* don't block carousel controls */
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  opacity: 0.7;
  z-index: 5; /* ensure above overlays */
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

/* Search Overlay */
.search-overlay {
  position: absolute;
  top: 55%; /* push the search box slightly lower on the hero */
  left: 0;
  right: 0;
  transform: translateY(-50%);
  z-index: 10;
}

.hero-content h1 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-content p {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1.2s ease-out;
}

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

.search-box {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1.4s ease-out;
}

.search-box .input-group-text {
  border: none;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.search-box .form-control,
.search-box .form-select {
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
}

.search-box .form-control:focus,
.search-box .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Category Cards */
.category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.category-card i {
  transition: transform 0.3s ease;
}

.category-card:hover i {
  transform: scale(1.1);
}

/* Tour Cards */
.tour-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  overflow: hidden;
}

.tour-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

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

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

.tour-card .badge {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
}

.tour-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-color);
  line-height: 1.4;
}

.tour-card .card-text {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Feature Boxes */
.feature-box {
  transition: transform 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon {
  transform: rotate(360deg);
}

/* Footer */
footer {
  margin-top: auto;
}

footer h5,
footer h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

footer ul li {
  padding: 0.3rem 0;
}

footer a {
  transition: color 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

footer a:hover {
  color: var(--primary-color) !important;
}

/* Improve contrast for muted text within footer */
footer .text-muted,
footer a.text-muted {
  color: #ced4da !important; /* light gray for dark bg */
}

/* Ensure visited links remain visible in footer */
footer a:visited {
  color: rgba(255, 255, 255, 0.85);
}

/* Focus styles for accessibility */
footer a:focus,
footer a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  color: #ffffff;
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: #ffffff;
}

/* Buttons */
.btn {
  padding: 0.5rem 1.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background-color: #0056b3;
  border-color: #004085;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
  /* tablet / small desktop */
  .hero-section {
    height: 360px; /* make hero smaller on medium screens */
  }
  .search-overlay {
    top: 60%;
  }
}

@media (max-width: 768px) {
  .hero-section {
    height: 340px;
  }

  .search-box {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .search-box .btn-lg {
    margin-top: 10px;
  }
}

@media (max-width: 576px) {
  .hero-section {
    height: 300px;
  }
  .search-overlay {
    top: 65%;
  }

  .search-box {
    padding: 15px;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }
}

/* Loading States */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Utilities */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0056b3;
}
/* Force: ensure hero size overrides any other rules (temporary, remove if not needed) */
/*
.hero-section.force-compact,
.hero-section {
  height: 420px !important;
  min-height: 300px !important;
}
*/

#heroCarousel.force-compact,
.horizontal-carousel {
  --carousel-gap: 1.5rem;
  display: flex;
  gap: var(--carousel-gap);
  overflow-x: auto;
  padding: 1rem 0.5rem;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}
.horizontal-carousel::-webkit-scrollbar {
  display: none;
} /* hide scrollbar (WebKit) */
.horizontal-carousel.dragging {
  cursor: grabbing;
}
.horizontal-carousel .tour-card-wrapper {
  flex: 0 0 calc((100% - (var(--carousel-gap) * 3)) / 4);
  max-width: calc((100% - (var(--carousel-gap) * 3)) / 4);
}

@media (max-width: 1199.98px) {
  .horizontal-carousel .tour-card-wrapper {
    flex: 0 0 calc((100% - var(--carousel-gap)) / 2);
    max-width: calc((100% - var(--carousel-gap)) / 2);
  }
}

@media (max-width: 575.98px) {
  .horizontal-carousel .tour-card-wrapper {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Carousel nav buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  cursor: pointer;
}
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.carousel-nav span { font-size: 22px; line-height: 1; }
.carousel-nav:focus { outline: none; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); }

/* Provide spacing so first/last items aren't covered by arrows */
.horizontal-carousel-wrapper {
  position: relative;
  padding-left: 32px;
  padding-right: 32px;
}

@media (max-width: 576px) {
  .carousel-nav { display: none !important; }
  .horizontal-carousel-wrapper {
    padding-left: 8px;
    padding-right: 8px;
  }
}
