/* ===================================
   COMPONENTES REUTILIZABLES
   =================================== */

/* Componente de header de sección */
.section-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .section-header {
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 1.875rem;
  }
}

.section-title-icon {
  height: 1.5rem;
  width: 1.5rem;
  margin-right: 0.75rem;
  color: #ef4444;
  filter: drop-shadow(0 0 3px #f87171);
}

/* Componente de acciones */
.action-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 640px) {
  .action-group {
    flex-direction: row;
  }
}

@media (min-width: 1024px) {
  .action-group {
    width: auto;
  }
}

.action-button-primary {
  display: flex;
  align-items: center;
  background-color: #15803d;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  text-decoration: none;
}

.action-button-primary:hover {
  background-color: #16a34a;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.6);
}

.action-button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  color: #60a5fa;
  background-color: #1e293b;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
  text-decoration: none;
}

.action-button-secondary:hover {
  background-color: #334155;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.6);
}

.action-button-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #7c3aed;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  color: #a78bfa;
  background-color: #1e293b;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.4);
  text-decoration: none;
}

.action-button-tertiary:hover {
  background-color: #334155;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.6);
  color: #c4b5fd;
}

.action-button-icon {
  height: 1rem;
  width: 1rem;
  margin-right: 0.5rem;
}

/* Componente de filtros */
.filters-container {
  margin-bottom: 1.5rem;
  background-color: #1e293b;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid #475569;
  padding: 1.25rem;
}

.search-input-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-input-icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  padding-left: 0.75rem;
  display: flex;
  align-items: center;
  pointer-events: none;
}

.search-input {
  padding-left: 2.5rem;
  display: block;
  width: 100%;
  font-size: 0.875rem;
  border: 1px solid #475569;
  background-color: #334155;
  color: #e2e8f0;
  border-radius: 0.375rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  letter-spacing: 0.025em;
}

.search-input:focus {
  outline: none;
  border-color: #ef4444;
  box-shadow: 0 0 0 1px #ef4444;
}

.search-clear-button {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  padding-right: 0.75rem;
  display: flex;
  align-items: center;
  color: #94a3b8;
  cursor: pointer;
}

.search-clear-button:hover {
  color: #cbd5e1;
}

.filters-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .filters-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }
}

.filters-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

@media (min-width: 640px) {
  .filter-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: auto;
  }
}

.filter-select {
  font-size: 0.75rem;
  border: 1px solid #475569;
  background-color: #334155;
  color: #e2e8f0;
  border-radius: 0.375rem;
  padding: 0.25rem 0.5rem;
  width: 100%;
  min-width: 160px;
}

.filter-select-region:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.filter-select-city:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 1px #10b981;
}

.filter-select-sort:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 1px #8b5cf6;
}

.clear-filters-button {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #475569;
  color: #e2e8f0;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.clear-filters-button:hover {
  background-color: #64748b;
}

.clear-all-filters-button {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  background-color: #dc2626;
  color: #fef2f2;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.4);
}

.clear-all-filters-button:hover {
  background-color: #b91c1c;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.6);
}

.clear-all-button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* En mobile, centrar el botón */
@media (max-width: 768px) {
  .clear-all-button-container {
    justify-content: center;
    margin-top: 1rem;
  }
}

/* Tags de filtros activos */
.active-filters {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.filter-tag-region {
  background-color: #1e3a8a;
  color: #93c5fd;
}

.filter-tag-city {
  background-color: #064e3b;
  color: #6ee7b7;
}

.filter-tag-remove {
  margin-left: 0.25rem;
  transition: opacity 0.2s ease;
}

.filter-tag-remove:hover {
  opacity: 0.75;
}

.filter-tag-remove-region {
  color: #93c5fd;
}

.filter-tag-remove-region:hover {
  color: #dbeafe;
}

.filter-tag-remove-city {
  color: #6ee7b7;
}

.filter-tag-remove-city:hover {
  color: #d1fae5;
}

/* Componente de información de ayuda */
.help-info {
  display: flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #94a3b8;
}

.help-icon {
  height: 0.75rem;
  width: 0.75rem;
  margin-right: 0.5rem;
}

/* Spinner de loading */
.loading-spinner {
  animation: spin 1s linear infinite;
  height: 0.75rem;
  width: 0.75rem;
}

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

.loading-spinner-icon {
  opacity: 0.25;
}

.loading-spinner-path {
  opacity: 0.75;
}

/* Iconos comunes */
.icon-small {
  height: 1rem;
  width: 1rem;
}

.icon-tiny {
  height: 0.75rem;
  width: 0.75rem;
}

/* Responsive helpers */
.mobile-hidden {
  display: none;
}

@media (min-width: 640px) {
  .mobile-hidden {
    display: inline;
  }
}

.mobile-only {
  display: inline;
}

@media (min-width: 640px) {
  .mobile-only {
    display: none;
  }
}

/* ===================================
   ANIMACIONES Y EFECTOS
   =================================== */

/* Animaciones de fade */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.fade-out {
  animation: fadeOut 0.3s ease-in-out;
}

.fade-in-down {
  animation: fadeInDown 0.3s ease-in-out;
}

.fade-out-up {
  animation: fadeOutUp 0.3s ease-in-out;
}

/* Efectos de transición para toggles */
.toggle-icon {
  transition: transform 0.2s ease-in-out;
}

.toggle-icon-mobile {
  transition: transform 0.2s ease-in-out;
}

/* ===================================
   REGLAS ESPECÍFICAS PARA EVENTOS
   =================================== */

/* Solo ocultar event-rows específicamente cuando tienen la clase hidden */
.event-row.hidden {
  display: none !important;
}

.event-row {
  transition: all 0.3s ease;
}

/* Usar una clase más específica en lugar de .hidden global */
.js-hidden {
  display: none !important;
}

.toggle-button {
  transition: all 0.2s ease;
}

.toggle-button-mobile {
  transition: all 0.2s ease;
}

/* Estados activos de los botones */
.toggle-button.active,
.toggle-button-mobile.active {
  background-color: #1e40af;
  border-color: #3b82f6;
} 

/* --- Tarjetas de Navegación con Imagen (Sección Superior) --- */
.main-navigation {
  @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6;
}

.nav-card {
  @apply rounded-xl overflow-hidden transition-all duration-300;
  position: relative;
  border: 1px solid #334155;
}

.nav-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: #475569;
}

.nav-card-image {
  @apply block w-full h-auto;
}

.nav-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(30, 41, 59, 1) 30%, transparent 100%);
  text-align: left;
}

.nav-card-title {
  @apply text-xl font-bold text-slate-100 mb-2;
}

.nav-card-description {
  @apply text-sm text-slate-300;
}

/* --- Tarjetas de Features con Imagen (Página de Inicio) --- */
.features-grid {
  @apply grid grid-cols-1 md:grid-cols-2 gap-8;
}

.feature-card {
  @apply bg-slate-800 rounded-xl overflow-hidden border border-slate-700;
  display: flex;
  flex-direction: column;
}

.feature-card-image {
}

.feature-card-image-wrapper {
}

.feature-content {
  @apply p-6 flex-grow flex flex-col;
}

.feature-title {
  @apply text-xl font-bold text-slate-100 mb-3;
}

.feature-description {
  @apply text-slate-300 text-sm mb-4 flex-grow;
}

.feature-link {
  @apply text-purple-400 font-semibold hover:text-purple-300 transition-colors duration-200 mt-auto inline-flex items-center;
}

.feature-link-icon {
  @apply w-5 h-5 ml-2;
} 

.feature-card .feature-card-image {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: top !important;
  border-radius: 0 !important;
} 
