/*
Theme Name: Radio Mega (ColorMag)
Template: colormag
Description: Tema hijo de prueba para Radio Mega Entre Ríos sobre ColorMag: portada tipo portal, banners del gobierno, colores del logo y textos en español.
Version: 0.2.7
Text Domain: radiomega-colormag
*/

/* ---------- Cabecera ---------- */
/* Foto de la costanera detrás del logo y los banners */
.cm-desktop-row .cm-header-main-row,
.cm-mobile-row .cm-header-main-row {
	background:
		linear-gradient(90deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.55) 22%, rgba(255,255,255,0) 42%),
		#fff url(assets/header-ciudad.jpg) center 60% / cover no-repeat;
}
.cm-header-main-row .cm-main-row { padding-top: 14px; padding-bottom: 14px; }

/* Logo grande, sin el nombre repetido en texto */
.cm-site-branding img.custom-logo { width: 300px; max-width: 100%; height: auto; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.cm-site-info { display: none; }

/* Banners del gobierno a la derecha del logo, en columna, como hoy */
.cm-header-right-col .widget { margin: 0; padding: 0; }
.cm-header-right-col .rm-banners { display: flex; flex-direction: column; align-items: flex-end; width: 620px; max-width: 100%; }
.cm-header-right-col .rm-banners a { display: block; width: 100%; line-height: 0; }
.cm-header-right-col .rm-banners a.rm-banner-chico { width: 76%; }
.cm-header-right-col .rm-banners img { display: block; width: 100%; height: auto; }

/* Banners cargados como bloques de imagen (Apariencia > Widgets): en columna, como antes */
.cm-header-right-col:has(> .widget_block) { flex-direction: column; align-items: flex-end; justify-content: center; flex: 0 1 620px; }
.cm-header-left-col { flex: 0 0 auto; }
.cm-header-right-col > .widget_block { width: 620px; max-width: 100%; margin: 0; line-height: 0; }
.cm-header-right-col > .widget_block:not(:has(img)) { display: none; }
.cm-header-right-col > .widget_block figure, .cm-header-right-col > .widget_block p { margin: 0; }
.cm-header-right-col > .widget_block a { display: block; line-height: 0; }
.cm-header-right-col > .widget_block img { display: block; width: 100%; height: auto; }
.cm-header-right-col > .widget_block:has(img[src*="728"]) { width: 472px; }

/* Celular: logo arriba y banners debajo, a todo el ancho */
.cm-mobile-row .cm-header-right-col:has(> .widget_block) { flex: 1 1 auto; align-items: stretch; }
.cm-mobile-row .cm-header-right-col > .widget_block, .cm-mobile-row .cm-header-right-col > .widget_block:has(img[src*="728"]) { width: 100%; }
.cm-mobile-row .cm-main-row { flex-direction: column; gap: 10px; }
.cm-mobile-row .cm-header-left-col:empty { display: none; }
.cm-mobile-row .cm-header-right-col { width: 100%; }
.cm-mobile-row .cm-header-right-col .rm-banners { width: 100%; }
.cm-mobile-row .cm-header-right-col .rm-banners a.rm-banner-chico { width: 100%; }
.cm-mobile-row .cm-site-branding img.custom-logo { width: 210px; }

/* Fecha y reloj */
.date-in-header { display: inline-flex; align-items: center; gap: 8px; }
.date-in-header .rm-reloj { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Barra lateral ---------- */
#cm-secondary .widget_media_image img,
.cm-secondary .widget_media_image img { display: block; margin: 0 auto; }

/* ---------- Botón de tres líneas: todas las secciones ---------- */
.rm-categorias { display: flex; align-items: center; }
.rm-categorias-boton {
	width: 44px; height: 44px; margin-right: 6px; padding: 0; border: 0; border-radius: 4px;
	background: transparent; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.rm-categorias-boton:hover, .rm-categorias-boton[aria-expanded="true"] { background: rgba(255,255,255,.12); }
.rm-categorias-boton:focus-visible, .rm-categorias-cerrar:focus-visible { outline: 3px solid #FCA80C; outline-offset: 2px; }
.rm-categorias-lineas { display: flex; flex-direction: column; justify-content: space-between; width: 22px; height: 16px; }
.rm-categorias-lineas span { display: block; height: 2px; border-radius: 2px; background: currentColor; }
.cm-mobile-row .rm-categorias-boton { color: #fff; }

.rm-categorias-fondo { position: fixed; inset: 0; z-index: 99998; background: rgba(10,20,25,.45); }
.rm-categorias-panel {
	position: fixed; top: 0; left: 0; bottom: 0; z-index: 99999;
	width: 320px; max-width: 86vw; overflow-y: auto; background: #fff; color: #14232A;
	box-shadow: 4px 0 24px rgba(0,0,0,.2);
	transform: translateX(-100%); transition: transform .2s ease;
	padding: 0 18px 24px;
}
.rm-categorias-panel.is-open { transform: translateX(0); }
.admin-bar .rm-categorias-panel { top: 32px; }
@media (prefers-reduced-motion: reduce) { .rm-categorias-panel { transition: none; } }

.rm-categorias-cabecera { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 3px solid #00707E; margin-bottom: 14px; }
.rm-categorias-titulo { font-size: 20px; font-weight: 700; }
.rm-categorias-cerrar { width: 44px; height: 44px; border: 0; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; color: #14232A; }

.rm-categorias-buscar { display: flex; gap: 6px; margin-bottom: 14px; }
.rm-categorias-buscar input { flex: 1; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #c9d6da; border-radius: 4px; }
.rm-categorias-buscar button { height: 40px; padding: 0 14px; border: 0; border-radius: 4px; background: #00707E; color: #fff; font-weight: 600; cursor: pointer; }

.rm-categorias-lista { list-style: none; margin: 0; padding: 0; }
.rm-categorias-lista li { margin: 0; border-bottom: 1px solid #e4e9eb; }
.rm-categorias-lista a { display: block; padding: 10px 4px; color: #14232A; font-weight: 600; text-decoration: none; text-transform: uppercase; font-size: 14px; }
.rm-categorias-lista a:hover { color: #00707E; }
.rm-categorias-lista .children { list-style: none; padding-left: 14px; }
body.rm-categorias-abierto { overflow: hidden; }

/* ---------- Compartir al final de la nota ---------- */
.rm-compartir { margin: 28px 0 8px; padding: 18px 20px; background: #EEF3F4; border-left: 5px solid #00707E; border-radius: 4px; }
.rm-compartir-titulo { margin: 0 0 12px; font-size: 18px; font-weight: 700; color: #14232A; }
.rm-compartir-botones { display: flex; flex-wrap: wrap; gap: 10px; }
.rm-compartir-boton {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border: 0; border-radius: 6px;
	font-size: 16px; font-weight: 700; color: #fff !important; text-decoration: none !important; cursor: pointer;
}
.rm-compartir-boton i { font-size: 20px; }
.rm-compartir-boton:hover { filter: brightness(.92); }
.rm-compartir-boton:focus-visible { outline: 3px solid #FCA80C; outline-offset: 2px; }
.rm-wa { background: #1DA851; flex: 1 1 220px; font-size: 18px; }
.rm-fb { background: #1877F2; }
.rm-x { background: #14171A; }
.rm-copiar { background: #5A6B72; }
@media (max-width: 600px) {
	.rm-compartir-boton { flex: 1 1 calc(50% - 10px); }
	.rm-wa { flex-basis: 100%; }
}

/* ---------- Notas relacionadas ---------- */
.rm-relacionadas { margin: 30px 0; }
.rm-relacionadas-titulo { margin: 0 0 16px; border-bottom: 2px solid #00707E; font-size: 18px; line-height: 1; }
.rm-relacionadas-titulo span { display: inline-block; padding: 8px 12px; background: #00707E; color: #fff; }
.rm-relacionadas-grilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rm-relacionada-foto { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; background: #e4e9eb; }
.rm-relacionada-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-relacionada-titulo { margin: 8px 0 4px; font-size: 15px; line-height: 1.3; }
.rm-relacionada-titulo a { color: #14232A; text-decoration: none; }
.rm-relacionada-titulo a:hover { color: #00707E; }
.rm-relacionada-fecha { font-size: 12px; color: #5A6B72; }
@media (max-width: 768px) { .rm-relacionadas-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .rm-relacionadas-grilla { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pie de página ---------- */
.rm-contacto, .rm-secciones-pie { list-style: none; margin: 0; padding: 0; }
.rm-contacto li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rm-contacto i { width: 18px; text-align: center; color: #18B4B4; }
.rm-secciones-pie { columns: 2; column-gap: 20px; }
.rm-secciones-pie li { margin-bottom: 8px; break-inside: avoid; }
.rm-envianos {
	display: inline-flex; align-items: center; gap: 8px; margin-top: 6px;
	min-height: 44px; padding: 0 18px; border-radius: 6px;
	background: #1DA851; color: #fff !important; font-weight: 700; text-decoration: none !important;
}
.rm-envianos:hover { filter: brightness(.92); }
.rm-copyright { font-size: 14px; }
