/**
 * ebooks.css — Estilos para la Biblioteca de Ebooks Gratuitos de Pablo Kuti
 *
 * @package PabloKuti
 */

.ebooks-page {
	min-height: 100vh;
	background: #07060a;
	color: #ffffff;
	font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
	position: relative;
	overflow-x: hidden;
}

.ebooks-bg {
	position: fixed;
	inset: 0;
	background:
		radial-gradient(circle at 50% 12%, rgba(212, 175, 55, 0.12) 0%, transparent 60%),
		radial-gradient(circle at 15% 50%, rgba(147, 51, 234, 0.08) 0%, transparent 50%),
		radial-gradient(circle at 85% 75%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
		#07060a;
	z-index: 0;
	pointer-events: none;
}

.ebooks-content {
	position: relative;
	z-index: 1;
	width: min(100% - 2.5rem, 1180px);
	margin: 0 auto;
	padding: 1.5rem 1rem 5rem;
}

/* Topbar */
.ebooks-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	margin-bottom: 3rem;
}

.ebooks-topbar__brand {
	font-family: 'Outfit', sans-serif;
	font-size: 0.88rem;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: #ffffff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.ebooks-topbar__brand:hover {
	color: #d4af37;
}

.ebooks-topbar__tag {
	font-size: 0.72rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: #d4af37;
	font-weight: 500;
}

.ebooks-topbar__back {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.55rem 1.15rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.04);
	color: #f1ede6;
	font-size: 0.76rem;
	letter-spacing: 0.08em;
	text-decoration: none;
	backdrop-filter: blur(8px);
	transition: all 0.25s ease;
}

.ebooks-topbar__back:hover {
	background: rgba(212, 175, 55, 0.15);
	border-color: rgba(212, 175, 55, 0.4);
	color: #fbbf24;
	transform: translateX(-3px);
}

/* Header */
.ebooks-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 3rem;
}

.ebooks-header__emblem {
	width: 58px;
	height: 58px;
	margin: 0 auto 1.25rem;
	border-radius: 16px;
	background: rgba(212, 175, 55, 0.12);
	border: 1px solid rgba(212, 175, 55, 0.35);
	color: #fbbf24;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

.ebooks-header__emblem svg {
	width: 30px;
	height: 30px;
}

.ebooks-header__title {
	font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
	font-size: clamp(2.2rem, 4.5vw, 3.4rem);
	font-weight: 300;
	color: #ffffff;
	margin: 0 0 1rem;
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.ebooks-header__sub {
	font-size: clamp(1rem, 1.4vw, 1.15rem);
	color: rgba(241, 207, 156, 0.88);
	line-height: 1.6;
	margin: 0;
}

/* Banner de Google Drive */
.ebooks-drive-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding: 1.75rem 2.25rem;
	border-radius: 18px;
	background: linear-gradient(90deg, rgba(30, 24, 38, 0.85) 0%, rgba(20, 16, 26, 0.95) 100%);
	border: 1px solid rgba(212, 175, 55, 0.35);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(212, 175, 55, 0.12);
	backdrop-filter: blur(12px);
	margin-bottom: 3.5rem;
}

.ebooks-drive-banner__info {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.ebooks-drive-banner__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: rgba(251, 191, 36, 0.15);
	border: 1px solid rgba(251, 191, 36, 0.35);
	color: #fbbf24;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ebooks-drive-banner__icon svg {
	width: 26px;
	height: 26px;
}

.ebooks-drive-banner__title {
	font-size: 1.15rem;
	font-weight: 500;
	color: #ffffff;
	margin: 0 0 0.3rem;
}

.ebooks-drive-banner__desc {
	font-size: 0.88rem;
	color: rgba(230, 222, 210, 0.8);
	margin: 0;
}

.ebooks-drive-banner__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.85rem 1.85rem;
	border-radius: 9999px;
	background: #d4af37;
	color: #0b090f;
	font-size: 0.84rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 0 20px rgba(212, 175, 55, 0.45);
	transition: all 0.25s ease;
	flex-shrink: 0;
}

.ebooks-drive-banner__cta:hover {
	background: #f59e0b;
	transform: translateY(-2px);
	box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

/* Grilla de Ebooks */
.ebooks-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
	margin-bottom: 4rem;
}

.ebook-card {
	position: relative;
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	background: #0f0d15;
	border: 1px solid rgba(212, 175, 55, 0.25);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(12px);
	overflow: hidden;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
	            border-color 0.3s ease,
	            box-shadow 0.3s ease;
}

.ebook-card:hover {
	transform: translateY(-6px);
	border-color: rgba(212, 175, 55, 0.55);
	box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.2);
}

.ebook-card__header {
	padding: 2rem 2rem 1.25rem;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
}

.ebook-card__badge {
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 0.35rem 0.85rem;
	border-radius: 9999px;
	background: rgba(212, 175, 55, 0.12);
	color: #fbbf24;
	border: 1px solid rgba(212, 175, 55, 0.3);
}

.ebook-card__mockup {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 0 2rem 1.5rem;
}

.ebook-card__book-spine {
	width: 90px;
	height: 125px;
	border-radius: 8px 12px 12px 8px;
	background: linear-gradient(135deg, rgba(35, 28, 48, 0.9) 0%, rgba(18, 14, 25, 0.95) 100%);
	border: 1px solid var(--ebook-accent, #d4af37);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.25);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
	text-align: center;
	flex-shrink: 0;
	position: relative;
}

.ebook-card__book-spine::after {
	content: '';
	position: absolute;
	left: 8px;
	top: 0;
	bottom: 0;
	width: 2px;
	background: rgba(255, 255, 255, 0.15);
}

.ebook-card__book-icon {
	color: var(--ebook-accent, #d4af37);
	margin-bottom: 0.4rem;
}

.ebook-card__book-icon svg {
	width: 24px;
	height: 24px;
}

.ebook-card__book-spine span {
	font-family: 'Outfit', sans-serif;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: #ffffff;
	text-transform: uppercase;
	line-height: 1.2;
}

.ebook-card__meta-details {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.ebook-card__title {
	font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
	font-size: 1.35rem;
	font-weight: 400;
	color: #ffffff;
	margin: 0;
	line-height: 1.3;
}

.ebook-card__subtitle {
	font-size: 0.86rem;
	color: var(--ebook-accent, #d4af37);
	margin: 0;
	line-height: 1.4;
}

.ebook-card__body {
	padding: 0 2rem 1.5rem;
	flex: 1;
}

.ebook-card__desc {
	font-size: 0.92rem;
	line-height: 1.7;
	color: rgba(230, 222, 210, 0.85);
	margin: 0 0 1.25rem;
}

.ebook-card__tags {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.ebook-card__tag {
	font-size: 0.72rem;
	color: rgba(255, 255, 255, 0.7);
	padding: 0.25rem 0.65rem;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

.ebook-card__footer {
	padding: 1.25rem 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	align-items: center;
	gap: 1rem;
	background: rgba(12, 10, 16, 0.6);
}

.ebook-card__btn-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	flex: 1;
	padding: 0.75rem 1.25rem;
	border-radius: 9999px;
	background: var(--ebook-accent, #d4af37);
	color: #0b090f;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
	box-shadow: 0 0 15px rgba(212, 175, 55, 0.35);
	transition: all 0.25s ease;
}

.ebook-card__btn-download:hover {
	filter: brightness(1.15);
	transform: translateY(-2px);
	box-shadow: 0 0 20px rgba(212, 175, 55, 0.55);
}

.ebook-card__btn-drive {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: rgba(255, 255, 255, 0.05);
	color: #ffffff;
	transition: all 0.25s ease;
}

.ebook-card__btn-drive:hover {
	background: rgba(212, 175, 55, 0.15);
	border-color: rgba(212, 175, 55, 0.4);
	color: #fbbf24;
}

.ebook-card__btn-drive svg {
	width: 18px;
	height: 18px;
}

/* Franja final */
.ebooks-footer-note {
	text-align: center;
	padding: 2rem;
	border-radius: 16px;
	border: 1px dashed rgba(212, 175, 55, 0.3);
	background: rgba(212, 175, 55, 0.04);
	max-width: 800px;
	margin: 0 auto;
}

.ebooks-footer-note p {
	font-size: 0.95rem;
	line-height: 1.7;
	color: rgba(241, 207, 156, 0.9);
	margin: 0;
}

@media (max-width: 900px) {
	.ebooks-drive-banner {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.25rem;
		padding: 1.5rem;
	}
	.ebooks-drive-banner__cta {
		width: 100%;
		justify-content: center;
	}
	.ebooks-grid {
		grid-template-columns: 1fr;
	}
}
