/* ==========================================================================
   Wordprecero — estilos del theme (se carga después de Bootstrap)
   Letras pequeñas, modernas y nítidas · mobile-first
   ========================================================================== */

:root {
	--wpc-azul: #3a5b9b;
	--wpc-azul-osc: #2f4d88;
	--wpc-verde: #1fbf5b;
	--wpc-amarillo: #ffc107;
	--wpc-rojo: #ff0033;
	--wpc-fondo: #f6f8fc;
	--wpc-texto: #20304d;
	--wpc-suave: #6b7a94;
	--wpc-borde: #e3e8f2;
	--wpc-blanco: #fff;
	--wpc-radio: 10px;
	--wpc-sombra: 0 1px 2px rgba(32, 48, 77, .06), 0 4px 14px rgba(32, 48, 77, .05);
	--wpc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;

	/* Integración con variables de Bootstrap */
	--bs-body-font-family: var(--wpc-font);
	--bs-body-font-size: .875rem;       /* 14px en móvil */
	--bs-body-line-height: 1.65;
	--bs-body-color: var(--wpc-texto);
	--bs-body-bg: var(--wpc-fondo);
	--bs-primary: var(--wpc-azul);
	--bs-primary-rgb: 58, 91, 155;
	--bs-success: var(--wpc-verde);
	--bs-success-rgb: 31, 191, 91;
	--bs-link-color: var(--wpc-azul);
	--bs-link-color-rgb: 58, 91, 155;
	--bs-link-hover-color: var(--wpc-azul-osc);
	--bs-link-hover-color-rgb: 47, 77, 136;
	--bs-border-color: var(--wpc-borde);
	--bs-border-radius: var(--wpc-radio);
}

@media (min-width: 768px) {
	:root { --bs-body-font-size: .9375rem; } /* 15px en escritorio */
}

/* Nitidez del texto */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: "kern", "liga";
	letter-spacing: -.003em;
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--wpc-texto);
	font-weight: 700;
	letter-spacing: -.015em;
	line-height: 1.3;
	margin-bottom: .6em;
}
h1, .h1 { font-size: 1.45rem; }
h2, .h2 { font-size: 1.2rem; }
h3, .h3 { font-size: 1.05rem; }
h4, .h4 { font-size: .95rem; }
h5, .h5, h6, .h6 { font-size: .875rem; }
@media (min-width: 768px) {
	h1, .h1 { font-size: 1.75rem; }
	h2, .h2 { font-size: 1.35rem; }
	h3, .h3 { font-size: 1.12rem; }
}

a { text-decoration: none; transition: color .15s; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; height: auto; }
small, .small { font-size: .8em; }
::selection { background: var(--wpc-amarillo); color: #000; }

/* Accesibilidad */
.skip-link { position: absolute; left: -999px; top: 0; z-index: 9999; background: var(--wpc-amarillo); color: #000; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 2px solid var(--wpc-azul); outline-offset: 2px; }

/* Botones */
.btn { font-size: .85rem; font-weight: 600; border-radius: 8px; padding: .5rem 1rem; }
.btn-primary { --bs-btn-bg: var(--wpc-azul); --bs-btn-border-color: var(--wpc-azul); --bs-btn-hover-bg: var(--wpc-azul-osc); --bs-btn-hover-border-color: var(--wpc-azul-osc); --bs-btn-active-bg: var(--wpc-azul-osc); }
.btn-success { --bs-btn-bg: var(--wpc-verde); --bs-btn-border-color: var(--wpc-verde); --bs-btn-hover-bg: #19a54e; --bs-btn-hover-border-color: #19a54e; }
.btn-warning { --bs-btn-bg: var(--wpc-amarillo); --bs-btn-border-color: var(--wpc-amarillo); --bs-btn-color: #000; --bs-btn-hover-color: #000; }
.btn-danger { --bs-btn-bg: var(--wpc-rojo); --bs-btn-border-color: var(--wpc-rojo); }

/* ---------- Header ---------- */
.site-header {
	background: var(--wpc-blanco);
	border-bottom: 1px solid var(--wpc-borde);
	position: sticky; top: 0; z-index: 1030;
}
.admin-bar .site-header { top: 46px; }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

.site-header .navbar { padding: .45rem 0; }
.custom-logo { max-width: 53px; max-height: 35px; width: auto; height: auto; display: block; }
.site-title { font-size: 1rem; font-weight: 800; color: var(--wpc-azul); letter-spacing: -.02em; }
.site-title:hover { text-decoration: none; color: var(--wpc-azul-osc); }

.navbar-nav .nav-link { font-size: .85rem; font-weight: 500; color: var(--wpc-texto); padding: .55rem .75rem; border-radius: 6px; }
.navbar-nav .nav-link:hover,
.navbar-nav .current-menu-item > .nav-link,
.navbar-nav .current-menu-ancestor > .nav-link { color: var(--wpc-azul); background: var(--wpc-fondo); text-decoration: none; }
.dropdown-menu { font-size: .85rem; border-color: var(--wpc-borde); box-shadow: var(--wpc-sombra); border-radius: var(--wpc-radio); }
.dropdown-item:active { background: var(--wpc-azul); }
.navbar-toggler { border: 0; padding: .35rem .5rem; }
.navbar-toggler:focus { box-shadow: none; }

@media (max-width: 991.98px) {
	.navbar-collapse { border-top: 1px solid var(--wpc-borde); margin-top: .45rem; padding: .5rem 0; }
	.navbar-nav .nav-link { padding: .65rem .5rem; } /* área táctil cómoda */
	.header-search { margin-top: .5rem; }
}

.header-search .form-control { font-size: .82rem; height: 34px; }

/* ---------- Layout ---------- */
.site-main { padding: 1.25rem 0 2rem; }
@media (min-width: 768px) { .site-main { padding: 2rem 0 3rem; } }

.wpc-card {
	background: var(--wpc-blanco);
	border: 1px solid var(--wpc-borde);
	border-radius: var(--wpc-radio);
	box-shadow: var(--wpc-sombra);
}

/* Encabezado de archivos */
.archive-header { margin-bottom: 1.25rem; }
.archive-header .archive-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--wpc-suave); font-weight: 600; }
.archive-header h1 { margin: .15rem 0 .35rem; }
.archive-description { color: var(--wpc-suave); font-size: .85rem; }
.archive-description p:last-child { margin-bottom: 0; }

/* Migas de pan */
.wpc-breadcrumb { font-size: .75rem; color: var(--wpc-suave); margin-bottom: .75rem; }
.wpc-breadcrumb a { color: var(--wpc-suave); }
.wpc-breadcrumb a:hover { color: var(--wpc-azul); }
.wpc-breadcrumb .sep { margin: 0 .35rem; opacity: .6; }

/* ---------- Tarjetas de posts ---------- */
.post-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.post-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(32, 48, 77, .09); }
.post-card .thumb { display: block; aspect-ratio: 16/9; background: var(--wpc-fondo); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.post-card .entry-title { font-size: .98rem; margin: .3rem 0 .4rem; line-height: 1.35; }
.post-card .entry-title a { color: var(--wpc-texto); }
.post-card .entry-title a:hover { color: var(--wpc-azul); text-decoration: none; }
.post-card .excerpt { font-size: .82rem; color: var(--wpc-suave); margin-bottom: .6rem; }
.post-card .excerpt p { margin: 0; }
.post-card .read-more { font-size: .78rem; font-weight: 600; margin-top: auto; }

.cat-badge {
	display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
	color: var(--wpc-azul); background: rgba(58, 91, 155, .09); padding: .18rem .5rem; border-radius: 4px;
}
.cat-badge:hover { background: var(--wpc-azul); color: #fff; text-decoration: none; }

.entry-meta { font-size: .75rem; color: var(--wpc-suave); display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.entry-meta a { color: var(--wpc-suave); }

.sticky-label { background: var(--wpc-amarillo); color: #000; font-size: .66rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; }

/* ---------- Single / Page ---------- */
.entry { padding: 1.1rem; }
@media (min-width: 768px) { .entry { padding: 2rem 2.25rem; } }
.entry-header .entry-title { margin: .5rem 0 .6rem; }
.entry-thumb { margin: 0 -1.1rem 1.25rem; }
.entry-thumb img { width: 100%; height: auto; display: block; }
@media (min-width: 768px) { .entry-thumb { margin: 0 0 1.5rem; border-radius: var(--wpc-radio); overflow: hidden; } }

/* Contenido: tamaño cómodo y nítido */
.entry-content { font-size: .9rem; line-height: 1.75; word-wrap: break-word; }
@media (min-width: 768px) { .entry-content { font-size: .95rem; } }
.entry-content > * { margin-bottom: 1.1em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li { margin-bottom: .3em; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(58, 91, 155, .35); text-underline-offset: 2px; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content img { border-radius: 8px; }
.entry-content blockquote, .wp-block-quote {
	border-left: 3px solid var(--wpc-azul); background: var(--wpc-fondo);
	padding: .8rem 1rem; border-radius: 0 8px 8px 0; font-style: italic; color: #3b4a66;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content pre { background: #1e2638; color: #e6ebf5; padding: 1rem; border-radius: 8px; font-size: .8rem; overflow-x: auto; }
.entry-content code { font-size: .82em; color: #c7254e; background: #f3f4f8; padding: .1rem .3rem; border-radius: 4px; }
.entry-content pre code { color: inherit; background: none; padding: 0; }
.entry-content table { width: 100%; font-size: .82rem; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--wpc-borde); padding: .5rem .65rem; }
.entry-content th { background: var(--wpc-fondo); font-weight: 600; }
.entry-content iframe, .entry-content video, .entry-content embed { max-width: 100%; }
.entry-content hr { border-color: var(--wpc-borde); opacity: 1; }

/* Bloques / clases WordPress */
.alignleft { float: left; margin: .3rem 1.2rem .8rem 0; }
.alignright { float: right; margin: .3rem 0 .8rem 1.2rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
@media (max-width: 575.98px) { .alignleft, .alignright { float: none; margin: 0 auto 1rem; display: block; } }
.wp-caption, figure figcaption, .wp-element-caption { font-size: .75rem; color: var(--wpc-suave); text-align: center; margin-top: .4rem; }
.wp-block-button__link { font-size: .85rem; font-weight: 600; border-radius: 8px; background: var(--wpc-azul); text-decoration: none !important; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.gallery-caption, .bypostauthor { display: block; }

/* Etiquetas */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag-list a { font-size: .74rem; color: var(--wpc-texto); background: var(--wpc-fondo); border: 1px solid var(--wpc-borde); padding: .2rem .6rem; border-radius: 20px; }
.tag-list a:hover { border-color: var(--wpc-azul); color: var(--wpc-azul); text-decoration: none; }

/* Caja autor */
.author-box { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem; }
.author-box img { border-radius: 50%; flex-shrink: 0; }
.author-box .name { font-weight: 700; font-size: .9rem; }
.author-box p { font-size: .82rem; color: var(--wpc-suave); margin: .2rem 0 0; }

/* Navegación entre posts */
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr; gap: .6rem; }
@media (min-width: 576px) { .post-navigation .nav-links { grid-template-columns: 1fr 1fr; } }
.post-navigation a { display: block; padding: .8rem 1rem; background: #fff; border: 1px solid var(--wpc-borde); border-radius: var(--wpc-radio); font-size: .82rem; font-weight: 600; color: var(--wpc-texto); height: 100%; }
.post-navigation a:hover { border-color: var(--wpc-azul); text-decoration: none; }
.post-navigation .meta-nav { display: block; font-size: .7rem; font-weight: 500; color: var(--wpc-suave); text-transform: uppercase; letter-spacing: .06em; }
.post-navigation .nav-next { text-align: right; }

/* Relacionados */
.related-title { font-size: .95rem; margin-bottom: .8rem; }

/* ---------- Paginación ---------- */
.wpc-pagination .page-link { font-size: .8rem; color: var(--wpc-texto); border-color: var(--wpc-borde); min-width: 36px; text-align: center; }
.wpc-pagination .page-item.active .page-link { background: var(--wpc-azul); border-color: var(--wpc-azul); color: #fff; }
.wpc-pagination .page-link:hover { color: var(--wpc-azul); text-decoration: none; }

/* ---------- Sidebar / widgets ---------- */
.widget { padding: 1rem 1.1rem; margin-bottom: 1rem; font-size: .84rem; }
.widget-title, .widget .wp-block-heading { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--wpc-suave); margin-bottom: .75rem; font-weight: 700; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .35rem 0; border-bottom: 1px dashed var(--wpc-borde); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--wpc-texto); }
.widget a:hover { color: var(--wpc-azul); }
.widget select { max-width: 100%; }
.tagcloud a, .wp-block-tag-cloud a { font-size: .74rem !important; display: inline-block; margin: 0 .25rem .35rem 0; padding: .15rem .55rem; border: 1px solid var(--wpc-borde); border-radius: 20px; }

/* Buscador */
.search-form .form-control { font-size: .85rem; }

/* ---------- Comentarios ---------- */
.comments-area { padding: 1.1rem; }
@media (min-width: 768px) { .comments-area { padding: 1.75rem 2rem; } }
.comments-title, .comment-reply-title { font-size: 1rem; }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { padding-left: 1rem; border-left: 2px solid var(--wpc-borde); margin-left: .5rem; }
.comment-body { padding: .9rem 0; border-bottom: 1px solid var(--wpc-borde); font-size: .85rem; }
.comment-author { display: flex; align-items: center; gap: .5rem; font-size: .84rem; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .72rem; margin: .15rem 0 .5rem; }
.comment-metadata a { color: var(--wpc-suave); }
.reply a { font-size: .75rem; font-weight: 600; }
.comment-form label { font-size: .8rem; font-weight: 600; display: block; margin-bottom: .25rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
	width: 100%; font-size: .85rem; padding: .5rem .7rem; border: 1px solid var(--wpc-borde); border-radius: 8px; background: #fff;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--wpc-azul); outline: 0; box-shadow: 0 0 0 3px rgba(58, 91, 155, .15); }
.comment-form .comment-form-cookies-consent { display: flex; gap: .4rem; align-items: flex-start; font-size: .78rem; }
.comment-form .comment-form-cookies-consent label { font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .78rem; color: var(--wpc-suave); }

/* ---------- 404 / vacío ---------- */
.error-404 .code { font-size: 4rem; font-weight: 800; color: var(--wpc-azul); line-height: 1; letter-spacing: -.04em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--wpc-texto); color: #c6cfe0; font-size: .8rem; padding: 2rem 0 1.25rem; }
.site-footer a { color: #fff; }
.site-footer .widget { background: none; border: 0; box-shadow: none; padding: 0; }
.site-footer .widget-title, .site-footer .wp-block-heading { color: #fff; }
.site-footer .widget li { border-color: rgba(255, 255, 255, .1); }
.site-footer .widget a { color: #c6cfe0; }
.site-footer .widget a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1rem; margin-top: 1.25rem; font-size: .75rem; }
.footer-menu { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.footer-menu a { color: #c6cfe0; }

/* Botón volver arriba */
.to-top {
	position: fixed; right: 14px; bottom: 14px; width: 38px; height: 38px; border-radius: 50%;
	background: var(--wpc-azul); color: #fff; border: 0; display: grid; place-items: center;
	opacity: 0; visibility: hidden; transition: opacity .2s; box-shadow: var(--wpc-sombra); z-index: 1020;
}
.to-top.show { opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
