
html, body {
  height: 100%; /* Establece una altura fija para el cuerpo */
  width: 100%; /* Establece un ancho fijo para el cuerpo */
  margin: 0; /* Elimina los márgenes predeterminados del cuerpo */
  padding: 0; /* Elimina el relleno predeterminado del cuerpo */
}

body {
    font-size: 16px; /* Establece un tamaño de fuente base para el cuerpo */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    background: url('https://source.unsplash.com/1600x900/?landscape') center/cover no-repeat fixed;
    position: relative;
    font-size: 120%;
}

/* Restringe el tamaño de fuente y la altura de línea para evitar cambios al hacer zoom */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.4;
  }
}

/* Restringe el tamaño de fuente y la altura de línea aún más en pantallas pequeñas si es necesario */
@media (max-width: 480px) {
  body {
    font-size: 12px;
    line-height: 1.3;
  }
}

/*#region Contenido principal */

.card {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  max-width: 420px;
  margin: 1em;
  padding-top: 12px;
}

.search {
  display: flex;
  align-items: center;
}

button {
  margin: 0.5em;
  border-radius: 50%;
  border: none;
  height: 44px;
  width: 44px;
  outline: none;
  background: #7c7c7c2b;
  color: white;
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

input.search-bar {
  border: none;
  outline: none;
  padding: 0.4em 1em;
  border-radius: 24px;
  background: #7c7c7c2b;
  color: white;
  font-family: inherit;
  font-size: 105%;
}

button:hover {
  background: #7c7c7c6b;
}

h2.city { 
    padding: 1%;
    margin-bottom: 3%;
}

h1.temp {
  margin: 0;
  margin-bottom: 0.4em;
}

.flex {
    display: flex;
    align-items: center;
}

.details {
    align-content: center;
}

.description {
  text-transform: capitalize;
  margin-left: 8px;
}

.weather.loading {
  visibility: hidden;
  max-height: 20px;
  position: relative;
}

.weather.loading:after {
  visibility: visible;
  content: "Loading...";
  color: white;
  position: absolute;
  top: 0;
  left: 20px;
}

.awesomplete-option {
  background-color: black;
  color: white;
}

.awesomplete ul li {
  color: rgb(250, 250, 250);
  background-color: black;
}

.logo-bottom {
  position: absolute;
  left: 45%;
  transform: translateX(-50%);
  width: auto; /* Deja que el ancho del logo se ajuste automáticamente */
  height: auto;
  bottom: 10px; /* Ajusta la distancia desde la parte inferior según tus necesidades */
  z-index: 1;
  box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.5); /* Cambia el color y la opacidad de la sombra */
}

/*#endregion */

/*#region Estilos para la sección del pronóstico extendido */
.forecast-extended {
  background-color: black; /* Cambia el color de fondo a negro */
  padding: 20px;
  border-radius: 5px;
  text-align: center;
  margin-top: 20px;
  overflow-y: auto;
  /* Elimina la altura máxima para permitir que la barra de navegación sea infinita */
}

/* Estilo para la barra de desplazamiento vertical en la barra de navegación */
.forecast-content::-webkit-scrollbar {
  width: 8px;
}

.forecast-content::-webkit-scrollbar-thumb {
  border-radius: 4px;
}

.forecast h2 {
  margin: 0;
  margin-bottom: 10px;
}

.forecast-content {
  padding-left: 0.7%;
  display: flex;
  flex-direction: column; /* Alinea los elementos en una columna */
  align-items: center;
  gap: 10px;
  max-height: 90vh; /* Limita la altura máxima para evitar desbordamientos */
  overflow-y: auto; /* Agrega desplazamiento vertical si es necesario */
}

.forecast-item {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5em; /* Reduzco el espacio interno */
  border-radius: 10px;
  width: 100%; /* Ocupa el ancho completo de la columna */
  margin-bottom: 10px; /* Espacio entre elementos */
  text-align: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.forecast-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.weather {
  text-align: center; /* Centra el contenido horizontalmente */
}

.forecast-extended {
  background-color: #f0f0f0; /* Color de fondo del cuadro */
  padding: 20px; /* Espaciado interno del cuadro */
  border-radius: 5px; /* Borde redondeado del cuadro */
  text-align: center; /* Centra el contenido horizontalmente */
  margin-top: 20px; /* Espaciado superior entre el pronóstico actual y extendido */
  overflow-y: auto; /* Agrega una barra de desplazamiento vertical cuando sea necesario */
  max-height: 300px; /* Altura máxima del cuadro, ajusta según sea necesario */
}

.extended-forecast {
  display: flex;
  justify-content: center; /* Centra horizontalmente los elementos */
  align-items: center; /* Centra verticalmente los elementos */
  flex-wrap: wrap; /* Permite que los elementos se envuelvan cuando no haya suficiente espacio horizontal */
}

/* Agrega una animación de desvanecimiento al cargar la página */
.forecast-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  overflow-x: hidden; /* Evita el desplazamiento horizontal */
}

/* Cuando se cargue la página y la sección del pronóstico extendido esté visible, cambia la opacidad a 1 */
.forecast-content.loaded {
  opacity: 1;
}

/*#endregion */

.more-info-button {
  display: inline-block;
  padding: 10px 10px;
  background-color: #007BFF;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.more-info-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* styles.css */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8); /* Fondo semitransparente */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Asegura que esté por encima de todo el contenido */
}

/* Estilos para una animación de carga, puedes personalizarla */
.loader::after {
  content: "";
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 2s linear infinite; /* Animación de rotación */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilo para ocultar la animación cuando la página está completamente cargada */
body.loaded .loader {
  display: none;
}


/* Agrega esta clase en tu archivo CSS o dentro de una etiqueta <style> en el HTML */
.highlight {
  animation: highlight 2s ease-in-out;
}

@keyframes highlight {
  0% {
    background-color: yellow;
  }
  100% {
    background-color: transparent;
  }
}

.logo-with-bg {
  background-color: rgba(0, 0, 0, 0.7); /* Fondo negro con un poco de transparencia */
  padding: 10px; /* Agrega un poco de espacio alrededor del logo */
  border-radius: 10px; /* Bordes redondeados para un mejor estilo */
}

.button-container {
  text-align: center;
}

.more-info-button {
  display: inline-block;
  padding: 12px 18px;
  background-color: #0056b3; /* Color azul oscuro para mejor contraste */
  color: #ffffff; /* Letra en blanco */
  text-decoration: none;
  border: none;
  border-radius: 5px;
  font-size: 16px; /* Aumenta el tamaño de la fuente */
  font-weight: bold;
  margin-bottom: 8px; /* Más espacio entre los botones */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.more-info-button:hover {
  background-color: #004494; /* Color de fondo más oscuro en hover */
  transform: scale(1.05);
}

.survey-button {
  display: inline-block;
  padding: 12px 18px;
  background-color: #218838; /* Verde oscuro para mejor contraste */
  color: #ffffff; /* Letra en blanco */
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 16px; /* Aumenta el tamaño de la fuente para mejor legibilidad */
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.survey-button:hover {
  background-color: #196f31; /* Color de fondo más oscuro en hover */
  transform: scale(1.1);
}

.survey-button:active {
  background-color: #145a27;
  transform: scale(0.95);
}

/* Dispositivos Moviles (vertical y horizontal) */
@media (max-width: 767px) and (max-height: 1024px) and (orientation: portrait) {
    
    .container {
        margin-top: 530px;
        padding: 0 4px 2% 4px;
    }

    .card {
        margin-left: 1.5%;
        margin-right: 1.5%;
        padding: 2.5%;
        border-radius: 20px;
        min-height: auto;
        min-width: 97%;
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        /*width: calc(100% - 20px);*/
        min-width: 110%;
        max-width: 150%;
        height: 40px;
        font-size: 16px;
    }

    h2.city, h1.temp { font-weight: 600; }

    h1.temp {
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        margin-bottom: 6%;
        padding-top: 2%;
        padding-bottom: 2%;
    }

    .flex {
        font-size: 16px;
        min-width: 100%;
        justify-content: center;
        margin-bottom: 2%;
    }

    .details {
        font-size: 16px;
        justify-content: center;
        min-width: 100%;
        min-height: 60px;
    }

    .button-container {
        margin-bottom: 4%;
        justify-content: center;
    }

    .more-info-button {
        margin-bottom: 6%;
    }

    .more-info-button, .survey-button {
        min-height: 40px;
        width: 90%;
        font-size: 16px;
    }

    img.logo-bottom { 
        left: 50%;
        top: 1%;
        width: 50%;
        height: 60px;
    }

    .forecast-content {
        margin-top: 8%;
        min-height: 70vh;
        padding-left: 2%;
        /*margin-bottom: 10%;*/
        padding-bottom: 60%;
        font-size: 18px;
    }

    .forecast-item {
        margin-top: 2%;
        min-height: auto;
        margin-left: 0;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description {
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }

}

@media (max-width: 767px) and (max-height: 590px) and (orientation: landscape) {

    .container {
        margin-top: 90%;
        padding: 2% 4px 2% 4px;
        min-width: 95%;
    }

    .card {
        margin-left: 1.5%;
        margin-right: 1.5%;
        padding: 2%;
        border-radius: 20px;
        min-height: auto;
        min-width: 97%;
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        min-width: 170%;
        height: 40px;
        font-size: 18px;
    }

    h2.city, h1.temp {
        font-weight: 600;
    }

    h1.temp {
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
        font-size: 18px;
    }

    .flex, .details {
        max-width: 280px;
    }

    .button-container {
        display: flex; 
        justify-content: space-between;
        margin-bottom: 4%;
        justify-content: center;
    }

    .more-info-button { 
        margin-right: 2%;
    }

    .more-info-button, .survey-button {
        height: 50px;
        width: 45%;
        font-size: 16px;
        align-content: center;
    }

    img.logo-bottom {
        left: 50%;
        top: 3%;
        width: 40%;
        height: 90px;
    }

    .forecast-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 6%;
        min-height: auto;
        padding-left: 2%;
        padding-bottom: 5%;
        font-size: 18px;
    }

    .forecast-item {
        margin-top: 2%;
        min-height: auto;
        margin-left: 0;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description {
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }
}

/* Tabletas (vertical y horizontal) */
@media (min-width: 768px) and (max-width: 1024px) and (min-height: 1024px) and (orientation: portrait) {

    html, body {
        overflow: auto;
    }

    .main-container {
        padding: 0 2% 2% 2%;
        min-height: 90vh;
        max-height: 100vh;
        margin-bottom: 10%;
    }

    .container {
        padding: 0 4px 2% 4px;
        min-width: 95%;
        height: auto;
    }

    .card {
        margin-left: 1.5%;
        margin-right: 1.5%;
        padding: 2% 2% 0 2%;
        border-radius: 20px;
        min-height: auto;
        min-width: 97%;
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        min-width: 180%;
        height: 50px;
        font-size: 22px;
    }

    h2.city {
        font-size: 28px;
    }

    h2.city, h1.temp {
        font-weight: 600;
    }

    h1.temp {
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
        font-size: 22px;
    }

    .flex, .details {
        min-width: 48%;
    }

    .button-container {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4%;
        justify-content: center;
    }

    .more-info-button {
        margin-right: 2%;
    }

    .more-info-button, .survey-button {
        height: 50px;
        width: 45%;
        font-size: 18px;
        align-content: center;
    }

    img.logo-bottom {
        left: 50%;
        top: 73%;
        width: 40%;
        height: 120px;
    }

    .forecast-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 2%;
        padding-top: 2%;
        height: 290px;
        padding-left: 2%;
        padding-bottom: 220px;
        font-size: 20px;
    }

    .forecast-item {
        margin-top: 2%;
        min-height: auto;
        width: 100%;
        margin-left: 0;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description {
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (max-height: 768px) and (orientation: landscape) {

    .container {
        margin-top: 63%;
        padding: 0 4px 2% 4px;
        min-width: 96%;
    }

    .card {
        margin-left: 1.5%;
        margin-right: 1.5%;
        padding: 2%;
        border-radius: 20px;
        min-height: auto;
        min-width: 97%;
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        min-width: 180%;
        height: 50px;
        font-size: 18px;
    }

    h2.city, h1.temp {
        font-weight: 600;
    }

    h1.temp {
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
        font-size: 22px;
    }

    .flex, .details {
        min-width: 370px
    }

    .button-container {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2%;
        justify-content: center;
    }

    .more-info-button {
        margin-right: 2%;
    }

    .more-info-button, .survey-button {
        height: 50px;
        width: 45%;
        font-size: 20px;
        align-content: center;
    }

    img.logo-bottom {
        left: 50%;
        top: 3%;
        width: 30%;
        height: 90px;
    }

    .forecast-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        margin-top: 5%;
        min-height: auto;
        padding-left: 2%;
        padding-bottom: 20%;
        font-size: 18px;
    }

    .forecast-item {
        margin-top: 2%;
        min-height: auto;
        width: 100%;
        margin-left: 0;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description {
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }
}

/* Pantallas Medianas (laptos y tablets grandes) */
@media (min-width: 1025px) and (max-width: 1199px) and (min-height: 800px) and (orientation: portrait) { 
    
    /*html, body {
        overflow: hidden;*/ /* Evita el desplazamiento al hacer zoom */
    /*}*/

    .main-container {
        padding: 5px 2% 2% 2%;
        margin-left: 2%;
        margin-right: 2%;
        height: 100vh;
        align-content: center;
    }

    .container {
        display: flex;
        justify-content: space-between;
        padding: 0 2% 2% 0%;
        min-height: 750px;
    }

    .card {
        padding: 2.5%;
        border-radius: 20px;
        min-width: 520px;
        max-height: 750px; 
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        /*width: calc(100% - 20px);*/
        min-width: 360px;
    }

    h2.city, h1.temp { 
        font-weight: 600;
    }

    h1.temp { 
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        justify-content: space-between;
        margin-bottom: 6%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
    }

    .flex, .details {
        width: 100%;
        height: 100px;
        align-content: center;
        text-align: center;
        justify-content: center;
    }

    .button-container { 
        margin-top: 30%;
    }

    .more-info-button {
        margin-right: 3%;
    }

    .more-info-button:hover, .survey-button:hover {
        color: #bec6c5;
    }

    .logo-bottom {
        left: 50%;
        top: 86%;
        max-width: 25%;
    }

    .forecast-content {
        margin-top: 2.5%;
        min-height: 500px;
        max-height: 680px;
        min-width: 350px;
    }

    .forecast-item { 
        min-height: auto;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description { 
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }

    .button-container {
        padding-top: 1%;
    }
}

@media (min-width: 1025px) and (max-width: 1199px) and (min-height: 320px) and (max-height: 1024px) 
and (orientation: landscape) {

    /*html, body {
        overflow: hidden;*/ /* Evita el desplazamiento al hacer zoom */
    /*}*/

    .main-container { 
        align-items: center;
        align-content: center;
    }

    .container {
        margin-top: -2%;
        display: flex;
        justify-content: space-between;
        padding: 0 2% 2% 2%;
        max-height: 75vh;
        min-width: 100%;
    }

    .card {
        padding: 2.5%;
        border-radius: 20px;
        min-width: 620px;
        min-height: auto; 
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        min-width: 460px;
    }

    h2.city { 
        margin-top: 5%;
    }

    h2.city, h1.temp { 
        font-weight: 600;
    }

    h1.temp { 
        margin-top: 3%;
        margin-bottom: 6%;
    }

    .detalles {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
    }

    .flex {
        min-width: 210px
    }

    .details {
        min-width: 330px;
    }

    .button-container {
        display: flex;
        justify-content: space-between;
        justify-content: center;
    }

    .more-info-button, .survey-button {
        height: 60px;
        font-size: 20px;
    }

    .more-info-button {
        margin-right: 3%;
    }

    .more-info-button:hover, .survey-button:hover {
        color: #bec6c5;
    }

    .logo-bottom {
        left: 50%;
        top: 88%;
        max-width: 25%; /* Establece un ancho máximo para el logo */
    }

    .forecast-content {
        margin-top: 2.5%;
        min-height: 65vh;
        min-width: 420px;
        max-width: 520px;
    }

    .forecast-item { 
        min-height: auto;
    }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description { 
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }
}

@media (min-width: 1200px) {

    html, body { overflow: hidden; }

    .main-container { 
        padding: 5px 2% 2% 2%;
        margin-left: 2%;
        margin-right: 2%;
        height: 100vh;
    }

    .container {
        display: flex;
        justify-content: space-between;
        padding: 0 2% 2% 2%;
        max-height: 550px;
    }

    .card {
        padding: 2.5%;
        border-radius: 20px;
        min-width: 620px;
        height: 510px; 
    }

    .search {
        justify-content: space-between;
        margin-bottom: 1em;
        padding-left: 1%;
    }

    input.search-bar {
        min-width: 460px;
    }

    h2.city, h1.temp { font-weight: 600; }

    h1.temp { 
        margin-top: 3%;
        margin-bottom: 4%;
    }

    .detalles {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6%;
        max-height: 130px;
        padding-top: 2%;
        padding-bottom: 2%;
    }

    .flex { min-width: 210px }

    .details { min-width: 330px; }

    .button-container {
        padding-top: 1%;
    }

    .more-info-button { margin-right: 3%; }

    .more-info-button:hover, .survey-button:hover { color: #bec6c5; }

    .logo-bottom {
        left: 50%;
        top: 86%;
        max-width: 20%;
    }

    .forecast-content {
        margin-top: 2.5%;
        min-height: 500px;
        max-height: 510px;
        min-width: 420px;
    }

    .forecast-item { min-height: auto; }

    p.date {
        box-shadow: 0 3px 7px rgba(220, 220, 220, 0.2);
        border-radius: 5px;
        margin-top: 2%;
    }

    .forecast-description { 
        display: flex;
        margin-bottom: 4%;
        justify-content: center;
        align-items: center;
        align-content: center;
    }

    .forecast-item .description {
        margin-top: 3.6%;
        align-content: center;
    }
}
/*1238*/