/* ==========================================================================
   redesign.css — piezas compartidas del rediseño 2026-11
   (panel unificado, encabezados SEO, tramos, tabla horaria, astronomía,
   cercanos, navegación entre días). Se carga después del resto de CSS del plugin.
   ========================================================================== */

/* ── Encabezados ── */
.cw-h1 {
	font-family: var(--ff-head);
	font-weight: 400;
	font-size: 34px;
	line-height: 1.15;
	color: var(--color-text);
	margin: 0;
}

.cw-h2 {
	font-family: var(--ff-head);
	font-weight: 400;
	font-size: 24px;
	line-height: 1.25;
	color: var(--color-text);
	margin: 0 0 16px;
}

.cw-h3 {
	font-family: var(--ff-body);
	font-weight: 600;
	font-size: 17px;
	line-height: 1.3;
	color: var(--color-text);
	margin: 0 0 8px;
}

/* parte larga del encabezado (SEO) en gris, sin peso visual */
.cw-h-soft {
	font-family: var(--ff-body);
	font-size: 0.72em;
	font-weight: 400;
	color: var(--color-text-muted);
}

.cw-lead {
	font-size: 18px;
	line-height: 1.6;
	color: #24384d;
	margin: 8px 0 0;
}

.cw-desc,
.cw-note {
	font-size: 14px;
	line-height: 1.7;
	color: var(--color-text-muted);
	margin: 8px 0 0;
}

/* ── Panel unificado (fondo blanco, bloques separados por línea) ── */
.cw-panel {
	width: 100%;
	max-width: var(--max-width);
	margin: 24px auto 0;
	padding: 0 var(--px);
	box-sizing: border-box;
	font-family: var(--ff-body);
}

.cw-panel > * {
	box-sizing: border-box;
}

.cw-panel__block {
	background: var(--color-white);
	padding: 28px 32px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cw-panel__block:first-child {
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.cw-panel__block:last-child {
	border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.cw-panel__block + .cw-panel__block {
	border-top: 1px solid var(--color-border);
}

.cw-panel__split {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
	gap: 64px;
	align-items: stretch;
}

.cw-panel__chart {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cw-panel__chart .cw-hourly-chart-wrap {
	position: relative;
	flex: 1;
	min-height: 260px;
}

.cw-hourly-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 13px;
	color: var(--color-text-muted);
	margin-bottom: 12px;
}

.cw-hourly-chart-legend .cw-leg-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cw-hourly-chart-legend .cw-leg-sq {
	width: 12px;
	height: 12px;
	border-radius: 3px;
	display: inline-block;
}

.cw-hourly-chart-legend .cw-leg-rain { background: rgba(24, 95, 165, 0.35); }
.cw-hourly-chart-legend .cw-leg-wind { border: 1.5px dashed #8a96a3; }

/* Tramos del día */
.cw-segments {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cw-segment {
	display: grid;
	grid-template-columns: 1fr auto 56px;
	gap: 12px;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--color-border);
}

.cw-segment:last-child { border-bottom: 0; }

.cw-segment.is-peak {
	background: var(--color-primary-bg);
	margin: 0 -12px;
	padding: 12px;
	border-radius: 10px;
}

.cw-segment__name strong { font-weight: 600; }
.cw-segment__name small { margin-left: 6px; font-size: 13px; color: var(--color-text-muted); }
.cw-segment__name em { display: block; font-style: normal; font-size: 14px; color: var(--color-text-muted); }
.cw-segment__temp { font-weight: 600; text-align: right; }
.cw-segment__rain { color: var(--color-temp-min); text-align: right; font-weight: 500; }

/* ── Tabla por horas ── */
.cw-table-scroll {
	overflow-x: auto;
}

.cw-hours-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

.cw-hours-table th,
.cw-hours-table td {
	padding: 8px 10px !important;
	text-align: left;
	vertical-align: middle;
	border: 0 !important;
	background: none !important;
}

.cw-hours-table thead th {
	font-size: 12px;
	font-weight: 500;
	color: var(--color-text-muted);
	text-transform: none;
	letter-spacing: 0;
}

.cw-hours-table tbody tr {
	border-top: 1px solid var(--color-border);
}

.cw-hours-table tbody th {
	font-weight: 600;
	white-space: nowrap;
}

.cw-hours-table .num {
	text-align: right;
}

.cw-hours-table .cwh-state {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #24384d;
}

.cw-hours-table .cwh-state img {
	width: 32px;
	height: 32px;
	flex: none;
}

.cw-hours-table .cwh-temp { font-weight: 600; }
.cw-hours-table .cwh-unit { color: var(--color-text-muted); font-size: 13px; }
.cw-hours-table .cwh-pressure { color: var(--color-text-muted); white-space: nowrap; }

.cw-hours-table .cwh-rain-pill {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 99px;
	background: var(--color-primary-bg);
	color: var(--color-temp-min);
	font-size: 13px;
	font-weight: 600;
}

.cw-hours-table .cwh-no-rain { color: var(--color-text-muted); }

.cwh-wind__in {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	white-space: nowrap;
}

.cwh-arrow {
	display: inline-flex;
	width: 28px;
	height: 28px;
	align-items: center;
	justify-content: center;
	color: var(--color-navy);
}

.cwh-dir {
	width: 36px;
	text-align: left;
	color: var(--color-text-muted);
	font-size: 13px;
}

/* ── Dos columnas: calidad del aire + astronomía ── */
.cw-two {
	width: 100%;
	max-width: var(--max-width);
	margin: 24px auto 0;
	padding: 0 var(--px);
	box-sizing: border-box;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: stretch;
}

.cw-two > .section {
	max-width: none;
	margin: 0;
	padding: 0;
}

.cw-two .section-aqi-inner,
.cw-two .section-astro-inner {
	height: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.cw-two .aqi-grid2 { flex: 1; }

.cw-two .section-aqi-inner h2,
.cw-two .section-astro-inner h2 {
	font-size: 22px;
	margin: 0 0 16px;
}

.cw-astro {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.cw-astro li {
	flex: 1;
	min-height: 52px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--color-border);
}

.cw-astro li:last-child { border-bottom: 0; }

.cw-astro__label {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--color-text-muted);
}

.cw-astro__label svg { color: var(--color-navy); flex: none; }
.cw-astro__value { font-weight: 600; }

/* ── FAQ: preguntas como H3 ── */
.section.faqs h3.question {
	font-family: var(--ff-body);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 6px;
	color: var(--color-text);
}

/* ── Municipios cercanos ── */
.section.related h2 {
	font-family: var(--ff-head);
	font-size: 22px;
	font-weight: 400;
	color: var(--color-text);
	margin: 0 0 16px;
}

/* ── Día anterior / siguiente ── */
.cw-daynav {
	width: 100%;
	max-width: var(--max-width);
	margin: 24px auto 0;
	padding: 16px var(--px) 0;
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	gap: 16px;
	border-top: 1px solid var(--color-border);
	font-family: var(--ff-body);
}

.cw-daynav a {
	display: flex;
	flex-direction: column;
	min-height: 48px;
	justify-content: center;
	text-decoration: none;
	color: var(--color-link);
}

.cw-daynav__next { align-items: flex-end; text-align: right; }
.cw-daynav small { font-size: 13px; color: var(--color-text-muted); }
.cw-daynav span { font-weight: 600; }

/* ── Responsive ── */
@media screen and (max-width: 900px) {
	.cw-panel__split,
	.cw-two {
		grid-template-columns: 1fr;
		gap: 28px;
	}
}

@media screen and (max-width: 600px) {
	.cw-panel,
	.cw-two,
	.cw-daynav {
		padding-left: 12px;
		padding-right: 12px;
	}
	.cw-panel__block {
		padding: 22px 18px;
	}
	.cw-h1 { font-size: 28px; }
	.cw-h2 { font-size: 21px; }
	.cw-lead { font-size: 16px; }
	.cw-hours-table { font-size: 14px; }
	.cw-hours-table .cwh-state span,
	.cw-hours-table .cwh-pressure,
	.cw-hours-table thead th:nth-child(5) { display: none; }
	.cwh-dir { display: none; }
}


/* ==========================================================================
   Ciudad (cweather-days.php)
   ========================================================================== */

/* Pestañas Resumen / Información: a la derecha, subrayadas */
#cweather-days .cw-tab-switcher {
	width: auto;
	max-width: calc(var(--max-width) - 48px);
	margin: 8px auto 12px;
	padding: 0;
	background: transparent;
	border-radius: 0;
	justify-content: flex-end;
	gap: 28px;
	border-bottom: 1px solid var(--color-border);
}

#cweather-days .cw-tab-btn {
	min-height: 44px;
	padding: 0 2px;
	margin-bottom: -1px;
	border-radius: 0;
	border-bottom: 3px solid transparent;
	background: transparent;
	color: var(--color-text-muted);
	font-size: 15px;
	font-weight: 500;
}

#cweather-days .cw-tab-btn.active {
	background: transparent;
	color: var(--color-text);
	font-weight: 700;
	border-bottom-color: var(--color-navy);
}

/* Próximas horas */
.cw-next-hours {
	margin: 24px 0 8px;
	padding-top: 24px;
	border-top: 1px solid var(--color-border);
}

.cw-next-hours__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(8, minmax(72px, 1fr));
	gap: 8px;
	overflow-x: auto;
}

.cw-next-hours__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	padding: 12px 6px;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	text-align: center;
}

.cw-next-hours__item.is-now {
	background: var(--color-primary-bg);
	border-color: transparent;
}

.cw-next-hours__time { font-size: 13px; color: var(--color-text-muted); }
.cw-next-hours__item strong { font-family: var(--ff-head); font-weight: 400; font-size: 22px; }
.cw-next-hours__rain { font-size: 12px; color: var(--color-temp-min); font-weight: 600; }

/* 14 días: evita el desbordamiento lateral en móvil */
#cweather-days .section.pronostic-days .pronostic-days-inner {
	overflow: hidden;
}

@media screen and (max-width: 480px) {
	.pronostic-days .days-col-header {
		display: none;
	}
	.cw-next-hours__list {
		grid-template-columns: repeat(8, 72px);
	}
}


/* ==========================================================================
   Estado / provincia (cweather-state.php)
   ========================================================================== */

#cweather-archive .cw-state-head .cw-h1 {
	font-size: 40px;
	margin: 0 0 8px;
}

#cweather-archive .cw-state-head .cw-lead {
	margin: 0 0 12px;
}

#cweather-archive .cw-list-heading.cw-h2 {
	font-size: 24px;
	margin: 0 0 16px;
}

@media screen and (max-width: 600px) {
	#cweather-archive .cw-state-head .cw-h1 { font-size: 30px; }
}


/* ==========================================================================
   Mapas SVG (estado / provincia y portada)
   ========================================================================== */

.cw-map {
	font-family: var(--ff-body);
	background: var(--color-white);
	border-radius: var(--radius-xl);
	padding: 24px 28px;
	margin: 0 0 28px;
	box-sizing: border-box;
}

.cw-map--country {
	padding: 0;
	margin: 16px 0 0;
	background: transparent;
}

.cw-map__title { margin-bottom: 12px; }

.cw-map__bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 14px;
}

.cw-map__group {
	display: inline-flex;
	padding: 3px;
	border-radius: 10px;
	background: var(--color-primary-bg);
}

.cw-map__group button {
	min-height: 36px;
	padding: 0 14px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--color-text);
	font: 500 14px var(--ff-body);
	cursor: pointer;
}

.cw-map__group button[aria-pressed="true"] {
	background: var(--color-navy);
	color: #fff;
}

.cw-map__stage { position: relative; }

.cw-map__svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
}

.cw-map__svg path {
	stroke: #ffffff;
	stroke-width: 0.8;
	stroke-linejoin: round;
	transition: opacity .12s;
}

.cw-map--country .cw-map__svg path[data-g] { stroke-width: 0.25; stroke-opacity: .5; }
.cw-map__svg path.is-empty { fill: #e6ebf0; }
.cw-map__svg a:hover path,
.cw-map__svg .is-hover { opacity: .78; }
.cw-map__svg a:focus-visible path { stroke: var(--color-navy); stroke-width: 2; }

.cw-map__dot {
	stroke: #ffffff;
	stroke-width: 2;
}

.cw-map__svg a:hover .cw-map__dot { stroke: var(--color-navy); }

.cw-map__info {
	margin: 8px 0 0;
	min-height: 22px;
	font-size: 14px;
	color: var(--color-text-muted);
}

.cw-map__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin-top: 10px;
	font-size: 13px;
	color: var(--color-text-muted);
}

.cw-map__legend-title { font-weight: 600; color: var(--color-text); }
.cw-map__legend span { display: inline-flex; align-items: center; gap: 6px; }
.cw-map__legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

@media screen and (max-width: 600px) {
	.cw-map { padding: 18px 14px; }
	.cw-map__group button { padding: 0 10px; font-size: 13px; }
}

/* Buscador de poblaciones del estado: hueco para la lupa */
#cweather-archive .cw-filter-input { padding-left: 36px !important; min-width: 260px; }

/* Día: calidad del aire sin desbordar en móvil */
.cw-two > .section { min-width: 0; }
@media screen and (max-width: 600px) {
	.cw-two .aqi-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	.cw-two .aqi2-card { min-width: 0; }
}

/* Mapa del estado: columna lateral (municipio seleccionado + ranking) */
.cw-map.has-side .cw-map__layout {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.cw-map__side { display: flex; flex-direction: column; gap: 16px; }

.cw-map__sel {
	background: var(--color-navy);
	color: #fff;
	border-radius: 18px;
	padding: 22px 24px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cw-map__sel-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--color-on-navy-muted); }
.cw-map__sel-name { display: block; font-family: var(--ff-head); font-size: 24px; line-height: 1.2; }
.cw-map__sel-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.cw-map__sel-val { font-family: var(--ff-head); font-size: 56px; line-height: 1; }
.cw-map__sel-sub { color: #d5dfea; font-size: 15px; }

.cw-map__sel-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 10px;
	background: #fff;
	color: var(--color-navy) !important;
	font-weight: 600;
	text-decoration: none;
}

.cw-map__rank {
	border: 1px solid var(--color-border);
	border-radius: 18px;
	padding: 12px;
}

.cw-map__rank-title { margin: 4px 10px 8px; font-weight: 600; color: var(--color-text); }
.cw-map__rank-list { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow-y: auto; }

.cw-map__rank-list a {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 10px;
	border-radius: 10px;
	color: var(--color-text);
	text-decoration: none;
}

.cw-map__rank-list a:hover { background: var(--color-primary-bg); }
.cw-map__sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.cw-map__rank-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-map__rank-list b { font-weight: 600; white-space: nowrap; }

@media screen and (max-width: 900px) {
	.cw-map.has-side .cw-map__layout { grid-template-columns: 1fr; }
	.cw-map__rank-list { max-height: 320px; }
}

/* Estado: poblaciones principales (tarjetas blancas) y resto en columnas */
#cweather-archive .cw-cities-block { margin-top: 48px; }

.cw-list-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 20px;
}

#cweather-archive .cw-list-head .cw-list-heading { margin: 0; }
.cw-list-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.cw-list-filter,
.cw-list-sort {
	height: 48px;
	padding: 0 14px;
	border: 1px solid #8fa5bd;
	border-radius: 10px;
	font: 400 16px var(--ff-body);
	color: var(--color-text);
	background: #fff;
	box-sizing: border-box;
}

.cw-list-filter { width: 280px; max-width: 100%; }

.cw-cards4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.cw-city-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 14px;
	color: var(--color-text) !important;
	text-decoration: none !important;
	transition: border-color .15s;
}

.cw-city-card:hover { border-color: #9fb3c8; }
.cw-city-card[hidden], .cw-others .city[hidden] { display: none; }
.cw-city-card__name { font-weight: 600; font-size: 17px; line-height: 1.3; }
.cw-city-card__meta { font-size: 14px; color: var(--color-text-muted); }
.cw-city-card__cta { font-weight: 600; font-size: 15px; color: var(--color-link); }

.cw-others {
	margin-top: 48px;
	padding: 28px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 20px;
}

#cweather-archive .cw-others .cw-list-heading { margin: 0 0 16px; }
.cw-others__cols { column-count: 3; column-gap: 32px; line-height: 2.3; }
.cw-others__cols a { display: block; color: var(--color-link); text-decoration: none; break-inside: avoid; }
.cw-others__cols a:hover { text-decoration: underline; }
.cw-no-results { margin-top: 24px; color: var(--color-text-muted); }

@media screen and (max-width: 900px) {
	.cw-cards4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cw-others__cols { column-count: 2; }
}

@media screen and (max-width: 600px) {
	.cw-list-tools, .cw-list-filter { width: 100%; }
	.cw-list-sort { width: 100%; }
	.cw-cards4 { gap: 10px; }
	.cw-city-card { padding: 14px; }
	.cw-others { padding: 20px; }
	.cw-others__cols { column-count: 1; }
}
@media screen and (min-width: 601px) {
	.cw-list-tools { flex-wrap: nowrap; }
	.cw-list-sort { width: auto !important; }
	.cw-list-filter { width: 280px !important; }
}
.cw-desc--strong { color: var(--color-text); font-weight: 600; }

/* Estado: otras poblaciones plegables + clima y vecinos (2026-11) */
#cweather-archive .cw-others .cw-list-heading { border: 0; padding: 0; }
.cw-others.is-collapsed:not(.is-filtering) .is-more { display: none; }
.cw-others.is-filtering .cw-others__more { display: none; }
.cw-others__more {
	margin-top: 16px;
	min-height: 48px;
	padding: 0 18px;
	background: #fff !important;
	color: var(--color-link) !important;
	border: 1px solid #8fa5bd !important;
	border-radius: 10px !important;
	font: 600 16px var(--ff-body) !important;
	cursor: pointer;
}
.cw-others__more:hover { border-color: var(--color-link) !important; }
.cw-state-about { display: grid; grid-template-columns: 1fr; gap: 16px 32px; margin-top: 48px; }
.cw-state-about.has-neighbors { grid-template-columns: 2fr 1fr; }
#cweather-archive .cw-state-about h2 { margin: 0 0 12px; border: 0; padding: 0; }
.cw-state-about__text p { margin: 0; font-size: 17px; line-height: 1.7; color: #24384d; }
.cw-state-about__near { display: flex; flex-direction: column; gap: 12px; }
.cw-near-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	padding: 0 16px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 12px;
	font-weight: 600;
	color: var(--color-text) !important;
	text-decoration: none !important;
}
.cw-near-link:hover { border-color: #9fb3c8; }
.cw-near-link span { color: var(--color-link); }
@media screen and (max-width: 900px) {
	.cw-state-about.has-neighbors { grid-template-columns: 1fr; }
}

/* Mapa: valores sobre cada zona */
.cw-map__labels text {
	font-family: var(--ff-body, Inter, sans-serif);
	font-weight: 700;
	fill: #0b1f33;
	stroke: rgba(255,255,255,.85);
	stroke-width: 3px;
	paint-order: stroke;
	text-anchor: middle;
	dominant-baseline: central;
	pointer-events: none;
}

/* Ciudad: 14 días + columna lateral (aviso, sol y luna, cercanos) (2026-11) */
#cweather-days .cw-gmain {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
	align-items: start;
	width: 100%;
	max-width: var(--max-width);
	margin: 20px auto;
	padding: 0 var(--px);
	box-sizing: border-box;
}
#cweather-days .cw-gmain .section.pronostic-days { margin: 0; padding: 0; max-width: none; }
.cw-side { display: flex; flex-direction: column; gap: 16px; }
.cw-side h2 { margin: 0 0 6px !important; font: 600 17px var(--ff-body) !important; color: var(--color-text); border: 0 !important; padding: 0 !important; }
.cw-side__note { background: #fff4d6; border: 1px solid #b45309; border-radius: 16px; padding: 18px; }
.cw-side__note h2 { color: #7a3a05 !important; }
.cw-side__note p { margin: 0; font-size: 15px; line-height: 1.5; color: #3d2a0a; }
.cw-side__card { background: #fff; border: 1px solid var(--color-border); border-radius: 16px; padding: 18px; }
.cw-side__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; }
.cw-side__row span { display: inline-flex; align-items: center; gap: 8px; color: var(--color-text-muted); }
.cw-side__row svg { width: 18px; height: 18px; color: var(--color-text); }
.cw-side__near .near { display: flex; flex-direction: column; }
.cw-side__near .near > a { text-decoration: none !important; color: var(--color-link); }
.cw-side__near .near > a:nth-child(n+9) { display: none; }
.cw-side__near .item { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-top: 1px solid #eef2f6; }
.cw-side__near .near > a:first-child .item { border-top: 0; }
.cw-side__near .near > a:hover .item { text-decoration: underline; }
.cw-side__near .distance { color: var(--color-text-muted); font-size: 14px; text-decoration: none; }
@media screen and (max-width: 900px) {
	#cweather-days .cw-gmain { grid-template-columns: 1fr; }
}

/* Ciudad: resumen climático (6 datos + gráfico máx/mín) (2026-11) */
.cw-gres { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: center; margin-top: 16px; }
.cw-sum-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cw-sum-tile { background: #f3f7fb; border-radius: 12px; padding: 14px; }
.cw-sum-tile span { display: block; font-size: 13px; color: var(--color-text-muted); }
.cw-sum-tile strong { display: block; font-family: var(--ff-head); font-weight: 400; font-size: 24px; color: var(--color-text); }
.cw-sum-chart { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cw-sum-chart svg { width: 100%; height: auto; display: block; font-family: var(--ff-body); }
.cw-sum-legend { display: flex; gap: 16px; font-size: 14px; color: var(--color-text-muted); }
.cw-sum-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cw-sum-legend i { display: inline-block; width: 18px; }
.cw-sum-legend i.is-max { height: 3px; background: #b45309; }
.cw-sum-legend i.is-min { border-top: 3px dashed #1257c9; }
@media screen and (max-width: 900px) {
	.cw-gres { grid-template-columns: 1fr; }
}

/* Ciudad: revisión general (2026-11) */
#breadcrumblist { width: 100%; box-sizing: border-box; justify-content: flex-start; }
#cweather-days .cw-tab-switcher { justify-content: flex-start; }
#cweather-days .weather-tips-sticky { display: none !important; }
.cw-next-hours__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.cw-next-hours__head .cw-h2 { margin-bottom: 12px; }
.cw-next-hours__all { font-weight: 600; color: var(--color-link); text-decoration: none; white-space: nowrap; }
.cw-next-hours__all:hover { text-decoration: underline; }

/* Municipios cercanos (día / horas / información) en tarjetas (2026-11) */
.cw-near-block { width: 100%; max-width: var(--max-width); margin: 24px auto 0; padding: 0 var(--px); box-sizing: border-box; }
.cw-near-block .cw-h2 { margin: 0 0 16px; }
.cw-near-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cw-near-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; background: #fff; border: 1px solid var(--color-border); border-radius: 12px; text-decoration: none !important; color: var(--color-link); }
.cw-near-card span { font-weight: 600; }
.cw-near-card small { font-size: 14px; color: var(--color-text-muted); white-space: nowrap; }
.cw-near-card:hover { border-color: #9fb3c8; }
@media screen and (max-width: 900px) { .cw-near-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 600px) { .cw-near-grid { grid-template-columns: 1fr; } }

/* Día concreto: panel resumen del día (2026-11) */
.cw-now__temp-tag { font-family: var(--ff-body); font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #b6c6d8; margin-left: 10px; vertical-align: super; }

/* Por horas en móvil: rejilla 4×2 sin scroll lateral (2026-11) */
@media screen and (max-width: 900px) {
	.cw-next-hours__list { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; overflow: visible; }
}

/* Ciudad: intro sin tarjeta blanca, pestañas a la derecha, fila del día clicable entera */
#cweather-days .cw-tab-switcher { justify-content: flex-end; }
#cweather-days #cw-tab-resumen.intro-inner { background: transparent; padding: 8px 0 0; border-radius: 0; box-shadow: none; }
#cweather-days #cw-tab-resumen .cw-next-hours { background: #fff; border: 1px solid #D9E3EE; border-radius: 20px; padding: 24px; margin-top: 28px; }
#cweather-days .day-row { position: relative; cursor: pointer; }
#cweather-days .day-row .detail-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
@media (max-width: 760px) { #cweather-days #cw-tab-resumen .cw-next-hours { padding: 16px; } }

/* Provincia/estado: cabecera alineada a la izquierda y sin tarjeta, como el mockup (2026-11) */
#cweather-archive .section-title.cw-state-head { background: transparent; padding: 8px 0 0; margin-bottom: 20px; width: 100%; max-width: calc(var(--max-width) - 48px); align-self: stretch; text-align: left; box-sizing: border-box; }
#cweather-archive .cw-state-head .cw-h1 { font-size: 52px; line-height: 1.08; margin: 0 0 10px; }
#cweather-archive .cw-state-head .cw-lead { font-size: 19px; line-height: 1.5; color: #4A5A6B; max-width: 680px; margin: 0; }
@media screen and (max-width: 600px) { #cweather-archive .cw-state-head .cw-h1 { font-size: 34px; } #cweather-archive .cw-state-head .cw-lead { font-size: 17px; } }

/* Mapa de provincia: zoom (+ / − / ver todo), arrastre y pellizco (2026-11) */
.cw-map--state .cw-map__svg { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cw-map--state.is-zoomed .cw-map__svg { touch-action: none; cursor: grab; }
.cw-map--state.is-zoomed .cw-map__svg:active { cursor: grabbing; }
.cw-map--state .cw-map__svg path { vector-effect: non-scaling-stroke; stroke-width: 1; }
.cw-map--state .cw-map__dot { vector-effect: non-scaling-stroke; }
.cw-map__zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 3; }
.cw-map__zoom button { width: 40px; height: 40px; padding: 0; border-radius: 10px; border: 1px solid #D9E3EE; background: #fff; color: #0b1f33; font: 600 22px/1 var(--ff-body, Inter, sans-serif); box-shadow: 0 2px 8px rgba(11,31,51,.10); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cw-map__zoom button:hover, .cw-map__zoom button:focus { background: #EAF1F9; color: #0b1f33; }
.cw-map__zoom button:disabled { opacity: .4; cursor: default; background: #fff; }
.cw-map__zoom button[hidden] { display: none; }

/* Por horas: slider horizontal con flechas (24 h) (2026-11) */
.cw-next-hours__slider { position: relative; }
.cw-next-hours__list,
.cw-next-hours .cw-next-hours__list { display: flex !important; gap: 10px; overflow-x: auto !important; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; }
.cw-next-hours__list::-webkit-scrollbar { display: none; }
.cw-next-hours__item { flex: 0 0 calc((100% - 70px) / 8); min-width: 0; scroll-snap-align: start; box-sizing: border-box; }
@media screen and (max-width: 900px) { .cw-next-hours__item { flex-basis: calc((100% - 40px) / 4.6); } }
.cw-sl-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 1px solid #D9E3EE; background: #fff; color: #0b1f33; font: 400 26px/1 var(--ff-body, Inter, sans-serif); box-shadow: 0 2px 10px rgba(11,31,51,.14); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cw-sl-btn:hover, .cw-sl-btn:focus { background: #EAF1F9; color: #0b1f33; }
.cw-sl-prev { left: -16px; }
.cw-sl-next { right: -16px; }
.cw-sl-btn[hidden] { display: none; }
@media (hover: none) { .cw-sl-btn { display: none; } }

/* Mapa de provincia/estado: tres tarjetas independientes como en el mockup (mapa · municipio · ranking) (2026-11) */
.cw-map--state.has-side { background: transparent; padding: 0; border-radius: 0; }
.cw-map--state.has-side .cw-map__main { background: #fff; border: 1px solid #D9E3EE; border-radius: 20px; padding: 24px; box-sizing: border-box; min-width: 0; }
.cw-map--state.has-side .cw-map__rank { background: #fff; border-color: #D9E3EE; border-radius: 20px; }
.cw-map--state.has-side .cw-map__layout { gap: 20px; }
@media screen and (max-width: 600px) { .cw-map--state.has-side .cw-map__main { padding: 16px; } }

/* Breadcrumb de fichas (ciudad, día, horas, info) alineado con el de provincia/estado (2026-11) */
#cweather-days #breadcrumblist,
#cweather-single #breadcrumblist { max-width: calc(var(--max-width) - 48px); margin-left: auto; margin-right: auto; }
#cweather-single #breadcrumblist { margin-top: 20px; }

/* Ciudad: entradilla como el mockup (texto oscuro, sin gris pequeño) (2026-11) */
#cweather-days #cw-tab-resumen h1 { font-size: 38px; line-height: 1.1; margin: 0 0 14px; }
#cweather-days .cw-city-intro { max-width: 820px; margin: 0; }
#cweather-days .cw-city-intro p { font-size: 16px; line-height: 1.65; color: #24384D; margin: 0 0 12px; }
#cweather-days .cw-city-intro p.cw-city-lead { font-size: 18px; line-height: 1.6; }
@media screen and (max-width: 600px) { #cweather-days #cw-tab-resumen h1 { font-size: 30px; } #cweather-days .cw-city-intro p.cw-city-lead { font-size: 17px; } }

/* Ciudad: Resumen climático como el mockup (tarjeta con borde, título con «en X» suave, sin párrafo) (2026-11) */
#cweather-days .section.climate-summary .climate-summary-inner { background: #fff; border: 1px solid #D9E3EE; border-radius: 20px; padding: 24px; box-shadow: none; }
#cweather-days .section.climate-summary .climate-summary-inner > h2 { font-size: 22px; line-height: 1.25; margin: 0 0 16px; }
#cweather-days .cw-sum-tiles > div, #cweather-days .cw-sum-tile { background: #F3F7FB; border-radius: 12px; }

/* Ciudad: columna lateral como el mockup (2026-11) */
.cw-side__note--info { background: #EAF1F9; border-color: #8FA5BD; }
.cw-side__note--info h2 { color: #0B1F33 !important; }
.cw-side__note--info p { color: #24384D; }
.cw-side__card, .cw-side__note { border-radius: 16px; padding: 18px; }
.cw-side__card { border-color: #D9E3EE; }
.cw-side__near .near > a { color: var(--color-text) !important; }
.cw-side__near .near > a:nth-child(n+6) { display: none; }
.cw-side__near .item { border-top: 0; }
.cw-side__near .near > a:hover .item { text-decoration: none; color: var(--color-link); }
