/* Whitepaper Single Template Styles
---------------------------------------------------------------------------------------------------- */

article.type-whitepaper {
	display: flex;
	flex-wrap: wrap;
	flex-direction: column;
	align-items: center;
}

.single-whitepaper .entry-header {
	max-width: 800px;
	width: 100%;
}

/* Author + date under title */
.whitepaper-meta {
	color: #888;
	font-size: 18px;
	margin-top: -10px;
	margin-bottom: 30px;
}

/* Back link */
.whitepaper-back {
	font-size: 14px;
	margin-bottom: 20px;
}

.whitepaper-back a {
	color: #888;
	text-decoration: none;
}

.whitepaper-back a:hover {
	color: #ff6c00;
}

/* Content area — clean typography for converted PDF content */
.single-whitepaper .entry-content {
	max-width: 800px;
	line-height: 1.8;
	font-size: 16px;
}

.single-whitepaper .entry-content h2,
.single-whitepaper .entry-content h3,
.single-whitepaper .entry-content h4 {
	margin-top: 2em;
	margin-bottom: 0.5em;
}

.single-whitepaper .entry-content img {
	max-width: 100%;
	height: auto;
	margin: 1.5em 0;
}

.single-whitepaper .entry-content figure {
	margin: 2em 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.single-whitepaper .entry-content figcaption {
	font-size: 13px;
	color: #666;
	text-align: center;
	margin-top: 0.5em;
}

.single-whitepaper .entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5em 0;
}

.single-whitepaper .entry-content th,
.single-whitepaper .entry-content td {
	border: 1px solid #ddd;
	padding: 8px 12px;
	text-align: left;
}

.single-whitepaper .entry-content th {
	background-color: #f5f5f5;
	font-weight: 600;
}

/* Gated content notice (papers < 6 months old) */
.whitepaper-gated-notice {
	margin-bottom: 20px;
}

.whitepaper-gated-message {
	color: #666;
	font-style: italic;
	margin-top: 1.5em;
	padding-top: 1.5em;
	border-top: 1px solid #e5e5e5;
}

/* Download form CTA */
.whitepaper-cta {
	max-width: 800px;
	width: 100%;
	margin-top: 40px;
	padding: 30px;
	background: #f5f5f5;
	border-radius: 4px;
	text-align: center;
}

.whitepaper-cta p {
	font-size: 18px;
	margin-bottom: 20px;
	color: #333;
}

/* HubSpot injects inline <style> tags with very specific selectors for .hs-button,
   including :hover, :focus, :active, :visited states. !important is the only way
   to override injected inline styles we don't control. */
.whitepaper-cta .hs_submit input,
.whitepaper-cta .hs_submit input:hover,
.whitepaper-cta .hs_submit input:focus,
.whitepaper-cta .hs_submit input:active,
.whitepaper-cta .hs_submit input:visited {
	background: #ff6c00 !important;
	background-image: none !important;
	border: none !important;
	box-shadow: none !important;
	text-shadow: none !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	padding: 14px 36px !important;
	border-radius: 4px !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
	line-height: normal !important;
	font-family: inherit !important;
}

.whitepaper-cta .hs_submit input:hover {
	background: #e55e00 !important;
}

#whitepaper-form {
	max-width: 500px;
	margin: 0 auto;
	text-align: left;
}

/* Whitepaper Archive Styles
---------------------------------------------------------------------------------------------------- */

.whitepaper-archive-header {
	max-width: 900px;
	margin: 0 auto 30px;
	text-align: center;
}

.whitepaper-archive-header h1 {
	margin-bottom: 5px;
}

.whitepaper-archive-desc {
	color: #666;
	font-size: 17px;
	margin-bottom: 25px;
}

/* Search form */
.whitepaper-search-form {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
}

.whitepaper-search-input {
	width: 100%;
	max-width: 400px;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid #b3b3b3;
	border-radius: 4px;
}

.whitepaper-search-input:focus {
	outline: none;
	border-color: #ff6c00;
}

/* Topic dropdown — select.class.class gives (0,2,1) to beat the global select:not([multiple]) rule */
select.whitepaper-topic-select.whitepaper-topic-select {
	padding: 0.35em;
	padding-right: 1.5em;
	padding-left: 0.5em;
	font-size: 15px;
	border: 1px solid #b3b3b3;
	border-radius: 4px;
	background-color: #fff;
	cursor: pointer;
	min-width: 160px;
}

.whitepaper-topic-select:focus {
	outline: none;
	border-color: #ff6c00;
}

.whitepaper-search-button {
	padding: 5px 20px;
	margin-top: 0px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background-color: #ff6c00;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.whitepaper-search-button:hover {
	background-color: #e55e00;
}

.whitepaper-result-count {
	color: #888;
	font-size: 14px;
}

.whitepaper-clear-filters {
	color: #888;
	text-decoration: underline;
	font-size: 14px;
}

.whitepaper-clear-filters:hover {
	color: #333;
}

/* Card grid */
.whitepaper-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 1100px;
	margin: 0 auto;
}

.whitepaper-grid .entry {
	position: relative;
	background: #fff;
	border: 1px solid #d5d5d5;
	box-shadow:
		rgba(0, 0, 0, 0.12) 0px 1px 3px,
		rgba(0, 0, 0, 0.24) 0px 1px 0px;
	border-radius: 6px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease;
	cursor: pointer;
}

.whitepaper-grid .entry:hover {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.whitepaper-grid .entry-header {
	width: 100%;
}

.whitepaper-card-title {
	font-size: 18px;
	line-height: 1.3;
	margin: 0 0 10px;
}

.whitepaper-card-title a {
	color: #333;
	text-decoration: none;
}

.whitepaper-card-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.whitepaper-card-title a:hover {
	color: #ff6c00;
}

.whitepaper-card-excerpt {
	font-size: 14px;
	color: #555;
	line-height: 1.6;
	flex: 1;
}

.whitepaper-grid .entry-footer {
	margin-top: auto;
	width: 100%;
	text-align: left;
}

/* Author link — sits above the card's ::after overlay so it's clickable */
.whitepaper-author-link {
	color: #0082ca;
	text-decoration: none;
	position: relative;
	z-index: 1;
}

.whitepaper-card-footer .whitepaper-author-link {
	font-size: 13px;
}

.whitepaper-meta .whitepaper-author-link {
	font-size: 18px;
}

.whitepaper-author-link:hover {
	color: #ff6c00;
	text-decoration: underline;
}

.whitepaper-card-footer {
	font-size: 13px;
	color: #888;
	margin: 0;
	text-align: left;
}

/* Pagination (Genesis) */
.post-type-archive-whitepaper .archive-pagination {
	max-width: 1100px;
	margin: 40px auto;
	text-align: center;
	width: 100%;
	display: flex;
}

/* Responsive */
@media only screen and (max-width: 900px) {
	.whitepaper-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 18px;
	}
}

@media only screen and (max-width: 600px) {
	.whitepaper-grid {
		grid-template-columns: 1fr;
	}

	.whitepaper-search-form {
		flex-direction: column;
	}

	.whitepaper-search-input {
		max-width: 100%;
	}

	.whitepaper-topic-select {
		width: 100%;
	}
}

/* Responsive — Single */
@media only screen and (max-width: 800px) {
	.single-whitepaper .entry-content {
		font-size: 15px;
	}

	.whitepaper-cta {
		width: 100%;
		padding: 20px;
	}
}

@media only screen and (max-width: 400px) {
	.single-whitepaper .entry-header {
		width: unset;
	}
}
