/*
Theme Name: Entre Comunes
Author: Arawato Producciones
Author URI: https://arawato.pro/entre-comunes
Description: Theme for Entre Comunes
Template:   savara-lite
Version:    0.0.1
License:    GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: comunes
Tags:       block-patterns, full-site-editing, ... (add any relevant tags)
*/

:root {
	--rosado1: #E9004B;
	--morado1: #211651;
	--morado2: #2C32A3;
	--amarillo: #FEA500;
	--anaranjado: #E96A3E;
}

h1, h2, h3, h4, h5, h6,
h2.guten-post-title,
h2.guten-post-title a,
h3.guten-post-title,
.guten-postblock h3.guten-post-title a {
	font-family: 'Fredoka' !important;
}

.guten-postblock h3.guten-post-title a {
	color: var(--morado1) !important;
}

.unbrake {
	word-break: normal !important;
}

#menu-principal .current-menu-item a {
	font-weight: 900 !important;
	text-transform: uppercase !important;
}


/*  Inicio  */




/* =====================================================================
   #carrusel · 
   ===================================================================== */

.carrusel {
	border-radius: 25px;
	overflow: hidden;
}

#carrusel {
	margin-bottom: 60px;
}

#carrusel div div div div div div div div div.n2-ss-slide-backgrounds {
	min-height: 700px;
}

#carrusel .titulo .n2-ss-text {
	font-size: 3rem;
	line-height: 0.75;
}


@media (min-width: 700px) {
	
	#carrusel div div div div div div div div div.n2-ss-slide-backgrounds {
		min-height: 500px !important;
	}
	#carrusel .titulo .n2-ss-text {
		font-size: 6rem;
		line-height: 0.75;
		margin-bottom: 20px;
	}
	
	#carrusel .contenedor {
		margin-left: 85px;
	}
}


/* =====================================================================
   #programas · 4 vertical episode cards per row
   ===================================================================== */

#programas {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: stretch;
  margin: 0;
  padding: 0;
}

/* ---------- Card ---------------------------------------------------- */
#programas .episodio {
  position: relative;
  isolation: isolate;              /* keeps the ::before scrim inside the card */
  flex: 0 0 calc(25% - 1.125rem);  /* 4 per row: 4 × 25% − 3 gaps */
  max-width: calc(25% - 1.125rem);
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;       /* text sticks to the bottom */
  overflow: hidden;
  border-radius: 14px;
  background-color: #1b1b1f;
  background-size: cover !important;
  background-position: center;
  background-repeat: no-repeat !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  transition: transform .25s ease, box-shadow .25s ease;
  font-size: 0;                    /* hides the stray " – " text node */
}

/* hide the broken <img source="..."> */
#programas .episodio > img { display: none; }

/* gradient scrim so the text stays readable over any photo */
#programas .episodio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;                     /* above the bg image, below the text */
  background: linear-gradient(
    to top,
	  rgba(0, 0, 0, .999) 0%, 
	  rgba(0, 0, 0, .78) 20%, 
	  rgba(0, 0, 0, .30) 30%, 
	  rgba(0, 0, 0, 0) 50%
  );
  transition: opacity .25s ease;
}

/* hover / keyboard focus */
#programas .episodio:hover,
#programas .episodio:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}
#programas .episodio:hover::before,
#programas .episodio:focus-within::before { opacity: .88; }

/* ---------- Text block ---------------------------------------------- */
#programas .metadata {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.25rem 1.15rem;
  font-size: 1rem;                 /* undo the font-size:0 above */
}

/* your markup puts the real description in the <p> AFTER .descripcion,
   so style every paragraph and hide the empty ones */
#programas .metadata p {
  margin: 0;
  color: rgba(255, 255, 255, .85);
  font-size: .875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* kills <p class="descripcion"></p> and the trailing empty <p></p> */
#programas .metadata p:empty { display: none; }

/* ---------- Title ---------------------------------------------------- */
#programas .titulo {
  color: #fff;
  font-size: 1.6625rem;
  font-weight: 700;
  line-height: 1.32;
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}

/* makes the WHOLE card clickable — delete this block if you don't want it */
#programas .titulo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

#programas .episodio:hover .titulo { color: #ffd166; }

#programas .titulo:focus-visible {
  outline: 2px solid #ffd166;
  outline-offset: 3px;
}

/* ---------- Responsive ----------------------------------------------- */
@media (max-width: 1200px) {
  #programas .episodio {
    flex: 0 0 calc(33.3333% - 1rem);
    max-width: calc(33.3333% - 1rem);
  }
}

@media (max-width: 900px) {
  #programas .episodio {
    flex: 0 0 calc(50% - .75rem);
    max-width: calc(50% - .75rem);
  }
}

@media (max-width: 560px) {
  #programas .episodio {
    flex: 0 0 100%;
    max-width: 100%;
    min-height: 280px;
  }
}

/* ############################################################### */
/* ########################  Destacado 1   ####################### */
/* ############################################################### */


/* Estilos para el contenedor principal */
#destado1 {
  width: 100%;
  margin: 2rem auto;
  font-family: 'Fredoka' !important;
  box-sizing: border-box;
}

/* Tarjeta de la publicación */
#destado1 .publicacion {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 80vh;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover !important;
  background-position: top center !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto hover suave al pasar el cursor */
#destado1 .publicacion:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Superposición de degradado sobre la imagen de fondo */
#destado1 .publicacion::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.6) 50%,
    rgba(15, 23, 42, 0.1) 100%
  );
  z-index: 1;
}

/* Contenedor de la metadato / textos */
#destado1 .metadata {
	max-width: 90%;
	position: relative;
	z-index: 2;
	padding: 0 2.5rem;
	color: #ffffff;
}

#destado1 .metadata span a.categoria {
	font-size: 25px;
	color: white;
}

/* Título de la noticia */
#destado1 .metadata h2 {
	margin: 0 0 1rem 0;
	font-family: 'Fredoka' !important;
	font-size: 7em;
	font-weight: 800;
	line-height: .8;
	/*letter-spacing: -0.02em;*/
}

#destado1 .metadata h2 a.titulo {
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  transition: color 0.2s ease;
}

#destado1 .metadata h2 a.titulo:hover {
  color: #38bdf8; /* Accent color sutil */
}

/* Descripción de la noticia */
#destado1 .metadata .descripcion,
#destado1 .metadata p {
  margin: 0;
  font-size: 1.125rem;
	font-style: italic;
  line-height: 1.1;
  color: #cbd5e1;
  max-width: 900px;
}

/* Ocultar elementos sobrantes o marcas de texto sueltas dentro del HTML */
#destado1 .publicacion > img,
#destado1 .publicacion {
  color: transparent; /* Oculta texto suelto después de la metadata si lo hay */
}

#destado1 .metadata * {
  color: initial; /* Restaura el color normal dentro de metadata */
}

/* Responsividad para pantallas móviles */
@media (max-width: 768px) {
  #destado1 .publicacion {
    min-height: 380px;
  }

  #destado1 .metadata {
    padding: 1.5rem;
  }

  #destado1 .metadata h2 {
    font-size: 1.75rem;
  }

  #destado1 .metadata p {
    font-size: 0.975rem;
  }
}

@media (min-width: 700px) {
	#destado1 .metadata {
		max-width: 40%;
		position: relative;
		z-index: 2;
		padding: 0 2.5rem;
		color: #ffffff;
	}
	
	/* Título de la noticia */
	#destado1 .metadata h2 {
		margin: 0 0 1rem 0;
		font-family: 'Fredoka' !important;
		font-size: 4.5em;
		font-weight: 800;
		line-height: .8;
		/*letter-spacing: -0.02em;*/
	}
}



/* ############################################################### */
/* ########################  Destacado 2   ####################### */
/* ############################################################### */


/* Estilos para el contenedor principal */
#destado2 {
  width: 100%;
  margin: 2rem auto 6rem;
  font-family: 'Fredoka' !important;
  box-sizing: border-box;
}

/* Tarjeta de la publicación */
#destado2 .publicacion {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 45vh;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto hover suave al pasar el cursor */
#destado2 .publicacion:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Superposición de degradado sobre la imagen de fondo para dar legibilidad */
#destado2 .publicacion::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95) 0%,
    rgba(15, 23, 42, 0.6) 50%,
    rgba(15, 23, 42, 0.1) 100%
  );
  z-index: 1;
}

/* Contenedor de la metadato / textos */
#destado2 .metadata {
	max-width: 70%;
	position: relative;
	z-index: 2;
	padding: 0 2.5rem;
	color: #ffffff;
}

/* Título de la noticia */
#destado2 .metadata h2 {
	margin: 0 0 1rem 0;
	font-family: 'Fredoka' !important;
	font-size: 3.5em;
	font-weight: 800;
	line-height: .8;
	letter-spacing: -0.02em;
}

#destado2 .metadata h2 a.titulo {
  color: #ffffff;
  text-decoration: none;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  transition: color 0.2s ease;
}

#destado2 .metadata h2 a.titulo:hover {
  color: #38bdf8; /* Accent color sutil */
}

/* Descripción de la noticia */
#destado2 .metadata .descripcion,
#destado2 .metadata p {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 900px;
}

/* Ocultar elementos sobrantes o marcas de texto sueltas dentro del HTML */
#destado2 .publicacion > img,
#destado2 .publicacion {
  color: transparent; /* Oculta texto suelto después de la metadata si lo hay */
}

#destado2 .metadata * {
  color: initial; /* Restaura el color normal dentro de metadata */
}

/* Responsividad para pantallas móviles */
@media (max-width: 768px) {
	#destado2 .publicacion {
		min-height: 350px;
	}

	#destado2 .metadata {
		max-width: 90%;
		padding: 1.5rem;
	}

	#destado2 .metadata h2 {
		font-size: 2.25rem;
	}

	#destado2 .metadata p {
		font-size: 0.975rem;
	}
}

