/*
Theme Name: aguaracuatro
Theme URI: https://alertatemprana.local
Author: Alerta Temprana
Author URI: https://alertatemprana.local
Description: Tema custom para Alerta Temprana.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: aguaracuatro
*/

/* ==========================================================================
   Variables y reset
   ========================================================================== */
:root {
	--container-width: 1216px;
	--gutter: 24px;

	--color-text: #17201a;
	--color-text-muted: #5b665d;
	--color-white: #ffffff;

	--color-green-950: #0d1710;
	--color-green-900: #16241a;
	--color-green-700: #3c5142;
	--color-green-500: #6c8570;

	--color-warning: #e8a33d;
	--color-accent-green: #1a7a44;
	--color-accent-green-soft: #e6f6ec;
	--color-bg-soft: #f2f5f2;
	--color-border-soft: #e7ebe8;

	--radius-full: 999px;
	--radius-lg: 24px;
	--radius-md: 20px;

	--font-sans: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

	--shadow-header: 0 12px 30px rgba(13, 23, 16, 0.16);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--font-sans);
	color: var(--color-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	display: block;
}

a {
	color: inherit;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: relative;
	z-index: 20;
	padding: 20px;
}

/* En la portada y en las páginas internas el header flota, transparente, sobre el hero */
.home .site-header,
.front-page .site-header,
.has-hero .site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

/* La admin bar de WordPress es fixed y no corre el contenido absoluto: la evitamos manualmente */
body.admin-bar.home .site-header,
body.admin-bar.front-page .site-header,
body.admin-bar.has-hero .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar.home .site-header,
	body.admin-bar.front-page .site-header,
	body.admin-bar.has-hero .site-header {
		top: 46px;
	}
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-header);
	padding: 10px 28px 10px 28px;
}

.header-logos {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-shrink: 0;
	margin-right: auto;
}

.site-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}

.site-logo img,
.site-logo .custom-logo,
.header-logos__eco {
	max-height: 50px;
	height: auto;
	width: auto;
}

.main-navigation .nav-menu {
	display: flex;
	align-items: center;
	gap: 36px;
}

.main-navigation .nav-menu > li {
	position: relative;
}

.main-navigation .nav-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	color: var(--color-text);
	padding: 12px 4px;
}

.main-navigation .menu-item-has-children > a::after {
	content: '';
	width: 7px;
	height: 7px;
	border-right: 1.5px solid var(--color-text-muted);
	border-bottom: 1.5px solid var(--color-text-muted);
	transform: rotate(45deg);
	margin-top: -3px;
}

.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--color-white);
	border-radius: 14px;
	box-shadow: var(--shadow-header);
	padding: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.main-navigation .menu-item-has-children:hover .sub-menu,
.main-navigation .menu-item-has-children:focus-within .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.main-navigation .sub-menu a {
	display: block;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 0.9rem;
	text-decoration: none;
	color: var(--color-text);
}

.main-navigation .sub-menu a:hover {
	background: #f2f4f2;
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 4px;
	width: 40px;
	height: 40px;
	border-radius: var(--radius-full);
	border: none;
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

.nav-close {
	display: none;
}

.nav-overlay {
	display: none;
}

.menu-toggle__bar {
	width: 20px;
	height: 2px;
	background: var(--color-text);
	border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	color: var(--color-white);
	overflow: hidden;
}

.hero::before,
.hero::after {
	content: '';
	position: absolute;
	inset: 0;
}

.hero::before {
	z-index: -2;
	background-image: url('assets/images/hero-bg.jpg');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	animation: hero-bg-zoom 26s ease-in-out infinite alternate;
	will-change: transform;
}

.hero::after {
	z-index: -1;
	background-image: linear-gradient(180deg, rgba(11, 46, 28, 0.55) 0%, rgba(11, 46, 28, 0.97) 100%);
}

@keyframes hero-bg-zoom {
	0% {
		transform: scale(1);
	}
	100% {
		transform: scale(1.1);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero::before {
		animation: none;
	}
}

.hero__content {
	padding-top: 170px;
	padding-bottom: 96px;
}

.hero__content--page {
	padding-top: 160px;
	padding-bottom: 40px;
}

.hero__title--page {
	max-width: none;
	font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
}

.hero__title {
	font-size: clamp(2rem, 1.2rem + 3.2vw, 3.25rem);
	line-height: 1.18;
	font-weight: 700;
	max-width: 700px;
	margin: 0 0 24px;
}

.hero__title strong {
	font-weight: 700;
}

.hero__title em {
	font-style: italic;
	font-weight: 400;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 26px;
	border-radius: var(--radius-full);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
	background: var(--color-white);
	color: var(--color-text);
}

.btn--primary:hover {
	transform: translateY(-2px);
}

.btn--outline {
	background: transparent;
	color: var(--color-white);
	border-color: rgba(255, 255, 255, 0.35);
}

.btn--outline:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, #1c7d44 0%, #125c30 100%);
	color: var(--color-white);
	padding-top: 32px;
}

.footer-watermark {
	position: absolute;
	z-index: 0;
	bottom: -12%;
	right: -6%;
	width: 46%;
	min-width: 420px;
	max-width: 760px;
	height: auto;
	pointer-events: none;
	user-select: none;
}

.site-footer > .container {
	position: relative;
	z-index: 1;
}

.footer-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	padding-bottom: 32px;
}

.footer-brand {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 24px;
}

.footer-brand img {
	height: 29px;
	width: auto;
}

.footer-social {
	display: flex;
	align-items: center;
	gap: 18px;
}

.footer-social a {
	display: inline-flex;
	color: var(--color-white);
}

.footer-social svg {
	width: 20px;
	height: 20px;
}

.footer-social a:hover {
	opacity: 0.75;
}

.footer-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	background: var(--color-white);
	color: var(--color-text);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-header);
	padding: 28px 40px;
}

.footer-contact {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 32px;
}

.footer-contact li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.9rem;
	font-weight: 500;
}

.footer-contact a {
	text-decoration: none;
	color: var(--color-text);
}

.footer-contact a:hover {
	text-decoration: underline;
}

.footer-contact__icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--color-text);
}

.footer-partner {
	display: flex;
	align-items: center;
	gap: 12px;
}

.footer-partner img {
	height: 23px;
	width: auto;
}

.footer-legal {
	padding: 24px 0;
	text-align: center;
}

.footer-legal p {
	margin: 0;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.75);
}

.footer-legal a {
	color: var(--color-white);
	font-weight: 700;
	text-decoration: none;
	margin-inline-start: 8px;
}

.footer-legal a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   Segmentos de la portada — comunes
   ========================================================================== */
.segmento {
	padding-block: 88px;
}

.segmento-pronostico {
	background: var(--color-bg-soft);
}

#smn {
	background: var(--color-border-soft);
}

#rios-embalses {
	background: var(--color-bg-soft);
}

#mapa-emergencia {
	background: var(--color-white);
}

#focos-calor {
	background: var(--color-accent-green-soft);
}

.embed-frame {
	width: 100%;
	background: #17251e;
	padding: 0 30px;
	border-radius: var(--radius-md);
}

.embed-frame iframe {
	display: block;
	width: 100%;
	height: 550px;
	border: 0;
	border-radius: var(--radius-lg);
}

.segmento__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

.segmento__head h2 {
	font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
	font-weight: 800;
	margin: 0;
}

.segmento__desc {
	color: var(--color-text-muted);
	max-width: 640px;
	margin: 0 0 40px;
	line-height: 1.6;
}

.badge-live {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--color-accent-green-soft);
	color: var(--color-accent-green);
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 7px 16px;
	border-radius: var(--radius-full);
}

.badge-live__dot {
	position: relative;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--color-accent-green);
}

.badge-live__dot::before {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: var(--color-accent-green);
	animation: badge-live-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes badge-live-ping {
	0% {
		transform: scale(1);
		opacity: 0.6;
	}
	100% {
		transform: scale(2.4);
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.badge-live__dot::before,
	.tag-live__dot::before {
		animation: none;
		display: none;
	}
}

/* ==========================================================================
   Segmento: satelite-radar
   ========================================================================== */
.satelite-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.satelite-card {
	background: var(--color-white);
	border: 1px solid var(--color-border-soft);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 24px rgba(13, 23, 16, 0.06);
	overflow: hidden;
}

.satelite-card__frame {
	position: relative;
	aspect-ratio: 4 / 5;
	background: var(--color-bg-soft);
}

.satelite-card__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.satelite-card__caption {
	margin: 0;
	padding: 16px 20px;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--color-text);
}

/* ==========================================================================
   Segmento: monitoreo-satelital (imagen GOES + radar Windy)
   ========================================================================== */
.monitoreo-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.monitoreo-card {
	background: var(--color-white);
	border: 1px solid var(--color-border-soft);
	border-radius: var(--radius-md);
	box-shadow: 0 4px 24px rgba(13, 23, 16, 0.06);
	overflow: hidden;
}

.monitoreo-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--color-bg-soft);
	overflow: hidden;
}

.monitoreo-card__thumb {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.monitoreo-card__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.tag-live {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(11, 23, 16, 0.65);
	color: var(--color-white);
	font-weight: 700;
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: var(--radius-full);
}

.tag-live__dot {
	position: relative;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ff5c5c;
}

.tag-live__dot::before {
	content: '';
	position: absolute;
	inset: -3px;
	border-radius: 50%;
	background: #ff5c5c;
	animation: badge-live-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.btn-expand {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	border: none;
	background: rgba(255, 255, 255, 0.9);
	color: var(--color-text);
	cursor: pointer;
}

.btn-expand svg {
	width: 16px;
	height: 16px;
}

.monitoreo-card__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	margin: 0;
	padding: 28px 16px 12px;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--color-white);
	background: linear-gradient(180deg, rgba(11, 23, 16, 0) 0%, rgba(11, 23, 16, 0.7) 100%);
	pointer-events: none;
}

.monitoreo-card__footer {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
}

.monitoreo-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	background: var(--color-accent-green-soft);
	color: var(--color-accent-green);
	flex-shrink: 0;
}

.monitoreo-card__icon svg {
	width: 18px;
	height: 18px;
}

.monitoreo-card__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.monitoreo-card__text strong {
	font-size: 0.9rem;
	color: var(--color-text);
}

.monitoreo-card__text span {
	font-size: 0.8rem;
	color: var(--color-text-muted);
}

.monitoreo-card__time {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--color-text-muted);
	white-space: nowrap;
}

/* ==========================================================================
   Modal de zoom (imagen satelital)
   ========================================================================== */
.zoom-modal {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.zoom-modal[hidden] {
	display: none;
}

.zoom-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 23, 16, 0.85);
}

.zoom-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 960px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	background: var(--color-green-950);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-header);
}

.zoom-modal__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: rgba(255, 255, 255, 0.06);
}

.zoom-modal__level {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--color-white);
	min-width: 48px;
}

.zoom-modal__actions {
	display: flex;
	gap: 8px;
}

.zoom-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: var(--radius-full);
	border: none;
	background: rgba(255, 255, 255, 0.1);
	color: var(--color-white);
	cursor: pointer;
}

.zoom-modal__btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.zoom-modal__btn svg {
	width: 16px;
	height: 16px;
}

.zoom-modal__btn--close {
	background: rgba(255, 92, 92, 0.16);
	color: #ff8a8a;
}

.zoom-modal__viewport {
	position: relative;
	flex: 1;
	overflow: hidden;
	cursor: grab;
	background: var(--color-green-950);
}

.zoom-modal__viewport.is-dragging {
	cursor: grabbing;
}

.zoom-modal__image {
	position: absolute;
	top: 50%;
	left: 50%;
	max-width: none;
	transform: translate(-50%, -50%) scale(1);
	transform-origin: center center;
	user-select: none;
	pointer-events: none;
}

.zoom-modal__hint {
	margin: 0;
	padding: 10px 16px;
	text-align: center;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.6);
	background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
	.zoom-modal__hint {
		display: none;
	}
}

/* ==========================================================================
   Segmento: rios-embalses
   ========================================================================== */
.rios-columns {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 24px;
	align-items: start;
}

.rios-column .segmento__head {
	margin-bottom: 20px;
}

.rios-column .segmento__head h2 {
	font-size: 16px;
}

.rios-columns .embed-frame {
	background: none;
	padding: 0;
	border-radius: 0;
}

.rios-column--1 .embed-frame iframe {
	height: 260px;
}

.rios-column--2 .embed-frame iframe {
	height: 260px;
	background: #203229;
}

/* ==========================================================================
   Segmento: mapa-emergencia
   ========================================================================== */
#mapa-emergencia {
	background: var(--color-bg-soft);
}

.mapa-emergencia-columns {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	align-items: start;
}

#mapa-emergencia .segmento__head a {
	color: inherit;
	text-decoration: none;
}

#mapa-emergencia .segmento__head a:hover {
	color: var(--color-accent-green);
}

.mapa-emergencia-image {
	display: block;
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.mapa-emergencia-image img {
	display: block;
	width: 100%;
	height: auto;
}

.mapa-emergencia-texto p {
	color: var(--color-text-muted);
	line-height: 1.7;
	margin: 0 0 20px;
}

.mapa-emergencia-texto p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Segmento: focos-calor
   ========================================================================== */
.focos-calor-columns {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 40px;
	align-items: start;
}

.focos-calor-texto p {
	color: var(--color-text-muted);
	line-height: 1.7;
	margin: 0 0 20px;
}

.focos-calor-texto p:last-child {
	margin-bottom: 0;
}

.focos-calor-fuente {
	font-size: 0.8rem;
	color: var(--color-text-muted);
}

.focos-calor-media iframe {
	display: block;
	width: 100%;
	height: 540px;
	border: 0;
	border-radius: var(--radius-lg);
}

/* ==========================================================================
   Página interna (page.php)
   ========================================================================== */
.page-content {
	padding-block: 56px;
	max-width: 860px;
	color: var(--color-text);
	line-height: 1.75;
}

.page-content img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--radius-lg);
	margin: 0 0 32px;
}

.page-content p {
	margin: 0 0 24px;
}

.page-content h2 {
	font-size: 1.6rem;
	font-weight: 800;
	margin: 48px 0 24px;
}

.page-content h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 32px 0 16px;
}

.page-content ul,
.page-content ol {
	margin: 0 0 24px;
	padding-left: 24px;
}

.page-content li {
	margin-bottom: 8px;
}

.page-content a {
	color: var(--color-accent-green);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.page-content hr {
	border: none;
	border-top: 3px solid var(--color-accent-green);
	margin: 40px 0;
	width: 120px;
}

/* ==========================================================================
   Archivos de contenido (Pronósticos, Informes especiales): grilla de
   tarjetas y vista de detalle, compartido entre CPTs.
   ========================================================================== */
.content-archive {
	padding-block: 56px;
}

.content-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px;
}

/* Archivo de Pronósticos: grilla fija de 3 columnas, tarjetas con imagen 4:5 */
.content-archive--pronosticos .content-grid {
	grid-template-columns: repeat(3, 1fr);
}

.content-archive--pronosticos .content-card__image {
	aspect-ratio: 4 / 5;
}

.content-card {
	background: var(--color-white);
	border: 1px solid var(--color-border-soft);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.content-card:hover {
	box-shadow: var(--shadow-header);
	transform: translateY(-2px);
}

.content-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.content-card__image {
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.content-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.content-card__body {
	padding: 20px 24px 24px;
}

.content-card__date {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-accent-green);
	margin-bottom: 8px;
}

.content-card__badge {
	display: inline-block;
	background: var(--color-accent-green-soft);
	color: var(--color-accent-green);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: var(--radius-full);
	margin-bottom: 10px;
}

.content-card__title {
	font-size: 1.1rem;
	font-weight: 800;
	margin: 0 0 8px;
}

.content-card__excerpt {
	margin: 0;
	color: var(--color-text-muted);
	line-height: 1.6;
	font-size: 0.9rem;
}

.content-empty {
	color: var(--color-text-muted);
	padding-block: 40px;
}

.content-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
}

.content-filters a {
	display: inline-flex;
	align-items: center;
	background: var(--color-white);
	border: 1px solid var(--color-border-soft);
	border-radius: var(--radius-full);
	padding: 8px 18px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
}

.content-filters a:hover {
	border-color: var(--color-accent-green);
	color: var(--color-accent-green);
}

.content-filters a.is-active {
	background: var(--color-accent-green);
	border-color: var(--color-accent-green);
	color: var(--color-white);
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: var(--radius-full);
	border: 1px solid var(--color-border-soft);
	color: var(--color-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
}

.pagination .page-numbers.current {
	background: var(--color-accent-green);
	border-color: var(--color-accent-green);
	color: var(--color-white);
}

.pagination .page-numbers:hover:not(.current) {
	border-color: var(--color-accent-green);
	color: var(--color-accent-green);
}

.content-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: var(--color-accent-green);
}

.content-single__date {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-accent-green);
	margin: 0 0 24px;
}

.content-single__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.content-single__image {
	border-radius: var(--radius-lg);
	overflow: hidden;
	margin-bottom: 32px;
}

.content-single__image img {
	width: 100%;
	height: auto;
	display: block;
}

/* ==========================================================================
   Popup de alerta
   ========================================================================== */
.popup-alerta {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.popup-alerta[hidden] {
	display: none;
}

.popup-alerta__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 23, 16, 0.72);
}

.popup-alerta__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	background: var(--color-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-header);
}

.popup-alerta__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	border: none;
	background: var(--color-white);
	color: var(--color-text);
	cursor: pointer;
	box-shadow: var(--shadow-header);
}

.popup-alerta__close svg {
	width: 16px;
	height: 16px;
}

.popup-alerta__image {
	display: block;
	width: 100%;
	max-height: 85vh;
	object-fit: contain;
	cursor: pointer;
}

@media (max-width: 640px) {
	.popup-alerta {
		padding: 16px;
	}

	.popup-alerta__dialog {
		max-height: 80vh;
	}

	.popup-alerta__image {
		max-height: 80vh;
	}
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
	.header-logos__eco-link {
		display: none;
	}

	.main-navigation {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 80%;
		max-width: 340px;
		background: var(--color-white);
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 28px;
		padding: 88px 28px 28px;
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateX(-100%);
		transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
		z-index: 40;
		box-shadow: var(--shadow-header);
	}

	.main-navigation.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateX(0);
	}

	.nav-close {
		position: absolute;
		top: 24px;
		right: 24px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 36px;
		height: 36px;
		border-radius: var(--radius-full);
		border: none;
		background: #f2f4f2;
		color: var(--color-text);
		cursor: pointer;
	}

	.main-navigation .nav-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 24px;
		width: 100%;
	}

	.main-navigation .nav-menu > li {
		width: 100%;
	}

	.main-navigation .nav-menu > li > a {
		font-size: 1.15rem;
		text-align: left;
		padding: 4px 0;
	}

	.main-navigation .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: transparent;
		text-align: left;
		padding: 8px 0 0 12px;
		display: none;
	}

	.main-navigation .sub-menu a {
		padding: 8px 0;
	}

	.menu-item-has-children.is-expanded .sub-menu {
		display: block;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.nav-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(11, 46, 28, 0.5);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s;
		z-index: 35;
	}

	.nav-overlay.is-open {
		opacity: 1;
		visibility: visible;
	}

	.satelite-grid {
		grid-template-columns: 1fr;
	}

	.monitoreo-grid {
		grid-template-columns: 1fr;
	}

	.rios-columns {
		grid-template-columns: 1fr;
	}

	.mapa-emergencia-columns {
		grid-template-columns: 1fr;
	}

	.focos-calor-columns {
		grid-template-columns: 1fr;
	}

	.content-archive--pronosticos .content-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	:root {
		--gutter: 20px;
	}

	.site-header__inner {
		margin-inline: auto;
		padding: 8px 8px 8px 20px;
	}

	.hero__content {
		padding-top: 140px;
		padding-bottom: 64px;
	}

	.hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.btn {
		justify-content: center;
	}

	.footer-bar {
		flex-direction: column;
		align-items: flex-start;
		padding: 24px;
	}

	.footer-contact {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		max-width: 100%;
	}

	.footer-contact li {
		width: 100%;
		max-width: 100%;
	}

	.footer-contact a,
	.footer-contact span {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		min-width: 0;
	}

	.footer-legal p {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.footer-legal a {
		margin-inline-start: 0;
	}

	.segmento {
		padding-block: 56px;
	}

	.segmento__desc {
		margin-bottom: 28px;
	}

	.content-archive--pronosticos .content-grid {
		grid-template-columns: 1fr;
	}

	.embed-frame {
		padding: 0 16px;
	}

	.embed-frame iframe {
		height: 380px;
		overflow-y: scroll;
	}

	#pronostico-semanal iframe {
		height: 530px;
	}

	.rios-column--2 .embed-frame iframe {
		height: 350px;
	}
}
