/*
Theme Name: Promalia
Theme URI: https://promalia.com
Author: Promalia
Description: Tema oficial de Promalia: directorio de promociones y códigos de referido en modo oscuro fintech. Diseñado para funcionar con el plugin Promalia Core (cuenta atrás, votos, Boost, AdSense).
Version: 1.0.2
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: promalia-theme
Tags: dark, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
	--bg: #0A0A0C;
	--bg-2: #0E0E12;
	--card: #121217;
	--card-2: #17171E;
	--border: rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.14);
	--text: #F4F4F5;
	--muted: #A1A1AA;
	--subtle: #71717A;
	--neon: #22C55E;
	--neon-2: #4ADE80;
	--neon-soft: rgba(34, 197, 94, 0.12);
	--boost: #EAB308;
	--danger: #EF4444;
	--radius: 16px;
	--radius-sm: 10px;
	--font: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
	--header-h: 72px;
	--container: 1200px;
}

/* ==========================================================================
   Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

html.nav-open,
html.nav-open body {
	overflow: hidden;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--neon-2);
	text-decoration: none;
}

a:hover {
	color: #86EFAC;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	color: var(--text);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

p {
	margin: 0 0 1em;
}

::selection {
	background: rgba(34, 197, 94, 0.35);
	color: #FFFFFF;
}

:focus-visible {
	outline: 2px solid var(--neon);
	outline-offset: 2px;
}

.screen-reader-text {
	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 !important;
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 10px 16px;
	clip: auto;
	background: var(--neon);
	color: #04130A;
	border-radius: 8px;
	font-weight: 700;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 20px;
}

.container--narrow {
	max-width: 820px;
}

.site-main {
	display: block;
	min-height: 60vh;
	outline: none;
}

/* ==========================================================================
   Botones del tema
   ========================================================================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	font-family: var(--font);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.1;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn:active {
	transform: translateY(1px);
}

.btn--primary {
	background: linear-gradient(135deg, #4ADE80 0%, #22C55E 55%, #16A34A 100%);
	border-color: rgba(74, 222, 128, 0.6);
	color: #04130A;
	box-shadow: 0 6px 24px rgba(34, 197, 94, 0.25);
}

.btn--primary:hover {
	color: #04130A;
	box-shadow: 0 8px 32px rgba(34, 197, 94, 0.4);
}

.btn--ghost {
	background: rgba(255, 255, 255, 0.03);
	border-color: var(--border-strong);
	color: var(--text);
}

.btn--ghost:hover {
	color: var(--text);
	border-color: rgba(34, 197, 94, 0.5);
	background: var(--neon-soft);
}

.btn--sm {
	min-height: 38px;
	padding: 8px 14px;
	font-size: 14px;
}

.text-link {
	display: inline-block;
	margin-top: 8px;
	font-weight: 700;
}

.kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 14px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--neon-soft);
	border: 1px solid rgba(34, 197, 94, 0.3);
	color: var(--neon-2);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kicker__dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	box-shadow: 0 0 10px currentColor;
}

.kicker--danger {
	color: #FCA5A5;
	background: rgba(239, 68, 68, 0.12);
	border-color: rgba(239, 68, 68, 0.35);
}

/* ==========================================================================
   Cabecera
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 9000;
	height: var(--header-h);
	background: rgba(10, 10, 12, 0.82);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-bar .site-header {
	top: 32px;
}

.site-header.is-scrolled {
	border-bottom-color: var(--border);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	height: 100%;
}

.site-header__brand {
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.site-logo,
.custom-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.custom-logo {
	max-height: 40px;
	width: auto;
}

.site-logo__text {
	font-size: 22px;
	font-weight: 900;
	letter-spacing: 0.1em;
	color: #FFFFFF;
	line-height: 1;
}

.site-logo:hover .pm-logo {
	filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.45));
}

.site-nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.site-nav .menu {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav .menu li {
	position: relative;
	margin: 0;
}

.site-nav .menu a {
	display: block;
	padding: 8px 14px;
	border-radius: 8px;
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav .menu a:hover,
.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a,
.site-nav .menu .current-menu-ancestor > a {
	color: var(--text);
	background: rgba(255, 255, 255, 0.05);
}

.site-nav .menu .current-menu-item > a,
.site-nav .menu .current_page_item > a {
	color: var(--neon-2);
}

.site-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.site-nav .menu li:hover > .sub-menu,
.site-nav .menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.site-nav__account--mobile {
	display: none;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.header-add .pm-btn {
	min-height: 38px;
	padding: 8px 14px;
	font-size: 14px;
}

.user-menu {
	position: relative;
}

.user-menu__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px 4px 4px;
	border-radius: 999px;
	border: 1px solid var(--border-strong);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
	font-family: var(--font);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.user-menu__toggle:hover {
	border-color: rgba(34, 197, 94, 0.5);
}

.user-menu__avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.user-menu__name {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.user-menu__panel {
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	min-width: 220px;
	padding: 6px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
	z-index: 10;
}

.user-menu__panel a {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	color: var(--text);
	font-size: 14px;
	font-weight: 600;
}

.user-menu__panel a:hover {
	background: var(--neon-soft);
	color: var(--neon-2);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	margin-left: auto;
	padding: 0 11px;
	border-radius: 10px;
	border: 1px solid var(--border-strong);
	background: rgba(255, 255, 255, 0.03);
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	height: 2px;
	border-radius: 2px;
	background: var(--text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(4) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Portada: hero
   ========================================================================== */
.hero {
	position: relative;
	overflow: hidden;
	padding: clamp(48px, 8vw, 110px) 0 clamp(48px, 7vw, 90px);
	border-bottom: 1px solid var(--border);
}

.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 48px 48px;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
	pointer-events: none;
}

.hero__glow {
	position: absolute;
	top: -240px;
	left: 50%;
	width: 900px;
	height: 600px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(34, 197, 94, 0.22), transparent);
	pointer-events: none;
}

.hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	align-items: center;
	gap: clamp(32px, 5vw, 64px);
}

.hero__title {
	margin: 0 0 12px;
	padding-bottom: 0.12em;
	font-size: clamp(36px, 5.6vw, 64px);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -0.03em;
	background: linear-gradient(180deg, #FFFFFF 30%, #A7F3C0 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero__subtitle {
	max-width: 560px;
	margin: 0 0 28px;
	color: var(--muted);
	font-size: clamp(16px, 1.6vw, 19px);
}

.hero__search {
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: 560px;
	padding: 6px 6px 6px 16px;
	border-radius: 14px;
	background: var(--card);
	border: 1px solid var(--border-strong);
	color: var(--muted);
	box-shadow: 0 16px 50px rgba(0, 0, 0, 0.4);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hero__search:focus-within {
	border-color: rgba(34, 197, 94, 0.6);
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 16px 50px rgba(0, 0, 0, 0.4);
}

.hero__search input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	border: 0;
	background: transparent;
	color: var(--text);
	font-family: var(--font);
	font-size: 16px;
	outline: none;
}

.hero__search input::placeholder {
	color: var(--subtle);
}

.hero__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 36px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.hero__stats li {
	display: flex;
	flex-direction: column;
}

.hero__stats strong {
	font-family: var(--mono);
	font-size: 28px;
	font-weight: 800;
	color: var(--neon);
	text-shadow: 0 0 18px rgba(34, 197, 94, 0.4);
	line-height: 1.1;
}

.hero__stats span {
	color: var(--subtle);
	font-size: 13px;
	font-weight: 600;
}

/* Panel Top 5 */
.top-panel {
	position: relative;
	width: 100%;
	max-width: 440px;
	justify-self: end;
	padding: 22px;
	border-radius: 20px;
	background:
		radial-gradient(360px 160px at 100% 0%, rgba(234, 179, 8, 0.10), transparent 70%),
		radial-gradient(360px 160px at 0% 100%, rgba(34, 197, 94, 0.10), transparent 70%),
		var(--card);
	border: 1px solid rgba(34, 197, 94, 0.25);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(34, 197, 94, 0.08);
}

.top-panel__head {
	margin-bottom: 16px;
}

.top-panel__title {
	margin: 0 0 2px;
	font-size: 20px;
	font-weight: 800;
}

.top-panel__sub {
	margin: 0;
	color: var(--subtle);
	font-size: 13px;
}

.top-panel__list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.top-panel__row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 12px;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.025);
	border: 1px solid var(--border);
}

.top-panel__pos {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: var(--muted);
	font-family: var(--mono);
	font-size: 14px;
	font-weight: 800;
}

.top-panel__row--1 {
	border-color: rgba(234, 179, 8, 0.45);
	background: linear-gradient(90deg, rgba(234, 179, 8, 0.12), rgba(255, 255, 255, 0.02));
}

.top-panel__row--1 .top-panel__pos {
	background: linear-gradient(135deg, #FDE047, #EAB308);
	color: #1A1300;
}

.top-panel__row--2 .top-panel__pos {
	background: linear-gradient(135deg, #F4F4F5, #A1A1AA);
	color: #18181B;
}

.top-panel__row--3 .top-panel__pos {
	background: linear-gradient(135deg, #FDBA74, #C2410C);
	color: #1C0A00;
}

.top-panel__avatar {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 2px solid var(--border-strong);
}

.top-panel__avatar--empty {
	display: inline-block;
	border-style: dashed;
	background: rgba(255, 255, 255, 0.02);
}

.top-panel__who {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.top-panel__name {
	overflow: hidden;
	color: var(--text);
	font-size: 15px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.top-panel__meta {
	color: var(--subtle);
	font-size: 12px;
}

.top-panel__score {
	flex-shrink: 0;
	color: var(--neon-2);
	font-family: var(--mono);
	font-size: 15px;
	font-weight: 800;
}

.top-panel__row.is-empty .top-panel__name {
	color: var(--muted);
}

.top-panel__row.is-empty .top-panel__score {
	color: var(--subtle);
}

.top-panel__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
}

.top-panel__link {
	font-size: 14px;
	font-weight: 700;
}

.top-panel__foot .pm-btn {
	min-height: 38px;
	padding: 8px 14px;
	font-size: 14px;
}

/* ==========================================================================
   Secciones
   ========================================================================== */
.section {
	padding: clamp(48px, 7vw, 88px) 0;
}

.section--tight {
	padding: clamp(28px, 4vw, 48px) 0;
}

.section--steps,
.section--community {
	background: linear-gradient(180deg, var(--bg-2), var(--bg));
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
}

.section__head {
	max-width: 720px;
	margin-bottom: 32px;
}

.section__head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	max-width: none;
}

.section__title {
	margin: 0;
	font-size: clamp(26px, 3.4vw, 40px);
	font-weight: 900;
	letter-spacing: -0.02em;
}

.section__lead {
	color: var(--muted);
	font-size: 17px;
}

.steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}

.step {
	position: relative;
	padding: 26px;
	border-radius: var(--radius);
	background: var(--card);
	border: 1px solid var(--border);
	counter-increment: step;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover {
	border-color: rgba(34, 197, 94, 0.35);
	transform: translateY(-3px);
}

.step::after {
	content: "0" counter(step);
	position: absolute;
	top: 18px;
	right: 22px;
	font-family: var(--mono);
	font-size: 30px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.06);
}

.step__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin-bottom: 16px;
	border-radius: 14px;
	background: var(--neon-soft);
	border: 1px solid rgba(34, 197, 94, 0.35);
	font-size: 24px;
}

.step h3 {
	font-size: 19px;
}

.step p {
	margin: 0;
	color: var(--muted);
}

.community {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: clamp(24px, 5vw, 64px);
}

.community__cta .section__title {
	margin-bottom: 12px;
}

/* FAQ */
.faq {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.faq__item {
	border-radius: 14px;
	background: var(--card);
	border: 1px solid var(--border);
	transition: border-color 0.2s ease;
}

.faq__item[open] {
	border-color: rgba(34, 197, 94, 0.35);
}

.faq__item summary {
	position: relative;
	padding: 18px 52px 18px 20px;
	font-weight: 700;
	font-size: 17px;
	cursor: pointer;
	list-style: none;
}

.faq__item summary::-webkit-details-marker {
	display: none;
}

.faq__item summary::after {
	content: "+";
	position: absolute;
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	font-weight: 400;
	color: var(--neon);
	transition: transform 0.2s ease;
}

.faq__item[open] summary::after {
	transform: translateY(-50%) rotate(45deg);
}

.faq__item p {
	margin: 0;
	padding: 0 20px 20px;
	color: var(--muted);
}

/* Aparición progresiva */
.js-reveal .reveal {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-reveal .reveal.is-visible {
	opacity: 1;
	transform: none;
}

/* ==========================================================================
   Cabeceras de página, contenido y blog
   ========================================================================== */
.page-hero {
	position: relative;
	padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 44px);
	background: radial-gradient(800px 300px at 50% -40%, rgba(34, 197, 94, 0.14), transparent 70%);
	border-bottom: 1px solid var(--border);
}

.page-hero--compact {
	padding-bottom: clamp(24px, 3vw, 36px);
}

.page-hero__title {
	margin: 0 0 10px;
	font-size: clamp(30px, 4.4vw, 48px);
	font-weight: 900;
	letter-spacing: -0.02em;
}

.page-hero__lead {
	max-width: 700px;
	margin: 0;
	color: var(--muted);
	font-size: 17px;
}

.page-hero__search {
	max-width: 560px;
	margin-top: 18px;
}

.entry-content {
	color: #D4D4D8;
	font-size: 17px;
	line-height: 1.75;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.8em;
	color: var(--text);
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.3em;
}

.entry-content blockquote {
	margin: 1.5em 0;
	padding: 16px 20px;
	border-left: 3px solid var(--neon);
	background: var(--card);
	border-radius: 0 12px 12px 0;
	color: var(--text);
}

.entry-content code {
	padding: 2px 6px;
	border-radius: 6px;
	background: var(--card-2);
	font-family: var(--mono);
	font-size: 0.9em;
	color: var(--neon-2);
}

.entry-content pre {
	overflow-x: auto;
	padding: 16px;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid var(--border);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border: 1px solid var(--border);
}

.entry-content img {
	border-radius: 12px;
}

.entry-content .pm-app {
	margin-top: 1.5em;
}

.entry-thumb {
	margin: 0 0 24px;
}

.entry-thumb img {
	width: 100%;
	border-radius: var(--radius);
}

.entry-tags a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--card);
	border: 1px solid var(--border);
	font-size: 13px;
	text-decoration: none;
}

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.post-card {
	border-radius: var(--radius);
	background: var(--card);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.post-card:hover {
	border-color: rgba(34, 197, 94, 0.35);
	transform: translateY(-3px);
}

.post-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}

.post-card__media img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.post-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 20px;
}

.post-card__meta {
	color: var(--subtle);
	font-size: 13px;
}

.post-card__title {
	margin: 6px 0 8px;
	font-size: 20px;
}

.post-card__excerpt {
	color: var(--muted);
	font-size: 15px;
}

.post-card__more {
	margin-top: auto;
	color: var(--neon-2);
	font-weight: 700;
}

.pagination,
.post-navigation {
	margin-top: 32px;
}

.pagination .nav-links,
.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.post-navigation .nav-links {
	justify-content: space-between;
}

.page-numbers,
.post-navigation a {
	display: inline-flex;
	align-items: center;
	min-width: 42px;
	min-height: 42px;
	padding: 8px 14px;
	border-radius: 10px;
	background: var(--card);
	border: 1px solid var(--border);
	color: var(--text);
	font-weight: 700;
	justify-content: center;
}

.page-numbers.current {
	background: var(--neon);
	border-color: var(--neon);
	color: #04130A;
}

.search-form {
	display: flex;
	gap: 8px;
}

.search-form__input,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-strong);
	background: #0B0B0F;
	color: var(--text);
	font-family: var(--font);
	font-size: 15px;
}

.search-form__input:focus,
.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: rgba(34, 197, 94, 0.7);
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.comments {
	margin-top: 32px;
}

.comment-list {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.comment-list .comment-body {
	margin-bottom: 14px;
	padding: 16px;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid var(--border);
}

.comment-list .avatar {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 8px;
}

.notice-box {
	padding: 28px;
	text-align: center;
	border-radius: var(--radius);
	border: 1px dashed var(--border-strong);
	color: var(--muted);
}

/* ==========================================================================
   Ficha de promoción
   ========================================================================== */
.single-brand {
	padding-top: 20px;
	padding-bottom: 48px;
}

.breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	color: var(--subtle);
	font-size: 14px;
}

.breadcrumbs a {
	color: var(--muted);
}

.breadcrumbs a:hover {
	color: var(--neon-2);
}

.breadcrumbs [aria-current] {
	color: var(--text);
	font-weight: 600;
}

.single-brand__more {
	margin-top: 24px;
}

/* 404 */
.error-404 {
	text-align: center;
	padding: clamp(60px, 10vw, 120px) 0;
}

.error-404 .page-hero__lead {
	margin: 0 auto;
}

.error-404__code {
	margin: 0;
	font-family: var(--mono);
	font-size: clamp(90px, 16vw, 180px);
	font-weight: 800;
	line-height: 1;
	color: var(--neon);
	text-shadow: 0 0 40px rgba(34, 197, 94, 0.45);
}

.error-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 28px;
}

/* ==========================================================================
   Integración con el plugin: el tema ya aporta el fondo y los márgenes
   ========================================================================== */
.pm-theme .pm-app.pm-grid-wrap,
.pm-theme .pm-app.pm-single,
.pm-theme .pm-app.pm-leaderboard {
	padding: 0;
	margin-bottom: 0;
	background: transparent;
	border-radius: 0;
}

.pm-theme .pm-single__grid {
	align-items: start;
}

.pm-theme .community__board .pm-app.pm-leaderboard {
	padding: 22px;
	border-radius: var(--radius);
	background: var(--card);
	border: 1px solid var(--border);
}

.pm-theme .section--request .pm-request-card,
.pm-theme .single-brand__more .pm-request-card {
	margin-bottom: 0;
}

.pm-theme .community__cta .pm-cta-card {
	margin-bottom: 0;
}

/* ==========================================================================
   Pie
   ========================================================================== */
.site-footer {
	padding: 56px 0 28px;
	background: #070709;
	border-top: 1px solid var(--border);
	color: var(--muted);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr;
	gap: 32px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--border);
}

.site-footer__desc {
	max-width: 340px;
	margin-top: 16px;
	font-size: 15px;
}

.footer-title {
	margin-bottom: 14px;
	color: var(--text);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.footer-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-menu li {
	margin: 0 0 10px;
}

.footer-menu a,
.footer-widget a {
	color: var(--muted);
	font-size: 15px;
}

.footer-menu a:hover,
.footer-widget a:hover {
	color: var(--neon-2);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	font-size: 13px;
}

.site-footer__note {
	max-width: 760px;
	margin: 0;
	color: var(--subtle);
}

.site-footer__copy {
	margin: 0;
	color: var(--subtle);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 900px) {
	:root {
		--header-h: 64px;
	}

	.nav-toggle {
		display: flex;
	}

	.site-header__actions {
		display: none;
	}

	.site-nav {
		position: fixed;
		top: var(--header-h);
		left: 0;
		right: 0;
		bottom: 0;
		flex-direction: column;
		justify-content: flex-start;
		gap: 20px;
		padding: 20px;
		background: rgba(10, 10, 12, 0.98);
		border-top: 1px solid var(--border);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	}

	.admin-bar .site-nav {
		top: calc(var(--header-h) + 46px);
	}

	.site-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.site-nav .menu {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.site-nav .menu a {
		padding: 14px 12px;
		font-size: 18px;
	}

	.site-nav .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		background: transparent;
		padding-left: 16px;
	}

	.site-nav__account--mobile {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		padding-top: 20px;
		border-top: 1px solid var(--border);
	}

	.site-nav__account--mobile .btn,
	.site-nav__account--mobile .header-add {
		flex: 1 1 auto;
	}

	.site-nav__account--mobile .header-add .pm-btn {
		width: 100%;
	}

	.site-nav__account--mobile .user-menu {
		width: 100%;
	}

	.site-nav__account--mobile .user-menu__panel {
		position: static;
		margin-top: 8px;
		box-shadow: none;
	}

	.hero__inner,
	.community {
		grid-template-columns: 1fr;
	}

	.top-panel {
		justify-self: stretch;
		max-width: none;
	}

	.steps {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 640px) {
	.container {
		padding: 0 16px;
	}

	.post-grid,
	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.hero__search {
		flex-wrap: wrap;
		padding: 10px;
	}

	.hero__search svg {
		display: none;
	}

	.hero__search input {
		flex-basis: 100%;
		padding: 0 6px;
	}

	.hero__search .btn {
		width: 100%;
	}

	.hero__stats {
		gap: 12px 24px;
	}

	.hero__stats strong {
		font-size: 22px;
	}

}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
