/* =========================
   TOURSPANAMA - Diseño Turístico Premium
   UX/UI Profesional con Microinteracciones
   ========================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Colores Base - Más suaves y profesionales */
  --bg: #fafbfc;
  --bg-secondary: #f4f6f8;
  --card: #ffffff;
  --card-hover: #fefefe;
  --text: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #e8ecf1;
  --border-light: #f1f4f7;

  /* Colores Primarios - Más suaves y modernos */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --secondary: #6366f1;
  --secondary-dark: #4f46e5;
  --accent: #10b981;
  --accent-dark: #059669;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;

  /* Gradientes - Más suaves */
  --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --gradient-hero: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.12) 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.03) 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);

  /* Sombras - Más suaves y modernas */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.08), 0 1px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px -4px rgba(0, 0, 0, 0.1), 0 2px 8px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px -8px rgba(0, 0, 0, 0.12), 0 4px 16px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 48px -12px rgba(0, 0, 0, 0.15);
  --shadow-colored: 0 8px 24px -8px rgba(14, 165, 233, 0.25);
  --shadow-colored-hover: 0 12px 32px -8px rgba(14, 165, 233, 0.35);

  /* Bordes */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Espaciado - Más generoso */
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 28px;
  --space-xl: 40px;
  --space-2xl: 56px;
  --space-3xl: 80px;

  /* Tipografía - Inter mejorada */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Tamaños de fuente mejorados */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Transiciones */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Background Decorativo - Más sutil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
.wrap {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Asegurar que el body tenga altura completa */
html, body {
  min-height: 100vh;
}

/* Navigation - Mejorado */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.nav.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: var(--font-weight-extrabold);
  font-size: 1.5rem;
  color: var(--text);
  transition: transform var(--transition-fast);
}

.brand:hover {
  transform: scale(1.02);
}

.mark, .logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-primary);
  box-shadow: var(--shadow-colored);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.mark::before, .logo::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.nav-user-greeting {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  margin-right: 0.5rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-user-greeting::before {
  content: '👤';
  margin-right: 0.5rem;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.nav-link {
  font-weight: var(--font-weight-semibold);
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
  font-size: 0.95rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: all var(--transition-base);
  transform: translateX(-50%);
}

.nav-link:hover {
  color: var(--primary);
  background: rgba(6, 182, 212, 0.05);
}

.nav-link:hover::after {
  width: 80%;
}

.nav-link.active {
  color: var(--primary);
  background: rgba(6, 182, 212, 0.1);
}

.nav-link.active::after {
  width: 80%;
}

/* Buttons - Mejorados con Microinteracciones */
.btn, .btn-primary, .btn-secondary {
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: var(--font-weight-semibold);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.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:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-colored);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-colored-hover);
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-colored);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Hero Section - Mejorado */
.hero {
  padding: var(--space-3xl) 0 var(--space-2xl);
  position: relative;
  z-index: 1;
  background-image: url('/images/Hero Image 19369.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.7) 0%, rgba(6, 182, 212, 0.3) 100%);
  z-index: 0;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  margin: var(--space-lg) 0 var(--space-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-search {
  display: flex;
  gap: var(--space-md);
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.search-input {
  flex: 1;
  min-width: 280px;
  padding: 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1), var(--shadow-md);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Tours Grid - Mejorado */
.tours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.tour-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, var(--card) 0%, var(--card-hover) 100%);
}

.tour-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-card);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 1;
}

.tour-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: var(--card);
}

.tour-card:hover::before {
  opacity: 1;
}

.tour-card-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background: var(--gradient-primary);
  transition: transform var(--transition-slow);
  position: relative;
  z-index: 0;
}

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

.tour-card-content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  background: var(--card);
}

.tour-card-title {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-sm);
  color: var(--text);
  line-height: 1.3;
}

.tour-card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.tour-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.tour-card-price {
  font-size: 1.75rem;
  font-weight: var(--font-weight-extrabold);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tour-card-info {
  display: flex;
  gap: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.tour-card-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-md);
  z-index: 10;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: var(--font-weight-extrabold);
  margin-bottom: var(--space-md);
  color: var(--text);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Loading States */
.loading, .error-state, .empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  color: var(--text-secondary);
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-lg);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  color: var(--danger);
}

/* Footer */
.footer {
  margin-top: var(--space-3xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  background: var(--card);
}

.footer-content {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-weight: var(--font-weight-extrabold);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.footer-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Responsive */
@media (max-width: 768px) {
  .nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
  }

  .tours-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .hero-search {
    flex-direction: column;
  }

  .search-input {
    width: 100%;
  }

  .wrap {
    padding: 0 var(--space-md);
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }

/* Mejoras adicionales de UX */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Mejoras de accesibilidad */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Mejoras de selección de texto */
::selection {
  background: var(--primary);
  color: white;
}

::-moz-selection {
  background: var(--primary);
  color: white;
}

/* Mejoras de scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Mejoras de imágenes */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mejoras de enlaces */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}

/* Mejoras de inputs globales */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  letter-spacing: -0.01em;
}

/* Mejoras de estados de carga */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Mejoras de notificaciones */
.notification {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.success {
  border-left: 4px solid var(--accent);
}

.notification.error {
  border-left: 4px solid var(--danger);
}

.notification.warning {
  border-left: 4px solid var(--warning);
}