/*======================================*/
/* OVERLAY DE PRONÓSTICOS                */
/*======================================*/
.weather-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.1);
  display: flex;
  justify-content: flex-end;
  
  visibility: hidden; 
  opacity: 0;
  pointer-events: none;
  
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 999;
}

.weather-overlay.active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.weather-panel {
  width: 450px;
  max-width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  color: var(--white);
  display: flex;
  flex-direction: column;
  
  transform: translateX(100%);
  transition: transform 0.3s ease;
  
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.weather-overlay.active .weather-panel {
  transform: translateX(0);
}

/* Webkit (Chrome, Safari, Edge) */
.weather-panel::-webkit-scrollbar {
  width: 8px;
}

.weather-panel::-webkit-scrollbar-track {
  background: transparent;
}

.weather-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
}

.weather-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.weather-overlay.active .weather-panel {
  transform: translateX(0);
}

.weather-close-btn{
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-white);
  cursor: pointer;
}

.weather-card {
  position: relative;
  padding: 20px;
  margin: 30px 30px 15px 30px;
  border-radius: 20px;
  background: url("../img/weather-forecast.webp") no-repeat;
  background-size: cover;
  background-position: center;
}

.weather-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--color-medium-blue), var(--color-dark-blue));
  opacity: 0.75;
  border-radius: 20px;
}

.weather-content {
  position: relative;
  display: flex;
  flex-direction: column;
}

.weather-content h2 {
  font-size: 22px;
  color: var(--color-white);
  text-align: center;
  margin-bottom: 10px;
}

.city-list,
.city-detail {
    display: none;
}

.city-list.active,
.city-detail.active{
    display: block;
}

.weather-cities {
  list-style: none;
  margin: 5px 0 0 0;
}

.weather-cities li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-white);
  cursor: pointer;
}

.weather-cities li h3{
  font-size: 20px;
  color: var(--color-white);
}

.weather-cities li h4{
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--color-white);
  justify-content: space-between;
  min-width: 100px;
}

.weather-icon {
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.5);
  padding: 5px;
  border-radius: 50%;
  margin: 0 5px 0 0;
}

.weather-icon.weather-icon--large{
    width: 45px;
    height: 45px;
}

.city-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.city-detail-header .city-info{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.city-detail-header .city-info h2{
    margin-bottom: 5px;
    text-align: left;
}

.city-detail-header .city-info h3{
    margin-bottom: 0;
    text-align: left;
    color: var(--color-white);
    font-size: 15px;
    font-weight: 300;
}

.city-search-btn {
  background: transparent;
  color: var(--color-white);
  border: none;
  cursor: pointer;
  flex-shrink: 0; 
  font-size: 20px;
}

.city-detail-variables {
  padding: 10px;
  background: rgba(0,0,0,.25);
  border-radius: 10px;
}

.city-detail-main-variable {
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-white);
  color: var(--color-white);
}

.city-detail-main-variable p {
  color: var(--color-white);
  text-align: right;
  font-size: 14px;
}

.city-detail-main-variable-measure {
  display: flex;
  align-items: center;
  width: 40%;
  margin-right: 10px;
}

.city-detail-main-variable-measure h3 {
  font-size: 40px;
  font-weight: bold;
  color: var(--color-white);
}

.city-detail-main-variable-measure h6 {
  color: var(--color-white);
  line-height: 2;
  margin-top: auto;
}

.city-detail-other-variables {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  text-align: center;
}

.city-detail-other-variable {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.city-detail-other-variable p {
  color: var(--color-white);
  font-size: 12px;
}

.city-detail-other-variable h4 {
  font-size: 18px;
  display: flex;
  align-items: center;
  color: var(--color-white);
}

.city-detail-other-variable h4 i {
  margin: 0 5px 0 0;
}

.cta-download-app {
  text-align: center;
  margin-top: 20px;
}

.cta-download-app h3 {
  color: var(--color-white);
  font-size: 18px;
}

.app-stores {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.app-stores a {
  cursor: pointer;
}

img.app-store {
  width: 120px;
  height: auto;
  transition: transform 0.3s ease;
}

.app-store:hover{
    transform: scale(1.05);
}

.weather-newsletters-container {
  position: relative;
  padding: 20px;
  margin: 15px 30px 30px 30px;
  border-radius: 20px;
  overflow-y: auto;
  flex:  0 0 auto;
  background: linear-gradient(180deg, var(--color-medium-blue), var(--color-dark-blue));
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.weather-newsletters-container h2 {
  font-size: 22px;
  color: var(--color-white);
  text-align: center;
}

.weather-newsletters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.weather-newsletter {
  display: flex;
  padding: 5px 0 15px 0;
  gap: 10px;
  border-bottom: 1px solid #ffffff;
  cursor: pointer;
}

.weather-newsletter img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.weather-newsletter h3 {
  color: var(--color-white);
  font-size: 18px;
  margin-bottom: 5px;
}

.weather-newsletter-time {
  font-size: 14px;
  color: var(--color-white);
  font-weight: 300;
}

.city-search-item{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.city-search-item-name{
    font-size: 14px;
    color: var(--color-dark-blue);
}

.city-search-item-department{
    font-size: 12px;
    color: var(--color-dark-gray);
}

/* ========= TABLET (≤ 1024px) ========= */
@media (max-width: 1024px) {
  .weather-newsletter h3 {
    font-size: 17px;
  }
}

/* ========= MÓVIL (≤ 767px) ========= */
@media (max-width: 767px) {
    .weather-newsletter h3 {
        font-size: 16px;
    }
}   

/*======================================*/
/* BOLETINES                            */
/*======================================*/

.bulletins-section{
  max-width: 1500px;
  margin: auto;
  padding: 3%;
  display: flex;
  gap: 50px;
}

.bulletin-container{
    width: 80%;
    text-align: justify;
}

.bulletin-container img{
    width: 100%;
    margin-bottom: 20px;
}

.bulletin-container h1,
.bulletin-container h2,
.bulletin-container h3,
.bulletin-container h4,
.bulletin-container h5,
.bulletin-container h6{
    margin-bottom: 20px;
}

.bulletin-container p,
.bulletin-container ul,
.bulletin-container ol{
    margin-bottom: 15px;
}

.other-bulletins h2 {
  text-align: center;
}

.other-bulletins {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: sticky;
  top: 115px; 
  align-self: flex-start;
  flex-shrink: 1;
}

.other-bulletin {
  display: flex;
  padding: 5px 0 15px 0;
  gap: 10px;
  width: 100%;
}

.other-bulletin img {
  width: 100px;
  height: 100px;
  object-fit: cover;
}

.other-bulletin h3 {
  font-size: 20px;
  margin-bottom: 5px;
}

.other-bulletin time {
  font-size: 16px;
  color: var(--color-dark-gray);
  font-weight: 400;
}

/* ========= TABLET (≤ 1024px) ========= */
@media (max-width: 1024px) {
.bulletins-section{
  padding: 5%;
  gap: 20px;
}
.bulletin-container{
    width: 70%;
    min-width: 60%;
}
.other-bulletins {
  top: 0; 
}
.other-bulletin time {
  font-size: 15px;
}
.other-bulletin h3 {
  font-size: 18px;
}
}

/* ========= MÓVIL (≤ 767px) ========= */
@media (max-width: 767px) {
.bulletins-section{
  padding: 8%;
  flex-direction: column;
}
.bulletin-container{
    width: 100%;
}
.other-bulletins {
  top: 0; 
}
.other-bulletin time {
  font-size: 14px;
}
.other-bulletin h3 {
  font-size: 16px;
}
}

/* Animaciones */
.bulletin-container.animate-in {
  animation: fadeInLeft 1.5s ease forwards;
}

.other-bulletins.animate-in {
  animation: fadeInRight 1.5s ease forwards;
}

/* En tablets y móviles, ambos elementos vienen de arriba */
@media (max-width: 1024px) {
  .bulletin-container.animate-in,
  .other-bulletins.animate-in {
    animation: fadeInUp 1.5s ease forwards !important;
  }
}