/*
Theme Name: Código Morse
Theme URI: https://codigomorse.com/
Author: Luis Esquivel
Description: Tema de bloques, sencillo y liviano, para publicar investigaciones periodísticas. Blanco y negro con azul eléctrico y resaltado neón, titulares en Archivo, texto en Newsreader y etiquetas en IBM Plex Mono. Sin constructores de páginas.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codigomorse
Tags: blog, news, one-column, two-columns, full-site-editing, block-patterns, wide-blocks
*/

/* ---------- Básicos ---------- */
::selection { background: #E5FF00; color: #000000; }
a { text-decoration-color: var(--wp--preset--color--azul); text-underline-offset: 3px; }
:where(a, button, input, .wp-element-button):focus-visible { outline: 3px solid #1F3BFF; outline-offset: 3px; }
.wp-site-blocks { padding-top: 0; }

/* ---------- Cabecera ---------- */
.cm-header-row { padding: 18px 0 14px; border-bottom: 1px solid #000; row-gap: 12px; }
.cm-header > .cm-topics { border-bottom: 1px solid #000; margin-top: 0; }
.cm-brand { gap: 6px; }
.cm-logo { gap: 12px; }
.cm-mark { display: block; flex: 0 0 auto; }
.cm-morse { margin: 0; font-family: var(--wp--preset--font-family--mono); font-size: clamp(11px, 2.6vw, 13px); letter-spacing: 0.14em; color: #6B6B6B; }
.cm-nav-wrap { gap: 4px 18px; }
.cm-nav .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; }
.cm-search .wp-block-search__button { width: 44px; height: 44px; padding: 0; justify-content: center; background: transparent; color: #000; border: 0; }
.cm-search .wp-block-search__button:hover { color: var(--wp--preset--color--azul); background: transparent; }
.cm-topics { gap: 0; padding: 0; font-family: var(--wp--preset--font-family--mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; }
.cm-topics > p { margin: 0; padding-right: 16px; display: flex; align-items: center; min-height: 44px; font-weight: 600; }
.cm-topics .wp-block-navigation { font-family: var(--wp--preset--font-family--mono); font-weight: 400; gap: 0; }
.cm-topics .wp-block-navigation-item { border-left: 1px solid #000; }
.cm-topics .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; white-space: nowrap; }
@media (max-width: 781px) {
	/* En el celular, los temas van en una sola fila que se desliza */
	.cm-topics { flex-wrap: nowrap !important; }
	.cm-topics > p { flex: 0 0 auto; }
	.cm-topics .wp-block-navigation { --navigation-layout-wrap: nowrap; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
	.cm-topics .wp-block-navigation::-webkit-scrollbar { display: none; }
	.cm-topics .wp-block-navigation__container { flex-wrap: nowrap; }
}

/* ---------- Etiquetas y títulos de sección ---------- */
.cm-label { font-family: var(--wp--preset--font-family--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.cm-section { border-top: 4px solid #000; padding-top: 12px; font-weight: 900; font-stretch: 85%; text-transform: uppercase; letter-spacing: -0.01em; }
.cm-tagline { font-family: var(--wp--preset--font-family--newsreader); font-style: italic; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.25; margin: 0; }
.cm-intro { padding: 28px 0; }

/* ---------- Tarjetas (bucles de entradas) ---------- */
.wp-block-post-template .wp-block-post-featured-image img { display: block; width: 100%; }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; }
.wp-block-post-template li:hover .wp-block-post-title a,
.wp-block-post-template li:focus-within .wp-block-post-title a { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--wp--preset--color--azul); text-underline-offset: 4px; }
.cm-title-xl { font-size: var(--wp--preset--font-size--xx-large) !important; line-height: 1.02 !important; letter-spacing: -0.025em !important; }
.cm-meta { gap: 6px 14px; }
.cm-side { border-left: 1px solid #000; padding-left: 28px; }
.cm-side .wp-block-post-template > li + li { border-top: 1px solid #000; padding-top: 24px; }
@media (max-width: 781px) {
	.cm-side { border-left: 0; padding-left: 0; border-top: 1px solid #000; padding-top: 24px; }
}

/* ---------- Bloques especiales ---------- */
.cm-metodo { background: #000; color: #fff; padding: 28px; }
.cm-metodo .cm-label, .cm-metodo h3 { color: var(--wp--preset--color--neon); }
.cm-metodo h3 { font-size: 44px; font-weight: 900; font-stretch: 85%; line-height: 0.95; text-transform: uppercase; }
.cm-metodo p { font-family: var(--wp--preset--font-family--newsreader); color: #E6E6E6; }
.cm-metodo a { color: #fff; }

.cm-newsletter { background: var(--wp--preset--color--neon); border: 2px solid #000; padding: 36px; }
.cm-newsletter h2 { font-size: var(--wp--preset--font-size--xx-large); font-weight: 900; font-stretch: 85%; line-height: 0.95; text-transform: uppercase; margin: 0; }
.cm-newsletter p { font-family: var(--wp--preset--font-family--newsreader); font-size: 20px; margin: 0; }

.cm-pista { border-top: 4px solid #000; padding-top: 24px; }
.cm-pista p { font-family: var(--wp--preset--font-family--newsreader); font-size: 20px; color: #333; }
.cm-btn-accent .wp-block-button__link { background: var(--wp--preset--color--azul); border-color: var(--wp--preset--color--azul); }
.cm-btn-accent .wp-block-button__link:hover { background: #000; border-color: #000; }

.cm-sobre { border-top: 1px solid #000; padding-top: 24px; }
.cm-sobre p { font-family: var(--wp--preset--font-family--newsreader); font-size: 20px; line-height: 1.55; }

/* ---------- Artículo ---------- */
.cm-article-head { padding-top: 40px; }
.cm-byline { border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 10px 0; gap: 6px 14px; }
.has-drop-cap:not(:focus)::first-letter { font-family: var(--wp--preset--font-family--archivo); font-weight: 900; font-size: 4.4em; line-height: 0.78; margin: 0.08em 0.1em 0 0; }
.cm-content .wp-block-image figcaption, .cm-content figcaption { font-family: var(--wp--preset--font-family--archivo); font-size: 14px; color: #4A4A4A; }
.cm-content mark { padding: 0 3px; }

.cm-resumen { border: 1px solid #000; padding: 24px 28px; font-family: var(--wp--preset--font-family--archivo); font-size: 16px; line-height: 1.55; }
.cm-resumen ul { padding-left: 20px; margin: 0; }
.cm-resumen li + li { margin-top: 8px; }

.cm-documento { background: #F4F4F4; padding: 16px; }
.cm-documento img { border: 1px solid #D6D6D6; }

.cm-fuentes { border: 2px solid #000; padding: 28px; font-family: var(--wp--preset--font-family--archivo); }
.cm-fuentes h2 { font-weight: 900; font-stretch: 85%; text-transform: uppercase; margin: 0; }
.cm-fuentes > p { font-family: var(--wp--preset--font-family--newsreader); font-size: 16px; color: #333; }
.cm-fuente { border-top: 1px solid #000; padding: 10px 0; gap: 8px 16px; font-size: 16px; line-height: 1.4; }
.cm-fuente p { margin: 0; }
.cm-tag { flex: 0 0 auto; font-family: var(--wp--preset--font-family--mono); font-size: 14px; font-weight: 600; background: #000; color: #fff; padding: 2px 8px; }
.cm-tag-web { background: transparent; color: #000; border: 1px solid #000; padding: 1px 7px; }
.cm-fuente .cm-grow { flex: 1 1 260px; }
.cm-fuente a { font-family: var(--wp--preset--font-family--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; min-height: 44px; }

.cm-metodo-nota { font-family: var(--wp--preset--font-family--archivo); font-size: 16px; color: #333; }

/* ---------- Pie ---------- */
.cm-footer { background: #000; color: #fff; padding: 28px 24px; }
.cm-footer a { color: #fff; }
.cm-footer .wp-block-site-title a { color: #fff; }
.cm-footer .wp-block-site-title { font-size: 28px; }
.cm-footer p { font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: #BDBDBD; margin: 0; }
.cm-footer .wp-block-social-links .wp-social-link { background: transparent; }
