/*
Theme Name: BroadNews Child
Theme URI: https://cuyovision.com/
Template: broadnews
Author: Cuyovisión
Description: Child theme de BroadNews para Cuyovisión. Todas las personalizaciones de diseño y funcionalidad del sitio viven acá, nunca en el tema padre.
Version: 1.0.0
Text Domain: broadnews-child
*/

/* =========================================================
 * BANNERS - se adaptan según el formato detectado de cada imagen
 * ========================================================= */

.cv-banners-group {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 16px;
	margin: 20px 0;
}

.cv-banner {
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 100%;
}

.cv-banner img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Horizontal (leaderboard tipo 900x90, 970x90): ocupa el ancho del bloque */
.cv-banner--horizontal {
	width: 100%;
}
.cv-banner--horizontal img {
	width: 100%;
	max-width: 970px;
	margin: 0 auto;
}

/* Cuadrado / rectángulo medio (tipo 300x250): no se estira, se centra */
.cv-banner--cuadrado img {
	max-width: 336px;
}

/* Vertical (skyscraper tipo 160x600): se limita en ancho para no romper columnas */
.cv-banner--vertical img {
	max-width: 300px;
}

/* Banner móvil específico: oculto en escritorio, visible solo en pantallas chicas */
.cv-banner--mobile-only {
	display: none;
}

@media (max-width: 782px) {
	.cv-banner--mobile-only {
		display: flex;
		width: 100%;
	}
	.cv-banner--vertical img,
	.cv-banner--cuadrado img {
		max-width: 100%;
	}
}

/* =========================================================
 * PORTADA EDITORIAL
 * ========================================================= */

.cv-homepage {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px;
}

.cv-section {
	margin: 36px 0;
}

.cv-section-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	border-bottom: 3px solid #1a1a1a;
	padding-bottom: 8px;
	margin-bottom: 18px;
}

.cv-section-title {
	font-size: 22px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin: 0;
}

.cv-section-more {
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
}

.cv-section-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* --- Tarjeta genérica --- */

.cv-card {
	display: flex;
	flex-direction: column;
}

.cv-card-image-link {
	display: block;
}

.cv-card-image {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #e5e5e5;
	border-radius: 4px;
}

.cv-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cv-card-image--empty {
	background: linear-gradient(135deg, #e5e5e5 25%, #ededed 25%, #ededed 50%, #e5e5e5 50%, #e5e5e5 75%, #ededed 75%, #ededed 100%);
	background-size: 16px 16px;
}

.cv-card-body {
	padding-top: 10px;
}

.cv-card-cat {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #b3121a;
	margin-bottom: 4px;
}

.cv-card-title {
	margin: 0;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 700;
}

.cv-card-title a {
	color: #1a1a1a;
	text-decoration: none;
}

.cv-card-title a:hover {
	color: #b3121a;
}

.cv-card-excerpt {
	font-size: 14px;
	color: #555;
	line-height: 1.5;
	margin-top: 8px;
}

/* --- Hero: noticia principal + secundarias --- */

.cv-hero {
	margin-top: 20px;
}

.cv-hero-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 28px;
}

.cv-hero-main .cv-card-image {
	aspect-ratio: 16 / 9;
}

.cv-hero-main .cv-card-title {
	font-size: 30px;
	line-height: 1.2;
}

.cv-hero-secondary {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.cv-hero-secondary .cv-card {
	flex-direction: row;
	gap: 12px;
}

.cv-hero-secondary .cv-card-image-link {
	flex: 0 0 120px;
}

.cv-hero-secondary .cv-card-image {
	aspect-ratio: 1 / 1;
}

.cv-hero-secondary .cv-card-body {
	padding-top: 0;
}

.cv-hero-secondary .cv-card-title {
	font-size: 15px;
}

/* --- Video --- */

.cv-video-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.cv-video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: 4px;
}

.cv-video-placeholder {
	display: block;
	text-align: center;
	padding: 40px 20px;
	background: #1a1a1a;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-radius: 4px;
}

/* --- Responsive --- */

@media (max-width: 1024px) {
	.cv-section-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 782px) {
	.cv-hero-grid {
		grid-template-columns: 1fr;
	}
	.cv-hero-main .cv-card-title {
		font-size: 24px;
	}
	.cv-section-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.cv-section-grid {
		grid-template-columns: 1fr;
	}
	.cv-hero-secondary .cv-card {
		flex-direction: row;
	}
}
