/* rooms.css */
/* ======================================================
   ARVENSIS: 6. ROOMS
   Estilos para la sección "Cabañas"
   ====================================================== */

/* Importar variables base */
@import url("base.css");

/* Contenedor del swiper anidado */
.swiper-wrapper {
  max-height: 310px;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.room {
  display: flex;
  gap: 2rem;
  background: var(--color-blanco);
  padding: 1.5rem 2rem;
  border-radius: var(--radio-borde-lg); /* 16px */
  align-items: center;
  box-shadow: var(--sombra-card);
  transition: var(--transicion-rapida);
}

.room:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* El JS inyecta un swiper, así que estilizamos el contenedor */
.room-gallery {
  flex: 0 0 460px;
  max-height: 310px;
  height: 310px;
  border-radius: var(--radio-borde-lg);
  overflow: hidden;
}

.room-gallery .swiper {
  width: 100%;
  height: 100%;
}

.room-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.room-info h3 {
  font-size: 1.4rem;
  color: var(--color-primario);
  margin-bottom: 0.25rem;
}

.room-info p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-texto-secundario);
  text-align: justify;
}

/* Preview de Amenities */
.amenities-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  color: var(--color-primario);
  font-size: 1.6rem;
  margin: 0.5rem 0;
  overflow: hidden;
  max-width: 100%;
}

.amenities-preview span {
  flex: 0 0 auto;
  transition: var(--transicion-rapida);
}

.amenities-preview span:nth-child(n+7) {
  display: none;
}

.amenities-preview span:hover {
  cursor: pointer;
  color: var(--color-acento);
  transform: scale(1.2);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

/* Lista completa de amenities (usada por JS) */
.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.amenities-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--color-primario);
  background: var(--color-fondo-secundario);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radio-borde-sm);
  transition: background 0.2s ease;
}

.amenities-list li:hover {
  background: #e9dcc0;
}

/* Responsive */
@media (max-width: 1024px) {
  .room {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }

  .room-gallery {
    width: 100%;
    height: 280px;
    flex: 0 0 auto;
  }

  .room-info {
    align-items: center;
  }
}

@media (max-width: 750px) {
  .amenities-preview {
    justify-content: center;
    gap: 0.6rem;
    font-size: 1.5rem;
  }
}