@import url('https://fonts.googleapis.com/css2?family=Anek+Tamil:wght@300&display=swap');

* {
  -webkit-touch-callout: none; /* Deshabilitar el menú emergente en dispositivos iOS */
  user-select: none; /* Evitar la selección de texto en todos los elementos */
}

img {
  pointer-events: none; /* Evitar eventos de puntero (como clic derecho) en las imágenes */
}

.container-estrellas {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.space {
  --size: 2px;
  --space-layer: 
    4vw 50vh 0 #fff,
    18vw 88vh 0 #fff,
    73vw 14vh 0 #fff;
  
  width: var(--size);
  height: var(--size);
  background: white;
  box-shadow: var(--space-layer);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.75;
}

.space {
   animation: move var(--duration) linear infinite;
}

@keyframes move {
  from { transform: translateY(0); }
  to { transform: translateY(-100vh); }
}

/* Basic styling */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-repeat: no-repeat;
  background: rgb(0, 101, 184) no-repeat center center fixed;
  background-size: cover;
  font-family: sans-serif;
  font-size: 16px;
}
main {
  flex: 1;
}
nav {
  background: rgba(17, 17, 17, 0.212);
  padding: 0 15px;
}
a {
  color: white;
  text-decoration: none;
}
.menu,
.submenu {
  list-style-type: none;
}
.logo {
  font-size: 20px;
  padding: 7.5px 10px 7.5px 0;
}
.item {
  padding: 10px;
}
.item.button {
  padding: 9px 5px;
}
.item:not(.button) a:hover,
.item a:hover::after {
  color: #ccc;
}

/* Mobile menu */
.menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.menu li a {
  display: block;
  padding: 15px 5px;
}
.menu li.subitem a {
  padding: 15px;
}
.toggle {
  order: 1;
  font-size: 20px;
}
.item.button {
  order: 2;
}
.item {
  order: 3;
  width: 100%;
  text-align: center;
  display: none;
}
.active .item {
  display: block;
}
.button.secondary {
  /* divider between buttons and menu links */
  border-bottom: 1px #444 solid;
}
/* Submenu up from mobile screens */
.submenu {
  display: none;
}
.submenu-active .submenu {
  display: block;
}
.has-submenu i {
  font-size: 12px;
}
.has-submenu > a::after {
  font-family: "Font Awesome 5 Free";
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  content: "\f078";
  color: white;
  padding-left: 5px;
}
.subitem a {
  padding: 10px 15px;
}
.submenu-active {
  background-color: rgba(17, 17, 17, 0.212);
  border-radius: 3px;
}

/* Tablet menu */
@media all and (min-width: 700px) {
  .menu {
    justify-content: center;
  }
  .logo {
    flex: 1;
  }
  .item.button {
    width: auto;
    order: 1;
    display: block;
  }
  .toggle {
    flex: 1;
    text-align: right;
    order: 2;
  }
  /* Button up from tablet screen */
  .menu li.button a {
    padding: 10px 15px;
    margin: 5px 0;
  }
  .button a {
    background: #0080ff;
    border: 1px royalblue solid;
  }
  .button.secondary {
    border: 0;
  }
  .button.secondary a {
    background: transparent;
    border: 1px #0080ff solid;
  }
  .button a:hover {
    text-decoration: none;
  }
  .button:not(.secondary) a:hover {
    background: royalblue;
    border-color: darkblue;
  }
}

/* Desktop menu */

@media all and (min-width: 960px) {
  .menu {
    align-items: flex-start;
    flex-wrap: nowrap;
    background: none;
  }
  .logo {
    order: 0;
  }
  .item {
    order: 1;
    position: relative;
    display: block;
    width: auto;
  }
  .button {
    order: 2;
  }
  .submenu-active .submenu {
    z-index: 2;
    display: block;
    position: absolute;
    left: 0;
    top: 68px;
    background: rgba(17, 17, 17, 0.9);
  }
  .toggle {
    display: none;
  }
  .submenu-active {
    border-radius: 0;
  }
}

/* Main */

.main-container {
  margin-top: 5vh;
  font-size: 100%;
  font-family: 'Open Sans', sans-serif;
  color: white;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
}

@media screen and (min-width: 920px) {
  .main-container {
    width: 70vw;
    margin: 8px auto;
    font-size: 1.1em;
  }
}


/* location-and-date */
.location-and-date {
  width: 100%;
}

.location-and-date__location {
  margin: 0;
  font-size: 2em;
  font-weight: 600;
}



/* current-temperature */
.current-temperature {
  display: flex;
  margin-top: 0.25em;
  width: 100%;
  align-items: center;
}

.current-temperature__icon-container {
  flex-grow: 1.25;
  text-align: center;
}

.current-temperature__content-container {
  flex-grow: 1;
  text-align: center;
}

.current-temperature__icon {
  width: 10.5em;
}

.current-temperature__value {
  font-size: 4.25em;
  font-weight: 300;
}

.current-temperature__summary {
  margin-top: -0.5em;
  margin-left: -0.6em;
  text-align: center;
  font-size: 1.125em;
}



/* current-stats */
.current-stats {
  display: flex;
  justify-content: space-around;
  padding-bottom: 1em;
  width: 100%;
  border-top: 1px solid rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.5);
}

@media screen and (min-width: 700px) {
  .current-stats {
    margin-bottom: 1em;
    padding-bottom: 0;
    border-top: none;
    border-bottom: none;
    border-left: 1px solid rgba(255,255,255,0.5);
  }
}

.current-stats__value {
  margin-top: 1em;
  font-size: 1.24em;
}

.current-stats__label {
  color: rgba(255,255,255,0.6);
}

@media screen and (min-width: 700px) {
  .current-temperature,
  .current-stats {
    width: 50%;
  }
}

#info-container {
  width: 50%; /* Ancho deseado para el contenedor */
  margin: 0 auto; /* Margen automático a la izquierda y derecha para centrar */
  margin-top: 15vh;
  margin-bottom: 15vh;
}

#forecast-container {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 5vh;
  margin-bottom: 5vh;
}

.forecast-card {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin: 10px;
  padding: 20px;
  width: 280px;
  text-align: center;
  color: white;
}

.forecast-card.expanded {
  font-size: 1.2rem;
  width: 80%; /* Ocupar todo el ancho cuando está expandido */
  background: rgba(0, 0, 0, 0.192);
  box-shadow: none;
}

.forecast-card h3 {
  margin-bottom: 10px;
}

.forecast-card p {
  margin: 10px 0;
}

.weather-state {
    font-size: 1.1em;
    font-weight: 500;
    margin: 8px 0;
    color: #c3c3c3;
    text-align: center;
}

/* Para los diferentes estados */
.weather-state[data-state="Despejado"] { color: #1a73e8; }
.weather-state[data-state*="soleado"] { color: #f57c00; }
.weather-state[data-state*="nublado"] { color: #5f6368; }
.weather-state[data-state*="Lluvia"] { color: #4285f4; font-weight: 600; }

.toggle-button {
  background-color: #0080ff;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
}

.toggle-button:hover {
  background-color: #005bb5;
}

.details-container {
  margin-top: 10px;
  display: none;
}

.condition-icon {
  width: 50px;
  height: 50px;
  margin-bottom: -2px;
}

.period-container {
  margin-bottom: 15px; /* Espacio entre los períodos */
  padding: 10px; /* Padding interno para mayor separación */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Línea divisoria entre los períodos */
}

.period-container:last-child {
  border-bottom: none; /* Elimina la línea divisoria del último período */
}

.period-container h4 {
  margin-bottom: 5px; /* Espacio entre el título del período y los datos */
  font-size: 1.2em; /* Tamaño de fuente del título del período */
  color: #ffffff; /* Color del título del período */
}

.daily-summary {
    margin-bottom: 1em;
    padding: 0.5em;
    border-bottom: 1px solid #ccc;
}
.daily-summary h4 {
    margin: 0 0 0.5em;
    font-size: 1.1em;
}
.daily-summary p {
    margin: 0;
    font-style: italic;
}

/* Botón de compartir pronóstico */
#share-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.share-button {
  display: block;
  margin: 5px auto 5px auto;
  padding: 14px 32px;
  background: linear-gradient(90deg, #0080ff 0%, #015cb8 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(0, 128, 255, 0.15);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  letter-spacing: 0.5px;
}

.share-button:hover, .share-button:focus {
  background: linear-gradient(90deg, #005bb5 0%, #0080ff 100%);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 128, 255, 0.25);
  outline: none;
}

/* Tarjetas*/

.tarjeta {
  margin: 30px auto;
  width: 90%;
  height: 82vh;
  min-height: 620px;
  border-radius: 40px;
  box-shadow: 5px 5px 30px 7px rgba(0,0,0,0.25), -5px -5px 30px 7px rgba(0,0,0,0.22);
  transition: 0.4s;
}

.tarjeta .tarjeta_image {
  width: 100%;
  height: inherit;
  border-radius: 40px;
}

.tarjeta .tarjeta_image img {
  width: inherit;
  height: inherit;
  border-radius: 40px;
  object-fit: cover;
}

.tarjeta .tarjeta_image video {
  width: inherit;
  height: inherit;
  border-radius: 40px;
  object-fit: cover;
}

.tarjeta .tarjeta_title {
  z-index: 1;
  position: relative;
  text-align: center;
  border-radius: 0px 0px 40px 40px;
  font-family: 'Big Shoulders Inline Text', cursive;
  font-size: 2rem;
  margin-top: -80vh;
  height: 40px;
}

.tarjeta:hover {
  box-shadow: 5px 5px 30px 15px rgba(0,0,0,0.25), 
    -5px -5px 30px 15px rgba(0,0,0,0.22);
}

.tarjeta_2 {
  position: relative;
  text-align: center;
  border-radius: 0px 0px 40px 40px;
  font-family: 'Anek Tamil', sans-serif;
  font-size: 1.8rem;
  margin-top: 22vh;
  height: 40px;
}

.color-texto-tarjeta2 {
  z-index: 1;
  color: white;
}

#fondo_tarjeta_clima {
  position: absolute;
  width: 90%;
  min-height: 620px;
}

#fondo_tarjeta_video {
  position: absolute;
  width: 90%;
  min-height: 620px;

  opacity: 0;
  transition: opacity 2s;
}

#fondo_tarjeta_transp {
  position: absolute;
  width: 90%;
  min-height: 620px;
  background-color: transparent;
}

/* CARDS */

.cards-list {
  z-index: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.card-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
  transition: none;
}

.card {
  margin: 30px auto;
  width: 300px;
  height: 256px;
  border-radius: 40px;
  box-shadow: 1px 1px 1px 1px rgba(0,0,0,0.25), -1px -1px 1px 1px rgba(0,0,0,0.22);
  transition: 0.4s;
}

.card .card_image {
  width: inherit;
  height: inherit;
  border-radius: 40px;
}

.card .card_image img {
  width: inherit;
  height: inherit;
  border-radius: 40px;
  object-fit: contain;
}

.fondo-tarjeta {
  position: relative;
  background-color: rgba(0, 0, 0, 0.3);
  text-align: center;
  border-radius: 40px 40px 40px 40px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 30px;
  margin-top: -256px;
  height: 256px;
}

.card .card_title {
  z-index: 1;
  position: relative;
  text-align: center;
  border-radius: 0px 0px 40px 40px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 30px;
  margin-top: -80px;
  height: 40px;
}

.card:hover {
  transform: scale(1.1, 1.1);
  box-shadow: 2px 2px 5px 2px rgba(0, 0, 0, 0.22);
}

.title-white {
  z-index: 1;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); /* Sombra negra */
}

.title-black {
  z-index: 1;
  color: black;
}

.card .card_actualizado {
  position: relative;
  text-align: center;
  border-radius: 0px 0px 40px 40px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 30px;
  margin-top: -64px;
  height: 40px;
}

#s-act-hora-fecha{
  margin-bottom: -90px;
  font-size: 1.4rem;
}

/* Cards */





/* Animaciones */

@keyframes movimientoizq_der {
  0% {
    transform: translateX(-0.8rem); /* Desplazamiento inicial hacia la izquierda */
  }
  50% {
    transform: translateX(0.8rem); /* Desplazamiento hacia la derecha */
  }
  100% {
    transform: translateX(-0.8rem); /* Vuelve a la posición inicial */
  }
}

@keyframes giro {
  0% {
    transform: rotate(0deg); /* Sin rotación inicial */
  }
  100% {
    transform: rotate(360deg); /* Rotación completa de 360 grados */
  }
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(-0.8rem);
  }
  20% {
    transform: translateX(0.8rem);
  }
  30% {
    transform: translateX(0.8rem);
  }
  40% {
    transform: translateX(0.8rem);
  }
  50% {
    transform: translateX(-0.8rem);
  }
  60% {
    transform: translateX(0.8rem);
  }
  70% {
    transform: translateX(-0.8rem);
  }
  80% {
    transform: translateX(0.8rem);
  }
  90% {
    transform: translateX(-0.8rem);
  }
  100% {
    transform: translateX(0);
  }
  /*animation: shake 30s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite;*/ /* 0.8s es la duración de la animación */
}

/* Animaciones */


@media all and (max-width: 500px) {
  .card-list {
    /* On small screens, we are no longer using row direction but column */
    flex-direction: column;
  }
}


/*
.card {
  margin: 30px auto;
  width: 300px;
  height: 300px;
  border-radius: 40px;
  background-image: url('https://i.redd.it/b3esnz5ra34y.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-repeat: no-repeat;
box-shadow: 5px 5px 30px 7px rgba(0,0,0,0.25), -5px -5px 30px 7px rgba(0,0,0,0.22);
  transition: 0.4s;
}
*/


.footer {
  margin-top: auto;
  text-align: center;
  display: flex;
  flex-flow: row wrap;
  padding: 17px 30px 20px 30px;
  color: #2f2f2f;
  background-color: rgba(17, 17, 17, 0.5);
  font-weight: bold;
}

.footer > * {
  flex:  1 100%;
}

.legal {
  display: flex;
  flex-wrap: wrap;
  color: #999;
}
  
.legal__links {
  display: flex;
  align-items: center;
  font-size: 90%;
}

.sol {
  color: #fffb00;
}

@media screen and (min-width: 450px) {
  .legal .legal__links {
    margin-left: auto;
  }
}

@media screen and (min-width: 40.375em) {
  .footer__nav > * {
    flex: 1;
  }
  
  .nav__item--extra {
    flex-grow: 2;
  }
  
  .footer__addr {
    flex: 1 0px;
  }
  
  .footer__nav {
    flex: 2 0px;
  }
}
