/*
 * Theme overrides — hand-compiled CSS
 * ===================================
 *
 * WHY THIS FILE EXISTS
 * The theme's styles are built from src/scss + library/**\/*.scss by webpack 4
 * into assets/css/core.min.css. That toolchain pins node-sass 4.x, which cannot
 * build on any Node newer than 14, and this machine has Node 24 with no
 * node_modules committed — so `npm run build` cannot be run to regenerate
 * core.min.css.
 *
 * The SCSS sources have been updated as the real source of truth. This file is
 * the hand-written equivalent of those changes, loaded after core.min.css so it
 * takes effect without a build.
 *
 * WHEN THE BUILD IS RESTORED
 * Run `npm run build`, confirm the banner + front page still look right, then
 * delete this file and its wp_enqueue_style('theme-overrides', ...) call in
 * app/site.php. Everything here already exists in the SCSS sources.
 *
 * Tokens used (from src/scss/_variables.scss, html font-size is 10px):
 *   primary        #09294f    secondary-alt  #124b8e
 *   tertiary       #3671B5    tertiary-alt   #8FBDE1
 *   body           #6d6e71    navigation-height 22rem
 *   breakpoints    xs 414  sm 568  md 768  lg 992  xl 1200  xxl 1500
 */

/* ==========================================================================
   1. Home banner — treatments panel (top right)
   Source: library/components/bannerHome/bannerHome.scss
   ========================================================================== */

.banner-home-wrapper .banner-treatments {
	position: relative;
	z-index: 1;
	padding: 0 1rem;
	margin: 0 0 4rem 0;
}

.banner-home-wrapper .banner-treatments .treatments-title {
	margin: 0 0 1.6rem 0;
}

.banner-home-wrapper .banner-treatments .treatments-title h4 {
	margin: 0;
	font-size: 1.6rem;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: 0.2rem;
	text-transform: uppercase;
	color: #ffffff;
	text-align: center;
}

.banner-home-wrapper .banner-treatments .treatments-grid {
	display: grid;
	/* 2 x 2 at every width — four full-width cards stacked is too tall a
	   hero on a phone. */
	grid-template-columns: repeat(2, 1fr);
	gap: 0.8rem;
}

.banner-home-wrapper .banner-treatments .treatment-card {
	position: relative;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	/*
	 * The source crops are 500x750 portraits. In a short, wide card `cover`
	 * showed only the middle ~43% of the frame, which is why every image read
	 * as a zoomed-in face. A portrait card shows ~89% of the original.
	 */
	aspect-ratio: 3 / 4;
	min-height: 0;
	box-shadow: 0 0 1rem 0.1rem rgba(0, 0, 0, 0.2);
	background: #124b8e;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner-home-wrapper .banner-treatments .treatment-card:hover,
.banner-home-wrapper .banner-treatments .treatment-card:focus-within {
	transform: translateY(-0.4rem);
	box-shadow: 0 0 1rem 0.3rem rgba(0, 0, 0, 0.2);
}

.banner-home-wrapper .banner-treatments .treatment-card:hover .treatment-media .background,
.banner-home-wrapper .banner-treatments .treatment-card:focus-within .treatment-media .background {
	transform: scale(1.06);
}

.banner-home-wrapper .banner-treatments .treatment-media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

.banner-home-wrapper .banner-treatments .treatment-media .background {
	width: 100%;
	height: 100%;
	background-size: cover !important;
	/* Bias upward so heads sit in frame rather than being cropped through. */
	background-position: center 22% !important;
	background-repeat: no-repeat !important;
	transition: transform 0.6s ease;
}

.banner-home-wrapper .banner-treatments .treatment-media .treatment-scrim {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: linear-gradient(
		to top,
		rgba(9, 41, 79, 0.92) 0%,
		rgba(9, 41, 79, 0.65) 45%,
		rgba(9, 41, 79, 0.15) 100%
	);
}

.banner-home-wrapper .banner-treatments .treatment-body {
	position: relative;
	z-index: 1;
	width: 100%;
	padding: 1.2rem;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-name h5 {
	margin: 0;
	color: #ffffff;
	font-size: 1.3rem;
	line-height: 1.25;
	font-weight: 700;
	/* Long names ("Full Dental Implant (Fixture + Crown)") must not crowd out
	   the price and link on a narrow phone card. */
	overflow-wrap: break-word;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-price {
	margin: 0.4rem 0 0 0;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-price span {
	color: #8FBDE1;
	font-size: 1.3rem;
	font-weight: 500;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-button .button-row {
	margin: 0.8rem 0 0 0;
	justify-content: flex-start;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-button a {
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	color: #ffffff !important;
	font-size: 1.3rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.4rem;
	min-width: 0;
	height: auto;
	line-height: 1.4;
}

/* .btn draws its fill and outline with ::before / ::after, so resetting the
   anchor alone still leaves a boxed button over the card artwork. */
.banner-home-wrapper .banner-treatments .treatment-body .treatment-button a::before,
.banner-home-wrapper .banner-treatments .treatment-body .treatment-button a::after {
	display: none !important;
	content: none !important;
}

.banner-home-wrapper .banner-treatments .treatment-body .treatment-button a:hover,
.banner-home-wrapper .banner-treatments .treatment-body .treatment-button a:focus {
	color: #8FBDE1 !important;
}

/*
 * This line spans the grid, and the blue gradient starts partway across it, so
 * it straddles white and mid-blue — no single text colour is legible on both.
 * It gets its own navy panel, which is also how this copy was presented before
 * (a translucent bar over the photo the treatments replaced).
 */
.banner-home-wrapper .banner-treatments .treatments-note {
	margin: 1.2rem 0 0 0;
	background: rgba(18, 75, 142, 0.92);
	padding: 1.2rem 1.6rem;
}

.banner-home-wrapper .banner-treatments .treatments-note p {
	margin: 0;
	color: #ffffff;
	font-size: 1.4rem;
	line-height: 2rem;
	text-align: center;
}

@media (min-width: 414px) {
	.banner-home-wrapper .banner-treatments {
		padding: 0;
	}
	.banner-home-wrapper .banner-treatments .treatments-grid {
		gap: 1.2rem;
	}
}

@media (min-width: 992px) {
	.banner-home-wrapper .banner-treatments {
		margin: 0;
		padding-top: 22rem;
	}
	.banner-home-wrapper .banner-treatments .treatments-title h4 {
		text-align: left;
		color: #124b8e;
	}
	/*
	 * Desktop cards are much wider, so a fixed portrait ratio would make the
	 * banner far taller than the viewport. A generous min-height still shows
	 * ~60% of the frame instead of the original ~43%.
	 */
	.banner-home-wrapper .banner-treatments .treatment-card {
		aspect-ratio: auto;
		min-height: 26rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-body {
		padding: 1.6rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-body .treatment-name h5 {
		font-size: 1.5rem;
	}
	.banner-home-wrapper .banner-treatments .treatments-note p {
		text-align: left;
	}
}

@media (min-width: 1500px) {
	.banner-home-wrapper .banner-treatments .treatments-grid {
		gap: 1.6rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-card {
		min-height: 32rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-body {
		padding: 2rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-body .treatment-name h5 {
		font-size: 1.8rem;
	}
	.banner-home-wrapper .banner-treatments .treatment-body .treatment-price span {
		font-size: 1.5rem;
	}
	.banner-home-wrapper .banner-treatments .treatments-note p {
		font-size: 1.6rem;
		line-height: 2.4rem;
	}
}

/* ==========================================================================
   2. Home banner — slider controls moved under the copy (left column)
   ========================================================================== */

.banner-home-wrapper .banner-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	position: relative;
	z-index: 1;
	/* Explicit: as a sibling of the initialised slick slider this box otherwise
	   resolves to zero width and the controls pile up at the column edge. */
	width: 100%;
}

.banner-home-wrapper .banner-controls .slide-arrows {
	display: none;
	align-items: center;
	gap: 0.8rem;
}

.banner-home-wrapper .banner-controls .slide-arrows i {
	width: 4rem;
	height: 4rem;
	font-size: 2rem;
	color: #ffffff;
	background: #3671B5;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.3s ease;
}

.banner-home-wrapper .banner-controls .slide-arrows i:hover,
.banner-home-wrapper .banner-controls .slide-arrows i:focus {
	background: #124b8e;
	outline: none;
}

.banner-home-wrapper .banner-controls .home-banner-dots {
	margin: 5rem 0 4rem 0;
}

@media (min-width: 992px) {
	.banner-home-wrapper .banner-controls {
		justify-content: flex-start;
	}
	.banner-home-wrapper .banner-controls .slide-arrows {
		display: flex;
	}
	.banner-home-wrapper .banner-controls .home-banner-dots {
		margin: 0;
		justify-content: flex-start;
	}
	.banner-home-wrapper .banner-controls .home-banner-dots ul {
		justify-content: flex-start;
	}
	/* The treatments column now carries the top offset on desktop. */
	.banner-home-wrapper .banner-home-slick {
		padding-top: 22rem;
	}
}

/*
 * Below lg the slide copy used to sit on the blue gradient (the photo column
 * came first), so it was set in white. The copy now leads on mobile against a
 * white background, so it has to take the dark palette instead.
 */
/*
 * Below lg the treatments lead the banner (order-1) and the slide copy sits
 * underneath on the blue gradient, so the copy keeps the original white
 * treatment. The slick padding-top belongs to the treatments column here.
 */
@media (max-width: 991.98px) {
	.banner-home-wrapper .banner-treatments {
		margin-top: 0;
		padding-top: calc(14rem + 2rem);
	}
	.banner-home-wrapper .banner-home-slick {
		padding-top: 3rem;
	}
	.banner-home-wrapper .banner-home-slick .banner-slide .section-left .section-title {
		margin-bottom: 2rem;
	}
	.banner-home-wrapper .banner-home-slick .banner-slide .section-left .button-row {
		margin: 2.4rem auto 0;
	}
	.banner-home-wrapper .banner-controls .home-banner-dots {
		margin: 2.4rem 0 2.4rem 0;
	}
}

@media (min-width: 768px) and (max-width: 991.98px) {
	.banner-home-wrapper .banner-treatments {
		padding-top: calc(22rem + 2rem);
	}
}

/* Tighten the gap the old full-height photo used to justify. */
.banner-home-wrapper .banner-home-slick .banner-slide .section-left .button-row {
	margin: 4rem auto 2rem;
}

@media (min-width: 992px) {
	.banner-home-wrapper .banner-home-slick .banner-slide .section-left .button-row {
		margin: 4rem 0 2rem;
	}
}

/* ==========================================================================
   3. Primary calls to action — Book an Appointment + Contact Us
   ========================================================================== */

/*
 * Book an Appointment / Procedure Forms are deliberately NOT restyled here.
 *
 * The theme already gives both top bars their intended treatment: a white bar
 * with plain text links, a navy block behind Book an Appointment on desktop
 * (.desktop-top-bar .section-button-alt:before), and a scale(1.1) grow on
 * hover on mobile (.mobile-top-top-bar .section-button a:hover). An earlier
 * revision turned them into filled buttons, which overflowed the 4rem mobile
 * bar and clipped off the top of the screen. Reverted to match production.
 */
/* Main-nav "Contact Us" — promoted from a plain link to an outlined button. */
.desktop-menu .navbar-nav .nav-link[href*="/contact-us"] {
	color: #09294f !important;
	border: 0.2rem solid #3671B5;
	border-radius: 0.4rem;
	padding: 0.9rem 2.2rem !important;
	margin-left: 1.2rem;
	font-weight: 700;
	line-height: 1;
	/* The theme stretches .nav-link to the full 16rem nav row; without these
	   the outline becomes a tall rectangle instead of a button. */
	height: auto !important;
	min-height: 0 !important;
	align-self: center !important;
	display: inline-flex !important;
	align-items: center;
	white-space: nowrap;
	transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.desktop-menu .navbar-nav .nav-link[href*="/contact-us"]:hover,
.desktop-menu .navbar-nav .nav-link[href*="/contact-us"]:focus {
	background: #3671B5;
	color: #ffffff !important;
	transform: translateY(-0.2rem);
	box-shadow: 0 0.3rem 1rem rgba(54, 113, 181, 0.35);
}

/* Keep the promoted nav item vertically centred against the taller nav row. */
.desktop-menu .navbar-nav .nav-item:last-child {
	display: flex;
	align-items: center;
}

/* ==========================================================================
   4. Front-page declutter — vertical rhythm only, no content removed
   Scoped to .home-content so inner pages keep their current spacing.
   ========================================================================== */

.home-content .sp-block > [class$="-wrapper"] {
	margin-top: 4.4rem;
	margin-bottom: 4.4rem;
}

.home-content .sp-block .content-and-media-wrapper {
	padding-top: 1.5rem;
	padding-bottom: 4.8rem;
	margin-top: 0;
	margin-bottom: 0;
}

.home-content .sp-block .form-cta-wrapper {
	padding-top: 4.8rem;
	padding-bottom: 4.8rem;
	margin-top: 0;
	margin-bottom: 0;
}

.home-content .sp-block .newsletter-subscription-wrapper {
	margin-top: 5.6rem;
	margin-bottom: 5.6rem;
}

.home-content .sp-block .map-and-form-contact-wrapper,
.home-content .sp-block .disclaimer-wrapper {
	margin-top: 0;
	margin-bottom: 0;
}

.home-content .disclaimer-block {
	margin-top: 3.2rem !important;
	margin-bottom: 3.2rem !important;
}

/* ==========================================================================
   5. Home page — Partners-with-logo alignment
   The .section-logo column is empty on the home page, so the partner logos
   were confined to the right-hand grid column (col-md-15 offset-md-2) and sat
   off-centre. Drop the empty column and centre the partners across the block.
   Source: library/blocks/partnersWithLogo/partnersWithLogo.scss
   ========================================================================== */
.home .partners-with-logo-wrapper .col-md-7 {
	display: none;
}
.home .partners-with-logo-wrapper .col-md-15 {
	margin-left: 0;
	-ms-flex: 0 0 100%;
	flex: 0 0 100%;
	max-width: 100%;
}
.home .partners-with-logo-wrapper .section-partners .section-title {
	-ms-flex-pack: center;
	justify-content: center;
}
