/*
Theme Name: The Patient Story
Theme URI: https://olliewp.com
Description: Custom Theme for The Patient Story
Author: Mitch Canter
Author URI: https://www.mitchcanter.me
Template:     ollie
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Tags:         blog, portfolio, entertainment
*/

/* =============================================
   Header Styles
   ============================================= */

.tps-header {
	z-index: 500;
}

.tps-nav-inner {
	height: 64px;
	max-width: 1400px;
	margin: 0 auto;
}

.tps-nav-logo .wp-block-site-logo img {
	height: 36px;
	width: auto;
}

/* Navigation links inside header */
.tps-header .wp-block-navigation .wp-block-navigation-item__content {
	padding: 8px 14px;
	border-radius: 5px;
	font-size: 13.5px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.9);
	white-space: nowrap;
	transition: color 0.15s, background 0.15s;
	text-transform: none;
	letter-spacing: normal;
}

.tps-header .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: #fff !important;
	background: rgba(255, 255, 255, 0.12);
}

/* Dropdown chevrons */
.tps-header .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation-item__content::after {
	content: '';
	display: inline-block;
	margin-left: 5px;
	border-left: 3.5px solid transparent;
	border-right: 3.5px solid transparent;
	border-top: 4px solid rgba(255, 255, 255, 0.9);
	vertical-align: middle;
	transition: transform 0.2s;
}

.tps-header .wp-block-navigation .wp-block-navigation-item.has-child:hover > .wp-block-navigation-item__content::after {
	transform: rotate(180deg);
	border-top-color: #fff;
}

/* Search button — circular icon */
.tps-nav-search .wp-block-search__button {
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 50%;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid rgba(255, 255, 255, 0.4);
	background: transparent !important;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.tps-nav-search .wp-block-search__button:hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.1) !important;
}

.tps-nav-search .wp-block-search__button svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: #fff;
	stroke-width: 2;
}

/* Join Community pill hover */
.tps-nav-pill .wp-block-button__link {
	transition: background 0.15s, transform 0.15s;
}

.tps-nav-pill .wp-block-button__link:hover {
	background-color: #0e1f5e !important;
	transform: translateY(-1px);
}

/* Responsive: hide nav items, show hamburger */
@media (max-width: 900px) {
	.tps-nav-inner {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.tps-nav-menu {
		display: none;
	}
}

/* --- Mega Menu --- */
.tps-mega-col + .tps-mega-col {
	border-left: 1px solid #e2e0e8;
	padding-left: 24px;
}

.tps-mega-link {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 7px 10px;
	border-radius: 5px;
	font-size: 13.5px;
	font-weight: 400;
	color: var(--wp--preset--color--charcoal, #26252d);
	transition: background 0.12s, color 0.12s;
}

.tps-mega-link::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #e2e0e8;
	flex-shrink: 0;
	transition: background 0.12s;
}

.tps-mega-link a {
	color: inherit;
	text-decoration: none;
}

.tps-mega-link:hover {
	background: var(--wp--preset--color--periwinkle-light, #eef0ff);
	color: var(--wp--preset--color--accent-1, #5f6fff);
}

.tps-mega-link:hover::before {
	background: var(--wp--preset--color--accent-1, #5f6fff);
}

.tps-mega-link:hover a {
	color: var(--wp--preset--color--accent-1, #5f6fff);
}

.tps-mega-link-accent {
	color: var(--wp--preset--color--accent-1, #5f6fff);
	font-weight: 600;
}

.tps-mega-link-accent a {
	color: var(--wp--preset--color--accent-1, #5f6fff);
}

.tps-mega-sub {
	font-size: 11.5px;
	color: var(--wp--preset--color--slate, #696771);
	margin-left: 4px;
	font-weight: 400;
}

.tps-mega-sub a {
	color: inherit;
	text-decoration: none;
	transition: color 0.12s;
}

.tps-mega-sub a:hover {
	color: var(--wp--preset--color--accent-1, #5f6fff);
}

.tps-mega-feature {
	overflow: hidden;
	border-radius: 12px;
	background: var(--wp--preset--color--offwhite, #fafafa);
	border: 1px solid #e2e0e8;
}

.tps-mega-feat-img {
	border-radius: 12px 12px 0 0;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, #060e30, #0d1b4a);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	overflow: hidden;
}

.tps-mega-feat-body {
	padding: 16px 20px 20px;
}

.tps-mega-feat-label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-1, #5f6fff);
	margin-bottom: 6px;
}

.tps-mega-feat-title {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--wp--preset--color--charcoal, #26252d);
	font-family: var(--wp--preset--font-family--instrument-serif, 'Instrument Serif', serif);
}

.tps-mega-feat-sep {
	border: none;
	border-top: 1px solid #e2e0e8;
	margin: 12px 0;
}

.tps-mega-feat-cta {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wp--preset--color--accent-1, #5f6fff);
	text-decoration: none;
	transition: color 0.12s;
}

.tps-mega-feat-cta:hover {
	color: var(--wp--preset--color--accent-2, #0e1f5e);
}

/* =============================================
   Helper Classes
   ============================================= */

.tps-webinar-section a,
.tps-stories-section a,
.tps-conditions-section a{
	text-decoration: none;
}

.tps-stories-section a:hover,
.tps-conditions-section a:hover{
	color: var(--wp--preset--color--orange);
}

/* =============================================
   Helper Classes
   ============================================= */

.equal-width-cols {
	display: flex;
  }
.equal-width-cols > * {
flex: 1 1 0; /* This makes all children have equal width */
min-width: 0; /* Prevents content from overflowing */
}

.site-header .header-desktop .wp-block-search__inside-wrapper{
	float: right;
}

.site-header .header-mobile .wp-block-navigation__responsive-container-close svg, .wp-block-navigation__responsive-container-open svg {
    fill: white;
    display: block;
    height: 24px;
    pointer-events: none;
    width: 24px;
}

/* =============================================
   Video Gallery Featured Layout
   ============================================= */

.video-gallery-featured {
	padding: 0;
}

/* The main grid layout - Featured + Side videos (2x2 on right) */
.video-gallery-grid {
	display: grid;
	grid-template-columns: 50% 25% 25%;
	grid-template-rows: 1fr 1fr;
	gap: 3px;
	background: #0d0d0d;
	border-radius: 8px;
	overflow: hidden;
	min-height: 500px;
}

/* Featured video - First item spans full height on left */
.video-gallery-grid > .video-card-wrapper:first-child {
	grid-column: 1;
	grid-row: 1 / 3;
}

/* Top right video - spans both right columns */
.video-gallery-grid > .video-card-wrapper:nth-child(2) {
	grid-column: 2 / 4;
	grid-row: 1;
}

/* Bottom right videos - side by side */
.video-gallery-grid > .video-card-wrapper:nth-child(3) {
	grid-column: 2;
	grid-row: 2;
}

.video-gallery-grid > .video-card-wrapper:nth-child(4) {
	grid-column: 3;
	grid-row: 2;
}

/* Video card wrapper - Contains the video block and overlay */
.video-card-wrapper {
	position: relative;
	overflow: hidden;
	background: #1a1a1a;
}

.video-card-wrapper .ytsb-video-card {
	border-radius: 0;
	box-shadow: none;
}

/* Make the thumbnail fill the card */
.video-card-wrapper .ytsb-thumbnail-wrapper {
	height: 100%;
	aspect-ratio: auto;
}

.video-card-wrapper .ytsb-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Remove stats bar - we'll show in overlay */
.video-card-wrapper .ytsb-stats-bar {
	display: none;
}

/* Video card overlay - Title and meta on bottom */
.video-card-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 60px 20px 20px;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.95) 0%,
		rgba(0, 0, 0, 0.7) 50%,
		transparent 100%
	);
	z-index: 15;
	pointer-events: none;
}

.video-card-overlay > * {
	pointer-events: auto;
}

/* Video title styling */
.video-card-title {
	margin: 0 0 8px 0;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

.video-card-title a {
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}

.video-card-title a:hover {
	color: #ff4444;
}

/* Featured video gets larger title */
.video-gallery-grid > .video-card-wrapper:first-child .video-card-title {
	font-size: 1.35rem;
	margin-bottom: 12px;
}

.video-gallery-grid > .video-card-wrapper:first-child .video-card-overlay {
	padding: 80px 24px 24px;
}

/* Video meta - Author, date, etc */
.video-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.75);
}

.video-card-meta a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
}

.video-card-meta a:hover {
	color: #fff;
}

/* Author styling */
.video-card-author {
	display: flex;
	align-items: center;
	gap: 4px;
}

.video-card-author::before {
	content: '●';
	font-size: 0.5rem;
	color: #ff4444;
	margin-right: 4px;
}

/* Date styling */
.video-card-date {
	display: flex;
	align-items: center;
}

.video-card-date::before {
	content: '📅';
	margin-right: 4px;
	font-size: 0.75rem;
}

/* Featured video meta - Show all stats inline */
.video-gallery-grid > .video-card-wrapper:first-child .video-card-meta {
	font-size: 0.85rem;
}

/* Rating badge styling (top right corner) */
.video-card-wrapper::after {
	content: '★';
	position: absolute;
	top: 12px;
	right: 12px;
	background: #ff4444;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 4px;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 2px;
}

/* Smaller videos - Reduced play button */
.video-gallery-grid > .video-card-wrapper:nth-child(n+2) .ytsb-play-icon {
	width: 48px;
	height: 34px;
}

/* Smaller videos - More compact overlay */
.video-gallery-grid > .video-card-wrapper:nth-child(n+2) .video-card-overlay {
	padding: 40px 14px 14px;
}

.video-gallery-grid > .video-card-wrapper:nth-child(n+2) .video-card-title {
	font-size: 0.9rem;
	margin-bottom: 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Hide meta on smaller cards */
.video-gallery-grid > .video-card-wrapper:nth-child(n+2) .video-card-meta {
	display: none;
}

/* Bottom row videos - even smaller */
.video-gallery-grid > .video-card-wrapper:nth-child(3) .ytsb-play-icon,
.video-gallery-grid > .video-card-wrapper:nth-child(4) .ytsb-play-icon {
	width: 40px;
	height: 28px;
}

.video-gallery-grid > .video-card-wrapper:nth-child(3) .video-card-title,
.video-gallery-grid > .video-card-wrapper:nth-child(4) .video-card-title {
	font-size: 0.8rem;
}

/* Duration badge adjustments */
.video-gallery-grid .ytsb-duration {
	font-size: 11px;
	padding: 3px 6px;
}

.video-gallery-grid > .video-card-wrapper:first-child .ytsb-duration {
	font-size: 13px;
	padding: 5px 10px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
	.video-gallery-grid {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
		min-height: auto;
	}
	
	.video-gallery-grid > .video-card-wrapper:first-child {
		grid-column: 1 / 3;
		grid-row: 1;
	}
	
	.video-gallery-grid > .video-card-wrapper:nth-child(2) {
		grid-column: 1;
		grid-row: 2;
	}
	
	.video-gallery-grid > .video-card-wrapper:nth-child(3) {
		grid-column: 2;
		grid-row: 2;
	}
	
	.video-gallery-grid > .video-card-wrapper:nth-child(4) {
		display: none;
	}
	
	.video-card-wrapper .ytsb-thumbnail-wrapper {
		aspect-ratio: 16/9;
		height: auto;
	}
}

@media (max-width: 600px) {
	.video-gallery-grid {
		grid-template-columns: 1fr;
	}
	
	.video-gallery-grid > .video-card-wrapper:first-child,
	.video-gallery-grid > .video-card-wrapper:nth-child(2),
	.video-gallery-grid > .video-card-wrapper:nth-child(3) {
		grid-column: 1;
		grid-row: auto;
	}
	
	.video-card-title {
		font-size: 0.9rem;
	}
	
	.video-gallery-grid > .video-card-wrapper:first-child .video-card-title {
		font-size: 1.1rem;
	}
	
	.video-card-overlay {
		padding: 40px 16px 16px;
	}
	
	.video-card-meta {
		font-size: 0.75rem;
	}
	
	.video-gallery-grid > .video-card-wrapper:nth-child(n+2) .video-card-meta {
		display: flex;
	}
}


/* =============================================
   Homepage Pattern Styles
   ============================================= */

/* --- Hero --- */
.tps-hero {
	overflow: hidden;
}

.tps-hero .wp-block-columns {
	min-height: 500px;
}

.tps-hero-badge {
	display: inline-flex;
	width: auto;
}

.tps-hero-stats {
	margin-top: var(--wp--preset--spacing--medium, 1.5rem);
}

.tps-hero-video-col {
	display: flex;
	align-items: stretch;
}

.tps-hero-video-grid {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
}

/* --- Search Band --- */
.tps-search-band .wp-block-search__inside-wrapper {
	border-radius: 5px;
	overflow: hidden;
	border: 1px solid rgba(95, 111, 255, 0.22);
}

.tps-search-band .wp-block-search__input {
	padding: 14px 18px;
	font-size: 14px;
	border: none;
}

.tps-search-band .wp-block-search__button {
	border-radius: 0;
	padding: 14px 28px;
	font-size: 14px;
	font-weight: 600;
	border: none;
	aspect-ratio: auto;
}

/* --- Trust Strip --- */
.tps-trust-strip .wp-block-columns {
	margin-bottom: 0;
}

.tps-trust-strip .wp-block-column + .wp-block-column {
	border-left: 1px solid rgba(95, 111, 255, 0.15);
}

/* --- Story Cards --- */
.tps-stories-grid .wp-block-post-template {
	gap: 20px;
}

.tps-story-card {
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tps-story-card:hover {
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.tps-story-card .wp-block-post-featured-image {
	margin: 0;
}

.tps-story-card .wp-block-post-featured-image img {
	border-radius: 0;
}

/* --- Webinar Section --- */
.tps-webinar-featured {
	overflow: hidden;
	transition: box-shadow 0.2s ease;
}

.tps-webinar-featured:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.tps-webinar-small {
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tps-webinar-small:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
}

/* --- Condition Cards --- */
.tps-condition-card {
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
	cursor: pointer;
}

.tps-condition-card:hover {
	border-color: var(--wp--preset--color--accent-1, #5F6FFF) !important;
	box-shadow: 0 4px 16px rgba(95, 111, 255, 0.12);
	transform: translateY(-1px);
}

.tps-condition-all:hover {
	opacity: 0.92;
}

/* --- Educational Content --- */
.tps-edu-card {
	transition: border-color 0.2s ease, background-color 0.2s ease;
	overflow: hidden;
}

.tps-edu-card:hover {
	border-color: rgba(95, 111, 255, 0.5) !important;
	background-color: rgba(95, 111, 255, 0.1) !important;
}

.tps-edu-thumb {
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}

@media (max-width: 980px) {
	.tps-edu-grid {
		flex-wrap: wrap;
	}

	.tps-edu-grid .wp-block-column {
		flex-basis: calc(50% - 8px) !important;
	}
}

@media (max-width: 600px) {
	.tps-edu-grid .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* --- Newsletter --- */
.tps-nl-form {
	transition: box-shadow 0.2s ease;
}

.tps-nl-form:hover {
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

.tps-nl-perks {
	list-style: none;
	padding-left: 0 !important;
}

.tps-nl-perks li {
	padding-left: 1.5em;
	position: relative;
}

.tps-nl-perks li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent-1, #5F6FFF);
	font-weight: 700;
}

/* --- Partners --- */
.tps-partner-logos {
	gap: 0 !important;
}

/* --- Care Partners --- */
.tps-care-section .wp-block-group.has-border-color {
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tps-care-section .wp-block-group.has-border-color:hover {
	border-color: #f25c05 !important;
	box-shadow: 0 4px 16px rgba(242, 92, 5, 0.1);
}

/* --- Social Cards --- */
.tps-social-card {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tps-social-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

/* =============================================
   Single Post / Article Styles — V6
   ============================================= */

/* --- Post Hero --- */
.tps-post-hero {
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
}

.tps-post-hero-inner {
	max-width: 1320px;
	margin: 0 auto;
}

.tps-post-tags a {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 100px;
	text-decoration: none;
	transition: background 0.15s;
	background: #eef0ff;
	color: var(--wp--preset--color--accent-1, #5f6fff);
	border: 1.5px solid rgba(95, 111, 255, 0.2);
}

.tps-post-tags a:hover {
	background: var(--wp--preset--color--accent-1, #5f6fff);
	color: #fff;
}

/* --- 2-Column Post Layout --- */
.tps-post-layout {
	max-width: 1320px;
	margin: 0 auto;
}

.tps-post-main {
	min-width: 0;
}

/* --- Sidebar --- */
.tps-sidebar-sticky {
	position: sticky;
	top: 88px;
}

/* --- Post Content Prose --- */
.tps-post-main .wp-block-post-content {
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
	font-size: 14.5px;
	line-height: 1.85;
	color: var(--wp--preset--color--charcoal, #26252d);
}

.tps-post-main .wp-block-post-content > * + * {
	margin-top: 1.5em;
}

.tps-post-main .wp-block-post-content h1,
.tps-post-main .wp-block-post-content h2,
.tps-post-main .wp-block-post-content h3,
.tps-post-main .wp-block-post-content h4,
.tps-post-main .wp-block-post-content h5,
.tps-post-main .wp-block-post-content h6 {
	font-family: var(--wp--preset--font-family--instrument-serif, 'Instrument Serif', serif);
	color: var(--wp--preset--color--charcoal, #26252d);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.tps-post-main .wp-block-post-content h1 {
	font-size: clamp(26px, 3.5vw, 42px);
	font-weight: 400;
	margin-top: 0;
}

.tps-post-main .wp-block-post-content h2 {
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 400;
	margin-top: 2.5em;
	padding-top: 1em;
	border-top: 1px solid #e2e0e8;
}

.tps-post-main .wp-block-post-content h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

.tps-post-main .wp-block-post-content h3 {
	font-size: clamp(18px, 2.5vw, 24px);
	margin-top: 2em;
}

.tps-post-main .wp-block-post-content h4 {
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-top: 2em;
}

.tps-post-main .wp-block-post-content p {
	font-size: 14.5px;
	line-height: 1.85;
	margin-bottom: 20px;
}

.tps-post-main .wp-block-post-content a {
	color: var(--wp--preset--color--accent-1, #5f6fff);
	text-decoration: underline;
	text-decoration-color: rgba(95, 111, 255, 0.3);
	text-underline-offset: 2px;
	transition: color 0.15s, text-decoration-color 0.15s;
}

.tps-post-main .wp-block-post-content a:hover {
	color: var(--wp--preset--color--orange, #f25c05);
	text-decoration-color: rgba(242, 92, 5, 0.4);
}

.tps-post-main .wp-block-post-content strong,
.tps-post-main .wp-block-post-content b {
	font-weight: 600;
	color: var(--wp--preset--color--charcoal, #26252d);
}

/* Lists */
.tps-post-main .wp-block-post-content ul,
.tps-post-main .wp-block-post-content ol {
	padding-left: 1.5em;
	font-size: 14.5px;
	line-height: 1.85;
}

.tps-post-main .wp-block-post-content li {
	margin-bottom: 0.5em;
}

.tps-post-main .wp-block-post-content li::marker {
	color: var(--wp--preset--color--orange, #f25c05);
}

/* Blockquotes / Pull Quotes */
.tps-post-main .wp-block-post-content blockquote,
.tps-post-main .wp-block-post-content .wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--orange, #f25c05);
	padding: 6px 24px;
	margin: 28px 0;
	font-family: var(--wp--preset--font-family--instrument-serif, 'Instrument Serif', serif);
	font-size: 21px;
	line-height: 1.45;
	color: var(--wp--preset--color--charcoal, #26252d);
	font-style: italic;
	background: none;
	border-radius: 0;
}

.tps-post-main .wp-block-post-content blockquote p,
.tps-post-main .wp-block-post-content .wp-block-quote p {
	font-size: inherit;
	line-height: inherit;
	font-family: inherit;
}

.tps-post-main .wp-block-post-content blockquote cite,
.tps-post-main .wp-block-post-content .wp-block-quote cite {
	display: block;
	margin-top: 0.75em;
	font-size: 13px;
	font-style: normal;
	font-weight: 500;
	color: var(--wp--preset--color--slate, #696771);
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
}

/* Separators */
.tps-post-main .wp-block-post-content hr,
.tps-post-main .wp-block-post-content .wp-block-separator {
	border: none;
	border-top: 1px solid #e2e0e8;
	margin: 2.5em 0;
}

/* Images and figures */
.tps-post-main .wp-block-post-content figure {
	margin: 28px 0;
}

.tps-post-main .wp-block-post-content figure img {
	border-radius: 16px;
	width: 100%;
	height: auto;
}

.tps-post-main .wp-block-post-content figcaption,
.tps-post-main .wp-block-post-content .wp-element-caption {
	font-size: 11.5px;
	color: var(--wp--preset--color--slate, #696771);
	text-align: center;
	margin-top: 6px;
	font-style: italic;
	line-height: 1.4;
}

/* Gallery */
.tps-post-main .wp-block-post-content .wp-block-gallery {
	margin: 28px 0;
}

.tps-post-main .wp-block-post-content .wp-block-gallery img {
	border-radius: 12px;
}

/* Tables */
.tps-post-main .wp-block-post-content table,
.tps-post-main .wp-block-post-content .wp-block-table {
	width: 100%;
	border-collapse: collapse;
	margin: 2em 0;
	font-size: 13.5px;
}

.tps-post-main .wp-block-post-content th,
.tps-post-main .wp-block-post-content td {
	padding: 12px 16px;
	border: 1px solid #e2e0e8;
	text-align: left;
}

.tps-post-main .wp-block-post-content th {
	background: #eef0ff;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--wp--preset--color--accent-2, #182c7f);
}

.tps-post-main .wp-block-post-content td {
	background: #fff;
}

.tps-post-main .wp-block-post-content tr:hover td {
	background: var(--wp--preset--color--offwhite, #fafafa);
}

/* Code */
.tps-post-main .wp-block-post-content code {
	background: #eef0ff;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}

.tps-post-main .wp-block-post-content pre {
	background: var(--wp--preset--color--charcoal, #26252d);
	color: #e8e6ef;
	padding: 1.5em;
	border-radius: 8px;
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
}

.tps-post-main .wp-block-post-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	color: inherit;
}

/* Details / Accordion */
.tps-post-main .wp-block-post-content details,
.tps-post-main .wp-block-post-content .wp-block-details {
	border: 1px solid #e2e0e8;
	border-radius: 8px;
	padding: 0;
	margin: 1.5em 0;
	overflow: hidden;
}

.tps-post-main .wp-block-post-content details summary {
	padding: 16px 20px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	background: var(--wp--preset--color--offwhite, #fafafa);
	border-bottom: 1px solid #e2e0e8;
	transition: background 0.15s;
}

.tps-post-main .wp-block-post-content details summary:hover {
	background: #eef0ff;
}

/* Embeds / Video */
.tps-post-main .wp-block-post-content .wp-block-embed {
	margin: 28px 0;
}

.tps-post-main .wp-block-post-content .wp-block-embed__wrapper {
	border-radius: 16px;
	overflow: hidden;
}

/* Cover blocks */
.tps-post-main .wp-block-post-content .wp-block-cover {
	border-radius: 16px;
	margin: 28px 0;
	min-height: 300px;
}

/* Columns in articles */
.tps-post-main .wp-block-post-content .wp-block-columns {
	gap: 24px;
	margin: 28px 0;
}

/* Groups with background */
.tps-post-main .wp-block-post-content .wp-block-group.has-background {
	padding: 24px 28px;
	border-radius: 16px;
}

/* --- Post Footer --- */
.tps-post-footer {
	margin-top: 48px;
	padding-top: 36px;
}

.tps-share-label {
	margin-bottom: 14px;
}

.tps-tags-grid a {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 100px;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	background: var(--wp--preset--color--offwhite, #fafafa);
	color: var(--wp--preset--color--slate, #696771);
	border: 1.5px solid #e2e0e8;
	margin: 3px 2px;
}

.tps-tags-grid a:hover {
	border-color: var(--wp--preset--color--orange, #f25c05);
	color: var(--wp--preset--color--orange, #f25c05);
}

/* --- Related Stories --- */
.tps-related-card {
	overflow: hidden;
	transition: transform 0.18s, box-shadow 0.18s;
}

.tps-related-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.07);
}

.tps-related-card .wp-block-post-featured-image {
	margin: 0;
}

.tps-related-card .wp-block-post-featured-image img {
	border-radius: 0;
}

/* --- Comments Area --- */
.tps-comments-area .wp-block-heading {
	font-family: var(--wp--preset--font-family--instrument-serif, 'Instrument Serif', serif);
	letter-spacing: -0.02em;
}

.tps-comments-area .wp-block-post-comments-form textarea {
	border: 1.5px solid #e2e0e8;
	border-radius: 8px;
	padding: 14px 16px;
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
	font-size: 14px;
	transition: border-color 0.2s;
	background: var(--wp--preset--color--offwhite, #fafafa);
}

.tps-comments-area .wp-block-post-comments-form textarea:focus {
	border-color: var(--wp--preset--color--accent-1, #5f6fff);
	outline: none;
}

.tps-comments-area .wp-block-post-comments-form input[type="submit"] {
	background: var(--wp--preset--color--orange, #f25c05);
	color: #fff;
	border: none;
	border-radius: 100px;
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--sora, 'Sora', sans-serif);
	cursor: pointer;
	transition: background 0.18s, transform 0.15s;
	box-shadow: 0 4px 18px rgba(242, 92, 5, 0.3);
}

.tps-comments-area .wp-block-post-comments-form input[type="submit"]:hover {
	background: #d94e00;
	transform: translateY(-1px);
}

/* --- Single Post Responsive --- */
@media (max-width: 1100px) {
	.tps-post-layout {
		flex-direction: column;
	}

	.tps-post-sidebar {
		flex-basis: auto !important;
	}

	.tps-sidebar-sticky {
		position: static;
	}

	.tps-related-grid .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 640px) {
	.tps-post-hero-inner {
		padding: 0 16px;
	}

	.tps-post-layout {
		padding: 28px 16px 48px !important;
	}

	.tps-related-grid .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}

	.tps-post-main .wp-block-post-content {
		font-size: 14px;
	}

	.tps-post-main .wp-block-post-content p {
		font-size: 14px;
	}

	.tps-post-main .wp-block-post-content h1 {
		font-size: 24px;
	}

	.tps-post-main .wp-block-post-content h2 {
		font-size: 20px;
	}

	.tps-post-main .wp-block-post-content h3 {
		font-size: 18px;
	}

	.tps-post-main .wp-block-post-content figure img {
		border-radius: 8px;
	}

	.tps-post-main .wp-block-post-content .wp-block-embed__wrapper {
		border-radius: 8px;
	}
}

/* --- Footer --- */
.tps-footer .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0;
	text-transform: none;
	letter-spacing: normal;
	font-size: 13.5px;
	color: rgba(255, 255, 255, 0.6);
}

.tps-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	color: #ffffff !important;
}

.tps-footer .wp-block-navigation .wp-block-navigation-item.has-child > .wp-block-navigation-item__content::after {
	display: none;
}

.tps-footer-socials .wp-social-link {
	border-radius: 50% !important;
}

/* --- Responsive --- */
@media (max-width: 980px) {
	.tps-hero .wp-block-columns {
		min-height: auto;
	}

	.tps-hero-video-col {
		min-height: 300px;
	}

	.tps-conditions-grid {
		flex-wrap: wrap;
	}

	.tps-conditions-grid .wp-block-column {
		flex-basis: calc(50% - 6px) !important;
	}

	.tps-trust-strip .wp-block-column + .wp-block-column {
		border-left: none;
		border-top: 1px solid rgba(95, 111, 255, 0.15);
	}

	.tps-social-grid {
		flex-wrap: wrap;
	}

	.tps-social-grid .wp-block-column {
		flex-basis: calc(50% - 8px) !important;
	}
}

@media (max-width: 600px) {
	.tps-conditions-grid .wp-block-column {
		flex-basis: 100% !important;
	}

	.tps-social-grid .wp-block-column {
		flex-basis: 100% !important;
	}

	.tps-partner-logos {
		flex-direction: column;
		align-items: center;
	}

	.tps-partner-logo-item {
		border-right: none !important;
		border-bottom: 1px solid #e2e0e8;
	}
}

/* ══════════════════════════════════════
   CONDITION HUB PAGE STYLES
   ══════════════════════════════════════ */

/* ── CONDITION HERO ── */
.cond-hero {
	position: relative;
	overflow: hidden;
}

.cond-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 70% 50%, rgba(95, 111, 255, 0.18) 0%, transparent 65%);
	pointer-events: none;
}

.cond-hero-inner.wp-block-columns {
	max-width: 1320px;
	margin: 0 auto;
	gap: 0;
	align-items: stretch;
	position: relative;
	z-index: 1;
}

.cond-hero-left {
	padding: 56px 56px 56px 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.cond-badge-pill {
	background: rgba(95, 111, 255, 0.2);
	border: 1px solid rgba(95, 111, 255, 0.4);
	border-radius: 100px;
	width: fit-content;
}

.cond-badge-dot {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
}

.cond-hero-stats .cond-stat {
	padding-right: 28px;
	margin-right: 28px;
	border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.cond-hero-stats .cond-stat:last-child,
.cond-hero-stats .cond-stat-last {
	border-right: none;
	padding-right: 0;
	margin-right: 0;
}

.cond-stat-n {
	margin-bottom: 0 !important;
}

.cond-stat-l {
	margin-top: 3px !important;
}

.cond-hero-right {
	background: rgba(255, 255, 255, 0.04);
	border-left: 1px solid rgba(255, 255, 255, 0.08);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.spotlight-quote::before {
	content: "\201C";
	color: #8892ff;
	margin-right: 3px;
}

.spotlight-quote::after {
	content: "\201D";
	color: #8892ff;
	margin-left: 3px;
}

.spotlight-avi {
	width: 48px;
	height: 48px;
	min-width: 48px;
	border-radius: 50%;
	background: rgba(95, 111, 255, 0.2);
	border: 2px solid rgba(95, 111, 255, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
}

.spotlight-cta {
	transition: letter-spacing 0.15s;
	cursor: pointer;
}

.spotlight-cta:hover {
	letter-spacing: 0.02em;
}

.cond-hero-actions .wp-block-button.is-style-fill .wp-block-button__link {
	box-shadow: 0 4px 18px rgba(242, 92, 5, 0.3);
	transition: transform 0.18s, box-shadow 0.18s;
}

.cond-hero-actions .wp-block-button.is-style-fill .wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 22px rgba(242, 92, 5, 0.4);
}

.cond-hero-actions .cond-btn-ghost .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08);
}

/* ── CONDITION SUB-NAV ── */
.cond-subnav {
	position: sticky;
	top: 0;
	z-index: 90;
}

.cond-subnav-inner {
	max-width: 1320px;
	margin: 0 auto;
	overflow-x: auto;
	scrollbar-width: none;
	gap: 0 !important;
}

.cond-subnav-inner::-webkit-scrollbar {
	display: none;
}

.cond-subnav-link {
	padding: 14px 20px;
	color: var(--wp--preset--color--slate);
	white-space: nowrap;
	border-bottom: 2px solid transparent;
	transition: color 0.15s, border-color 0.15s;
	cursor: pointer;
	margin: 0 !important;
	flex-shrink: 0;
}

.cond-subnav-link:hover {
	color: var(--wp--preset--color--charcoal);
}

.cond-subnav-link.active {
	color: var(--wp--preset--color--accent-1);
	border-bottom-color: var(--wp--preset--color--accent-1);
	font-weight: 600 !important;
}

/* ── CONDITION LAYOUT: main + sidebar ── */
.cond-layout.wp-block-columns {
	max-width: 1320px;
	margin-left: auto;
	margin-right: auto;
	align-items: start;
}

.cond-main {
	min-width: 0;
}

.cond-sidebar {
	position: sticky;
	top: 120px;
}

.cond-sidebar-sticky {
	position: sticky;
	top: 120px;
}

/* ── SECTION HEADINGS ── */
.cond-section:last-child,
.cond-section-last {
	border-bottom: none !important;
	padding-bottom: 0 !important;
}

/* ── SIDEBAR WIDGETS (shared) ── */
.sb-patient-box,
.sb-nav-widget,
.sb-nl-widget,
.sb-upcoming-widget {
	overflow: hidden;
}

/* ── Patient Info Box ── */
.sb-patient-photo {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(95, 111, 255, 0.25);
	border: 2px solid rgba(95, 111, 255, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin: 0 !important;
	overflow: hidden;
	padding: 0;
}

.sb-patient-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
	display: block;
}

figure.sb-patient-photo:has(img[src]) {
	background: transparent;
	border-color: transparent;
}

.sb-patient-name {
	margin: 0 !important;
}

.sb-patient-sub {
	margin: 0 !important;
}

.sb-patient-fact-label {
	margin: 0 !important;
}

.sb-patient-fact-value {
	margin: 0 !important;
}

/* ── Story Nav Widget ── */
.sb-nav-link {
	color: var(--wp--preset--color--slate);
	border-left: 2px solid transparent;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	cursor: pointer;
}

.sb-nav-link:hover {
	background: var(--wp--preset--color--offwhite);
	color: var(--wp--preset--color--charcoal);
}

.sb-nav-link.active {
	background: var(--wp--preset--color--periwinkle-light);
	color: var(--wp--preset--color--accent-1);
	border-left-color: var(--wp--preset--color--accent-1);
	font-weight: 600 !important;
}

/* ── Story Nav: dynamic Table of Contents ── */
html {
	scroll-behavior: smooth;
}

.tps-post-main h1[id],
.tps-post-main h2[id],
.tps-post-main h3[id] {
	scroll-margin-top: 24px;
}

.sb-toc-link {
	display: block;
	padding: 10px 18px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
}

.sb-toc-link--indent-1 {
	padding-left: 34px;
	font-size: 12.5px;
}

.sb-toc-link--indent-2 {
	padding-left: 50px;
	font-size: 12px;
	color: var(--wp--preset--color--slate);
}

/* ── Upcoming Events Widget ── */
.sb-event {
	transition: background 0.15s;
}

.sb-event:hover {
	background: var(--wp--preset--color--offwhite);
}

.sb-event-tag {
	margin-bottom: 0 !important;
}

.sb-event-title {
	margin-bottom: 0 !important;
}

.sb-event-cta-btn .wp-block-button__link {
	display: inline-block;
}

/* ── Newsletter Widget ── */
.sb-nl-eyebrow {
	margin: 0 !important;
}

.sb-nl-title {
	margin: 0 !important;
}

.sb-nl-input {
	display: block;
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #666 !important;
	border-radius: 10px;
	font-size: 13px !important;
	color: var(--wp--preset--color--charcoal);
	background: #fff;
	outline: none;
	transition: border-color 0.15s;
	margin-bottom: 8px;
	box-sizing: border-box;
	font-family: inherit;
}

.sb-nl-input:focus {
	border-color: var(--wp--preset--color--orange);
}

.sb-nl-btn {
	display: block;
	width: 100%;
	padding: 10px;
	background: var(--wp--preset--color--orange);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: background 0.15s;
	font-family: inherit;
	margin-top: 4px;
}

.sb-nl-btn:hover {
	background: #d94e00;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
	.cond-hero-inner.wp-block-columns {
		flex-direction: column !important;
	}

	.cond-hero-left {
		padding: 36px 0;
	}

	.cond-hero-right {
		border-left: none;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.cond-layout.wp-block-columns {
		flex-direction: column !important;
	}

	.cond-sidebar {
		position: static;
	}

	.cond-sidebar-sticky {
		position: static;
	}
}

@media (max-width: 640px) {
	.cond-hero-left {
		padding: 36px 0;
	}

	.cond-layout.wp-block-columns {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}

	.cond-subnav-inner {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
}