/* ============================================
   ENHANCED SAN JOSE TOURISM PLATFORM CSS
   Modern UI with Improved UX & Visual Effects
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-light: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(31, 38, 135, 0.2);
  --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.3);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  color: #fff;
}

/* ============================================
   ANIMATED BACKGROUND SHAPES
   ============================================ */
.bg-shapes {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  top: 0;
  left: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 25s infinite ease-in-out;
}

.shape1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.shape2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
  top: 50%;
  right: -100px;
  animation-delay: -8s;
}

.shape3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(240, 147, 251, 0.25) 0%, transparent 70%);
  bottom: -80px;
  left: 40%;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg) scale(1); 
  }
  25% { 
    transform: translate(50px, -50px) rotate(90deg) scale(1.1); 
  }
  50% { 
    transform: translate(-30px, 30px) rotate(180deg) scale(0.9); 
  }
  75% { 
    transform: translate(70px, 40px) rotate(270deg) scale(1.05); 
  }
}

/* ============================================
   ENHANCED GLASSMORPHISM
   ============================================ */
.glass {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow-md), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.7s;
}

.glass:hover::before {
  left: 100%;
}

/* ============================================
   NAVIGATION - PREMIUM DESIGN
   ============================================ */
nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 18px 30px;
  width: 95%;
  max-width: 1300px;
  transition: var(--transition-smooth);
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: white;
  text-shadow: 0 3px 8px rgba(0,0,0,0.4);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo:hover {
  transform: scale(1.05);
  text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 14px;
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: -1;
}

.nav-links a:hover::before {
  transform: translateY(0);
}

.nav-links a:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   BURGER MENU
   ============================================ */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.burger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.burger span {
  width: 28px;
  height: 3px;
  background: white;
  margin: 4px 0;
  transition: var(--transition-smooth);
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.burger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-6px, 7px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.burger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-6px, -7px);
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */
.nav-mobile {
  
  top: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  width: 90%;
  max-width: 400px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-bounce);
  z-index: 999;
  padding: 25px;
}

.nav-mobile.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-mobile a {
  display: block;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  padding: 15px 20px;
  margin: 10px 0;
  border-radius: 14px;
  transition: var(--transition-smooth);
  text-align: center;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transform: translateX(5px);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 130px 25px 50px;
}

/* ============================================
   HERO SECTION - STUNNING DESIGN
   ============================================ */
.hero {
  text-align: center;
  margin-bottom: 70px;
  padding: 60px 40px;
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}

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

.hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.5);
}

.hero h1 {
  font-size: 4rem;
  color: white;
  margin-bottom: 25px;
  font-weight: 800;
  text-shadow: 0 5px 15px rgba(0,0,0,0.4);
  line-height: 1.1;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-weight: 400;
}

/* ============================================
   FILTER SECTION - MODERN PILLS
   ============================================ */
.filter-section {
  margin: 30px 0;
  text-align: center;
  animation: fadeIn 0.6s ease-out;
}

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

.filter-buttons {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 18px 25px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-sm);
}

.filter-btn {
  padding: 12px 26px;
  border: none;
  border-radius: 30px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition-bounce);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-weight: 700;
  backdrop-filter: blur(10px);
  border: 2px solid transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  letter-spacing: 0.3px;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.filter-btn.active {
  background: var(--primary-gradient);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* ============================================
   MAP SECTION
   ============================================ */
.map-section {
  margin-bottom: 70px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.map-container {
  padding: 35px;
  margin-bottom: 50px;
}

.section-title {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 25px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 3px 10px rgba(0,0,0,0.4);
  letter-spacing: -0.5px;
}

#map {
  height: 500px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 3px solid rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}

#map:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ============================================
   VIEW TOGGLE - SLEEK SWITCH
   ============================================ */
.view-toggle-section {
  margin-bottom: 35px;
  animation: fadeIn 0.6s ease-out 0.3s both;
}

.view-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 8px;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 20px;
}

.view-btn {
  flex: 1;
  padding: 14px 35px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 700;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  z-index: 1;
}

.view-btn:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.view-btn.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
  transform: scale(1.03);
}

/* ============================================
   TILES SECTION - PREMIUM CARDS
   ============================================ */
.tiles-section {
  padding: 35px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 35px;
}

.tile {
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform 0.5s ease;
  z-index: 2;
}

.tile:hover::before {
  transform: scaleX(1);
}

.tile:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.tile img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: var(--transition-smooth);
  border-radius: 20px 20px 0 0;
}

.tile:hover img {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.tile-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tile-body h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 14px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.tile-body p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 15px;
  flex: 1;
  max-height: 130px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Custom Scrollbar */
.tile-body p::-webkit-scrollbar,
.list-item-content p::-webkit-scrollbar,
.popup-description::-webkit-scrollbar {
  width: 6px;
}

.tile-body p::-webkit-scrollbar-track,
.list-item-content p::-webkit-scrollbar-track,
.popup-description::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.tile-body p::-webkit-scrollbar-thumb,
.list-item-content p::-webkit-scrollbar-thumb,
.popup-description::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

.tile-body p::-webkit-scrollbar-thumb:hover,
.list-item-content p::-webkit-scrollbar-thumb:hover,
.popup-description::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-gradient);
}

/* ============================================
   LIST SECTION - ELEGANT ROWS
   ============================================ */
.list-section {
  padding: 35px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.list-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 35px;
}

.list-item {
  display: flex;
  overflow: hidden;
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

.list-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--primary-gradient);
  transform: scaleY(0);
  transition: transform 0.5s ease;
}

.list-item:hover::before {
  transform: scaleY(1);
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.list-item-image {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  overflow: hidden;
  border-radius: 20px;
  margin: 20px;
}

.list-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.list-item:hover .list-item-image img {
  transform: scale(1.12) rotate(2deg);
  filter: brightness(1.1);
}

.list-item-content {
  padding: 28px 28px 28px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.list-item-content h3 {
  color: white;
  font-size: 1.6rem;
  margin-bottom: 14px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
  letter-spacing: -0.3px;
}

.list-item-content p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-bottom: 22px;
  font-size: 15px;
  flex: 1;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 12px;
}

/* ============================================
   BUTTON - GRADIENT MAGIC
   ============================================ */
.btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary-gradient);
  color: white;
  text-decoration: none;
  font-weight: 700;
  border-radius: 16px;
  transition: var(--transition-bounce);
  position: relative;
  overflow: hidden;
  font-size: 15px;
  align-self: flex-start;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  letter-spacing: 0.3px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

.btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* ============================================
   MAP POPUP - STYLED
   ============================================ */
.popup-description {
  max-height: 110px;
  overflow-y: auto;
  margin: 10px 0;
  padding-right: 8px;
  line-height: 1.6;
  color: #333;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .tiles {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  nav {
    padding: 15px 20px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .tiles {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .container {
    padding: 110px 18px 30px;
  }

  .map-container,
  .tiles-section,
  .list-section {
    padding: 25px;
  }

  #map {
    height: 350px;
  }

  .view-toggle {
    flex-direction: column;
    padding: 8px;
    max-width: 100%;
  }

  .view-btn {
    width: 100%;
    padding: 14px 20px;
  }

  .list-item {
    flex-direction: column;
  }

  .list-item-image {
    width: 100%;
    height: 220px;
    margin: 0;
    border-radius: 20px 20px 0 0;
  }

  .list-item-content {
    padding: 25px;
  }

  .filter-buttons {
    flex-direction: column;
    width: 100%;
    padding: 15px;
  }

  .filter-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 25px;
  }

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

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

  .section-title {
    font-size: 1.8rem;
  }

  .tile img {
    height: 200px;
  }

  .tile-body,
  .list-item-content {
    padding: 20px;
  }

  .tile-body h3,
  .list-item-content h3 {
    font-size: 1.3rem;
  }

  .filter-btn {
    padding: 11px 20px;
    font-size: 14px;
  }

  .list-item-image {
    height: 180px;
  }
}

/* ============================================
   UTILITY ANIMATIONS
   ============================================ */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Loading State */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Add this to your indexdesign.css file or in a <style> tag in your <head> */

/* Ensure body and html have the background */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
}

/* Make sure the background shapes are visible */
.bg-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Mobile-specific fixes */
@media (max-width: 768px) {
  html, body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
  }
  
  .container {
    background: transparent;
  }
  
  /* Ensure buttons are tappable on mobile */
  .filter-btn,
  .star-filter-btn,
  .view-btn {
    min-height: 44px; /* iOS recommended tap target size */
    padding: 10px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  
  /* Prevent button text selection on mobile */
  button, .btn, .filter-btn, .star-filter-btn, .view-btn {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

/* Fix for InfinityFree servers */
.tile, .list-item {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

/* Ensure map container has proper size */
#map {
  min-height: 400px;
  height: 500px;
  width: 100%;
  border-radius: 16px;
  z-index: 1;
}

@media (max-width: 768px) {
  #map {
    height: 350px;
    min-height: 350px;
  }
}