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

body {
  font-family: 'Roboto', sans-serif;
  background: url('../img/new-background.jpg') no-repeat center/cover;
  color: #2F2F2F;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

/* Header */
.header {
  background: #E8E4D9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}
.header__box {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.header__logo { height: 50px; }
.header__btn-back {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.header__btn-back img { height: 28px; max-width: 28px; object-fit: contain; }
.d-n { display: none !important; }

/* Main */
.main { padding: 2rem 0; }
.main__title {
  font-weight: 300;
  margin-bottom: 1rem;
  color: #d3c1c1;
}
.main__floor-box { width: 100%; }
.main__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 20px;
}
.main__list button {
  background: url('../img/null.png') no-repeat center/cover;
  border: none;
  border-radius: 1px;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: #2F2F2F;
  transition: background 0.2s;
}
.main__list button:hover { background: url('../img/0.png') no-repeat center/cover; }
.floor__map-box { padding: 2rem 0; }
.floor__title {
  font-weight: 300;
  margin-bottom: 1rem;
  color: #2F2F2F;
}
.version-selector { margin-bottom: 1rem; }
/* Version List */
.version-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
  justify-content: center;
}
/* Botones de versión */
.main__floor.main__floor-edit {
  background: url('../img/null.png') no-repeat center/contain;
  min-width: 50px; /* Tamaño mínimo para evitar que sea demasiado pequeño */
  aspect-ratio: 1/1; /* Mantiene proporción cuadrada */
  padding: 1rem; /* Espacio interno para que el número no toque los bordes */
  border: none;
  border-radius: 4px; /* Esquinas ligeramente redondeadas */
  cursor: pointer;
  font-size: 1rem; /* Tamaño de texto más pequeño para mejor ajuste */
  color: #E0E0E0; /* Texto claro para contraste */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* Mejora legibilidad */
}

/* Hover para botones de versión */
.main__floor.main__floor-edit:hover {
  background: url('../img/0.png') no-repeat center/contain; /* Escala sin recortar */
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Botón seleccionado (activo) */
.main__floor.main__floor-edit.active {
  border: 2px solid #FFD700; /* Borde dorado para indicar selección */
  transform: scale(1.1);
}

/* Botones de añadir/eliminar versión */
.add-version-btn, .delete-version-btn {
  min-width: 50px;
  aspect-ratio: 1/1; /* Cuadrado */
  padding: 0.2rem; /* Menos padding para emojis pequeños */
  background: #2C2C2C; /* Fondo oscuro */
  border: 2px solid #FFD700;
  border-radius: 4px;
  color: #E0E0E0;
  font-size: 0.8rem; /* Tamaño más pequeño para emojis */
  line-height: 1; /* Evita desplazamiento vertical */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-version-btn:hover, .delete-version-btn:hover {
  background: #3A3A3A;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.edit-tools { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer */
.footer {
  background: #E8E4D9;
  padding: 1rem 0;
  margin-top: auto;
  text-align: center;
}
.footer__box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer__left, .footer__right { flex: 1; min-width: 200px; }
.footer__by, .footer__by-text, .footer__right-text, .footer__contact-item-title {
  font-size: 0.9rem;
  color: #2F2F2F;
  margin: 0.2rem 0;
}
.footer__contact-item-text { color: #007bff; text-decoration: none; }
.footer__contact img { height: 20px; filter: brightness(0) invert(1); }

/* Floor Map */
.floor__map {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Dos columnas en pantallas grandes */
  gap: 2.5rem;
  background-color: #2C2C2C;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  box-sizing: border-box;
}
.haka__box {
  width: 100%;
  max-width: 400px; /* Reducir el ancho máximo (antes 500px) */
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem; /* Reducir el espacio entre bloques */
  background: url("../img/back2.jpg") no-repeat center/cover;
  padding: 0.8rem; /* Reducir padding */
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  box-sizing: border-box;
}
.haka__box-title {
  font-size: 1.4em;
  font-weight: 700;
  margin-bottom: 1.2rem;
  text-align: center;
  color: #FFD700;
  background: none;
  border: none;
  cursor: default;
  grid-column: 1 / -1;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}
.haka__block {
  position: relative;
  aspect-ratio: 1 / 1;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.haka__block img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Edit Mode */
.edit-tools {
  margin-top: 20px;
  padding: 20px;
  background: rgba(0,0,0,0.1);
  border-radius: 8px;
}
.edit-tool {
  width: 60px;
  height: 60px;
  border: 3px solid #FFD700;
  border-radius: 8px;
  background: #2C2C2C;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.edit-tool:hover { transform: scale(1.1); border-color: #FFAA00; }
.edit-tool:active { cursor: grabbing; }
.edit-tool img { width: 80%; height: 80%; }
.save-btn {
  padding: 12px 24px;
  background: linear-gradient(45deg, #4CAF50, #45a049);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.save-btn:hover {
  background: linear-gradient(45deg, #45a049, #4CAF50);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}
.haka__block-editable:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Search */
.floor__search {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  background: #3A3A3A;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.floor__search-label {
  color: #E0E0E0;
  font-size: 1rem;
}
.floor__search-input {
  padding: 0.5rem;
  width: 120px;
  border: 1px solid #BDBDBD;
  border-radius: 4px;
  font-size: 1rem;
  background: #2C2C2C;
  color: #E0E0E0;
}
.floor__search-btn {
  padding: 0.5rem 1rem;
  background: #FFD700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  color: #2F2F2F;
}
.floor__search-btn:hover { background: #FFAA00; }
.clear-btn {
  background: #ff5555;
  color: white;
}
.clear-btn:hover { background: #cc4444; }

/* Responsive */
@media (max-width: 768px) {
  .container { padding: 0 10px; }
  .main__list { grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 15px; }
  .floor__map { grid-template-columns: 1fr; gap: 2rem; padding: 1.5rem; }
  .haka__box { grid-template-columns: repeat(5, 1fr); width: 100%; min-width: 200px; }
  .haka__block { min-width: 30px; min-height: 30px; }
  .edit-tool { width: 50px; height: 50px; }
}

.hero-seo { text-align: center; padding: 1rem; background: rgba(209, 107, 66, 0.562); border-radius: 8px; margin-bottom: 1rem; }
.hero-seo h1 { color: #FFD700; font-size: 1rem; }
.hero-seo ul { list-style: none; }
.hero-seo li { margin: 0.5rem 0; }

/* Ajustar el contenedor principal */
.container {
  max-width: 1400px; /* Aumentar ligeramente para dar espacio a sidebars */
  width: 100%;
  padding: 0 10px;
  display: flex;
  justify-content: center;
}

/* Contenedor del contenido con sidebars */
.content-wrapper {
  display: flex;
  width: 100%;
  max-width: 1200px;
  gap: 20px;
  position: relative;
}
/* Ajustes para el contenedor de la cabecera y pie de página */
.header .container,
.footer .container {
  max-width: 1200px; /* Mantener consistencia */
  justify-content: space-between;
}

/* Responsividad */
@media (max-width: 1024px) {
  .haka__box {
    max-width: 400px; /* Reducir ancho en pantallas medianas */
  }
}

@media (max-width: 768px) {
  .content-wrapper {
    flex-direction: column;
    gap: 10px;
  }
  .main-content {
    max-width: 100%;
  }
}