/* =========================================================
   GENERAL
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  background: #f5f1ea;
  font-family: 'Poppins', sans-serif;
  color: #111;
}


/* =========================================================
   PANTALLA 2814 x 640
   ========================================================= */

.pantalla {
  width: 2814px;
  height: 640px;

  display: grid;
  grid-template-columns: 102px 1fr 102px;

  background: #f5f1ea;
}


/* =========================================================
   LATERALS
   ========================================================= */

.lateral {
  width: 102px;
  height: 640px;
  overflow: hidden;
}

.lateral img {
  display: block;
  width: 102px;
  height: 641px;
  object-fit: cover;
}


/* =========================================================
   CONTINGUT CENTRAL
   ========================================================= */

.contenido {
  position: relative;
  width: 100%;
  height: 640px;
}


/* Cada pantalla ocupa tota la zona central */

.pantalla-contingut {
  position: absolute;

  left: 0;
  top: 0;

  width: 100%;
  height: 640px;

  padding: 30px 40px;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.7s ease;
}


/* pantalla activa */

.pantalla-contingut.activa {
  opacity: 1;
  pointer-events: auto;
}


/* =========================================================
   METEOROLOGIA
   ========================================================= */

#pantalla-meteo {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 40px;

  padding: 30px 40px;
}


/* -------------------------
   ESQUERRA
   ------------------------- */

.meteo-esquerra {
  display: grid;

  grid-template-columns: 42% 58%;

  gap: 25px;

  height: 580px;
}


/* =========================================================
   CAPÇALERES
   ========================================================= */

/* Títol Madrid */

.meteo-titol {
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.1;
}


/* Títol Previsión de hoy */

.horaria-titol {
  font-size: 48px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.1;
  
/* Alineació amb MADRID */
  position: relative;
  top: 44px;
}

/* Títol Previsión */

.previsio-titol {
  font-size: 48px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.1;
  
/* Alineació amb MADRID */
  position: relative;
  top: 44px;
}


/* -------------------------
   ACTUAL
   ------------------------- */

.meteo-actual {

  background: linear-gradient(
    110deg,
    #3e6599,
    #669bd8
  );

  border-radius: 32px;

  color: white;

  padding: 28px;

  display: flex;
  flex-direction: column;

  justify-content: center;
  align-items: center;

  text-align: center;
}


/* Hoy */

.meteo-data {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
}


/* zona icona + temperatura */

.meteo-actual-centre {

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  margin: 5px 0;
}


/* icona actual */

.meteo-icon-actual {

  width: 125px;
  height: 125px;

  object-fit: contain;

  margin-bottom: 5px;
}


/* temperatura actual */

.meteo-temp-actual {

  font-size: 88px;

  line-height: 0.95;

  font-weight: 500;
}


/* descripció */

.meteo-descripcio {

  font-size: 25px;

  font-weight: 500;

  margin-top: 15px;

  min-height: 35px;
}


/* mín / màx */

.meteo-minmax {

  display: flex;

  gap: 30px;

  font-size: 22px;

  margin-top: 15px;
}


/* =========================================================
   PREVISIÓ HORÀRIA
   ========================================================= */

.meteo-horaria {

  background: linear-gradient(
    110deg,
    #4e7fba,
    #6599d3
  );

  border-radius: 32px;

  color: white;

  padding: 30px 25px;

  display: flex;

  flex-direction: column;
}

.horaria {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 15px;
}

.hora {
  flex: 1;
  height: 80%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

/* Hora */

.hora-label,
.dia-nom {
  font-size: 28px;
  font-weight: 600;
  height: 40px;
  margin-bottom: 25px;
  line-height: 44px;
}


/* Icones iguals a la previsió de la dreta */

.hora-icon,
.dia-icon {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 20px;
}

/* Temperatura */

.hora-temp,
.dia-temp {
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
}

/* =========================================================
   PREVISIÓ DIES
   ========================================================= */

.meteo-dreta {
  background: linear-gradient(
    110deg,
    #6599d3,
    #3e6599
  );

  border-radius: 32px;
  color: white;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
}

.previsio-dies {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 15px;
}

.dia-previsio {
  flex: 1;
  height: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  text-align: center;
}

/* =========================================================
   NOTÍCIES EFE
   ========================================================= */

.pantalla-noticies {

  padding: 45px 55px;

  display: flex;

  align-items: center;
}


.noticies-grid {

  width: 100%;
  height: 100%;

  display: grid;

  grid-template-columns: 1fr 1fr;

  grid-template-rows: 1fr 1fr;

  column-gap: 80px;

  row-gap: 25px;
}


/* notícia */

.noticia {

  display: grid;

  grid-template-columns: 390px 1fr;

  gap: 30px;

  align-items: center;

  min-width: 0;
}


/* imatge */

.noticia img {

  width: 390px;
  height: 220px;

  object-fit: cover;

  border-radius: 2px;
}


/* text */

.noticia-text {

  display: flex;

  align-items: flex-start;

  gap: 18px;
}


/* vinyeta lila */

.noticia-icon {

  flex: 0 0 34px;

  width: 34px;
  height: 34px;

  margin-top: 5px;

  background: #b28afd;

  clip-path: polygon(
    0 0,
    50% 50%,
    0 100%,
    100% 100%,
    50% 50%,
    100% 0
  );
}


/* titular */

.noticia h2 {

  margin: 0;

  font-family: 'Poppins', sans-serif;

  font-size: 30px;

  line-height: 1.25;

  font-weight: 500;

  color: #111;
}


/* =========================================================
   TRANSICIÓ NOTÍCIES
   ========================================================= */

.noticia {

  opacity: 0;

  transform: translateY(10px);

  animation: entradaNoticia 0.7s ease forwards;
}


@keyframes entradaNoticia {

  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}