/* Ficha de ruta "Cuaderno de ruta". Solo se carga en las entradas (body.cg-ruta). */

.cg-ruta {
	--cg-verde: #1F4D33;
	--cg-verde-osc: #123222;
	--cg-texto: #1B2A21;
	--cg-texto-2: #34443A;
	--cg-gris: #4A5A4F;
	--cg-borde: #DDE3DA;
	--cg-fondo: #F4F6F2;
	--cg-naranja: #E07A2E;
}

/* La portada sustituye a la imagen destacada, al título y a los metadatos de GeneratePress. */
.cg-ruta .featured-image.page-header-image-single,
.cg-ruta .inside-article > .featured-image,
.cg-ruta .entry-header .entry-meta { display: none; }

/* Portada a todo ancho: la imagen tiene altura fija, así no hay saltos al cargar. */
.cg-portada {
	position: relative;
	height: clamp(380px, 62vh, 560px);
	background: #2E5A44;
	color: #fff;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}
.cg-portada--sin-foto { height: auto; min-height: 260px; }
.cg-portada__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.cg-portada__banda {
	position: relative;
	width: 100%;
	background: rgba(15, 35, 24, 0.72);
}
.cg-portada__dentro {
	max-width: 880px;
	margin: 0 auto;
	padding: 28px 24px 32px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.cg-migas { font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; color: #DCEBDF; }
.cg-migas a { color: #fff; }
.cg-portada__titulo {
	margin: 0;
	color: #fff;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1.05;
}
.cg-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cg-chip { margin: 0; padding: 6px 12px; border: 1px solid #A9C9B2; border-radius: 999px; font-size: 15px; }
.cg-chip--fuerte { background: #fff; color: #14301F; border-color: #fff; font-weight: 600; }

/* Columna de lectura. */
.cg-ruta .site-content .content-area { width: 100%; }
.cg-ruta .inside-article { max-width: 760px; margin: 0 auto; padding-left: 24px; padding-right: 24px; background: transparent; }
.cg-ruta .entry-content { font-size: 18px; line-height: 1.75; color: var(--cg-texto-2); }
.cg-ruta .entry-content h2 { font-size: 30px; line-height: 1.2; margin: 1.6em 0 0.5em; color: var(--cg-texto); }
.cg-ruta .entry-content h3 { font-size: 22px; margin: 1.4em 0 0.4em; color: var(--cg-texto); }
.cg-ruta .entry-content p.cg-entradilla { font-size: 21px; line-height: 1.6; color: var(--cg-texto); }

/* Fotos del relato: grandes y redondeadas. */
.cg-ruta .entry-content img { border-radius: 14px; height: auto; }
.cg-ruta .entry-content figure { margin: 28px 0; }
.cg-ruta .entry-content figcaption { font-size: 14px; color: var(--cg-gris); margin-top: 8px; }
.cg-ruta .entry-content .wp-block-image img,
.cg-ruta .entry-content p > img:only-child { width: 100%; }

/* Frase destacada (bloque Cita). */
.cg-ruta .entry-content blockquote {
	border: 0;
	margin: 32px 0;
	padding: 0;
	font-size: 28px;
	line-height: 1.3;
	text-align: center;
	color: var(--cg-verde);
	font-style: normal;
}

/* "…Hasta la próxima". */
.cg-ruta .entry-content p.cg-hasta-pronto { font-size: 24px; color: var(--cg-verde); margin-top: 1.4em; }

/* Botón "Fotos de la ruta" (enlace a Google Fotos). */
.cg-ruta .entry-content a[href*="photos.app.goo.gl"],
.cg-ruta .entry-content a[href*="photos.google.com"] {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 22px;
	background: #fff;
	border: 1px solid #C9D5C6;
	border-radius: 999px;
	font-weight: 600;
	color: var(--cg-verde);
	text-decoration: none;
}

/* Firma. */
.cg-firma-autor { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--cg-gris); margin: 32px 0 24px; }
.cg-firma-autor strong { color: var(--cg-texto); }
.cg-firma-autor__avatar {
	width: 44px; height: 44px; border-radius: 999px; background: #C9D9C4;
	display: inline-flex; align-items: center; justify-content: center;
	font-weight: 600; color: var(--cg-verde); flex: 0 0 44px;
}

/* Mapa de Wikiloc: hueco fijo, se carga al pulsar. */
.cg-mapa {
	height: 400px; border-radius: 14px; background: #E4ECEF; border: 1px solid #C9D5DA;
	display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center;
	margin: 28px 0; overflow: hidden;
}
.cg-mapa__texto { margin: 0; color: #31505F; font-size: 15px; }
.cg-mapa__boton {
	min-height: 44px; border: 0; background: #12324A; color: #fff;
	font-weight: 600; padding: 10px 18px; border-radius: 8px; cursor: pointer;
}
.cg-mapa iframe { width: 100%; height: 100%; border: 0; }

/* Anuncios: altura reservada para que la página no salte (CLS). */
.cg-anuncio { margin: 32px 0; text-align: center; }
.cg-anuncio__etiqueta { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #5E6E63; margin-bottom: 6px; }
.cg-anuncio--in-article { min-height: 300px; }
.cg-anuncio--multiplex { min-height: 320px; margin-top: 40px; }

/* Sigue caminando. */
.cg-sigue { margin: 56px 0 24px; padding-top: 40px; border-top: 1px solid var(--cg-borde); }
.cg-sigue__titulo { text-align: center; font-size: 32px; margin: 0 0 24px; color: var(--cg-texto); }
.cg-sigue__rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cg-tarjeta {
	display: flex; flex-direction: column; background: var(--cg-fondo); border-radius: 14px;
	overflow: hidden; text-decoration: none; color: var(--cg-texto);
}
.cg-tarjeta__img { width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 0 !important; }
.cg-tarjeta__zona { padding: 12px 14px 0; font-size: 13px; font-weight: 600; color: #2F6B45; }
.cg-tarjeta__titulo { padding: 4px 14px 14px; font-weight: 700; font-size: 18px; line-height: 1.25; }
.cg-sigue__enlaces { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cg-sigue__enlaces li { margin: 0; }
.cg-pastilla {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
	border-radius: 999px; border: 1px solid #C9D5C6; text-decoration: none; color: var(--cg-verde);
}
.cg-pastilla--fuerte { background: var(--cg-verde); color: #fff; border-color: var(--cg-verde); font-weight: 600; }
.cg-pastilla--fuerte:hover { background: var(--cg-verde-osc); color: #fff; }

@media (max-width: 600px) {
	.cg-portada__dentro { padding: 20px 16px 24px; }
	.cg-ruta .inside-article { padding-left: 16px; padding-right: 16px; }
	.cg-ruta .entry-content { font-size: 17px; }
	.cg-ruta .entry-content p.cg-entradilla { font-size: 19px; }
	.cg-ruta .entry-content blockquote { font-size: 23px; }
	.cg-mapa { height: 320px; }
	.cg-anuncio--in-article { min-height: 280px; }
}
