/*
Theme Name: HallaPalabra Pro
Theme URI: https://hallapalabra.com/
Author: HallaPalabra
Author URI: https://hallapalabra.com/
Description: Tema ligero y accesible para HallaPalabra.com. Una sola hoja de estilos, sin fuentes externas ni jQuery. Diseñado para funcionar con el plugin HallaPalabra Core y Yoast SEO.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hallapalabra-pro
*/

:root {
	--hp-brand: #07883f;
	--hp-brand-dark: #0b5d32;
	--hp-brand-soft: #e9f8ef;
	--hp-ink: #14201a;
	--hp-muted: #56635b;
	--hp-line: #e2e8e4;
	--hp-surface: #ffffff;
	--hp-bg: #f6f8f6;
	--hp-radius: 14px;
	--hp-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--hp-header-h: 68px;
}

/* Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hp-header-h) + 12px); }
body { margin: 0; font-family: var(--hp-font); font-size: 1rem; line-height: 1.6; color: var(--hp-ink); background: var(--hp-bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--hp-brand-dark); text-underline-offset: 2px; }
a:hover { color: var(--hp-brand); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; color: var(--hp-ink); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
:focus-visible { outline: 3px solid var(--hp-brand); outline-offset: 2px; border-radius: 4px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--hp-ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 32px); }
code { padding: 1px 6px; border-radius: 6px; background: #eef2ef; font-size: .9em; }

/* Header ---------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .94); backdrop-filter: saturate(1.6) blur(10px); border-bottom: 1px solid var(--hp-line); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { display: flex; align-items: center; gap: 20px; min-height: var(--hp-header-h); }
.site-logo { display: block; flex: none; line-height: 0; }
.site-logo img, .custom-logo { width: 180px; height: auto; }
.site-nav { margin-left: auto; }
.nav-menu { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--hp-ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.nav-menu a:hover, .nav-menu [aria-current="page"], .nav-menu .current-menu-item > a { background: var(--hp-brand-soft); color: var(--hp-brand-dark); }
.header-search { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; background: var(--hp-brand); color: #fff; font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.header-search:hover { background: var(--hp-brand-dark); color: #fff; }
.nav-toggle { display: none; margin-left: 4px; padding: 8px; border: 1px solid var(--hp-line); border-radius: 10px; background: #fff; color: var(--hp-ink); cursor: pointer; }

@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.header-search { margin-left: auto; }
	.header-search span { display: none; }
	.header-search { padding: 0 12px; }
	.site-nav { position: fixed; inset: var(--hp-header-h) 0 auto 0; margin: 0; padding: 12px 16px 20px; background: #fff; border-bottom: 1px solid var(--hp-line); box-shadow: 0 12px 24px rgb(0 0 0 / .08); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .18s ease; }
	.admin-bar .site-nav { top: calc(var(--hp-header-h) + 46px); }
	.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
	.nav-menu { flex-direction: column; }
	.nav-menu a { padding: 12px; font-size: 1.05rem; }
	.site-logo img, .custom-logo { width: 150px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Breadcrumbs ------------------------------------------------------------ */
.breadcrumbs { padding-top: 16px; font-size: .88rem; color: var(--hp-muted); }
.breadcrumbs a { color: var(--hp-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--hp-brand-dark); text-decoration: underline; }
.breadcrumbs .breadcrumb_last { color: var(--hp-ink); }

/* Pages ---------------------------------------------------------------- */
.site-main { padding-block: 28px 72px; }
.entry-header { margin-bottom: 18px; }
.entry-title { margin: 0; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.7rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
.entry-content { font-size: 1.05rem; }
.entry-content > p:first-child { font-size: 1.12rem; color: var(--hp-muted); max-width: 70ch; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.entry-content th, .entry-content td { padding: 8px 10px; border: 1px solid var(--hp-line); text-align: left; vertical-align: top; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content .hpc-chip-list, .entry-content .hpc-letter-grid, .entry-content .hpc-link-columns, .entry-content .hpc-related__grid, .entry-content .hpc-word-cloud, .entry-content .hpc-stats, .entry-content .hpc-random__grid { padding-left: 0; }

/* Home ------------------------------------------------------------------ */
.site-main--home { padding-top: 0; }
.home-content > .hpc-hero { position: relative; margin: 0 calc(50% - 50vw); padding: 56px max(16px, calc(50vw - 590px)) 48px; background:
	radial-gradient(900px 300px at 85% -10%, rgb(22 184 90 / .16), transparent 60%),
	radial-gradient(700px 260px at 0% 110%, rgb(7 136 63 / .10), transparent 60%),
	linear-gradient(#fbfdfb, #f2f7f3); border-bottom: 1px solid var(--hp-line); }
.hpc-hero h1 { max-width: 18ch; margin: 0 0 12px; font-size: clamp(2.2rem, 1.4rem + 3.6vw, 3.7rem); line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.hpc-hero .hpc-lead { max-width: 60ch; margin: 0 0 26px; font-size: 1.15rem; color: var(--hp-muted); }
.hpc-hero .hpc-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--hp-line); color: var(--hp-brand-dark); }
.hpc-hero .hpc-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hp-brand); box-shadow: 0 0 0 4px rgb(7 136 63 / .15); }
.hpc-home-search { max-width: 980px; padding: 20px; border: 1px solid var(--hp-line); border-radius: 18px; background: #fff; box-shadow: 0 18px 40px -24px rgb(11 93 50 / .35); }
.hpc-home-search .hpc-form__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hpc-home-search .hpc-button { justify-self: end; min-width: 220px; }
@media (max-width: 720px) { .hpc-home-search .hpc-form__grid { grid-template-columns: 1fr 1fr; } .hpc-home-search .hpc-button { justify-self: stretch; } }

.home-content > .hpc-section { padding: 44px 0 8px; }
.home-content > .hpc-section > h2 { margin: 0 0 6px; }
.home-content > .hpc-section > .hpc-lead { margin: 0 0 18px; color: var(--hp-muted); }
.hpc-section--about { max-width: 820px; }
.hpc-section--about p { font-size: 1.05rem; }
.home-content .hpc-faq { max-width: 820px; }
.home-content .hpc-faq details { border-top: 1px solid var(--hp-line); padding: 14px 0; }
.home-content .hpc-faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.home-content .hpc-faq details p { margin: 8px 0 0; color: var(--hp-muted); }

/* Generic content blocks used in pages --------------------------------- */
.entry-content details { border-top: 1px solid var(--hp-line); padding: 12px 0; }
.entry-content summary { cursor: pointer; font-weight: 700; }

/* 404 ------------------------------------------------------------------- */
.error-404 .hpc-form { margin: 24px 0; padding: 20px; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); background: #fff; }
.error-404__links { display: flex; flex-wrap: wrap; gap: 12px; }

/* Footer ---------------------------------------------------------------- */
.site-footer { margin-top: 40px; padding: 48px 0 28px; background: #0f2017; color: #c9d6ce; }
.site-footer a { color: #e7efe9; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer__brand .site-logo img { width: 170px; filter: brightness(0) invert(1); opacity: .95; }
.site-footer__brand p { max-width: 34ch; font-size: .95rem; }
.site-footer h2 { margin: 0 0 12px; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #8fb79d; }
.site-footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .95rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / .12); font-size: .88rem; }
.site-footer .hpc-linkbutton { color: #e7efe9; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .hpc-landing__aside, .hpc-related, .hpc-ad, .breadcrumbs { display: none !important; } body { background: #fff; } }
