/**
 * Explor Tours — Tour Card & Carousel Styles
 *
 * Loaded by the Explor Tours plugin on the frontend.
 * Designed to work with Hello Elementor or any theme.
 */

/* ==========================================================================
   Design Tokens (scoped to plugin elements)
   ========================================================================== */
:root {
  --explor-primary: hsl(195, 85%, 40%);
  --explor-primary-fg: #ffffff;
  --explor-accent: hsl(38, 90%, 55%);
  --explor-foreground: hsl(220, 20%, 15%);
  --explor-muted: hsl(220, 10%, 45%);
  --explor-border: hsl(220, 13%, 90%);
  --explor-card-bg: #ffffff;
  --explor-shadow: 0 2px 12px hsla(220, 20%, 80%, 0.25);
  --explor-shadow-glow: 0 4px 24px hsla(195, 85%, 40%, 0.15);
  --explor-radius: 0.75rem;
  --explor-font: 'Outfit', system-ui, sans-serif;
  --explor-font-heading: 'Playfair Display', serif;
}

/* ==========================================================================
   Tour Grid
   ========================================================================== */
.tour-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .tour-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tour-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Grid column variants */
.tour-grid--cols-1 { grid-template-columns: 1fr; }
.tour-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.tour-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1023px) {
  .tour-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .tour-grid--cols-2,
  .tour-grid--cols-3,
  .tour-grid--cols-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Tour Card — unified layout for all variants
   ========================================================================== */
.tour-card {
  display: flex;
  flex-direction: column;
  background: var(--explor-card-bg);
  border-radius: var(--explor-radius);
  overflow: hidden;
  box-shadow: var(--explor-shadow);
  border: 1px solid rgba(220, 223, 228, 0.5);
  transition: box-shadow 0.3s, border-color 0.3s;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.tour-card:hover {
  box-shadow: var(--explor-shadow-glow);
  border-color: rgba(14, 136, 170, 0.3);
}

/* Fixed-height image area — crop to fill */
.tour-card-image {
  position: relative;
  overflow: hidden;
  height: 220px;
  flex-shrink: 0;
}

.tour-card-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s;
}

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

.tour-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--explor-primary);
  color: var(--explor-primary-fg);
  font-family: var(--explor-font);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 9999px;
}

/* Card body — flex-grow pushes footer to bottom */
.tour-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem;
}

.tour-card-title {
  font-family: var(--explor-font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--explor-foreground);
  line-height: 1.4;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.tour-card:hover .tour-card-title {
  color: var(--explor-primary);
}

/* Excerpt / description */
.tour-card-excerpt {
  font-family: var(--explor-font);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--explor-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer — always pinned to bottom */
.tour-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--explor-border);
}

.tour-card-price {
  font-family: var(--explor-font);
  font-weight: 600;
  color: var(--explor-foreground);
  font-size: 0.8rem;
}

.tour-card-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-family: var(--explor-font);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--explor-foreground);
  transition: color 0.2s;
}

.tour-card:hover .tour-card-link {
  color: var(--explor-primary);
}

.tour-card-link svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ==========================================================================
   Carousel (Swiper)
   ========================================================================== */
.explor-carousel {
  position: relative;
  padding: 0 3rem;
}

.explor-carousel .swiper {
  overflow: hidden;
}

.explor-carousel .swiper-slide {
  height: auto;
}

.explor-carousel .swiper-slide .tour-card {
  height: 100%;
}

.explor-carousel-prev,
.explor-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--explor-border);
  box-shadow: var(--explor-shadow);
  cursor: pointer;
  color: var(--explor-foreground);
  transition: border-color 0.2s, color 0.2s;
}

.explor-carousel-prev:hover,
.explor-carousel-next:hover {
  border-color: var(--explor-primary);
  color: var(--explor-primary);
}

.explor-carousel-prev {
  left: 0;
}

.explor-carousel-next {
  right: 0;
}

.explor-carousel .swiper-pagination {
  margin-top: 1.5rem;
  position: relative;
  text-align: center;
}

.explor-carousel .swiper-pagination-bullet {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--explor-border);
  opacity: 1;
}

.explor-carousel .swiper-pagination-bullet-active {
  background: var(--explor-primary);
}

/* Mobile carousel */
@media (max-width: 767px) {
  .explor-carousel {
    padding: 0 2rem;
  }
}

/* ==========================================================================
   Fade-in Animation (IntersectionObserver driven)
   ========================================================================== */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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