/**
 * template-destinations.css - Styling for destination templates
 * Uses centralized color variables from main.css
 */

/* =============================================
 * DESTINATION CARDS
 * ============================================= */

 .destination-card {
  background-color: var(--dark-secondary);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  position: relative;
  border: 1px solid transparent;
  /* Subtle gold glow in normal state */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 0 5px rgba(var(--accent-gold-rgb), 0.1);
}

.destination-card:hover {
  transform: translateY(-5px);
  /* Enhanced gold glow on hover */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 15px rgba(var(--accent-gold-rgb), 0.3);
  border-color: rgba(var(--accent-gold-rgb), 0.3);
}

/* Gold border animation on hover */
.destination-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  border: 2px solid transparent;
  opacity: 0;
  transition: all 0.5s ease;
  pointer-events: none;
}

.destination-card:hover::after {
  border-color: var(--accent-gold);
  opacity: 0.5;
  box-shadow: 0 0 15px rgba(var(--accent-gold-rgb), 0.5);
}

/* Add a subtle gold shimmer effect to cards */
@keyframes goldShimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

.destination-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(var(--accent-gold-rgb), 0), 
    rgba(var(--accent-gold-rgb), 0.5), 
    rgba(var(--accent-gold-rgb), 0), 
    transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.destination-card:hover::before {
  opacity: 1;
  animation: goldShimmer 2s infinite linear;
}

.destination-card .card-img-top {
  height: 180px;
  object-fit: cover;
  width: 100%;
}

.destination-card .card-body {
  padding: 1.25rem;
}

.destination-card .card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--dark-text-primary);
}

.destination-card .card-text {
  font-size: 0.9rem;
  color: var(--dark-text-secondary);
  margin-bottom: 1rem;
}

.destination-card .card-footer {
  background-color: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 1.25rem;
}

/* =============================================
 * DESTINATION CATEGORY BADGES
 * ============================================= */

.destination-overlay {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
}

.destination-category {
  color: var(--dark-text-primary);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Category-specific styling */
.destination-category[data-category="cultural"],
.destination-category:contains("Cultural") {
  background: linear-gradient(135deg, var(--primary-color), #1a7a8c);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="nature"],
.destination-category:contains("Nature") {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="wildlife"],
.destination-category:contains("Wildlife") {
  background: linear-gradient(135deg, #e67e22, #d35400);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="beach"],
.destination-category:contains("Beach") {
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="urban"],
.destination-category:contains("Urban") {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="adventure"],
.destination-category:contains("Adventure") {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-left: 3px solid var(--accent-gold);
}

.destination-category[data-category="heritage"],
.destination-category:contains("Heritage") {
  background: linear-gradient(135deg, #f1c40f, #f39c12);
  border-left: 3px solid var(--primary-color);
}

/* Default category badge (fallback) */
.destination-category:not([data-category]):not(:contains("Cultural")):not(:contains("Nature")):not(:contains("Wildlife")):not(:contains("Beach")):not(:contains("Urban")):not(:contains("Adventure")):not(:contains("Heritage")) {
  background: linear-gradient(135deg, var(--primary-color), rgba(var(--primary-color), 0.7));
  border-left: 3px solid var(--accent-gold);
}

/* Badge hover effect */
.destination-card:hover .destination-category {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 5px rgba(var(--accent-gold-rgb), 0.4);
}

/* =============================================
 * BUTTONS & CONTROLS
 * ============================================= */

.destination-card .btn-outline-primary {
  border-color: var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.destination-card .btn-outline-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25), 0 0 8px rgba(var(--accent-gold-rgb), 0.4);
  background-color: var(--primary-color);
  color: var(--dark-text-primary);
  border-color: var(--accent-gold);
}

/* Carousel Controls */
.destinations-control .control-icon {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.destinations-control:hover .control-icon {
  background-color: var(--primary-color);
  color: var(--dark-text-primary);
  transform: scale(1.1);
}

.destinations-control .control-icon i {
  color: var(--dark-color);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.destinations-control:hover .control-icon i {
  color: var(--dark-text-primary);
}

/* Style override for bootstrap primary button in destinations section */
#destinations .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--dark-text-primary);
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#destinations .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(var(--accent-gold-rgb), 0.3);
  border-color: var(--accent-gold);
}

/* =============================================
 * RATING STARS & DETAILS
 * ============================================= */

/* Rating stars */
.destination-rating {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.destination-rating i {
  margin-right: 2px;
}

.destination-rating span {
  color: var(--dark-text-muted);
  margin-left: 5px;
  font-size: 0.8rem;
}

/* =============================================
 * ANIMATIONS & EFFECTS
 * ============================================= */

/* Card animation */
.destination-card-animated {
  animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Premium Glow Effects */
.premium-glow {
  position: absolute;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(33, 147, 176, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  top: -70px;
  right: 10%;
  border-radius: 50%;
  z-index: -1;
}

.premium-glow-2 {
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(var(--accent-gold-rgb), 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  bottom: -120px;
  left: 5%;
  border-radius: 50%;
  z-index: -1;
}

/* =============================================
 * LOADING & ERROR STATES
 * ============================================= */

/* Loading spinner styling */
#destinations-loading {
  padding: 40px 0;
}

#destinations-loading .spinner-border {
  width: 3.5rem;
  height: 3.5rem;
  border-color: var(--primary-color);
  border-right-color: transparent;
}

#destinations-loading .loading-text {
  font-size: 1.2rem;
  color: var(--dark-text-muted);
  font-weight: 500;
  margin-top: 15px;
}

/* Error message styling */
#destinations-error {
  padding: 50px 0;
}

#destinations-error i {
  color: var(--accent-gold);
}

/* =============================================
 * LAYOUT & POSITIONING
 * ============================================= */

/* Destination-specific button styles */
.destination-view-all {
  margin-top: 2rem;
  display: inline-block;
}

/* Fix z-index issues with destinations section */
#destinations {
  position: relative;
  z-index: 2;
}

/* Responsive adjustments */
@media (min-width: 992px) {
  .destination-card {
    margin-bottom: 1.5rem;
  }
}

/* =============================================
 * THEME ADJUSTMENTS
 * ============================================= */

/* Light theme adjustments */
body.light-theme .premium-glow {
  background: radial-gradient(circle, rgba(33, 147, 176, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
}

body.light-theme .premium-glow-2 {
  background: radial-gradient(circle, rgba(var(--accent-gold-rgb), 0.09) 0%, rgba(255, 255, 255, 0) 70%);
}

body.light-theme #destinations-loading .loading-text {
  color: var(--light-text-muted);
}

/* Shadow and glow adjustments for dark and light themes */
body:not(.light-theme) .destination-card {
  background-color: var(--dark-secondary);
}

body.light-theme .destination-card {
  background-color: var(--light-secondary);
  /* Custom gold glow for light theme */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), 0 0 5px rgba(var(--accent-gold-rgb), 0.08);
}

body.light-theme .destination-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 0 15px rgba(var(--accent-gold-rgb), 0.2);
  border-color: rgba(var(--accent-gold-rgb), 0.25);
}

/* Fix text colors in light theme */
body.light-theme .destination-card .card-title {
  color: var(--light-text-primary);
}

body.light-theme .destination-card .card-text {
  color: var(--light-text-secondary);
}

body.light-theme .destination-card .card-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-theme .destination-rating span {
  color: var(--light-text-muted);
}