/*
Theme Name: Código Civil — Índice Tierra
Theme URI: https://codigo-civil.es/
Author: Juan Antonio García García
Author URI: https://codigo-civil.es/
Description: Tema de bloques (FSE) con estructura de repertorio jurídico y estética moderna: listados densos por sección con la última entrada destacada, fechas y etiquetas en monoespaciada, filetes finos y nada de tarjetas pesadas. Paleta de tonos tierra/crudos (fondo ecru, tinta marrón) con bloques destacados en terracota, oliva, ocre y arcilla por sección; titulares en Plus Jakarta Sans (gruesos y apretados), cuerpo en Inter y datos en IBM Plex Mono. Pensado para jurisprudencia, derecho europeo, legislación y protección de datos.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codigo-civil-indice-tierra
Tags: blog, news, one-column, two-columns, custom-colors, custom-menu, editor-style, full-site-editing, block-patterns, threaded-comments, translation-ready
*/

/* v1.0.1: el menú de cabecera y pie incluye enlaces a las categorías por defecto. */

/* =====================================================================
   CÓDIGO CIVIL — ÍNDICE · estética de repertorio
   ===================================================================== */

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* --- Cabecera / masthead --- */
.wp-block-site-title a { text-decoration: none; }
.cc-navbar .wp-block-navigation a { text-decoration: none; }
.cc-navbar .wp-block-navigation a:hover { color: var(--wp--preset--color--primary); }

/* Buscador minimal */
.cc-search .wp-block-search__inside-wrapper { border: 1px solid var(--wp--preset--color--border) !important; max-width: 26rem; }
.cc-search .wp-block-search__input { border: 0 !important; background: transparent; font-family: var(--wp--preset--font-family--mono); font-size: 0.8rem; padding: 0.4rem 0.6rem; }
.cc-search .wp-block-search__button { background: transparent; color: var(--wp--preset--color--contrast); margin: 0; padding: 0 0.7rem; }
.cc-search .wp-block-search__button:hover { color: var(--wp--preset--color--primary); }

/* --- Kicker y standfirst del titular --- */
.cc-kicker { margin: 0; }
.cc-standfirst { font-family: var(--wp--preset--font-family--serif); }

/* --- Cabeceras de sección --- */
.cc-seclabel { margin: 0; }
.cc-verlink { margin: 0; }
.cc-verlink a { color: var(--wp--preset--color--primary); text-decoration: none; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.cc-verlink a:hover { text-decoration: underline; }

/* --- Entrada destacada de cada sección --- */
.cc-ultlabel { margin: 0; color: var(--wp--preset--color--primary); font-family: var(--wp--preset--font-family--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; }
.cc-feattitle { font-family: var(--wp--preset--font-family--display); font-weight: 700; letter-spacing: -0.02em; }
.cc-feattitle a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.cc-feattitle a:hover { color: var(--wp--preset--color--primary); }
.cc-featex { font-family: var(--wp--preset--font-family--serif); }
.cc-feat .wp-block-post-date { display: block; }

/* --- Listados (repertorio) --- */
.wp-block-post-template.cc-list { list-style: none; margin: 0; padding: 0; gap: 0 !important; }
.wp-block-post-template.cc-list > li { margin: 0; }
.cc-row { transition: background-color 0.12s ease; }
.cc-row:hover { background: var(--wp--preset--color--band); }
.cc-date {
	flex: 0 0 4.6rem;
	color: var(--wp--preset--color--contrast-2);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	white-space: nowrap;
	padding-top: 0.12em;
}
.cc-rowtitle { font-family: var(--wp--preset--font-family--serif); }
.cc-rowtitle a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.cc-row:hover .cc-rowtitle a { color: var(--wp--preset--color--primary); }
.cc-rowcat a, .cc-rowex { color: var(--wp--preset--color--contrast-2); }
.cc-rowcat a { font-family: var(--wp--preset--font-family--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; }

/* --- Ficha del artículo --- */
.cc-ficha { gap: 2.5rem; }
.cc-flabel { margin: 0; color: var(--wp--preset--color--contrast-2); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.12em; }
.cc-fvalue, .cc-ficha .wp-block-post-date, .cc-ficha .wp-block-post-author-name { font-family: var(--wp--preset--font-family--serif); font-size: 0.98rem; color: var(--wp--preset--color--contrast); }
.cc-ficha .wp-block-post-terms a { color: var(--wp--preset--color--contrast); text-decoration: none; font-family: var(--wp--preset--font-family--serif); text-transform: none; letter-spacing: 0; font-size: 0.98rem; }

/* --- Voces (etiquetas) --- */
.cc-voces a { font-family: var(--wp--preset--font-family--mono); font-size: 0.74rem; color: var(--wp--preset--color--primary); text-decoration: none; }
.cc-voces a:hover { text-decoration: underline; }

/* --- Cuerpo del artículo: lectura cómoda --- */
.cc-article { font-size: 1.09rem; line-height: 1.78; }
.cc-article > * { margin-block: 1.3em; }
.cc-article > p:first-of-type { margin-top: 0.6em; }
.cc-article h2 { font-size: 1.5rem; margin-top: 1.9em; line-height: 1.25; font-weight: 600; }
.cc-article h3 { font-size: 1.2rem; margin-top: 1.5em; }
.cc-article h2 + p, .cc-article h3 + p { margin-top: 0.5em; }
.cc-article a { color: var(--wp--preset--color--primary); text-underline-offset: 2px; }
.cc-article blockquote { border-left: 2px solid var(--wp--preset--color--primary); padding: 0.2rem 0 0.2rem 1.3rem; font-style: italic; }
.cc-article ul, .cc-article ol { padding-left: 1.4em; }
.cc-article li { margin-block: 0.4em; }
.cc-article code, .cc-article kbd { font-family: var(--wp--preset--font-family--mono); font-size: 0.9em; background: var(--wp--preset--color--band); padding: 0.1em 0.35em; }

/* --- Filete grueso (variación de separador) --- */
.wp-block-separator.is-style-cc-rule { border: 0; height: 2px; background: var(--wp--preset--color--contrast); opacity: 1; max-width: 100%; margin-block: 0; }

/* --- Navegación entre entradas --- */
.cc-nav a { text-decoration: none; font-family: var(--wp--preset--font-family--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cc-nav a:hover { color: var(--wp--preset--color--primary); }

/* --- Paginación --- */
.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers {
	text-decoration: none; color: var(--wp--preset--color--contrast);
	font-family: var(--wp--preset--font-family--mono); font-size: 0.8rem;
	padding: 0.35em 0.7em; border: 1px solid transparent;
}
.wp-block-query-pagination a:hover { border-color: var(--wp--preset--color--border); }
.wp-block-query-pagination .page-numbers.current { color: var(--wp--preset--color--primary); border-color: var(--wp--preset--color--primary); }

/* --- Footer --- */
footer .wp-block-categories { list-style: none; margin: 0; padding: 0; }
footer .wp-block-navigation a, footer .wp-block-categories a { text-decoration: none; }
footer .wp-block-navigation a:hover, footer .wp-block-categories a:hover { color: var(--wp--preset--color--primary); }

/* --- Responsive --- */
@media (max-width: 600px) {
	.cc-ficha { gap: 1.4rem; }
	.cc-date { flex-basis: 4rem; }
	.cc-nav { width: 100%; }
}

/* =====================================================================
   CAPA "MODERNA" — sobre la estructura de repertorio
   ===================================================================== */

/* Etiquetas de sección en display (Space Grotesk) en vez de mono clásico */
.cc-seclabel {
	font-family: var(--wp--preset--font-family--display) !important;
	letter-spacing: 0.02em !important;
	font-weight: 600;
}
/* Filete de sección en azul de acento */
.cc-sechead { border-bottom-color: var(--wp--preset--color--primary) !important; }

/* Entrada destacada: barra de acento a la izquierda + aire */
.cc-feat {
	position: relative;
	padding-left: 1rem;
	border-bottom-color: var(--wp--preset--color--border) !important;
}
.cc-feat::before {
	content: "";
	position: absolute;
	left: 0; top: 0.15rem; bottom: 0.9rem;
	width: 3px;
	background: var(--wp--preset--color--primary);
	border-radius: 3px;
}
.cc-ultlabel { color: var(--wp--preset--color--primary); }

/* Masthead: nombre del sitio con tracking apretado moderno */
.wp-block-site-title { letter-spacing: -0.03em; }

/* Hover de fila: tinte azul muy sutil en vez de gris */
.cc-row:hover { background: rgba(58, 86, 255, 0.05); }
.cc-row:hover .cc-rowtitle a { color: var(--wp--preset--color--primary); }

/* Kicker "EN PORTADA" y "Última entrada": pastilla de acento suave */
.cc-kicker, .cc-ultlabel {
	display: inline-block;
}

/* Buscador: redondeado moderno */
.cc-search .wp-block-search__inside-wrapper { border-radius: 2rem; overflow: hidden; }
.cc-search .wp-block-search__input { padding-left: 1rem; }

/* Enlaces de navegación: subrayado de acento al pasar */
.cc-navbar .wp-block-navigation a:hover,
.nav a:hover { color: var(--wp--preset--color--primary); }

/* Citas */
.cc-article blockquote { border-left-color: var(--wp--preset--color--primary); }

/* =====================================================================
   CAPA "FRESCO 2.0" — panel, chips y tarjetas suaves
   ===================================================================== */

/* Panel destacado de portada (hero redondeado y tintado) */
.cc-leadpanel {
	background: var(--wp--preset--color--primary);
	color: #fff;
	border-radius: 0;
	max-width: none;
	margin: 0;
	padding: 3.6rem max(1.5rem, calc((100% - 75rem) / 2)) 3rem !important;
	box-shadow: none;
	text-align: left;
}
.cc-leadpanel .cc-kicker { color: rgba(255,255,255,0.85) !important; }
.cc-leadpanel .wp-block-post-title, .cc-leadpanel .wp-block-post-title a { color: #fff; }
.cc-leadpanel .wp-block-post-title a:hover { color: #fff; opacity: 0.9; }
.cc-leadpanel .cc-standfirst { color: rgba(255,255,255,0.92) !important; max-width: 48rem; }
.cc-leadpanel .wp-block-post-date { color: rgba(255,255,255,0.72) !important; }

/* Quita el filete grueso entre el panel y las secciones */
.wp-block-separator.is-style-cc-rule { display: none; }

/* Etiqueta de sección como "chip" (pastilla) en vez de filete */
.cc-sechead { border-bottom: 0 !important; align-items: center !important; margin-bottom: 1rem !important; padding-bottom: 0 !important; }
.cc-seclabel {
	display: inline-block;
	background: rgba(176, 83, 46, 0.12);
	color: var(--wp--preset--color--primary) !important;
	padding: 0.34em 0.85em;
	border-radius: 999px;
	letter-spacing: 0.02em !important;
	font-size: 0.82rem !important;
}

/* Última entrada de cada sección: tarjeta suave redondeada */
.cc-feat {
	background: var(--wp--preset--color--primary);
	color: #fff;
	border: 0 !important;
	border-radius: 16px;
	padding: 1.4rem 1.5rem !important;
	margin-bottom: 1.1rem !important;
	box-shadow: 0 12px 28px rgba(142,63,32,0.22);
}
.cc-feat::before { display: none !important; }
.cc-ultlabel {
	display: inline-block;
	background: rgba(255,255,255,0.20);
	color: #fff !important;
	padding: 0.22em 0.65em;
	border-radius: 999px;
	font-size: 0.6rem;
	letter-spacing: 0.1em;
}

/* --- Color de tierra distinto por sección (en el destacado) --- */
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(1) .cc-feat { background: #B0532E; } /* Jurisprudencia · terracota */
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(2) .cc-feat { background: #6F6A3A; } /* Derecho europeo · oliva */
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(1) .cc-feat { background: #C07A2B; } /* Actualidad legislativa · ocre */
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(2) .cc-feat { background: #8A5440; } /* Protección de datos · arcilla */
.cc-feat .cc-feattitle, .cc-feat .cc-feattitle a { color: #fff; }
.cc-feat .cc-feattitle a:hover { color: #fff; opacity: 0.9; }
.cc-feat .cc-featex { color: rgba(255,255,255,0.92) !important; }
.cc-feat .wp-block-post-date { display: block; margin-top: 0.5rem; color: rgba(255,255,255,0.72) !important; }

/* Hover de fila en violeta suave + sangría ligera */
.cc-row { border-radius: 8px; padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.cc-row:hover { background: rgba(176, 83, 46, 0.07); }

/* Buscador y botones bien redondeados (ya pill) + masthead apretado */
.cc-search .wp-block-search__inside-wrapper { border-radius: 999px; background: var(--wp--preset--color--surface); }
.wp-block-site-title { letter-spacing: -0.04em; }

/* Enlaces "ver todo" en mono violeta */
.cc-verlink a { color: var(--wp--preset--color--primary); }

/* --- Iconos de sección (monocromo, mask) --- */
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(1) .cc-seclabel::before,
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(2) .cc-seclabel::before,
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(1) .cc-seclabel::before,
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(2) .cc-seclabel::before {
  content:""; display:inline-block; width:1.05em; height:1.05em; margin-right:0.5em; vertical-align:-0.16em;
  background-color: currentColor;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center; -webkit-mask-size:contain; mask-size:contain;
}
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(1) .cc-seclabel::before { -webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m16%2016%203-8%203%208c-.87.65-1.92%201-3%201s-2.13-.35-3-1Z%27%2F%3E%3Cpath%20d%3D%27m2%2016%203-8%203%208c-.87.65-1.92%201-3%201s-2.13-.35-3-1Z%27%2F%3E%3Cpath%20d%3D%27M7%2021h10%27%2F%3E%3Cpath%20d%3D%27M12%203v18%27%2F%3E%3Cpath%20d%3D%27M3%207h2c2%200%205-1%207-2%202%201%205%202%207%202h2%27%2F%3E%3C%2Fsvg%3E"); mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27m16%2016%203-8%203%208c-.87.65-1.92%201-3%201s-2.13-.35-3-1Z%27%2F%3E%3Cpath%20d%3D%27m2%2016%203-8%203%208c-.87.65-1.92%201-3%201s-2.13-.35-3-1Z%27%2F%3E%3Cpath%20d%3D%27M7%2021h10%27%2F%3E%3Cpath%20d%3D%27M12%203v18%27%2F%3E%3Cpath%20d%3D%27M3%207h2c2%200%205-1%207-2%202%201%205%202%207%202h2%27%2F%3E%3C%2Fsvg%3E"); }
main .wp-block-columns:nth-of-type(1) > .wp-block-column:nth-of-type(2) .cc-seclabel::before { -webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%2F%3E%3Cpath%20d%3D%27M3%2012h18%27%2F%3E%3Cpath%20d%3D%27M12%203a14%2014%200%200%201%200%2018%2014%2014%200%200%201%200-18%27%2F%3E%3C%2Fsvg%3E"); mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%279%27%2F%3E%3Cpath%20d%3D%27M3%2012h18%27%2F%3E%3Cpath%20d%3D%27M12%203a14%2014%200%200%201%200%2018%2014%2014%200%200%201%200-18%27%2F%3E%3C%2Fsvg%3E"); }
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(1) .cc-seclabel::before { -webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2021h18%27%2F%3E%3Cpath%20d%3D%27M5%2021V10%27%2F%3E%3Cpath%20d%3D%27M9%2021V10%27%2F%3E%3Cpath%20d%3D%27M15%2021V10%27%2F%3E%3Cpath%20d%3D%27M19%2021V10%27%2F%3E%3Cpath%20d%3D%27M12%203%2021%208H3Z%27%2F%3E%3C%2Fsvg%3E"); mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M3%2021h18%27%2F%3E%3Cpath%20d%3D%27M5%2021V10%27%2F%3E%3Cpath%20d%3D%27M9%2021V10%27%2F%3E%3Cpath%20d%3D%27M15%2021V10%27%2F%3E%3Cpath%20d%3D%27M19%2021V10%27%2F%3E%3Cpath%20d%3D%27M12%203%2021%208H3Z%27%2F%3E%3C%2Fsvg%3E"); }
main .wp-block-columns:nth-of-type(2) > .wp-block-column:nth-of-type(2) .cc-seclabel::before { -webkit-mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%203l7%203v5c0%204.5-3%207-7%208-4-1-7-3.5-7-8V6Z%27%2F%3E%3Cpath%20d%3D%27M9.4%2012l1.8%201.8%203.4-3.8%27%2F%3E%3C%2Fsvg%3E"); mask-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%2523000%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M12%203l7%203v5c0%204.5-3%207-7%208-4-1-7-3.5-7-8V6Z%27%2F%3E%3Cpath%20d%3D%27M9.4%2012l1.8%201.8%203.4-3.8%27%2F%3E%3C%2Fsvg%3E"); }
.cc-seclabel { display:inline-flex !important; align-items:center; }
