:root {
  --border-radius: 12px;
  --border-color: #ccc;
  --primary-color: rgba(135, 162, 237);
  --primary-border-clr: rgba(135, 162, 237, 0.7);
}

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

body {
  font-family: "DM Sans", sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex-grow: 1;
}

/* Main search page */
.main-search {
  margin: 0 auto;
}

/* Header */
.header-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 2rem;
  align-items: center;
  padding: 0 1rem 1rem 1rem;
}

.header-container a img {
  width: 163px;
  height: auto;
}

.beta-badge {
  background-color: #e63946;
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* Estilos para el buscador SIN USAR POR AHORA SE REEMPLAZA POR BOTONES DE FILTROS */
.search-form {
  height: 42px;
  width: 630px;
  display: flex;
}

.search-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.search-form input {
  flex: 1;
  height: 100%;
  border: 1px solid var(--border-color);
  border-right: none;
  border-top-left-radius: var(--border-radius);
  border-bottom-left-radius: var(--border-radius);
  font-size: 0.875rem;
  color: #555;
  padding: 0 1rem;
}
.search-form input:focus,
.search-form input:active {
  outline: none;
}
.search-form button {
  background: none;
  border: 1px solid var(--border-color);
  border-left: none;
  border-top-right-radius: var(--border-radius);
  border-bottom-right-radius: var(--border-radius);
  height: 100%;
  padding: 0 1rem;
  cursor: pointer;
}

.search-form button svg {
  stroke: var(--border-color);
}

/* Botones de filtros */
.filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter a {
  flex: 1;
  border: 1px solid #ccc;
  padding: 0.5rem 1rem;
  min-width: fit-content;
  border-radius: 8px;
  color: #333;
  cursor: pointer;
  font-size: 0.6rem;
  background-color: #fff;
  text-decoration: none;
}

.filter a.active {
  border: 2px solid #333;
}

/* Body Search Result */
main h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.main-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem 1rem;
}

.flex-result {
  display: flex;
  justify-content: space-between;
  align-items: self-start;
  flex-wrap: wrap-reverse;
  gap: 1rem;
}

.result-container,
#map {
  flex: 1 1 400px;
  min-width: 300px;
}

/* Map  */
#map {
  height: 250px;
}

.search-result {
  list-style: none;
}

/* images slider  */
.hostel-container {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.slider-wrapper {
  position: relative;
  width: 100%;
}

.slider {
  display: flex;
  aspect-ratio: 3/2;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overflow-x: auto;
  /* box-shadow: 0 1.5rem 3rem hsla(0, 0%, 0%, 0.25); */
  border-radius: 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.slider::-webkit-scrollbar {
  display: none;
}

.slider img {
  flex: 1 0 100%;
  scroll-snap-align: center;
  object-fit: cover;
}

.slider-nav {
  display: flex;
  column-gap: 1rem;
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.slider-nav a {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: #fff;
  opacity: 0.75;
  transition: opacity ease 0.25s;
}

.slider-nav a:hover {
  opacity: 1;
}

/* Hostel information */
.hostel-info {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}
.hostel-info h2 {
  font-size: 1.15rem;
}
.hostel-info p {
  font-size: 0.875rem;
}

.breakfast-info {
  font-size: 0.875rem;
  color: green;
  border: 1px solid green;
  border-radius: 1rem;
  padding: 5px 10px;
}

/* Actions Buttons */
.buttons-container {
  width: 100%;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}
.button {
  border: none;
  border-radius: 5px;
  padding: 0.3rem 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
/* separator */
div.separator {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

/* Modal overlay  */
#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

#modal-overlay.hidden {
  display: none;
}

/* Modal Profle  */
#modal-content {
  max-width: 100%;
}
.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  background: none;
  border: none;
}
.profile-container {
  position: relative;
  background-color: #ffffff;
  max-width: 1100px;
  max-height: 90vh;
  padding: 2rem;
  overflow-y: auto;
  border-radius: 5px;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
}

.profile-container h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.profile-container h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.profile-container .container {
  padding: 1rem 0;
}

.address-container,
.contact-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.address-container svg,
.contact-container svg {
  width: 18px;
  height: 18px;
}

/* Carouse de imagenes en el perfil  */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  gap: 0.35rem;
  max-width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.image-grid::-webkit-scrollbar {
  display: none;
}

.image-grid img {
  scroll-snap-align: start;
  width: 267px;
  height: 168px;
  aspect-ratio: 3/2;
  object-fit: cover;
}

.scroll-button-left,
.scroll-button-right {
  position: absolute;
  z-index: 1;
  background: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  opacity: 0.8;
}
.scroll-button-left {
  left: 10px;
}
.scroll-button-right {
  right: 10px;
}

.facilities-list {
  list-style: circle;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1.5rem;
}

.dlList dt {
  font-weight: 600;
}

.dl-item-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  margin-bottom: 1rem;
}

.dd-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.unspecified {
  color: #666;
  background-color: #ddd;
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 15px;
  max-width: fit-content;
}

/* Contact info  */
.contact-info-container {
  position: relative;
  background-color: #fff;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 350px;
}

.contact-info-container h3 {
  border-bottom: 1px solid #ccc;
  text-align: center;
  padding-bottom: 1rem;
  margin: 0;
}

.contact-info-container a {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: #777;
}

.contact-info-container .contact-span {
  color: #000;
  font-weight: 600;
}

/* Seccion Politica */
.information {
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* No result container */
.no-results {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1);
}

.no-results span {
  font-size: 8rem;
}

.no-results p:last-of-type {
  margin-top: 1rem;
}

/* Footer */
footer {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-top: 1px solid #ddd;
  margin-top: 4rem;
}

.disclaimer,
#copyright {
  font-size: 0.875rem;
  color: #555;
  text-align: center;
}

.disclaimer {
  margin-bottom: 1rem;
}

#copyright {
  margin-top: 1rem;
}

.disclaimer a {
  color: #007bff;
  text-decoration: none;
}

.disclaimer a:hover {
  text-decoration: underline;
}

.social-links ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

.social-links svg {
  stroke: #333;
  width: 25px;
  height: 25px;
  stroke-width: 1;
  cursor: pointer;
}

.more {
  margin: 2.25rem 0;
}

.more ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

@media only screen and (max-width: 600px) {
  .header-container {
    gap: 1rem;
  }

  main h1 {
    font-size: 1.25rem;
  }

  .profile-container h2 {
    font-size: 1.55rem;
  }

  .profile-container h3 {
    font-size: 1.1rem;
  }

  .profile-container p,
  .profile-container span,
  .profile-container ul,
  .profile-container dl {
    font-size: 0.875rem;
  }

  .scroll-button-left,
  .scroll-button-right {
    padding: 0.15rem 0.5rem;
  }

  .profile-container .unspecified {
    font-size: 0.75rem;
  }

  .contact-info-container {
    position: fixed;
    gap: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 150px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    animation-name: slideUp;
    animation-duration: 0.5s;
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      bottom: -100%;
    }
    to {
      opacity: 1;
      bottom: 0;
    }
  }
}

@media only screen and (min-width: 600px) {
  .slider-wrapper {
    width: 300px;
  }
}
