/* Dansal Page Specific Styles */
#map {
  width: 100%;
  height: 480px;
  border-radius: 20px;
}

.dansal-card {
  transition: all 0.3s ease;
}

.dansal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(255, 54, 0, 0.2);
}

.loader {
  border-top-color: #FF3600;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pagination-btn {
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive map */
@media (max-width: 768px) {
  #map {
    height: 350px;
  }
}

@media (max-width: 480px) {
  #map {
    height: 300px;
  }
}

/* NEW ADVANCED FEATURES STYLES */

/* Voice Search Animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.voice-listening {
  animation: pulse 1s infinite;
  color: #FF3600 !important;
}

/* Smart Search Suggestions */
#searchSuggestions {
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
}

.search-suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

.search-suggestion-item:hover {
  background-color: #f8f8f8;
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

/* AI Recommendations */
#aiRecommendations {
  animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.recommendation-item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
}

/* Sort Dropdown */
#sortDropdown {
  min-width: 200px;
}

/* View Toggle */
.view-list .dansal-card {
  width: 100%;
  max-width: none;
}

/* PWA Install Prompt */
#installBtn {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
  40% {transform: translateY(-5px);}
  60% {transform: translateY(-3px);}
}

/* Offline Indicator */
.offline-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #ff4444;
  color: white;
  padding: 10px 15px;
  border-radius: 5px;
  z-index: 10000;
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Loading Skeletons */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  height: 200px;
  border-radius: 12px;
  margin-bottom: 20px;
}

/* Enhanced Cards with Interactions */
.dansal-card {
  position: relative;
  overflow: hidden;
}

.card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.dansal-card:hover .card-actions {
  opacity: 1;
}

.favorite-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.favorite-btn:hover {
  background: #FF3600;
  color: white;
}

.favorite-btn.active {
  background: #FF3600;
  color: white;
}

/* Map Enhancements */
.map-cluster {
  background: #FF3600;
  color: white;
  border-radius: 50%;
  text-align: center;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Responsive Design Improvements */
@media (max-width: 640px) {
  .dansal-card {
    margin-bottom: 15px;
  }
  
  #smartSearch {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  .dansal-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .dansal-card {
    border: 2px solid currentColor;
  }
  
  #smartSearch {
    border-width: 2px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark Mode Enhancements */
.dark .search-suggestion-item:hover {
  background-color: #374151;
}

.dark .skeleton {
  background: linear-gradient(90deg, #374151 25%, #4B5563 50%, #374151 75%);
  background-size: 200% 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #FF3600;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #E63100;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
  background: #FF6B00;
}

/* Focus Styles for Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #FF3600;
  outline-offset: 2px;
}

/* Loading States */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #FF3600;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #333;
  color: white;
  padding: 15px 20px;
  border-radius: 5px;
  z-index: 10000;
  animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast.success {
  background: #4CAF50;
}

.toast.error {
  background: #f44336;
}

.toast.info {
  background: #2196F3;
}

