/*
Theme Name: Academia del Poder
Theme URI: https://www.academiadelpoder.com/
Author: Academia del Poder
Description: Tema editorial de Academia del Poder. Historias reales de ambición, negocios, dinero, éxito y fracaso.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adp
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { height: auto; }
::selection { background: #800000; color: #fff; }
:focus-visible { outline: 2px solid #D9443C; outline-offset: 3px; }

/* Etiqueta pequeña tipo "kicker" */
.adp-kicker {
	font-family: var(--wp--preset--font-family--interfaz);
	font-size: 0.75rem !important;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

/* ---------- Cabecera ---------- */
.adp-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-bar .adp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .adp-header { top: 0; position: relative; } }
.adp-header .adp-logo img { display: block; height: 46px; width: auto; }
@media (max-width: 600px) { .adp-header .adp-logo img { height: 38px; } }
.adp-header .wp-block-navigation { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.adp-header .wp-block-navigation a { text-decoration: none; }
.adp-header .wp-block-navigation a:hover { color: #D9443C !important; }
.adp-header .wp-block-navigation__responsive-container.is-menu-open { background: #0B0B0B !important; color: #fff !important; }
.adp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.1rem; }
.adp-header .wp-block-button__link { padding: 0.7rem 1.1rem; font-size: 0.75rem; }
@media (max-width: 600px) { .adp-header .adp-header-cta { display: none; } }

/* ---------- Portada ---------- */
.adp-hero { position: relative; overflow: hidden; }
.adp-hero::before {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: radial-gradient(ellipse 80% 60% at 85% 10%, rgba(150,17,15,0.45), transparent 60%);
}
.adp-hero > * { position: relative; }
.adp-hero h1 em { font-style: italic; color: #D9443C; }
.adp-rule { width: 64px; height: 4px; background: #800000; border: 0; margin-left: 0 !important; }
.adp-hero .adp-rule { background: #96110F; }

/* Tarjetas de historias */
.adp-card { height: 100%; display: flex; flex-direction: column; }
.adp-card .wp-block-post-featured-image { margin: 0; overflow: hidden; }
.adp-card .wp-block-post-featured-image img { transition: transform .5s ease; aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.adp-card:hover .wp-block-post-featured-image img { transform: scale(1.04); }
.adp-card .wp-block-post-title a:hover { color: #800000; }
.adp-card .wp-block-post-excerpt__excerpt { color: #6B6560; }
.adp-card .wp-block-post-excerpt__more-link { display: none; }

/* Historia destacada */
.adp-featured .wp-block-post-featured-image img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.adp-featured .wp-block-post-title a:hover { color: #D9443C; }

/* Categorías */
.adp-cats { gap: 1px !important; background: rgba(255,255,255,0.12); }
.adp-cat { background: #0B0B0B; padding: 2rem 1.5rem; text-decoration: none; display: block; color: #fff; transition: background .25s ease; min-height: 100%; }
.adp-cat:hover { background: #800000; color: #fff; }
.adp-cat strong { display: block; font-family: var(--wp--preset--font-family--titulares); font-weight: 900; font-size: 1.5rem; margin-bottom: .4rem; }
.adp-cat span { display: block; font-size: .9rem; opacity: .75; line-height: 1.5; }
.adp-cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: rgba(255,255,255,0.12); margin-bottom: clamp(2rem, 4vw, 3rem); }
@media (max-width: 1000px) { .adp-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .adp-cat-grid { grid-template-columns: 1fr; } }

/* ---------- Artículo ---------- */
.adp-single-head .wp-block-post-title { margin-left: 0 !important; }
.adp-single-head .wp-block-post-excerpt { font-family: var(--wp--preset--font-family--lectura); font-style: italic; color: #6B6560; }
.adp-single-head .wp-block-post-excerpt__more-link { display: none; }
.adp-meta { font-size: .85rem; color: #6B6560; }
.adp-meta > * { margin: 0 !important; }
.wp-block-post-content > p:first-of-type::first-letter {
	float: left; font-family: var(--wp--preset--font-family--titulares); font-weight: 900;
	font-size: 4.2em; line-height: .82; padding: .06em .1em 0 0; color: #800000;
}
.wp-block-post-content h2 { margin-top: 2.6rem; }
.wp-block-post-content h3 { margin-top: 2rem; }
.wp-block-post-content blockquote p { margin: 0; }
.wp-block-post-content figure figcaption { font-family: var(--wp--preset--font-family--interfaz); }

/* Caja "Lo que esta historia te enseña" */
.adp-lecciones {
	background: #0B0B0B; color: #fff; padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
	border-top: 4px solid #96110F; margin-top: 3rem !important; font-family: var(--wp--preset--font-family--interfaz);
	font-size: 1rem; line-height: 1.6;
}
.adp-lecciones h2, .adp-lecciones h3 { color: #fff; margin-top: 0 !important; font-size: 1.6rem; }
.adp-lecciones ol, .adp-lecciones ul { padding-left: 1.2rem; margin-bottom: 0; }
.adp-lecciones li { margin-bottom: .75rem; }
.adp-lecciones li::marker { color: #D9443C; font-weight: 700; }
.adp-lecciones strong { color: #fff; }

/* Fuentes y nota de IA */
.adp-fuentes { font-family: var(--wp--preset--font-family--interfaz); font-size: .85rem !important; color: #6B6560; border-top: 1px solid #E2DBD1; padding-top: 1.25rem; margin-top: 2.5rem !important; line-height: 1.6; }
.adp-fuentes h2, .adp-fuentes h3 { font-family: var(--wp--preset--font-family--interfaz); font-size: .75rem !important; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #1C1A18; margin-top: 0 !important; }
.adp-fuentes a { color: #6B6560; }
.adp-nota-ia { font-size: .8rem !important; color: #6B6560; font-style: italic; }

/* ---------- Newsletter ---------- */
.adp-newsletter-form { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 560px; }
.adp-newsletter-form input[type="email"] {
	flex: 1 1 260px; padding: .95rem 1rem; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25);
	color: #fff; font: inherit; font-size: 1rem; border-radius: 0;
}
.adp-newsletter-form input[type="email"]::placeholder { color: rgba(255,255,255,.65); }
.adp-newsletter-form button {
	padding: .95rem 1.6rem; border: 0; background: #0B0B0B; color: #fff; font: inherit; font-weight: 700;
	font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border-radius: 0;
}
.adp-newsletter-form button:hover { background: #fff; color: #800000; }
.adp-newsletter-form .adp-consent { flex-basis: 100%; font-size: .8rem; line-height: 1.5; opacity: .85; display: flex; gap: .5rem; align-items: flex-start; }
.adp-newsletter-form .adp-consent input { margin-top: .2rem; accent-color: #0B0B0B; }
.adp-newsletter-form .adp-consent a { color: inherit; }
.adp-newsletter-form .adp-hp { position: absolute; left: -9999px; }
.adp-newsletter-msg { padding: .9rem 1rem; background: rgba(0,0,0,.3); font-weight: 600; margin-bottom: 1rem; }
.adp-newsletter--claro .adp-newsletter-form input[type="email"] { background: #fff; color: #1C1A18; border-color: #E2DBD1; }
.adp-newsletter--claro .adp-newsletter-form input[type="email"]::placeholder { color: #6B6560; }
.adp-newsletter--claro .adp-newsletter-form button { background: #800000; }
.adp-newsletter--claro .adp-newsletter-form button:hover { background: #96110F; color: #fff; }
.adp-newsletter--claro .adp-newsletter-msg { background: #F6F2EC; color: #1C1A18; }

/* ---------- Pie ---------- */
.adp-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.adp-footer a:hover { color: #fff; }
.adp-footer .adp-footer-legal a { font-size: .8rem; }
.adp-footer .wp-block-social-links .wp-social-link { background: transparent !important; border: 1px solid rgba(255,255,255,.25); }
.adp-footer .wp-block-social-links .wp-social-link:hover { background: #800000 !important; border-color: #800000; }

/* Paginación */
.wp-block-query-pagination { font-weight: 600; }
.wp-block-query-pagination a { text-decoration: none; }
.wp-block-query-pagination-numbers .current { background: #800000; color: #fff; padding: .2rem .6rem; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.adp-card .wp-block-post-featured-image img { transition: none; }
}

/* Clases auxiliares de bloques */
.adp-hero-title { max-width: 14ch; }
.adp-hero-lead { color: rgba(255,255,255,0.8); font-size: clamp(1.1rem, 2vw, 1.35rem) !important; line-height: 1.6; max-width: 40ch; }
.adp-btn-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border: 1px solid #fff !important; }
.adp-btn-outline .wp-block-button__link:hover { background: #fff !important; color: #0B0B0B !important; }
.adp-list-plain { list-style: none; padding-left: 0 !important; line-height: 2; }
.adp-sep-dark { border-color: rgba(255,255,255,0.12) !important; background: rgba(255,255,255,0.12) !important; color: rgba(255,255,255,0.12) !important; opacity: 1; }
.adp-sello { width: 110px; height: auto; display: block; }
.adp-meta .wp-block-shortcode, .adp-meta p { font-size: .85rem; color: #6B6560; }

/* Accesibilidad: texto solo para lectores de pantalla */
.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 !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus { background: #fff; clip: auto !important; clip-path: none; color: #0B0B0B; display: block; height: auto; left: 5px; padding: 15px 23px; top: 5px; width: auto; z-index: 100000; }
.adp-header .adp-logo img { height: 52px; }
@media (max-width: 600px) { .adp-header .adp-logo img { height: 40px; } }
.adp-hero-title, .adp-hero-lead, .adp-hero .adp-rule { margin-left: 0 !important; }
