/* =============================================================
   lugares.css  –  Grid de lugares + filtros + modal
   ============================================================= */

/* ── Sección contenedora ── */
.lugares-section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 5rem 4vw 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Encabezado ── */
.lugares-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lugares-title {
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff; /* ajusta según tu tema */
  margin: 0;
}

.lugares-title-accent {
  color: #e53d3d; /* color primario del sitio */
}

.lugares-subtitle {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  color: #ccc;
}

/* ── Filtros ── */
.lugares-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem 0 2.5rem;
  width: 100%;
}

.filtro-btn {
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 4px solid transparent;
  color: inherit;
  cursor: pointer;
  padding: 0 0.5rem 0.4rem;
  opacity: 0.25;
  transition:
    opacity 0.2s,
    border-color 0.2s;
  letter-spacing: 0.02em;
}

.filtro-btn:hover {
  opacity: 1;
}

/* Estado activo: subrayado visible con el color de la categoría */
.filtro-btn.filtro-activo {
  opacity: 1;
  border-bottom-color: var(--cat-color, #e53d3d);
}

/* TODOS usa el rojo primario */
.filtro-btn[data-categoria="todos"] {
  --cat-color: #e53d3d;
}

/* ── Grid ── */
.lugares-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .lugares-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Tarjeta ── */
.lugar-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
}

.lugar-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.lugar-card:hover .lugar-card-img {
  transform: scale(1.04);
}

.lugar-card-img--placeholder {
  background: #333;
}

/* Badge categoría (esquina superior derecha) */
.lugar-card-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.55rem 1.1rem;
  border-bottom-left-radius: 1rem;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

/* Título (esquina inferior izquierda) */
.lugar-card-titulo {
  position: absolute;
  bottom: 0.75rem;
  left: 1rem;
  right: 0.5rem;
  color: #fff;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  margin: 0;
  line-height: 1.2;
}

/* Tarjeta oculta por filtro */
.lugar-card.lugar-oculto {
  display: none;
}

/* ── Overlay del modal ── */
.lugar-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.62);
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
}

.lugar-modal-overlay.activo {
  display: flex;
}

/* ── Wrapper: contiene el modal + botón X sin cortar ── */
.lugar-modal-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
}

/* Botón cerrar (X) — posicionado sobre el wrapper, fuera del scroll */
.lugar-modal-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: none;
  background-color: var(--modal-color, #e53d3d);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  line-height: 1;
  z-index: 10;
}

/* ── Modal ── */
.lugar-modal {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Imagen del modal */
.lugar-modal-img-wrap {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

.lugar-modal-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 0.5rem;
}

/* Badge dentro del modal */
.lugar-modal-badge {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.45rem 1rem;
  border-bottom-left-radius: 1rem;
  border-top-right-radius: 0.5rem;
  background-color: var(--modal-color, #e53d3d);
  color: #fff;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
}

/* Textos del modal */
.lugar-modal-titulo {
  color: #111;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  margin: 0;
}

.lugar-modal-info {
  color: #333;
  font-size: 0.9rem;
  margin: 0;
  white-space: pre-line;
  line-height: 1.5;
}

.lugar-modal-horarios-label {
  color: #111;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: uppercase;
  margin: 0;
}

.lugar-modal-horario {
  color: #333;
  font-size: 0.9rem;
  margin: 0;
}

/* Botones del modal */
.lugar-modal-acciones {
  display: flex;
  gap: 1rem;
  padding-top: 0.5rem;
}

.lugar-modal-btn {
  flex: 1;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--modal-color, #e53d3d);
  color: #fff;
  font-family: var(
    --font-condensed,
    "Barlow Condensed",
    "Arial Narrow",
    sans-serif
  );
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  text-decoration: none;
  transition: filter 0.2s;
  display: block;
}

.lugar-modal-btn:hover {
  filter: brightness(0.88);
  color: #fff;
  text-decoration: none;
}

.lugar-modal-btn.deshabilitado {
  opacity: 0.45;
  pointer-events: none;
}
