/* Modern Campgrounds Index Page */

/* Page Layout */
.campgrounds-page {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  padding-top: 80px;
}

/* Enhanced Search Bar */
.search-section {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: var(--cb-navbar-height);
  z-index: 100;
}

.search-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.search-input-group {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 2px solid #e9ecef;
  border-radius: 40px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  border-color: #0d6efd;
  background: white;
  box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
  outline: none;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.1rem;
}

.search-button {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: white;
  border: none;
  border-radius: 40px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(13,110,253,0.3);
}

.clear-button {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 40px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-button:hover {
  background: #c82333;
  color: white;
  transform: translateY(-2px);
}

/* Results Header */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #212529;
  margin: 0;
}

.results-info {
  color: #6c757d;
  font-size: 1.1rem;
}

.results-count {
  font-weight: 600;
  color: #0d6efd;
}

.add-campground-btn {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.add-campground-btn:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(40,167,69,0.3);
}

/* Modern Card Grid */
.campgrounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.campground-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  position: relative;
}

.campground-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-image-container {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(13,110,253,0.9);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-location {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-description {
  color: #495057;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
}

.card-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #28a745;
}

.card-price-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 400;
}

.card-button {
  background: #0d6efd;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.card-button:hover {
  background: #0b5ed7;
  color: white;
  transform: translateY(-1px);
}

/* Map Container */
.map-container {
  position: relative;
  height: 400px;
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

#cluster-map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.empty-state-icon {
  font-size: 4rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #495057;
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: #6c757d;
  margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .campgrounds-page {
    padding-top: 60px;
  }
  
  .search-section {
    padding: 0.75rem;
    top: var(--cb-navbar-height);
  }
  
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-input-group {
    min-width: auto;
  }
  
  .search-button,
  .clear-button {
    width: 100%;
    justify-content: center;
  }
  
  .campgrounds-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .results-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .page-title {
    font-size: 2rem;
  }
  
  .map-container {
    height: 300px;
  }
}

/* Animation for cards */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.campground-card {
  animation: slideInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.campground-card:nth-child(1) { animation-delay: 0.1s; }
.campground-card:nth-child(2) { animation-delay: 0.2s; }
.campground-card:nth-child(3) { animation-delay: 0.3s; }
.campground-card:nth-child(4) { animation-delay: 0.4s; }
.campground-card:nth-child(5) { animation-delay: 0.5s; }
.campground-card:nth-child(6) { animation-delay: 0.6s; }

/* Mobile Button Overrides - Small circular buttons */
@media (max-width: 768px) {
  .search-form {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0.75rem !important;
  }
  
  .search-input-group {
    flex: 1 !important;
  }
  
  .search-button {
    width: auto !important;
    padding: 0.6rem !important;
    border-radius: 50% !important;
    min-width: 44px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  
  .search-button span {
    display: none !important;
  }
  
  .search-button i {
    margin: 0 !important;
  }
  
  .clear-button {
    width: auto !important;
    padding: 0.6rem !important;
    border-radius: 50% !important;
    min-width: 44px !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }
  
  .clear-button span {
    display: none !important;
  }
  
  .clear-button i {
    margin: 0 !important;
  }
}