/* =========================================================
   The Doctor's Guardian — Blog Design
   Token system
   ========================================================= */
:root{
	--dgbd-navy: #101C33;
	--dgbd-navy-deep: #0A1424;
	--dgbd-blue: #2E9BD6;
	--dgbd-blue-light: #EAF5FC;
	--dgbd-gold: #FFC44A;
	--dgbd-ink: #1A2233;
	--dgbd-gray: #5B6B82;
	--dgbd-gray-light: #8B99AD;
	--dgbd-border: #E5EAF1;
	--dgbd-bg: #F7F9FC;
	--dgbd-white: #FFFFFF;
	--dgbd-bg-surface: #FFFFFF;
	--dgbd-heading: #101C33;
	--dgbd-table-head-bg: #101C33;
	--dgbd-table-head-text: #FFFFFF;
	--dgbd-hero-bg: #4E97FD;
	--dgbd-hero-text-muted: #162847;
	--dgbd-radius: 16px;
	--dgbd-radius-sm: 10px;
	--dgbd-shadow: 0 2px 8px rgba(16,28,51,0.06), 0 12px 32px rgba(16,28,51,0.06);
	--dgbd-shadow-hover: 0 6px 16px rgba(16,28,51,0.09), 0 20px 40px rgba(16,28,51,0.10);
	--dgbd-font-display: 'Poppins', 'Segoe UI', sans-serif;
	--dgbd-font-body: 'Inter', 'Segoe UI', sans-serif;
}

.dgbd-single, .dgbd-archive{
	font-family: var(--dgbd-font-body);
	color: var(--dgbd-ink);
	background: var(--dgbd-bg-surface);
	-webkit-font-smoothing: antialiased;
}

.dgbd-container{
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
}

.dgbd-single *, .dgbd-archive *{ box-sizing: border-box; }

/* =========================================================
   Shared bits
   ========================================================= */
.dgbd-badge{
	display: inline-flex;
	align-items: center;
	background: var(--dgbd-navy);
	color: var(--dgbd-white);
	font-family: var(--dgbd-font-display);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 8px 16px;
	border-radius: 999px;
}
.dgbd-badge-floating{
	position: absolute;
	top: 16px;
	left: 16px;
	background: rgba(16,28,51,0.85);
	backdrop-filter: blur(4px);
}

.dgbd-post-meta{
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--dgbd-gray);
}
.dgbd-light-meta{ color: rgba(255,255,255,0.75); }
.dgbd-meta-dot{ opacity: .6; }

.dgbd-btn{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--dgbd-font-display);
	font-weight: 600;
	font-size: 15px;
	padding: 13px 26px;
	border-radius: var(--dgbd-radius-sm);
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
	border: 2px solid transparent;
}
.dgbd-btn-primary{
	background: var(--dgbd-blue);
	color: var(--dgbd-white);
}
.dgbd-btn-primary:hover{ background: var(--dgbd-navy); transform: translateY(-1px); }
.dgbd-btn-light{
	background: var(--dgbd-white);
	color: var(--dgbd-navy);
}
.dgbd-btn-light:hover{ background: var(--dgbd-gold); transform: translateY(-1px); }
.dgbd-btn-outline-light{
	background: transparent;
	color: var(--dgbd-white);
	border-color: rgba(255,255,255,0.4);
}
.dgbd-btn-outline-light:hover{ border-color: var(--dgbd-white); }

.dgbd-read-link{
	font-family: var(--dgbd-font-display);
	font-weight: 600;
	font-size: 14px;
	color: var(--dgbd-blue);
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.dgbd-hero-section{
	background: var(--dgbd-hero-bg);
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
}

.dgbd-breadcrumb-row{ padding-top: 28px; }
.dgbd-breadcrumb{ font-size: 13px; color: rgba(255,255,255,0.75); }
.dgbd-breadcrumb a{ color: rgba(255,255,255,0.75); text-decoration: none; }
.dgbd-breadcrumb a:hover{ color: var(--dgbd-white); }
.dgbd-crumb-sep{ margin: 0 8px; opacity: .6; }
.dgbd-crumb-current{ color: var(--dgbd-white); }

.dgbd-post-hero{ padding: 8px 0 40px; }

.dgbd-eyebrow-cat{
	font-family: var(--dgbd-font-display);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--dgbd-white);
	margin: 0 0 18px;
}
.dgbd-eyebrow-cat span:first-child{ color: rgba(255,255,255,0.75); }
.dgbd-eyebrow-sep{ margin: 0 8px; color: rgba(255,255,255,0.75); }

.dgbd-hero-grid{
	display: grid;
	grid-template-columns: 2.2fr 1fr;
	gap: 40px;
	align-items: center;
}
.dgbd-hero-grid.dgbd-hero-grid--no-media{ grid-template-columns: 1fr; max-width: 780px; }
.dgbd-hero-text{ min-width: 0; }
.dgbd-post-title{
	font-family: var(--dgbd-font-display);
	font-weight: 800;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.18;
	color: var(--dgbd-white);
	margin: 0 0 18px;
}
.dgbd-post-excerpt{
	font-size: 18px;
	color: rgba(255,255,255,0.85);
	line-height: 1.6;
	margin: 0 0 22px;
}

.dgbd-post-meta{ gap: 22px; }
.dgbd-hero-text .dgbd-post-meta{ color: rgba(255,255,255,0.85); }
.dgbd-meta-item{ display: inline-flex; align-items: center; gap: 7px; }
.dgbd-meta-icon{ width: 17px; height: 17px; flex: none; color: var(--dgbd-gray-light); }
.dgbd-hero-text .dgbd-meta-icon{ color: rgba(255,255,255,0.85); }

.dgbd-hero-media{
	border-radius: var(--dgbd-radius);
	overflow: hidden;
	box-shadow: var(--dgbd-shadow);
	align-self: center;
}
.dgbd-hero-media img{ width: 100%; height: auto; display: block; }

.dgbd-post-layout{
	display: grid;
	grid-template-columns: minmax(0,1fr) 340px;
	gap: 40px;
	align-items: start;
	padding: 40px 0 40px;
}

.dgbd-content-card{
	background: var(--dgbd-bg-surface);
	border: 1px solid var(--dgbd-border);
	border-radius: var(--dgbd-radius);
	padding: 40px 44px;
	box-shadow: var(--dgbd-shadow);
}

/* Article typography */
.dgbd-post-content{ font-size: 17px; line-height: 1.8; color: var(--dgbd-ink); }
.dgbd-post-content h2{
	font-family: var(--dgbd-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--dgbd-heading);
	margin: 44px 0 10px;
	padding-top: 10px;
	position: relative;
	scroll-margin-top: 100px;
}
.dgbd-post-content h2::before{
	content: "";
	display: block;
	width: 48px;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--dgbd-blue), var(--dgbd-gold));
	margin-bottom: 14px;
}
.dgbd-post-content h3{
	font-family: var(--dgbd-font-display);
	font-size: 20px;
	font-weight: 600;
	color: var(--dgbd-heading);
	margin: 30px 0 10px;
	scroll-margin-top: 100px;
}
.dgbd-post-content p{ margin: 0 0 18px; }
.dgbd-post-content a{ color: var(--dgbd-blue); text-decoration: underline; text-decoration-color: rgba(46,155,214,0.35); text-underline-offset: 2px; }
.dgbd-post-content a:hover{ text-decoration-color: var(--dgbd-blue); }
.dgbd-post-content strong{ color: var(--dgbd-heading); }
.dgbd-post-content ul, .dgbd-post-content ol{ margin: 0 0 20px; padding-left: 22px; }
.dgbd-post-content li{ margin-bottom: 8px; }
.dgbd-post-content blockquote{
	margin: 24px 0;
	padding: 18px 22px;
	background: var(--dgbd-blue-light);
	border-left: 4px solid var(--dgbd-blue);
	border-radius: 0 var(--dgbd-radius-sm) var(--dgbd-radius-sm) 0;
	color: var(--dgbd-heading);
	font-style: normal;
}
.dgbd-post-content img{ max-width: 100%; height: auto; border-radius: var(--dgbd-radius-sm); }

.dgbd-post-content table{
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 15px;
	border-radius: var(--dgbd-radius-sm);
	overflow: hidden;
	box-shadow: var(--dgbd-shadow);
}
.dgbd-post-content th{
	background: var(--dgbd-table-head-bg);
	color: var(--dgbd-table-head-text);
	text-align: left;
	padding: 12px 16px;
	font-family: var(--dgbd-font-display);
	font-weight: 600;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.dgbd-post-content td{
	padding: 12px 16px;
	border-bottom: 1px solid var(--dgbd-border);
}
.dgbd-post-content tr:nth-child(even) td{ background: var(--dgbd-bg); }
.dgbd-post-content tr:last-child td{ border-bottom: none; }

/* FAQ cards */
.dgbd-faq-list{ margin: 24px 0 8px; display: flex; flex-direction: column; gap: 14px; }
.dgbd-faq-item{
	border: 1px solid var(--dgbd-border);
	border-radius: var(--dgbd-radius-sm);
	padding: 18px 20px;
	background: var(--dgbd-bg-surface);
}
.dgbd-faq-q{
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-family: var(--dgbd-font-display);
	font-weight: 700;
	font-size: 16px;
	color: var(--dgbd-heading);
	margin: 0 0 10px;
}
.dgbd-faq-num{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex: none;
	border-radius: 7px;
	background: var(--dgbd-gold);
	color: var(--dgbd-navy-deep);
	font-size: 13px;
	font-weight: 700;
	margin-top: 1px;
}
.dgbd-faq-q-text{ padding-top: 2px; }
.dgbd-faq-a{
	font-size: 15px;
	line-height: 1.7;
	color: var(--dgbd-ink);
	padding-left: 36px;
}

/* Sidebar */
.dgbd-sidebar{ position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.dgbd-card{
	background: var(--dgbd-bg-surface);
	border: 1px solid var(--dgbd-border);
	border-radius: var(--dgbd-radius);
	padding: 22px;
	box-shadow: var(--dgbd-shadow);
}
.dgbd-card-title{
	font-family: var(--dgbd-font-display);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--dgbd-gray);
	margin: 0 0 14px;
}

.dgbd-toc-card{ padding: 26px 24px; }

.dgbd-toc-toggle{
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	background: none;
	border: none;
	margin: 0;
	padding: 0;
	font: inherit;
	text-align: left;
	cursor: default;
}
.dgbd-toc-toggle .dgbd-card-title{ margin: 0; }
.dgbd-toc-chevron{
	display: none;
	flex: none;
	color: var(--dgbd-gray-light);
	transition: transform .2s ease;
}
.dgbd-toc-panel{ margin-top: 14px; }

.dgbd-toc-list{ list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.dgbd-toc-item + .dgbd-toc-item{ margin-top: 14px; }
.dgbd-toc-item a{
	display: flex;
	align-items: flex-start;
	gap: 10px;
	color: var(--dgbd-ink);
	text-decoration: none;
	font-size: 15px;
	line-height: 1.45;
	transition: color .15s ease;
}
.dgbd-toc-item a:hover{ color: var(--dgbd-blue); }
.dgbd-toc-item a.is-active{ color: var(--dgbd-blue); }
.dgbd-toc-item a.is-active .dgbd-toc-num{ color: var(--dgbd-blue); }
.dgbd-toc-level-3 a{ font-size: 14px; color: var(--dgbd-gray); }
.dgbd-toc-num{
	font-family: var(--dgbd-font-display);
	font-weight: 700;
	font-size: 12px;
	color: var(--dgbd-gray-light);
	flex: none;
	padding-top: 2px;
}
.dgbd-toc-item-text{ padding-top: 0; }

.dgbd-cta-card{ background: var(--dgbd-navy); border: none; color: var(--dgbd-white); }
.dgbd-cta-eyebrow{
	font-family: var(--dgbd-font-display);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--dgbd-gold);
	margin: 0 0 8px;
}
.dgbd-cta-heading{
	font-family: var(--dgbd-font-display);
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--dgbd-white);
}
.dgbd-cta-text{ font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.6; margin: 0 0 18px; }
.dgbd-cta-card .dgbd-btn-primary{ width: 100%; background: var(--dgbd-blue); }
.dgbd-cta-card .dgbd-btn-primary:hover{ background: var(--dgbd-gold); color: var(--dgbd-navy); }
.dgbd-cta-phone{
	display: block;
	text-align: center;
	margin-top: 12px;
	color: rgba(255,255,255,0.85);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}
.dgbd-cta-phone:hover{ color: var(--dgbd-gold); }

.dgbd-image-module{ padding: 0; overflow: hidden; }
.dgbd-image-module img{ width: 100%; height: auto; display: block; }
.dgbd-image-module a{ display: block; line-height: 0; }
.dgbd-image-module-caption{
	margin: 0;
	padding: 12px 16px;
	font-size: 13px;
	color: var(--dgbd-gray);
	text-align: center;
}

.dgbd-html-module{ overflow: hidden; }
.dgbd-html-module--flush{ padding: 0; border: none; box-shadow: none; background: transparent; }
.dgbd-html-module img,
.dgbd-html-module iframe,
.dgbd-html-module video{ max-width: 100%; }

.dgbd-view-all{
	display: inline-block;
	font-family: var(--dgbd-font-display);
	font-weight: 600;
	font-size: 14px;
	color: var(--dgbd-blue);
	text-decoration: none;
	margin-top: 4px;
}

.dgbd-post-end-related{ padding: 12px 0 44px; }
.dgbd-post-end-related .dgbd-section-heading{ margin-bottom: 22px; }
.dgbd-post-end-related .dgbd-card-grid{ margin-bottom: 20px; }

.dgbd-bottom-cta{
	margin: 20px 0 60px;
	background: linear-gradient(120deg, var(--dgbd-navy), var(--dgbd-navy-deep));
	border-radius: var(--dgbd-radius);
	padding: 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.dgbd-bottom-cta-heading{
	font-family: var(--dgbd-font-display);
	font-size: 24px;
	font-weight: 700;
	color: var(--dgbd-white);
	margin: 6px 0 0;
}
.dgbd-bottom-cta-actions{ display: flex; gap: 12px; flex-wrap: wrap; }
.dgbd-light{ color: var(--dgbd-gold) !important; }

/* =========================================================
   ARCHIVE (blog listing)
   ========================================================= */
.dgbd-archive-hero{
	background: var(--dgbd-hero-bg);
	padding: 72px 0 56px;
	margin-bottom: 44px;
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(-50vw + 50%);
	margin-right: calc(-50vw + 50%);
}
.dgbd-archive-hero::after{
	content: "";
	position: absolute;
	width: 520px; height: 520px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.15);
	top: -220px; right: -140px;
}
.dgbd-eyebrow{
	font-family: var(--dgbd-font-display);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--dgbd-white);
	margin: 0 0 14px;
	position: relative;
}
.dgbd-archive-title{
	font-family: var(--dgbd-font-display);
	font-weight: 700;
	font-size: clamp(32px, 5vw, 52px);
	color: var(--dgbd-white);
	margin: 0 0 16px;
	position: relative;
}
.dgbd-archive-subtitle{
	font-size: 18px;
	color: rgba(255,255,255,0.85);
	max-width: 620px;
	line-height: 1.6;
	position: relative;
}

.dgbd-search-form{
	display: flex;
	gap: 12px;
	margin-top: 28px;
	max-width: 560px;
	position: relative;
}
.dgbd-search-field{
	flex: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--dgbd-white);
	border-radius: 999px;
	padding: 0 18px;
	box-shadow: var(--dgbd-shadow);
}
.dgbd-search-icon{ flex: none; color: var(--dgbd-gray-light); }
.dgbd-search-input{
	flex: 1;
	border: none;
	outline: none;
	background: transparent;
	padding: 13px 0;
	font-family: var(--dgbd-font-body);
	font-size: 15px;
	color: var(--dgbd-ink);
	min-width: 0;
}
.dgbd-search-input::placeholder{ color: var(--dgbd-gray-light); }
.dgbd-search-submit{ flex: none; border-radius: 999px; }
.dgbd-search-input::-webkit-search-cancel-button{ -webkit-appearance: none; }


.dgbd-featured-post{
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 0;
	background: var(--dgbd-bg-surface);
	border: 1px solid var(--dgbd-border);
	border-radius: var(--dgbd-radius);
	overflow: hidden;
	box-shadow: var(--dgbd-shadow);
	text-decoration: none;
	color: inherit;
	margin-bottom: 52px;
	transition: box-shadow .2s ease, transform .2s ease;
}
.dgbd-featured-post:hover{ box-shadow: var(--dgbd-shadow-hover); transform: translateY(-2px); }
.dgbd-featured-media{ position: relative; min-height: 280px; background: var(--dgbd-bg); }
.dgbd-featured-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.dgbd-media-placeholder{ width: 100%; height: 100%; min-height: 280px; background: linear-gradient(135deg, var(--dgbd-blue-light), var(--dgbd-border)); }
.dgbd-featured-body{ padding: 36px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.dgbd-featured-title{
	font-family: var(--dgbd-font-display);
	font-size: 26px;
	font-weight: 700;
	color: var(--dgbd-heading);
	margin: 0;
	line-height: 1.3;
}
.dgbd-featured-excerpt{ font-size: 15px; color: var(--dgbd-gray); line-height: 1.6; margin: 0; }

.dgbd-section-heading{
	font-family: var(--dgbd-font-display);
	font-size: 22px;
	font-weight: 700;
	color: var(--dgbd-heading);
	margin: 0 0 24px;
}

.dgbd-card-grid{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin-bottom: 40px;
}
.dgbd-post-card{
	display: flex;
	flex-direction: column;
	background: var(--dgbd-bg-surface);
	border: 1px solid var(--dgbd-border);
	border-radius: var(--dgbd-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: var(--dgbd-shadow);
	transition: box-shadow .2s ease, transform .2s ease;
}
.dgbd-post-card:hover{ box-shadow: var(--dgbd-shadow-hover); transform: translateY(-3px); }
.dgbd-card-media{ position: relative; height: 190px; background: var(--dgbd-bg); }
.dgbd-card-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.dgbd-card-body{ padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.dgbd-card-title-link{
	font-family: var(--dgbd-font-display);
	font-size: 17px;
	font-weight: 600;
	color: var(--dgbd-heading);
	margin: 0;
	line-height: 1.4;
}
.dgbd-post-card:hover .dgbd-card-title-link{ color: var(--dgbd-blue); }
.dgbd-card-excerpt{ font-size: 14px; color: var(--dgbd-gray); line-height: 1.6; margin: 0; flex: 1; }

.dgbd-results-count{ font-size: 14px; color: var(--dgbd-gray-light); text-align: center; margin: 0 0 20px; }

.dgbd-pagination{ display: flex; justify-content: center; padding-bottom: 64px; }
.dgbd-pagination ul{ list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.dgbd-pagination .page-numbers{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	border: 1px solid var(--dgbd-border);
	color: var(--dgbd-navy);
	text-decoration: none;
	font-family: var(--dgbd-font-display);
	font-weight: 600;
	font-size: 14px;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dgbd-pagination .page-numbers:hover{ border-color: var(--dgbd-blue); color: var(--dgbd-blue); }
.dgbd-pagination .page-numbers.current{ background: var(--dgbd-navy); border-color: var(--dgbd-navy); color: var(--dgbd-white); }
.dgbd-pagination .page-numbers.dots{ border: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px){
	.dgbd-hero-grid{ grid-template-columns: 1fr; gap: 24px; }
	.dgbd-post-layout{ grid-template-columns: 1fr; }
	.dgbd-sidebar{ position: static; order: -1; }
	.dgbd-toc-list{ max-height: none; }
	.dgbd-card-grid{ grid-template-columns: repeat(2, 1fr); }
	.dgbd-featured-post{ grid-template-columns: 1fr; }

	/* TOC becomes a closed-by-default accordion on mobile */
	.dgbd-toc-toggle{ cursor: pointer; }
	.dgbd-toc-chevron{ display: block; }
	.dgbd-toc-panel{ display: none; }
	.dgbd-toc-card.is-open .dgbd-toc-panel{ display: block; }
	.dgbd-toc-card.is-open .dgbd-toc-chevron{ transform: rotate(180deg); }

	/* CTA card + "Latest blogs" are moved here by JS, after the article content */
	.dgbd-mobile-end-slot:not(:empty){ padding-top: 4px; padding-bottom: 28px; display: flex; flex-direction: column; gap: 20px; }
	.dgbd-mobile-end-slot .dgbd-cta-card{ margin: 0; }
}
@media (max-width: 640px){
	.dgbd-card-grid{ grid-template-columns: 1fr; }
	.dgbd-bottom-cta{ flex-direction: column; align-items: flex-start; padding: 28px; }
	.dgbd-post-title{ font-size: 28px; }
	.dgbd-container{ padding: 0 18px; }
	.dgbd-search-form{ flex-direction: column; max-width: 100%; }
	.dgbd-search-submit{ width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
	.dgbd-post-card, .dgbd-featured-post, .dgbd-btn{ transition: none; }
}

/* Focus visibility */
.dgbd-single a:focus-visible, .dgbd-archive a:focus-visible, .dgbd-toc-toggle:focus-visible{
	outline: 2px solid var(--dgbd-blue);
	outline-offset: 2px;
}
