/*
Theme Name: HallaPalabra
Theme URI: https://hallapalabra.com/
Author: HallaPalabra
Author URI: https://hallapalabra.com/
Description: Tema ligero, accesible y optimizado para HallaPalabra.com. Diseñado para trabajar con Yoast SEO y LiteSpeed Cache sin duplicar funciones.
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
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog
*/

:root {
  --hp-green-900: #0b5d32;
  --hp-green-800: #08743b;
  --hp-green-700: #07883f;
  --hp-green-600: #0aa149;
  --hp-green-500: #16b85a;
  --hp-green-100: #e9f8ef;
  --hp-green-50: #f5fbf7;
  --hp-ink-950: #111827;
  --hp-ink-800: #1f2937;
  --hp-ink-600: #4b5563;
  --hp-ink-500: #6b7280;
  --hp-line: #e5e7eb;
  --hp-surface: #ffffff;
  --hp-bg: #f7f9f8;
  --hp-warning: #b8680a;
  --hp-warning-bg: #fff8e8;
  --hp-radius-sm: 10px;
  --hp-radius: 16px;
  --hp-radius-lg: 24px;
  --hp-shadow-sm: 0 1px 2px rgba(17, 24, 39, .05), 0 8px 24px rgba(17, 24, 39, .04);
  --hp-shadow: 0 18px 50px rgba(17, 24, 39, .08);
  --hp-container: 1180px;
  --hp-focus: 0 0 0 3px rgba(22, 184, 90, .25);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--hp-bg);
  color: var(--hp-ink-950);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--hp-green-800); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--hp-green-900); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: none; box-shadow: var(--hp-focus); border-radius: 6px; }

.hp-container { width: min(calc(100% - 32px), var(--hp-container)); margin-inline: auto; }
.hp-narrow { width: min(calc(100% - 32px), 820px); margin-inline: auto; }
.hp-section { padding: 72px 0; }
.hp-section--compact { padding: 48px 0; }
.hp-section--white { background: var(--hp-surface); }
.hp-section-title { margin: 0 0 10px; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.15; letter-spacing: -.025em; }
.hp-section-lead { margin: 0 0 30px; color: var(--hp-ink-600); max-width: 760px; }
.hp-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; color: var(--hp-green-800); font-weight: 800; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; }

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 99999; padding: 10px 14px; background: #fff; color: #111827; border: 1px solid var(--hp-line); box-shadow: var(--hp-shadow-sm); }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(229,231,235,.85); backdrop-filter: blur(14px); }
.site-header__inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.site-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link, .hp-brand { display: inline-flex; align-items: center; text-decoration: none; }
.custom-logo { width: auto; max-height: 48px; }
.hp-brand__logo { display: block; width: 230px; max-width: 44vw; height: auto; }
.hp-brand__text { font-weight: 900; font-size: 1.25rem; color: var(--hp-ink-950); letter-spacing: -.03em; }
.main-navigation { display: flex; align-items: center; }
.main-navigation ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.main-navigation a { display: block; padding: 10px 12px; color: var(--hp-ink-800); font-weight: 700; font-size: .95rem; text-decoration: none; border-radius: 9px; }
.main-navigation a:hover, .main-navigation .current-menu-item > a { color: var(--hp-green-800); background: var(--hp-green-50); }
.menu-toggle { display: none; border: 1px solid var(--hp-line); background: #fff; color: var(--hp-ink-950); padding: 9px; border-radius: 10px; cursor: pointer; }
.menu-toggle svg { display: block; }

.hp-hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--hp-green-50) 100%); border-bottom: 1px solid var(--hp-line); }
.hp-hero::before, .hp-hero::after { content: ""; position: absolute; border-radius: 999px; filter: blur(1px); pointer-events: none; }
.hp-hero::before { width: 420px; height: 420px; right: -180px; top: -220px; background: rgba(22,184,90,.08); }
.hp-hero::after { width: 280px; height: 280px; left: -170px; bottom: -170px; background: rgba(11,93,50,.06); }
.hp-hero__inner { position: relative; z-index: 1; padding: 82px 0 68px; text-align: center; }
.hp-hero h1 { max-width: 850px; margin: 0 auto 16px; font-size: clamp(2.25rem, 6vw, 4.65rem); line-height: .98; letter-spacing: -.055em; }
.hp-hero__lead { max-width: 720px; margin: 0 auto 34px; color: var(--hp-ink-600); font-size: clamp(1rem, 2vw, 1.2rem); }

.hp-search-card { max-width: 920px; margin: 0 auto; padding: 24px; text-align: left; background: rgba(255,255,255,.98); border: 1px solid var(--hp-line); border-radius: var(--hp-radius-lg); box-shadow: var(--hp-shadow); }
.hp-search-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.hp-field { display: flex; flex-direction: column; gap: 6px; }
.hp-field--wide { grid-column: span 2; }
.hp-field label { font-size: .82rem; font-weight: 800; color: var(--hp-ink-800); }
.hp-input, .hp-select { width: 100%; min-height: 48px; padding: 10px 13px; color: var(--hp-ink-950); background: #fff; border: 1px solid #d7dce1; border-radius: 10px; transition: border-color .18s ease, box-shadow .18s ease; }
.hp-input::placeholder { color: #9ca3af; }
.hp-input:focus, .hp-select:focus { border-color: var(--hp-green-500); outline: none; box-shadow: var(--hp-focus); }
.hp-search-actions { display: flex; justify-content: center; margin-top: 18px; }
.hp-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 22px; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--hp-green-700), var(--hp-green-500)); color: #fff; font-weight: 850; text-decoration: none; cursor: pointer; box-shadow: 0 10px 22px rgba(10,161,73,.17); transition: transform .16s ease, box-shadow .16s ease; }
.hp-button:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(10,161,73,.22); }
.hp-button--ghost { background: #fff; color: var(--hp-green-800); border: 1px solid #cae8d5; box-shadow: none; }
.hp-button--ghost:hover { color: var(--hp-green-900); background: var(--hp-green-50); box-shadow: none; }
.hp-search-tip { margin: 12px 0 0; text-align: center; color: var(--hp-ink-500); font-size: .88rem; }

.hp-chip-list { display: flex; flex-wrap: wrap; gap: 10px; }
.hp-chip { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; background: #fff; border: 1px solid var(--hp-line); color: var(--hp-ink-800); border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .92rem; box-shadow: 0 1px 0 rgba(17,24,39,.02); }
.hp-chip:hover { color: var(--hp-green-800); border-color: #bcdcca; background: var(--hp-green-50); }

.hp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hp-feature { padding: 24px; background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); box-shadow: var(--hp-shadow-sm); }
.hp-feature__icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; background: var(--hp-green-100); color: var(--hp-green-800); border-radius: 12px; font-size: 1.2rem; font-weight: 900; }
.hp-feature h3 { margin: 0 0 7px; font-size: 1.08rem; }
.hp-feature p { margin: 0; color: var(--hp-ink-600); }

.hp-link-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.hp-link-tile { display: flex; min-height: 56px; align-items: center; justify-content: center; padding: 10px 12px; background: #fff; border: 1px solid var(--hp-line); border-radius: 12px; color: var(--hp-ink-800); font-weight: 800; text-decoration: none; text-align: center; }
.hp-link-tile:hover { color: var(--hp-green-800); background: var(--hp-green-50); border-color: #c4e3d0; }

.hp-example { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: stretch; }
.hp-example__copy { padding: 28px; background: #10291d; color: #fff; border-radius: var(--hp-radius-lg); }
.hp-example__copy p { color: #cde1d5; }
.hp-word-cloud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 28px; background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius-lg); }
.hp-word { display: grid; place-items: center; min-height: 54px; padding: 9px; border: 1px solid #dce6e0; border-radius: 10px; background: var(--hp-green-50); font-weight: 850; color: var(--hp-ink-800); }

.hp-content { padding: 48px 0 80px; }
.hp-content-card { padding: clamp(24px, 4vw, 42px); background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius-lg); box-shadow: var(--hp-shadow-sm); }
.entry-header { margin-bottom: 24px; }
.entry-title { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
.entry-meta { color: var(--hp-ink-500); font-size: .92rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { line-height: 1.2; letter-spacing: -.02em; }
.entry-content h2 { margin-top: 2em; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote { margin-inline: 0; padding: 18px 22px; border-left: 4px solid var(--hp-green-500); background: var(--hp-green-50); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--hp-line); text-align: left; }

.hp-breadcrumbs { padding: 18px 0 0; color: var(--hp-ink-500); font-size: .88rem; }
.hp-breadcrumbs a { color: var(--hp-ink-600); }

.hp-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-post-card { overflow: hidden; background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); box-shadow: var(--hp-shadow-sm); }
.hp-post-card__image { display: block; aspect-ratio: 16/9; overflow: hidden; background: #edf2ef; }
.hp-post-card__image img { width: 100%; height: 100%; object-fit: cover; }
.hp-post-card__body { padding: 20px; }
.hp-post-card h2 { margin: 0 0 9px; font-size: 1.22rem; line-height: 1.25; }
.hp-post-card h2 a { color: var(--hp-ink-950); text-decoration: none; }
.hp-post-card h2 a:hover { color: var(--hp-green-800); }
.hp-post-card p { color: var(--hp-ink-600); }

.pagination, .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.page-numbers { display: inline-grid; place-items: center; min-width: 42px; min-height: 42px; padding: 7px 11px; background: #fff; border: 1px solid var(--hp-line); border-radius: 10px; text-decoration: none; }
.page-numbers.current { background: var(--hp-green-800); color: #fff; border-color: var(--hp-green-800); }

.hp-search-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.hp-filter-panel { position: sticky; top: 96px; padding: 20px; background: #fff; border: 1px solid var(--hp-line); border-radius: var(--hp-radius); box-shadow: var(--hp-shadow-sm); }
.hp-filter-panel h2 { margin-top: 0; font-size: 1.1rem; }
.hp-filter-panel .hp-field + .hp-field { margin-top: 12px; }
.hp-results-panel { min-width: 0; }
.hp-result-empty { padding: 36px; background: #fff; border: 1px dashed #cfd8d2; border-radius: var(--hp-radius); color: var(--hp-ink-600); text-align: center; }

.site-footer { padding: 52px 0 28px; background: #0f1d16; color: #d8e4dc; }
.site-footer a { color: #eaf5ee; }
.site-footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 32px; }
.site-footer__brand img { width: 220px; height: auto; filter: brightness(0) invert(1); opacity: .95; }
.site-footer__brand p { max-width: 420px; color: #a9bdb1; }
.site-footer h2 { margin: 0 0 12px; color: #fff; font-size: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li + li { margin-top: 7px; }
.site-footer__bottom { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.11); color: #9fb2a7; font-size: .9rem; }

.not-found { text-align: center; padding: 80px 0; }
.not-found__code { margin: 0; font-size: clamp(5rem, 16vw, 11rem); line-height: .8; color: var(--hp-green-100); letter-spacing: -.08em; }

@media (max-width: 980px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .main-navigation { position: absolute; left: 16px; right: 16px; top: calc(100% + 8px); display: none; padding: 12px; background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; box-shadow: var(--hp-shadow); }
  .main-navigation.is-open { display: block; }
  .main-navigation ul { display: block; }
  .main-navigation a { padding: 12px; }
  .hp-search-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-link-grid { grid-template-columns: repeat(4, 1fr); }
  .hp-grid-3, .hp-post-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-example { grid-template-columns: 1fr; }
  .hp-search-layout { grid-template-columns: 1fr; }
  .hp-filter-panel { position: static; }
}

@media (max-width: 680px) {
  .hp-container, .hp-narrow { width: min(calc(100% - 22px), var(--hp-container)); }
  .site-header__inner { min-height: 64px; }
  .hp-brand__logo { width: 190px; }
  .hp-hero__inner { padding: 56px 0 44px; }
  .hp-search-card { padding: 16px; border-radius: 18px; }
  .hp-search-grid { grid-template-columns: 1fr; }
  .hp-field--wide { grid-column: auto; }
  .hp-button { width: 100%; }
  .hp-grid-3, .hp-post-grid, .site-footer__top { grid-template-columns: 1fr; }
  .hp-link-grid { grid-template-columns: repeat(3, 1fr); }
  .hp-word-cloud { grid-template-columns: repeat(2, 1fr); padding: 18px; }
  .hp-section { padding: 52px 0; }
  .hp-section--compact { padding: 36px 0; }
}

@media (max-width: 420px) {
  .hp-link-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-chip { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Editable Gutenberg homepage */
.hp-home-content > .wp-block-group { margin-top: 0; margin-bottom: 0; }
.hp-home-content .hp-container,
.hp-home-content .hp-narrow { margin-inline: auto; }
.hp-home-title { max-width: 850px; margin: 0 auto 16px !important; font-size: clamp(2.25rem, 6vw, 4.65rem) !important; line-height: .98 !important; letter-spacing: -.055em !important; }
.hp-field-help { color: var(--hp-ink-500); font-weight: 600; }
.hp-chip-list--spaced { margin-top: 18px; }
.hp-home-benefits { margin-top: 28px; margin-bottom: 0; }
.hp-home-benefits .hp-feature { margin: 0; }
.hp-home-benefits .hp-feature__icon { margin: 0 0 16px; }
.hp-home-benefits .hp-feature h3 { margin-top: 0; }
.hp-eyebrow--light { color: #7de2a4; }
.hp-example > .wp-block-shortcode { margin: 0; }
.hp-example__copy .wp-block-buttons { margin-top: 24px; }
.hp-button-block .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 22px; border-radius: 11px; background: #fff; color: var(--hp-green-800); border: 1px solid #cae8d5; font-weight: 850; text-decoration: none; }
.hp-button-block .wp-block-button__link:hover { color: var(--hp-green-900); background: var(--hp-green-50); }
.hp-about-section p { color: var(--hp-ink-600); }
.hp-faq-section { background: var(--hp-bg); }
.hp-faq-item { margin: 12px 0; padding: 0; background: #fff; border: 1px solid var(--hp-line); border-radius: 14px; box-shadow: var(--hp-shadow-sm); overflow: hidden; }
.hp-faq-item summary { cursor: pointer; padding: 17px 20px; font-weight: 800; color: var(--hp-ink-950); }
.hp-faq-item > p { margin: 0; padding: 0 20px 18px; color: var(--hp-ink-600); }
.hp-faq-item[open] summary { color: var(--hp-green-800); }

@media (max-width: 680px) {
  .hp-home-title { font-size: clamp(2.15rem, 12vw, 3.4rem) !important; }
}
