/**
 * Hospital News Issues — front-end styles.
 * Matched to hospitalnews.com / TagDiv Newspaper theme.
 */

:root {
	--hn-font: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--hn-color-black: #111111;
	--hn-color-title-blue: #0056b3;
	--hn-color-category-blue: #3498db;
	--hn-color-category-bg: #eef6fc;
	--hn-color-red: #dd3333;
	--hn-color-text: #222222;
	--hn-color-muted: #999999;
	--hn-color-border: #e6e6e6;
	--hn-color-banner: #4a90c4;
	--hn-color-section-bg: #f7f9fb;
	--hn-max-width: 1068px;
	--hn-content-width: 1018px;
}

/* Container */

.hn-issues {
	max-width: var(--hn-max-width);
	margin: 0 auto;
	padding: 0 15px 40px;
	color: var(--hn-color-text);
	font-family: var(--hn-font);
	line-height: 1.5;
}

.hn-issues--current,
.hn-issues--archive {
	padding-top: 8px;
}

/* Cover + monthly focus banner */

.hn-issue-hero {
	margin: 0 calc(50% - 50vw) 0;
	padding: 36px max(15px, calc((100vw - var(--hn-content-width)) / 2));
	background: #0c6eb8;
	color: #ffffff;
}

.hn-issue-hero__banner {
	margin: 0 0 24px;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 3px 18px rgba(0, 0, 0, 0.1);
}

.hn-issue-hero__banner img {
	display: block;
	width: 100%;
	height: auto;
}

.hn-issue-hero__cover {
	flex: 0 0 40%;
	max-width: 330px;
	align-self: center;
}

.hn-issue-hero__cover img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.hn-issue-hero__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 72px;
	max-width: var(--hn-content-width);
	margin: 0 auto;
}

.hn-issue-hero__copy {
	flex: 0 1 360px;
}

.hn-issue-hero__title {
	margin: 0 0 4px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.15;
	color: #ffffff !important;
}

.hn-issue-hero__description {
	margin: 0 0 18px;
	font-size: 17px;
	line-height: 1.45;
	color: #ffffff;
}

.hn-issue-hero__actions {
	display: grid;
	gap: 8px;
	max-width: 210px;
}

.hn-issue-hero__button {
	display: block;
	padding: 8px 14px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: #000000 !important;
	background: #ffffff;
}

.hn-issue-hero__button--hcp {
	background: #dd9933;
}

.hn-issue-hero__button:hover {
	color: #000000 !important;
	opacity: 0.9;
}

/* Intro line (magazine-current) */

.hn-issue-intro {
	margin: 0 0 26px;
	padding: 0 24px;
	text-align: center;
	font-family: var(--hn-font);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	color: var(--hn-color-black);
	background: transparent;
}

/* Flipbook embed — responsive 4:3 frame */

.hn-flipbook-embed {
	position: relative;
	margin: 0 0 28px;
	padding-top: 75%;
	height: 0;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	background: var(--hn-color-section-bg);
}

.hn-flipbook-embed iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* Section headers — EDITORIAL / CURRENT NEWS */

.hn-issue-sections {
	display: block;
}

.hn-issue-section {
	margin-bottom: 44px;
	padding-bottom: 8px;
}

.hn-issue-section:last-child {
	margin-bottom: 0;
}

.hn-section {
	margin-bottom: 26px;
}

.hn-section__header {
	display: flex;
	align-items: center;
	margin-bottom: 0;
}

.hn-section__title {
	margin: 0;
	padding: 0 0 2px;
	font-family: var(--hn-font);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hn-color-black);
	border-left: 0;
}

.hn-section__rule {
	display: block;
	width: 100%;
	height: 3px;
	margin-top: 12px;
	background: #777777;
}

/* Article rows — image left, category + title right */

.hn-issue-section__articles {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.hn-article-row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 14px;
	width: 100%;
	padding: 8px 0;
	border-bottom: 0;
	transition: background-color 0.2s ease;
}

.hn-article-row:first-child {
	padding-top: 8px;
}

.hn-article-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.hn-article-row:hover {
	background-color: rgba(74, 144, 196, 0.04);
}

.hn-article-row__thumb {
	flex: 0 0 165px;
	width: 165px;
	max-width: 165px;
	min-width: 165px;
	display: block;
	overflow: hidden;
	line-height: 0;
	text-decoration: none;
	border-radius: 0;
	box-shadow: none;
	transition: box-shadow 0.25s ease;
}

.hn-article-row:hover .hn-article-row__thumb {
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.hn-article-row__thumb img,
.hn-article-row__thumb-fallback {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 165 / 120;
	object-fit: cover;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.hn-article-row:hover .hn-article-row__thumb img {
	transform: scale(1.02);
	opacity: 0.95;
}

.hn-article-row__thumb--placeholder .hn-article-row__thumb-fallback {
	background: #ececec;
}

.hn-article-row__content {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 2px;
}

.hn-article-row__category {
	display: inline-block;
	margin: 0 0 3px;
	text-decoration: none;
}

.hn-article-row__category-text {
	display: inline-block;
	padding: 0;
	font-family: var(--hn-font);
	font-size: 9px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hn-color-category-blue) !important;
	background: transparent;
	border: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hn-article-row__category:hover .hn-article-row__category-text {
	background: var(--hn-color-category-blue);
	color: #ffffff !important;
}

.hn-article-row__title {
	margin: 0;
	padding: 0;
	font-family: var(--hn-font);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.28;
}

.hn-article-row__title a {
	color: var(--hn-color-black) !important;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

.hn-article-row__title a:hover {
	color: var(--hn-color-black) !important;
	text-decoration: none;
}

/* Keep TagDiv / theme from breaking magazine rows */
.hn-issues .hn-article-row,
.hn-issues .hn-article-row__thumb,
.hn-issues .hn-article-row__content {
	box-sizing: border-box;
}

.hn-issues .hn-article-row__title,
.hn-issues .hn-article-row__title a {
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.28 !important;
}

/* Ad slots — centered, subtle frame, sized by ad type */

.hn-issue-ad {
	margin: 36px auto;
	text-align: center;
	clear: both;
}

.hn-issue-ad__link {
	display: inline-block;
	line-height: 0;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.hn-issue-ad__link:hover {
	opacity: 0.94;
	transform: translateY(-1px);
}

.hn-issue-ad img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border: 1px solid var(--hn-color-border);
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hn-issue-ad--full {
	max-width: 100%;
	padding: 8px 0;
}

.hn-issue-ad--full img,
.hn-issue-ad--full .hn-issue-ad__link {
	width: 100%;
}

.hn-issue-ad--half {
	max-width: 66%;
	padding: 12px 0;
	margin: 40px auto;
}

.hn-issue-ad--half img,
.hn-issue-ad--half .hn-issue-ad__link {
	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
}

/* TagDiv-style block title (past editions) */

.hn-block-title-wrap {
	margin: 0 0 24px;
	text-align: center;
}

.hn-block-title {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0;
	font-family: var(--hn-font);
	font-size: 18px;
	font-weight: 700;
	font-style: italic;
	line-height: 1;
	text-transform: uppercase;
	color: #ffffff;
}

.hn-block-title span {
	position: relative;
	z-index: 1;
	display: inline-block;
	padding: 12px 32px;
	background: var(--hn-color-banner);
	transform: skewX(-12deg);
	box-shadow: 0 3px 12px rgba(74, 144, 196, 0.35);
}

.hn-past-intro {
	margin: 0 0 32px;
	padding: 14px 20px;
	text-align: center;
	font-size: 15px;
	line-height: 1.6;
	color: var(--hn-color-muted);
	background: var(--hn-color-section-bg);
}

/* Past editions list — full-width horizontal rows */

.hn-issues--past {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.hn-past-grid {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.hn-past-card {
	border-bottom: 1px solid var(--hn-color-border);
	padding: 32px 0;
	transition: background-color 0.2s ease;
}

.hn-past-card:hover {
	background-color: rgba(74, 144, 196, 0.03);
}

.hn-past-card:first-child {
	padding-top: 0;
}

.hn-past-card:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.hn-past-card__link {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 32px;
	text-decoration: none;
	color: inherit;
}

.hn-past-card__link:hover .hn-past-card__title {
	color: var(--hn-color-red);
}

.hn-past-card__image-wrap {
	flex: 0 0 300px;
	max-width: 300px;
	overflow: hidden;
	line-height: 0;
	border-radius: 6px;
	box-shadow: 0 3px 16px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.25s ease;
}

.hn-past-card:hover .hn-past-card__image-wrap {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.hn-past-card__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.hn-past-card__link:hover .hn-past-card__image {
	transform: scale(1.02);
	opacity: 0.94;
}

.hn-past-card__image-wrap--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	background: #f4f4f4;
	padding: 1rem;
	text-align: center;
	font-weight: 600;
	color: var(--hn-color-muted);
}

.hn-past-card__meta {
	flex: 1 1 auto;
	min-width: 0;
	padding-top: 8px;
}

.hn-past-card__category {
	display: inline-block;
	margin-bottom: 12px;
	padding: 5px 10px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hn-color-red);
	background: rgba(221, 51, 51, 0.08);
	border: 1px solid rgba(221, 51, 51, 0.2);
}

.hn-past-card__title {
	margin: 0 0 12px;
	font-family: var(--hn-font);
	font-size: 28px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--hn-color-title-blue);
	transition: color 0.2s ease;
}

.hn-past-card__excerpt {
	margin: 0 0 16px;
	font-size: 15px;
	line-height: 1.65;
	color: var(--hn-color-text);
}

.hn-past-card__cta {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--hn-color-red);
}

/* Past editions page — full width, no sidebar */

body.hn-past-editions-page .td-main-sidebar,
body.hn-past-editions-page .td-pb-span4.td-main-sidebar {
	display: none !important;
}

body.hn-past-editions-page .td-pb-span8.td-main-content,
body.hn-past-editions-page .td-main-content {
	width: 100% !important;
	float: none !important;
}

body.hn-past-editions-page .td-ss-main-content {
	padding-right: 0;
}

body.hn-past-editions-page .td-page-header,
body.hn-past-editions-page .td-page-title,
body.hn-past-editions-page .entry-title.td-page-title,
body.hn-past-editions-page h1.entry-title {
	display: none !important;
}

body.hn-past-editions-page .hn-issues-layout__sidebar {
	display: none;
}

body.hn-past-editions-page .hn-issues-layout__main {
	flex: 1 1 100%;
	max-width: 100%;
}

/* Notices */

.hn-issue-notice,
.hn-issue-empty {
	padding: 24px;
	background: #f7f7f7;
	text-align: center;
	color: var(--hn-color-muted);
	font-size: 15px;
}

/* Generic theme layout fallback (non-Tagdiv) */

.hn-issues-layout {
	max-width: var(--hn-max-width);
	margin: 0 auto;
	padding: 0 15px 40px;
}

.hn-issues-breadcrumbs {
	margin-bottom: 20px;
	font-size: 12px;
	color: var(--hn-color-muted);
}

.hn-issues-breadcrumbs a {
	color: var(--hn-color-muted);
	text-decoration: none;
}

.hn-issues-layout__columns {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
}

.hn-issues-layout__main {
	flex: 1 1 65%;
	min-width: 0;
}

.hn-issues-layout__sidebar {
	flex: 1 1 30%;
	min-width: 280px;
}

/* Tablet */

@media (min-width: 768px) {
	.hn-past-card__image-wrap {
		flex-basis: 340px;
		max-width: 340px;
	}
}

/* Mobile */

@media (max-width: 767px) {
	.hn-issues {
		padding: 0 15px 30px;
	}

	.hn-issue-intro {
		font-size: 14px;
		margin-bottom: 28px;
		padding: 14px 16px;
	}

	.hn-issue-hero {
		padding-top: 28px;
		padding-bottom: 28px;
	}

	.hn-issue-hero__inner {
		flex-direction: column-reverse;
		gap: 24px;
		text-align: center;
	}

	.hn-issue-hero__cover {
		max-width: 230px;
	}

	.hn-issue-hero__actions {
		margin: 0 auto;
	}

	.hn-section__title {
		font-size: 18px;
	}

	.hn-article-row {
		flex-direction: column;
		gap: 16px;
		padding: 22px 0;
	}

	.hn-article-row__thumb {
		flex: none;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.hn-article-row__title,
	.hn-issues .hn-article-row__title a {
		font-size: 20px !important;
	}

	.hn-issue-ad--half {
		max-width: 100%;
	}

	.hn-past-card__link {
		flex-direction: column;
		gap: 16px;
	}

	.hn-past-card__image-wrap {
		flex: none;
		max-width: 100%;
		width: 100%;
	}

	.hn-past-card__title {
		font-size: 22px;
	}

	.hn-past-card__excerpt {
		font-size: 14px;
	}
}
