/* General Body and Font Styles */
body {
	font-family: 'Inter', sans-serif;
	background-color: #f8fafc;
	/* slate-50 */
	color: #1e293b;
	/* slate-800 */
	margin: 0;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	/* Prevents horizontal scroll */
}

body.menu-open {
	overflow: hidden;
	/* Prevents scrolling when menu is open */
}

h1,
h2,
h3,
.font-serif {
	font-family: 'Playfair Display', serif;
}

a {
	color: inherit;
	text-decoration: none;
}

/* Container */
.container {
	width: 100%;
	max-width: 64rem;
	/* max-w-5xl */
	margin-left: auto;
	margin-right: auto;
	padding: 0 0.5rem;
	box-sizing: border-box;
}

/* Header */
.header {
	background-color: rgba(255, 255, 255, 0.8);
	backdrop-filter: blur(4px);
	position: sticky;
	top: 0;
	z-index: 10;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	padding: 0.75rem 0;
}

.header .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.header-icon {
	width: 3rem;
	height: 3rem;
	margin-right: 0px;
	align-self: center;
}

.header-logo-wrapper {
	display: flex;
	align-items: baseline;
	/* Vertically align to baseline */
	flex-wrap: wrap;
	gap: 0.1rem 0.5rem;
}

.header-logo {
	font-size: 1.75rem;
	/* text-2xl */
	font-weight: 700;
	margin: 0;
}

.header-subheading {
	font-size: 0.8rem;
	font-family: 'Inter', sans-serif;
	color: #64748b;
	margin: 0;
	font-weight: 500;
}

/* Hamburger Menu */
.hamburger-menu {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	width: 1.75rem;
	height: 1.75rem;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 20;
}

.hamburger-line {
	width: 1.75rem;
	height: 2px;
	background: #1e293b;
	border-radius: 10px;
	transition: all 0.3s linear;
	position: relative;
	transform-origin: 1px;
}

.hamburger-menu.open .hamburger-line:nth-child(1) {
	transform: rotate(45deg);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
	opacity: 0;
	transform: translateX(20px);
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
	transform: rotate(-45deg);
}

/* Mobile Nav */
.header-nav {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: white;
	height: 100vh;
	width: 100%;
	text-align: center;
	padding: 2rem;
	position: fixed;
	top: 0;
	left: 0;
	transition: transform 0.3s ease-in-out;
	transform: translateX(100%);
	z-index: 15;
	box-sizing: border-box;
}

.header-nav.open {
	transform: translateX(0);
}

.header-nav a {
	font-size: 1.5rem;
	padding: 1.5rem 0;
	font-weight: bold;
	color: #1e293b;
	width: 100%;
	white-space: nowrap;
	/* Prevents word wrapping */
}

/* Main Content Wrapper */
.main-wrapper {
	padding: 1.5rem 0;
}

/* Main Article Card */
.article-card {
	background-color: #ffffff;
	border-radius: 1rem;
	/* rounded-2xl */
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	/* shadow-lg */
	overflow: hidden;
	padding: 1.5rem 0.5rem;
}

.article-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	/* gap-8 */
}

/* Aside (Left Column) */
.aside {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.book-cover-mask {
	border-radius: 0.5rem;
	overflow: hidden;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	width: 100%;
	max-width: 16rem;
	/* max-w-xs */
}

.book-cover {
	display: block;
	width: 100%;
	/* height: 345px; */
	aspect-ratio: 2 / 3;
	transition: transform 0.3s ease;
}

.book-cover-mask:hover .book-cover {
	transform: scale(1.05);
}

.sidebar-summary {
	margin-top: 1.5rem;
	font-size: 1rem;
	/* Increased size */
	line-height: 1.6;
	color: #334155;
	text-align: left;
	max-width: 18rem;
}

/* Content (Right Column) */
.category-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.category-tag {
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.125rem 0.625rem;
	border-radius: 9999px;
}

.tag-history {
	background-color: #dbeafe;
	color: #1e40af;
}

.tag-ideas {
	background-color: #f3e8ff;
	color: #5b21b6;
}

.book-title {
	font-size: 2rem;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.2;
}

.book-author {
	margin-top: 0.5rem;
	font-size: 1rem;
	/* Smaller size */
	font-weight: 500;
	color: #64748b;
	/* Lighter color */
}

.intro-hook {
	margin-top: 1.5rem;
	font-size: 1.125rem;
	color: #334155;
	line-height: 1.75;
}

.intro-hook p {
	margin-bottom: 1rem;
}

/* "Most surprising insights" Section */
.insights-section {
	margin-top: 2.5rem;
}

.insights-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.insight-card {
	position: relative;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	padding: 1.5rem;
	padding-right: 3rem;
	transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
	cursor: pointer;
}

.insight-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.insight-card.checked {
	background-color: #f0fdf4;
	/* green-50 */
	border-color: #bbf7d0;
	/* green-200 */
}

.insight-card h4 {
	font-family: 'Inter', sans-serif;
	font-size: 1rem;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 0.5rem 0;
}

.insight-card p {
	font-size: 0.95rem;
	color: #475569;
	margin: 0;
	line-height: 1.6;
}

.insight-card .example {
	font-style: italic;
	color: #475569;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e2e8f0;
	font-size: 0.9rem;
}

.checkmark {
	position: absolute;
	top: 50%;
	right: 1rem;
	transform: translateY(-50%) scale(0.5);
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background-color: #22c55e;
	/* green-500 */
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.checkmark svg {
	stroke: white;
	stroke-width: 3;
	fill: none;
}

.insight-card.checked .checkmark {
	transform: translateY(-50%) scale(1);
	opacity: 1;
}

/* Bottom CTA */
.bottom-actions {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin-top: 2.5rem;
	padding-top: 2.5rem;
	border-top: 1px solid #e2e8f0;
}

.amazon-button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 50%;
	/* Narrower button */
	background-color: #f59e0b;
	color: #ffffff;
	font-weight: 600;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	transition: background-color 0.3s;
}

.amazon-button:hover {
	background-color: #d97706;
}

.amazon-button svg {
	height: 1.25rem;
	width: 1.25rem;
	margin-right: 0.5rem;
}

.continue-reading {
	font-size: 1rem;
	color: #475569;
	margin-bottom: 1rem;
	text-align: center;
	max-width: 30rem;
}

.disclaimer {
	text-align: center;
	font-size: 0.75rem;
	color: #94a3b8;
	margin-top: 0.75rem;
}

/* Related Books */
.related-section {
	margin-top: 3rem;
}

.related-title {
	font-size: 1.875rem;
	font-weight: 700;
	text-align: center;
	color: #0f172a;
	margin-bottom: 2rem;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}

.related-book-item {
	text-align: center;
}

.related-book-item .book-cover-mask {
	margin-left: auto;
	margin-right: auto;
}

.related-book-item h3 {
	font-weight: 600;
	color: #1e293b;
	transition: color 0.2s;
	margin-top: 0.75rem;
}

.related-book-item:hover h3 {
	color: #4f46e5;
}

.related-book-item p {
	font-size: 0.875rem;
	color: #64748b;
}

/* Footer */
.footer {
	background-color: #1e293b;
	color: #cbd5e1;
	margin-top: 4rem;
	padding: 2rem 0;
}

.footer .container {
	text-align: center;
}

.footer h3 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 0.5rem;
}

.footer p {
	margin-bottom: 1rem;
	max-width: 28rem;
	margin-left: auto;
	margin-right: auto;
}

.footer-nav {
	display: flex;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
}

.footer-nav a:hover {
	color: #ffffff;
}

.footer-copy {
	font-size: 0.75rem;
	color: #64748b;
}

/* Responsive Breakpoints */
@media (min-width: 768px) {

	/* md */
	.hamburger-menu {
		display: none;
	}

	.header-nav {
		display: flex;
		position: static;
		flex-direction: row;
		height: auto;
		width: auto;
		background: transparent;
		transform: translateX(0);
		padding: 0;
		gap: 2rem;
	}

	.header-nav a {
		font-size: 1rem;
		padding: 0;
		font-weight: 500;
		color: #475569;
	}

	.main-wrapper {
		padding: 2rem 0;
	}

	.article-card {
		padding: 2.5rem;
	}

	.article-grid {
		grid-template-columns: 240px 1fr;
		gap: 2.5rem;
	}

	.book-title {
		font-size: 2.5rem;
	}

	.related-section {
		margin-top: 4rem;
	}

	.related-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem;
	}

	.container {
		padding: 0 2rem;
	}

	.article-card {
		padding: 1.5rem;
	}

	.article-section {
		max-width: 40rem;
		margin: 0 auto;
	}

	.article-section h1 {
		font-size: 2.25rem;
		margin-bottom: 1rem;
	}

	.article-section a {
		color: #4f46e5;
	}

	.article-section a:hover {
		text-decoration: underline;
	}
}

@media (min-width: 1024px) {

	/* lg */
	.article-grid {
		grid-template-columns: 280px 1fr;
		gap: 3rem;
	}

	.book-title {
		font-size: 3rem;
	}

	.related-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}