/*
Theme Name:   Best Marketing Books
Description:  A fast, clean theme for BestMarketingBooks.com. Requires the Best Marketing Books Directory plugin.
Version:      1.2.0
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  bmb-theme
*/

:root {
	--bmb-ink: #1a1033;
	--bmb-text: #2d2545;
	--bmb-muted: #645c7a;
	--bmb-line: #e9e1f7;
	--bmb-paper: #ffffff;
	--bmb-cream: #f8f4ff;
	--bmb-violet: #6c2bd9;
	--bmb-pink: #e8175d;
	--bmb-sun: #ffc93c;
	--bmb-accent: #e8175d;
	--bmb-accent-ink: #ffffff;
	--bmb-grad: linear-gradient(135deg, #6c2bd9 0%, #b5179e 55%, #e8175d 100%);
	--bmb-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--bmb-serif: "Fraunces", Georgia, "Times New Roman", serif;
	--bmb-wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--bmb-sans); font-size: 17px; line-height: 1.6; color: var(--bmb-text); background: var(--bmb-cream); }
img { max-width: 100%; height: auto; }
a { color: var(--bmb-ink); text-underline-offset: 3px; }
a:hover { color: var(--bmb-accent); }
h1, h2, h3, h4 { font-family: var(--bmb-serif); color: var(--bmb-ink); line-height: 1.15; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 2.5rem 0 1rem; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: .6rem 1rem; background: #fff; }

.wrap { max-width: var(--bmb-wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 820px; }

/* Header */
.site-header { background: var(--bmb-paper); border-bottom: 1px solid var(--bmb-line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--bmb-ink); font-family: var(--bmb-serif); font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.brand__mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--bmb-ink); color: #fff; font-size: 1rem; }
.brand__mark svg { width: 20px; height: 20px; }
.brand span b { color: var(--bmb-accent); }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; align-items: center; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--bmb-text); }
.nav a:hover, .nav .current-menu-item > a { color: var(--bmb-accent); }
.nav .menu-cta > a { background: var(--bmb-ink); color: #fff; padding: .5em 1em; border-radius: 999px; }
.nav .menu-cta > a:hover { background: var(--bmb-accent); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--bmb-line); border-radius: 8px; padding: .45rem .6rem; font: inherit; font-weight: 600; color: var(--bmb-ink); cursor: pointer; }
@media (max-width: 900px) {
	.nav-toggle { display: inline-flex; }
	.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bmb-paper); border-bottom: 1px solid var(--bmb-line); padding: .5rem 16px 1rem; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.nav li a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--bmb-line); }
	.nav .menu-cta > a { margin-top: .7rem; text-align: center; }
}

/* Hero */
.hero { padding: 4rem 0 3rem; background: radial-gradient(1200px 400px at 85% -10%, #fde3cf 0, transparent 60%), var(--bmb-cream); }
.hero h1 { max-width: 15ch; }
.hero__lead { font-size: 1.2rem; max-width: 52ch; color: var(--bmb-text); margin: 0 0 1.75rem; }
.search-form { display: flex; gap: .5rem; max-width: 560px; background: #fff; padding: .4rem; border-radius: 999px; border: 1px solid var(--bmb-line); box-shadow: 0 6px 24px rgba(20,33,61,.08); }
.search-form input[type=search] { flex: 1; min-width: 0; border: 0; padding: .6rem 1rem; font: inherit; background: transparent; outline: none; }
.search-form button { border: 0; background: var(--bmb-accent); color: #fff; font: inherit; font-weight: 600; padding: .6rem 1.3rem; border-radius: 999px; cursor: pointer; }
.hero__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.hero__chips a { font-size: .9rem; text-decoration: none; padding: .3em .85em; border: 1px solid var(--bmb-line); border-radius: 999px; background: #fff; color: var(--bmb-text); }
.hero__chips a:hover { border-color: var(--bmb-ink); color: var(--bmb-ink); }

/* Sections */
.section { padding: 2.5rem 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section__head h2 { margin: 0 0 .5rem; }
.section__head a { font-weight: 600; }
.section--white { background: var(--bmb-paper); border-top: 1px solid var(--bmb-line); border-bottom: 1px solid var(--bmb-line); }

.cta-band { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.cta-card { background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 16px; padding: 1.75rem; }
.cta-card--dark { background: var(--bmb-ink); color: #dfe4ee; border-color: var(--bmb-ink); }
.cta-card--dark h3 { color: #fff; }
.cta-card h3 { margin: 0 0 .5rem; font-size: 1.4rem; }
.cta-card p { margin: 0 0 1.2rem; }
.cta-card--dark .bmb-btn--ghost { color: #fff !important; border-color: rgba(255,255,255,.35); }
@media (max-width: 720px) { .cta-band { grid-template-columns: 1fr; } }

/* Page / content */
.page-head { padding: 3rem 0 1.5rem; }
.page-head p { font-size: 1.1rem; max-width: 65ch; margin: 0; }
.crumbs { font-size: .85rem; color: var(--bmb-muted); margin-bottom: .75rem; }
.crumbs a { color: inherit; }
.entry { background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 16px; padding: clamp(1.25rem, 4vw, 2.75rem); margin-bottom: 3rem; }
.entry > :first-child { margin-top: 0; }
.entry--plain { background: transparent; border: 0; padding: 0; }

/* Single book */
.book { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; padding: 2.5rem 0; }
.book__aside { position: sticky; top: 100px; align-self: start; display: grid; gap: 1rem; }
.book__aside .bmb-btn { width: 100%; }
.book__subtitle { font-size: 1.25rem; color: var(--bmb-text); margin: -.4rem 0 .8rem; }
.book__byline { color: var(--bmb-muted); margin-bottom: 1rem; }
.book__facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--bmb-line); border-bottom: 1px solid var(--bmb-line); margin: 1.25rem 0; font-size: .95rem; }
.book__facts dt { color: var(--bmb-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.book__facts dd { margin: 0; font-weight: 600; color: var(--bmb-ink); }
.book__facts div { min-width: 110px; }
.book__lead { font-size: 1.15rem; }
.box { background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 14px; padding: 1.4rem 1.6rem; margin: 1.5rem 0; }
.box h2 { margin-top: 0; font-size: 1.3rem; }
.box ul { margin: 0; padding-left: 1.2rem; }
.box--author { display: grid; gap: .3rem; }
.author-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
@media (max-width: 820px) {
	.book { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.5rem; }
	.book__aside { position: static; grid-template-columns: 130px 1fr; align-items: start; }
	.book__aside .bmb-cover { grid-row: span 3; }
}

/* Comments */
.comments { margin: 2rem 0 3rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.comment-list .children { list-style: none; padding-left: 1.25rem; }
.comment-meta { font-size: .85rem; color: var(--bmb-muted); }
.comment-author .avatar { display: none; }
.comment-respond { background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 14px; padding: 1.5rem; }
.comment-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; padding: .6rem .8rem; border: 1px solid #cfc8bb; border-radius: 8px; font: inherit; }
.comment-form .submit { background: var(--bmb-accent); color: #fff; border: 0; border-radius: 999px; padding: .7em 1.5em; font: inherit; font-weight: 600; cursor: pointer; }

/* Author profile */
.author-hero { display: grid; gap: .5rem; }

/* Pagination */
.pagination { margin: 2rem 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers { padding: .4rem .8rem; border: 1px solid var(--bmb-line); border-radius: 8px; text-decoration: none; background: #fff; }
.pagination .current { background: var(--bmb-ink); color: #fff; }

/* Footer */
.site-footer { background: var(--bmb-ink); color: #c5cbd8; padding: 3rem 0 2rem; margin-top: 3rem; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ffc59e; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; font-family: var(--bmb-sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .82rem; color: #9aa3b5; }
.site-footer .brand { color: #fff; margin-bottom: .75rem; }
.site-footer .brand__mark { background: var(--bmb-accent); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.newsletter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; background: var(--bmb-paper); border: 1px solid var(--bmb-line); border-radius: 16px; padding: 1.5rem 1.75rem; }
.newsletter h3 { margin: 0 0 .25rem; }
.newsletter p { margin: 0; }

/* ===== Vibrant theme layer ===== */
a:hover { color: var(--bmb-violet); }
.brand__mark { background: var(--bmb-grad); box-shadow: 0 4px 12px rgba(108,43,217,.35); }
.brand span b { background: var(--bmb-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav a:hover, .nav .current-menu-item > a { color: var(--bmb-pink); }
.nav .menu-cta > a { background: var(--bmb-grad); box-shadow: 0 6px 16px rgba(181,23,158,.3); }
.nav .menu-cta > a:hover { background: var(--bmb-ink); }

/* Hero: full color */
.hero { position: relative; overflow: hidden; color: #fff; padding: 4.5rem 0 4rem;
	background:
		radial-gradient(600px 300px at 90% 10%, rgba(255,201,60,.55), transparent 60%),
		radial-gradient(500px 400px at 75% 110%, rgba(10,166,154,.55), transparent 60%),
		linear-gradient(135deg, #4c1d95 0%, #6c2bd9 35%, #b5179e 70%, #e8175d 100%); }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 340px; height: 340px; border-radius: 40px; transform: rotate(18deg); background: rgba(255,255,255,.08); }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--bmb-sun); }
.hero__lead { color: #f3e8ff; }
.hero .bmb-eyebrow { color: var(--bmb-sun); }
.hero .search-form { border: 0; box-shadow: 0 16px 40px rgba(26,16,51,.35); }
.search-form button { background: var(--bmb-pink); }
.hero .search-form button { background: var(--bmb-sun); color: var(--bmb-ink); }
.hero__chips a { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(4px); }
.hero__chips a:hover { background: #fff; color: var(--bmb-violet); border-color: #fff; }

/* Section headings with a color bar */
.section__head h2 { position: relative; padding-bottom: .5rem; }
.section__head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 5px; border-radius: 5px; background: var(--bmb-grad); }
.section__head a { color: var(--bmb-pink); text-decoration: none; }
.section__head a:hover { color: var(--bmb-violet); }

/* Colored band for topic rows */
.section--white { background: linear-gradient(180deg, #fff 0%, #fff4fa 50%, #f0fbfa 100%); border-color: var(--bmb-line); }

/* CTA cards */
.cta-card { background: linear-gradient(135deg, #fff3c4, #ffd9a8); border: 0; }
.cta-card--dark { background: linear-gradient(135deg, #1a1033, #4c1d95); }
.cta-card--dark .bmb-btn--ghost:hover { background: #fff; color: var(--bmb-violet) !important; }

/* Newsletter */
.newsletter { background: linear-gradient(135deg, #dcf7f4, #e1ebff); border: 0; }

/* Page headers get a colorful wash */
.page-head { position: relative; }
.page-head h1 { background: linear-gradient(135deg, #4c1d95, #b5179e 60%, #e8175d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.crumbs a:hover { color: var(--bmb-pink); }
.entry { border: 0; box-shadow: 0 4px 24px rgba(26,16,51,.06); }

/* Book page */
.book__facts { border-color: var(--bmb-line); }
.book__facts dt { color: var(--bmb-violet); font-weight: 700; }
.box { border: 0; box-shadow: 0 4px 20px rgba(26,16,51,.06); border-left: 5px solid var(--bmb-violet); }
.box--author { border-left-color: var(--bmb-teal, #0aa69a); }
.comment-form .submit { background: var(--bmb-pink); }

/* Footer */
.site-footer { background: #1a1033; position: relative; color: #cfc6e6; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #6c2bd9, #e8175d, #ffc93c, #0aa69a); }
.site-footer a:hover { color: var(--bmb-sun); }
.footer-grid h4 { color: var(--bmb-sun); }
body { background: var(--bmb-cream); }

/* ===== Pages added in 1.2 ===== */
.nav ul { gap: 1.1rem; }
@media (max-width: 1080px) and (min-width: 901px) { .nav a { font-size: .88rem; } .nav ul { gap: .8rem; } }

/* Newsletter band on every page */
.newsletter-band { padding: 3rem 0 0; }
.newsletter-band + .site-footer { margin-top: 3rem; }
.bmb-news { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: 22px; color: #fff; position: relative; overflow: hidden;
	background: radial-gradient(500px 260px at 100% 0%, rgba(255,201,60,.45), transparent 60%), radial-gradient(420px 300px at 0% 120%, rgba(10,166,154,.5), transparent 60%), linear-gradient(135deg, #4c1d95, #6c2bd9 45%, #e8175d); box-shadow: 0 24px 60px rgba(108,43,217,.3); }
.bmb-news__eyebrow { margin: 0 0 .4rem; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--bmb-sun); }
.bmb-news__title { color: #fff; margin: 0 0 .5rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.bmb-news__lead { margin: 0; color: #f3e8ff; }
.bmb-news__fields { display: flex; flex-wrap: wrap; gap: .5rem; background: #fff; padding: .45rem; border-radius: 999px; box-shadow: 0 12px 30px rgba(26,16,51,.3); }
.bmb-news__fields input { flex: 1 1 140px; min-width: 0; border: 0; padding: .65rem 1rem; font: inherit; background: transparent; outline: none; color: var(--bmb-text); }
.bmb-news__fields input + input { border-left: 1px solid var(--bmb-line); }
.bmb-news__fields button { border: 0; background: var(--bmb-sun); color: var(--bmb-ink); font: inherit; font-weight: 700; padding: .65rem 1.4rem; border-radius: 999px; cursor: pointer; }
.bmb-news__fields button:hover { background: #ffd866; }
.bmb-news__fine { margin: .7rem 0 0 .5rem; font-size: .82rem; color: #e9dcff; }
.bmb-news__fine a { color: #fff; }
.bmb-news .bmb-alert { margin-bottom: .75rem; }
@media (max-width: 760px) {
	.bmb-news { grid-template-columns: 1fr; gap: 1.25rem; }
	.bmb-news__fields { border-radius: 16px; flex-direction: column; }
	.bmb-news__fields input + input { border-left: 0; border-top: 1px solid var(--bmb-line); }
}

/* Blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.post-card { background: #fff; border-radius: 18px; overflow: hidden; box-shadow: 0 4px 24px rgba(26,16,51,.07); display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(108,43,217,.14); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__art { display: grid; place-items: center; height: 100%; font-size: 3rem; background: linear-gradient(135deg, #6c2bd9, #e8175d); }
.post-card__art--1 { background: linear-gradient(135deg, #0aa69a, #2563eb); }
.post-card__art--2 { background: linear-gradient(135deg, #ff8a00, #e8175d); }
.post-card__art--3 { background: linear-gradient(135deg, #4c1d95, #0aa69a); }
.post-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.post-card__title { font-size: 1.3rem; margin: .6rem 0 .5rem; }
.post-card__title a { text-decoration: none; color: var(--bmb-ink); }
.post-card__title a:hover { color: var(--bmb-violet); }
.post-card__meta, .post__meta { font-size: .85rem; color: var(--bmb-muted); margin: .5rem 0 0; }
.post__content h2 { font-size: 1.5rem; margin-top: 2rem; }
.post__hero img { border-radius: 18px; margin-bottom: 1.5rem; }
.more-posts { padding-left: 1.2rem; }
.more-posts li { margin: .4rem 0; }
