/*
 * Design updates, loaded after style.css and accessibility.css.
 *
 * Plain CSS (not SCSS) because library/css/style.css no longer matches its SCSS
 * sources and can't be safely recompiled. See CLAUDE.md.
 */

/* =========================================================================
   Home page slideshow: full-width image with the content overlaid
   (design: design/26-10-20 Slideshow and Banner Edits/Homepage Slider*.png)
   ========================================================================= */

.home #slideshow-wrapper {
	min-height: 0;
}

.home #slideshow-wrapper #slides .slide {
	height: clamp(460px, 135vw, 600px);
	overflow: hidden;
	color: #fff;
}

/* Cycle2 collapses the container for a frame while it starts; reserve the slide height. */
.home #slideshow-wrapper #slides {
	min-height: clamp(460px, 135vw, 600px);
}

/* Prevent the layout jump while Cycle2 loads. Before it starts, slides don't have the
   .cycle-slide class: show only the first one (style.css hides every slide on small
   screens and shows all of them, stacked, on desktop). */
.home #slideshow-wrapper #slides > .slide:not(.cycle-slide):first-of-type {
	display: block !important;
}

.home #slideshow-wrapper #slides > .slide:not(.cycle-slide) ~ .slide:not(.cycle-slide) {
	display: none !important;
}

/* style.css floats the slide's child divs at 50% width on desktop; undo that. */
.home #slideshow-wrapper #slides .slide > .slide-media,
.home #slideshow-wrapper #slides .slide > .slide-body {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: auto;
	float: none;
}

.home #slideshow-wrapper .slide-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Darken behind the text so white type stays legible on any photo. */
.home #slideshow-wrapper .slide-media::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 80%);
}

.home #slideshow-wrapper #slides .slide > .slide-body {
	display: flex;
	align-items: flex-start;
	padding: 70px 20px 70px;
}

.home #slideshow-wrapper .slide-body .content-wrapper {
	position: relative;
	max-width: 100%;
	font-family: 'Raleway', sans-serif;
}

.home #slideshow-wrapper .slide-body .content-wrapper h1,
.home #slideshow-wrapper .slide-body .content-wrapper h2,
.home #slideshow-wrapper .slide-body .content-wrapper h3 {
	position: relative;
	margin: 0 0 16px;
	color: #fff;
	font-family: 'Raleway', sans-serif;
	font-size: 42px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
}

.home #slideshow-wrapper .slide-body .content-wrapper p {
	margin: 0 0 16px;
	color: #fff;
	font-family: 'Raleway', sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.45;
}

.home #slideshow-wrapper .slide-body .content-wrapper p:empty {
	display: none;
}

/* Links in the slide content are the call-to-action button. */
.home #slideshow-wrapper .slide-body .content-wrapper a {
	display: inline-block;
	margin-top: 8px;
	padding: 12px 40px;
	border-radius: 5px;
	background-color: #82b4bd;
	color: #0a0a0a;
	font-family: 'Raleway', sans-serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

.home #slideshow-wrapper .slide-body .content-wrapper a:hover,
.home #slideshow-wrapper .slide-body .content-wrapper a:focus {
	background-color: #a3c9d0;
	color: #0a0a0a;
}

/* Arrows and pause control sit along the bottom on small screens so they
   don't cover the text. */
.home #slideshow-wrapper .cycle-prev,
.home #slideshow-wrapper .cycle-next {
	top: auto;
	bottom: 0;
	transform: none;
}

.home #slideshow-wrapper .cycle-prev {
	left: auto;
	right: 70px;
}

.home #slideshow-wrapper .cycle-next {
	right: 0;
}

.home #slideshow-wrapper .cycle-toggle {
	left: 20px;
	bottom: 20px;
}

@media (min-width: 40em) {
	.home #slideshow-wrapper #slides,
	.home #slideshow-wrapper #slides .slide {
		min-height: clamp(420px, 43vw, 760px);
	}

	.home #slideshow-wrapper #slides .slide {
		height: clamp(420px, 43vw, 760px);
	}

	.home #slideshow-wrapper .slide-media::after {
		background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0) 70%);
	}

	.home #slideshow-wrapper #slides .slide > .slide-body {
		align-items: center;
		padding: 60px max(9.75vw, 100px);
	}

	.home #slideshow-wrapper .slide-body .content-wrapper {
		max-width: 460px;
	}

	.home #slideshow-wrapper .slide-body .content-wrapper h1,
	.home #slideshow-wrapper .slide-body .content-wrapper h2,
	.home #slideshow-wrapper .slide-body .content-wrapper h3 {
		font-size: clamp(48px, 5.6vw, 84px);
		margin-bottom: 20px;
	}

	/* Dashed rule running from the left edge to the headline. */
	.home #slideshow-wrapper .slide-body .content-wrapper > :is(h1, h2, h3):first-child::before {
		content: "";
		position: absolute;
		top: 0.45em;
		right: calc(100% + 54px);
		width: calc(max(9.75vw, 100px) - 54px);
		border-top: 2px dashed rgba(255, 255, 255, 0.85);
	}

	.home #slideshow-wrapper .slide-body .content-wrapper p {
		font-size: clamp(20px, 1.67vw, 26px);
		line-height: 1.4;
	}

	.home #slideshow-wrapper .slide-body .content-wrapper a {
		padding: 12px 40px;
		font-size: clamp(18px, 1.4vw, 22px);
	}

	.home #slideshow-wrapper .cycle-prev,
	.home #slideshow-wrapper .cycle-next {
		top: 50%;
		bottom: auto;
		transform: translateY(-50%);
	}

	.home #slideshow-wrapper .cycle-prev {
		left: 10px;
		right: auto;
	}

	.home #slideshow-wrapper .cycle-next {
		right: 10px;
	}
}

/* =========================================================================
   Interior page banner: title panel on the left, wide image on the right
   (design: design/26-10-20 Slideshow and Banner Edits/Cosmetic*.png, Hand.png)
   ========================================================================= */

.interior-banner {
	display: flex;
	flex-direction: column;
	background-color: #f0ede7;
}

/* Small screens: image on top, text below (text comes first in the markup
   so the heading is read first). */
.interior-banner__media {
	order: -1;
	height: clamp(180px, 46vw, 300px);
	overflow: hidden;
}

.interior-banner__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 75% center;
}

.interior-banner__text {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	padding: 22px 20px 26px;
}

.interior-banner__title {
	margin: 0;
	color: #006f83;
	font-family: 'Raleway', sans-serif;
	font-size: 36px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: break-word;
	hyphens: auto;
}

.interior-banner__title span {
	font-weight: inherit;
}

/* Dashed rule between the title and subtitle. */
.interior-banner__text::after {
	content: "";
	order: 1;
	margin: 20px -16px 0 -16px;
	border-top: 1px dashed #82b4bd;
}

.interior-banner__subtitle {
	order: 2;
	margin: 22px 0 0;
	color: #0a0a0a;
	font-family: 'Raleway', sans-serif;
	font-size: 24px;
	font-weight: 500;
	line-height: 1.3;
}

@media (min-width: 64em) {
	.interior-banner {
		flex-direction: row;
		min-height: clamp(280px, 20.8vw, 400px);
	}

	.interior-banner__text {
		flex: 0 0 40%;
		justify-content: center;
		padding: 40px 32px 40px max(9.75vw, 60px);
	}

	.interior-banner__title {
		font-size: clamp(40px, 4.1vw, 64px);
	}

	/* Runs from the left edge of the page and about 47px into the image
	   (32px right padding + 47px). */
	.interior-banner__text::after {
		margin: 32px -79px 0 calc(-1 * max(9.75vw, 60px));
	}

	.interior-banner__subtitle {
		margin-top: 32px;
		font-size: clamp(22px, 1.95vw, 30px);
	}

	.interior-banner__media {
		order: 2;
		position: relative;
		flex: 1 1 60%;
		height: auto;
	}

	.interior-banner__media img {
		position: absolute;
		top: 0;
		left: 0;
		object-position: center;
	}
}

/* =========================================================================
   Home page surgeon videos: click-to-load YouTube thumbnail
   ========================================================================= */

.home #meet-the-surgeon-wrapper .video-facade {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
}

.home #meet-the-surgeon-wrapper .video-facade img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* YouTube-style play button. */
.home #meet-the-surgeon-wrapper .video-facade__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 68px;
	height: 48px;
	border-radius: 14px;
	background: rgba(23, 23, 23, 0.8);
	transform: translate(-50%, -50%);
	transition: background-color 0.2s;
}

.home #meet-the-surgeon-wrapper .video-facade__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	border-style: solid;
	border-width: 11px 0 11px 19px;
	border-color: transparent transparent transparent #fff;
	transform: translate(-40%, -50%);
}

.home #meet-the-surgeon-wrapper .video-facade:hover .video-facade__play,
.home #meet-the-surgeon-wrapper .video-facade:focus-visible .video-facade__play {
	background: #f00;
}

/* =========================================================================
   Footer social icons: inline SVGs (replaces the Font Awesome kit)
   ========================================================================= */

.footer #inner-footer #footer-links #footer-social-links .social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background-color: #ece8e1;
	color: #545a5f;
	vertical-align: middle;
}

.footer #inner-footer #footer-links #footer-social-links .social-icon svg {
	display: block;
	width: auto;
	height: 15px;
}

/* =========================================================================
   Team grids (Our Surgeons, Our Team): balanced columns
   page-teammembers.php sets --cols-md / --cols-lg per group (phs_balanced_columns())
   so 9 surgeons lay out 5 + 4 instead of 4 + 4 + 1. Cards are capped at 194px so
   the small staff photos aren't stretched.
   ========================================================================= */

@media (min-width: 40em) {
	.page-template-page-teammembers .main-container .main-grid #team-wrapper .team-role-outer-wrapper .team-role-inner-wrapper.is-balanced {
		max-width: calc(var(--cols-md) * 194px);
		margin-left: auto;
		margin-right: auto;
	}

	/* !important: style.css sets per-group widths (25%, 24%, 33%) with ID selectors. */
	.page-template-page-teammembers #team-wrapper .team-role-inner-wrapper.is-balanced > .person-wrapper {
		width: calc(100% / var(--cols-md)) !important;
	}
}

@media (min-width: 64em) {
	.page-template-page-teammembers .main-container .main-grid #team-wrapper .team-role-outer-wrapper .team-role-inner-wrapper.is-balanced {
		max-width: calc(var(--cols-lg) * 194px);
	}

	.page-template-page-teammembers #team-wrapper .team-role-inner-wrapper.is-balanced > .person-wrapper {
		width: calc(100% / var(--cols-lg)) !important;
	}
}

/* Our Surgeons (page 2926): 3 per row (set in page-teammembers.php) with larger photos.
   The originals are only 154px wide, so cap them at 220px to limit upscaling blur. */
.page-id-2926 #team-wrapper .team-role-inner-wrapper.is-balanced > .person-wrapper img {
	width: 100%;
	max-width: 220px;
	height: auto;
}

@media (min-width: 40em) {
	.page-template-page-teammembers.page-id-2926 .main-container .main-grid #team-wrapper .team-role-outer-wrapper .team-role-inner-wrapper.is-balanced {
		max-width: calc(var(--cols-md) * 240px);
	}
}

@media (min-width: 64em) {
	.page-template-page-teammembers.page-id-2926 .main-container .main-grid #team-wrapper .team-role-outer-wrapper .team-role-inner-wrapper.is-balanced {
		max-width: calc(var(--cols-lg) * 240px);
	}
}

/* =========================================================================
   Home: surgeon picker strip (#surgeon-wrapper)
   style.css gives each card a fixed 110-125px width with overflow:hidden, so 9 surgeons
   (1099px) overflow the 1024px row and the last one is clipped. Let the cards share the
   row instead; the active card stays slightly wider.
   ========================================================================= */

@media (min-width: 40em) {
	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
		margin-left: 1.25%;
	}

	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper:first-of-type {
		margin-left: 0;
	}

	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper.active {
		flex-grow: 1.15;
	}

	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper .person-link,
	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper.active .person-link {
		width: 100% !important; /* style.css sets 125px !important on the active card */
	}

	.home #meet-the-surgeon-wrapper #surgeon-outer-wrapper #surgeon-wrapper .person-wrapper .person-link img {
		display: block;
		width: 100%;
		height: auto;
	}
}

/* =========================================================================
   Our Team (page 14): groups stacked, not side by side
   Each group gets a centered heading and a 3-per-row grid (cols set in page-teammembers.php),
   with a dashed divider between groups. Photos fill the 194px cards (174px wide).
   style.css styles the groups by ID (#cat-3, #cat-4: beige box, side-by-side widths, offset
   heading padding and grid margins), hence the #content #inner-content prefix.
   ========================================================================= */

@media (min-width: 40em) {
	.page-id-14 .main-container .main-grid#team-wrapper,
	.page-id-14 #team-wrapper.grid-x {
		display: block;
		background-color: #f0ede7;
		padding: 20px 0 30px;
	}

	.page-id-14 #content #inner-content #team-wrapper .team-role-outer-wrapper {
		display: block;
		flex: 0 0 auto;
		width: 100%;
		max-width: 760px;
		margin: 0 auto;
		padding: 45px 0;
		background: transparent;
	}

	.page-id-14 #content #inner-content #team-wrapper .team-role-outer-wrapper + .team-role-outer-wrapper {
		border-top: 1px dashed #d4d2da;
	}

	.page-id-14 #content #inner-content #team-wrapper .team-role-outer-wrapper h2 {
		text-align: center;
		font-size: 16px;
		padding: 0;
		margin: 0 0 40px;
	}

	.page-id-14 #content #inner-content #team-wrapper .team-role-outer-wrapper .team-role-inner-wrapper.is-balanced {
		margin-left: auto;
		margin-right: auto;
		border-left: 0; /* old side-by-side divider on #cat-4 */
	}

	.page-id-14 #team-wrapper .team-role-inner-wrapper.is-balanced > .person-wrapper {
		margin-bottom: 30px;
	}

	.page-id-14 #team-wrapper .team-role-inner-wrapper.is-balanced > .person-wrapper img {
		display: block;
		width: 100%;
		height: auto;
		margin: 0 auto;
	}
}

/* ==========================================================================
   Footer newsletter form (Gravity Forms 1 and 4): email input and submit
   button on one line, with the "»" arrows beside the text instead of below
   it. GF 3.x renders the submit as a <button>, which the old SCSS rules
   (input.button, absolute positioning, 10% width) no longer fit.
   ========================================================================== */
/* Mobile: heading, input and button stacked, each full width. */
#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body {
	width: 100%;
}

/* !important beats the old li#field_1_2 / li#field_1_3 max-widths in style.css. */
#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body .gform_fields li.gfield--type-email {
	width: 100%;
	max-width: none !important;
	padding-right: 0;
}

#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_footer {
	display: block;
	width: 100%;
	margin: 15px 0 0;
	padding: 0;
}

#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_footer .gform_button {
	position: static;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 39px;
	max-width: none;
	margin: 0;
	padding: 0 20px;
	white-space: nowrap;
}

/* Tablet/desktop: one row (heading, input, button). */
@media print, screen and (min-width: 40em) {
	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper form {
		display: flex;
		align-items: center;
		gap: 15px;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_footer {
		flex: 0 0 auto;
		width: auto;
		margin: 0;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body .gform_fields li.gfield--type-html {
		flex: 0 0 auto;
		max-width: none !important;
		margin-right: 15px;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body .gform_fields li.gfield--type-html h3 {
		white-space: nowrap;
		top: 0;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body .gform_fields li.gfield--type-email {
		flex: 1 1 auto;
		width: auto;
	}

	/* Invisible reCAPTCHA field (its badge is position: fixed). */
	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_body .gform_fields li.gfield--type-captcha {
		flex: 0 0 0;
		width: 0;
		padding: 0;
	}

	#newsletter-cta-wrapper #newsletter-cta .gform_wrapper .gform_footer .gform_button {
		display: inline-flex;
		width: auto;
		padding: 0 30px;
	}
}
