/*
Theme Name:   Buscalibros GP
Theme URI:    https://buscalibros.com.es
Description:  Tema hijo ligero de GeneratePress para buscalibros.com.es (diseño «Revista moderna»). Portada con reseña destacada, géneros, últimas reseñas, listas y newsletter; ficha de libro con valoración, enlace de afiliado de Amazon y datos estructurados de reseña.
Author:       Margarita Jorge
Template:     generatepress
Version:      1.0.0
Requires at least: 6.0
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:  buscalibros-gp
*/

/* ---------- Fuente de títulos (autoalojada, 23 KB) ---------- */
@font-face {
	font-family: "Caladea";
	src: url("assets/fonts/caladea-bold.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ---------- Colores de la marca ---------- */
:root {
	--bl-terra: #C2553D;
	--bl-terra-dark: #A8452F;
	--bl-ink: #2B2B2B;
	--bl-cream: #FBF3E4;
	--bl-line: #EFE6D8;
	--bl-line-2: #E3D6C0;
	--bl-muted: #6E5F50;
	--bl-text-soft: #4A4038;
	--bl-serif: "Caladea", Georgia, "Times New Roman", serif;
	--bl-radius: 14px;
	/* Variables de GeneratePress */
	--contrast: #2B2B2B;
	--contrast-2: #6E5F50;
	--contrast-3: #B8AB98;
	--base: #EFE6D8;
	--base-2: #FBF3E4;
	--base-3: #FFFFFF;
	--accent: #C2553D;
}

body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--bl-ink);
	background: #fff;
	line-height: 1.6;
}

h1, h2, h3, h4,
.entry-title,
.page-title,
.widget-title {
	font-family: var(--bl-serif);
	font-weight: 700;
	line-height: 1.15;
	color: var(--bl-ink);
}

a { color: var(--bl-terra-dark); }
a:hover, a:focus { color: var(--bl-ink); }

:focus-visible {
	outline: 3px solid var(--bl-terra);
	outline-offset: 2px;
}

/* ---------- Barra superior ---------- */
.bl-topbar {
	background: var(--bl-terra);
	color: #fff;
	font-size: 14px;
	text-align: center;
	padding: 8px 16px;
}

/* ---------- Cabecera y menú ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--bl-line);
}
.site-logo img,
.header-image {
	max-height: 52px;
	width: auto;
}
.main-navigation,
.main-navigation ul ul {
	background: #fff;
}
.main-navigation .main-nav ul li a {
	color: var(--bl-ink);
	font-weight: 600;
	font-size: 15px;
}
.main-navigation .main-nav ul li:hover > a,
.main-navigation .main-nav ul li.current-menu-item > a,
.main-navigation .main-nav ul li[class*="current-menu-"] > a {
	color: var(--bl-terra-dark);
	background: transparent;
}
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items {
	color: var(--bl-ink);
}
.navigation-search input[type="search"] {
	background: var(--bl-cream);
	color: var(--bl-ink);
}

/* ---------- Botones ---------- */
.bl-btn,
button,
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: var(--bl-terra);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
}
.bl-btn:hover, .bl-btn:focus,
button:hover, input[type="submit"]:hover {
	background: var(--bl-terra-dark);
	color: #fff;
}
.bl-btn--dark { background: var(--bl-ink); }
.bl-btn--dark:hover, .bl-btn--dark:focus { background: #000; color: #fff; }
.bl-btn--amazon { background: var(--bl-ink); }
.bl-btn--amazon:hover, .bl-btn--amazon:focus { background: #000; color: #fff; }

/* ---------- Utilidades ---------- */
.bl-wrap {
	max-width: 1240px;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}
.bl-eyebrow {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bl-terra-dark);
	text-decoration: none;
}
.bl-stars {
	color: var(--bl-terra);
	letter-spacing: 2px;
	font-size: 18px;
	line-height: 1;
}
.bl-meta { color: var(--bl-muted); font-size: 15px; }
.bl-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.bl-section-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 24px;
}
.bl-section-head h2 { margin: 0; font-size: clamp(26px, 3vw, 34px); }
.bl-section-head a { font-weight: 700; text-decoration: none; }

/* ---------- Portada: héroe ---------- */
.bl-front .site-content { display: block; padding: 0; }
.bl-front .site-main { margin: 0; }

.bl-hero { background: var(--bl-cream); }
.bl-hero__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 48px;
	padding-top: 56px;
	padding-bottom: 56px;
}
.bl-hero__text {
	flex: 1 1 380px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.bl-hero__badge {
	align-self: flex-start;
	background: #fff;
	padding: 6px 12px;
	border-radius: 999px;
}
.bl-hero h1,
.bl-hero .bl-hero__title {
	margin: 0;
	font-size: clamp(34px, 5vw, 54px);
	line-height: 1.05;
}
.bl-hero h1 a,
.bl-hero .bl-hero__title a { color: inherit; text-decoration: none; }
.bl-hero__excerpt { margin: 0; font-size: 18px; color: var(--bl-text-soft); max-width: 560px; }
.bl-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.bl-hero__covers {
	flex: 1 1 300px;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 320px;
}
.bl-hero__covers .bl-cover { box-shadow: 0 18px 40px rgba(43, 43, 43, .25); }
.bl-hero__covers .bl-cover--main { width: 200px; position: relative; z-index: 1; }
.bl-hero__covers .bl-cover--side { width: 150px; }
.bl-hero__covers .bl-cover--left { transform: rotate(-8deg) translateX(40px); }
.bl-hero__covers .bl-cover--right { transform: rotate(8deg) translateX(-40px); }

/* Portada de libro (imagen destacada o bloque de color) */
.bl-cover {
	display: block;
	aspect-ratio: 2 / 3;
	border-radius: 3px 8px 8px 3px;
	overflow: hidden;
	background: var(--bl-terra);
	flex-shrink: 0;
}
.bl-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.bl-cover--ph1 { background: var(--bl-terra); }
.bl-cover--ph2 { background: var(--bl-ink); }
.bl-cover--ph3 { background: #7A6A5A; }
.bl-cover--ph4 { background: #E9C9A8; }
.bl-cover--ph5 { background: #8E3B2A; }
.bl-cover--ph6 { background: #D8C9AE; }

/* ---------- Píldoras de géneros ---------- */
.bl-chips {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	white-space: nowrap;
	padding: 28px 20px 6px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.bl-chip {
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid var(--bl-line-2);
	color: var(--bl-ink);
	text-decoration: none;
	font-size: 15px;
}
.bl-chip:hover, .bl-chip:focus { border-color: var(--bl-terra); color: var(--bl-terra-dark); }
.bl-chip--on { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff; font-weight: 600; }
.bl-chip--on:hover, .bl-chip--on:focus { color: #fff; }

/* ---------- Tarjetas de reseña ---------- */
.bl-reviews { padding-top: 32px; padding-bottom: 56px; }
.bl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 24px;
}
.bl-card {
	display: flex;
	gap: 18px;
	padding: 18px;
	border: 1px solid var(--bl-line);
	border-radius: var(--bl-radius);
	background: #fff;
	transition: border-color .15s;
}
.bl-card:hover { border-color: var(--bl-line-2); }
.bl-card .bl-cover { width: 96px; }
.bl-card__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.bl-card__title { margin: 0; font-size: 21px; line-height: 1.2; }
.bl-card__title a { color: var(--bl-ink); text-decoration: none; }
.bl-card__title a:hover { color: var(--bl-terra-dark); }
.bl-card__more { color: var(--bl-ink); font-weight: 700; font-size: 15px; }

/* ---------- Listas ---------- */
.bl-lists { padding-bottom: 64px; }
.bl-lists .bl-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.bl-list-tile {
	min-height: 200px;
	padding: 28px;
	border-radius: 16px;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 6px;
	background: var(--bl-terra);
	color: #fff;
}
.bl-list-tile:nth-child(3n+2) { background: var(--bl-ink); }
.bl-list-tile:nth-child(3n) { background: var(--bl-cream); color: var(--bl-ink); border: 1px solid var(--bl-line-2); }
.bl-list-tile:hover, .bl-list-tile:focus { color: inherit; opacity: .92; }
.bl-list-tile__label { font-size: 14px; font-weight: 600; }
.bl-list-tile__title { font-family: var(--bl-serif); font-weight: 700; font-size: 28px; line-height: 1.1; }

/* ---------- Newsletter ---------- */
.bl-news { background: var(--bl-ink); color: #fff; }
.bl-news__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 44px;
	padding-bottom: 44px;
}
.bl-news h2 { color: #fff; margin: 0 0 6px; font-size: 30px; }
.bl-news p { margin: 0; color: #D9D1C6; }
.bl-news__text { flex: 1 1 320px; }
.bl-news__form { flex: 1 1 340px; max-width: 480px; }
.bl-news input[type="email"],
.bl-news input[type="text"] {
	height: 48px;
	border-radius: 999px;
	border: 0;
	padding: 0 16px;
	width: 100%;
}

/* ---------- Archivos (categorías, etiquetas, búsqueda, blog) ---------- */
.blog .site-main,
.archive .site-main,
.search .site-main {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 24px;
	align-items: start;
}
.blog .site-main > :not(article),
.archive .site-main > :not(article),
.search .site-main > :not(article) {
	grid-column: 1 / -1;
}
.blog .site-main article,
.archive .site-main article,
.search .site-main article { margin: 0; }
.blog .inside-article,
.archive .inside-article,
.search .inside-article {
	border: 1px solid var(--bl-line);
	border-radius: var(--bl-radius);
	padding: 18px;
	height: 100%;
}
.archive .post-image img,
.blog .post-image img,
.search .post-image img {
	aspect-ratio: 2 / 3;
	object-fit: cover;
	width: 100%;
	max-width: 180px;
	border-radius: 3px 8px 8px 3px;
}
.archive .entry-title, .blog .entry-title, .search .entry-title { font-size: 22px; }
.page-header {
	background: var(--bl-cream);
	border-radius: var(--bl-radius);
	padding: 28px;
}

/* ---------- Entrada (reseña) ---------- */
.single .entry-title { font-size: clamp(32px, 4.5vw, 46px); }
.bl-book {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	background: var(--bl-cream);
	border-radius: var(--bl-radius);
	padding: 24px;
	margin: 0 0 32px;
}
.bl-book .bl-cover { width: 140px; box-shadow: 6px 8px 0 var(--bl-line-2); }
.bl-book__info { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; }
.bl-book__title { font-family: var(--bl-serif); font-weight: 700; font-size: 24px; line-height: 1.15; }
.bl-book__verdict { font-size: 15px; color: var(--bl-muted); }
.bl-book--end { margin: 40px 0 0; }
.bl-disclosure { font-size: 13px; color: var(--bl-muted); margin: 0; }

.entry-content blockquote {
	border-left: 0;
	background: var(--bl-cream);
	border-radius: var(--bl-radius);
	padding: 20px 24px;
	font-family: var(--bl-serif);
	font-size: 20px;
}

/* ---------- Pie ---------- */
.site-footer .site-info {
	background: var(--bl-cream);
	color: var(--bl-muted);
	font-size: 14px;
}
.site-footer .site-info a { color: var(--bl-ink); }
.bl-footer {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: center;
}
.bl-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 22px;
	font-size: 15px;
}
.bl-footer__note { font-size: 13px; margin: 0; }

/* ---------- Móvil ---------- */
@media (max-width: 768px) {
	.bl-hero__inner { padding-top: 36px; padding-bottom: 40px; gap: 28px; }
	.bl-hero__covers { min-height: 240px; order: -1; }
	.bl-hero__covers .bl-cover--main { width: 140px; }
	.bl-hero__covers .bl-cover--side { width: 104px; }
	.bl-hero__actions .bl-btn { flex: 1 1 100%; }
	.bl-card .bl-cover { width: 84px; }
	.bl-book { padding: 18px; }
	.bl-book .bl-cover { width: 110px; }
	.bl-book .bl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* ---------- Ajustes de contenedores de GeneratePress ---------- */
.bl-front .site.grid-container { max-width: none; padding: 0; }
.bl-front .site-content { display: block; padding: 0; }
.bl-front .content-area { width: 100%; float: none; }
.single .inside-article,
.page .inside-article {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}
.single .entry-content { font-size: 18px; }


/* Intro de portada (H1) y migas de pan */
.bl-intro { padding: 40px 20px 4px; text-align: center; }
.bl-intro__title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 8px; }
.bl-intro__text { color: var(--contrast-2, #6E5F50); margin: 0 auto; max-width: 640px; }
.bl-breadcrumbs { font-size: 14px; color: var(--contrast-2, #6E5F50); margin: 0 0 12px; }
.bl-breadcrumbs a { color: inherit; }
