/*
Theme Name: DentalBff
Theme URI: https://dentalbff.com
Author: DentalBff
Author URI: https://dentalbff.com
Description: Block theme for DentalBff with home, about, and testimonials pages. Full-width header, mobile overlay menu, testimonial submission form, and social links (TikTok, Instagram, LinkedIn). Edit in Appearance → Editor.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dentalbff-developer
Tags: full-site-editing, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, featured-images, wide-blocks, responsive-layout
*/

:root {
	--color-white: #FBFBFB;
	--color-light-gray: #E8E8E8;
	--color-beige: #CFCDC7;
	--color-medium-gray: #817A7A;
	--color-dark: #342E2E;
	--star-filled: #FFD700;
}

/* Header: transparent over hero, white text (home) */
.site-header.header-transparent {
	background-color: transparent !important;
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	z-index: 100;
}

.site-header.header-transparent a,
.site-header.header-transparent .wp-block-site-title a,
.site-header.header-transparent .dentalbff-header-social a {
	color: #fff !important;
}

.site-header.header-transparent a:hover {
	opacity: 0.9;
}

/* Header: no underline on links; current page gets underline */
.site-header a {
	text-decoration: none;
}
.site-header a:hover {
	text-decoration: none;
}
body.page-about .site-header .nav-about a,
body.page-testimonials .site-header .nav-testimonials a,
.site-header a.current-page-link {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.site-header-overlay a.current-page-link {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* Header: site title size 2rem */
.site-header .wp-block-site-title a,
.site-header .wp-block-site-title {
	font-size: 2rem;
}

/* Header: nav links (About, Testimonials) 16px */
.site-header .nav-about,
.site-header .nav-testimonials {
	font-size: 16px;
}
.site-header .nav-about a,
.site-header .nav-testimonials a {
	font-size: 16px;
}

/* Header: solid background, dark text (About / Testimonials) */
.site-header.header-inner {
	background-color: var(--color-light-gray) !important;
}

.site-header.header-inner a,
.site-header.header-inner .wp-block-site-title a,
.site-header.header-inner .dentalbff-header-social a {
	color: var(--color-dark) !important;
}

.site-header.header-inner a:hover {
	opacity: 0.8;
}

/* Header: full width (alignfull) - no max-width */
.site-header.alignfull {
	max-width: none;
}

/* Sub-pages: force header full width even if template part was customized (DB override) */
.site-header.header-inner,
.wp-block-template-part .site-header.header-inner {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
}
/* Inner header content row: full width so title/nav go edge-to-edge within padding */
.site-header.header-inner .site-header-inner,
.site-header.header-inner > .wp-block-group {
	max-width: none;
	width: 100%;
}
/* Spacing: same gap between page links and between icons (2rem) */
.site-header .site-header-right,
.site-header .site-header-nav {
	gap: 2rem;
}
.site-header.header-inner .site-header-right,
.site-header.header-inner .site-header-nav {
	gap: 2rem;
}

/* Header: mobile hamburger (two-line icon to match sample) */
.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 6px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}
.menu-toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
}
.menu-toggle .menu-toggle-bar:nth-child(n+3) {
	display: none;
}
.site-header.header-transparent .menu-toggle { color: #fff; }
.site-header.header-inner .menu-toggle { color: var(--color-dark); }

@media (max-width: 781px) {
	.menu-toggle {
		display: flex;
	}
	/* Hide nav on mobile; menu appears in overlay instead */
	.site-header .site-header-right .site-header-nav,
	.site-header .site-header-nav.wp-block-group {
		display: none !important;
	}

	/* Overlay backdrop (dark strip when menu open) */
	.site-header-overlay-backdrop {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.45);
		z-index: 9998;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.25s ease;
	}
	.site-header.menu-open .site-header-overlay-backdrop {
		display: block;
		opacity: 1;
		pointer-events: auto;
	}

	/* Overlay panel (slide-in from left) */
	.site-header-overlay {
		display: none;
		position: fixed;
		left: 0;
		top: 0;
		bottom: 0;
		width: min(85%, 320px);
		max-width: 320px;
		background: var(--color-light-gray);
		z-index: 9999;
		transform: translateX(-100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
		padding: 1.5rem 1.25rem 2rem;
		flex-direction: column;
		gap: 2rem;
	}
	.site-header.menu-open .site-header-overlay {
		display: flex;
		transform: translateX(0);
	}
	.site-header-overlay .site-header-overlay-close {
		position: absolute;
		top: 1rem;
		right: 1rem;
		width: 44px;
		height: 44px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 1.75rem;
		line-height: 1;
		border: none;
		background: transparent;
		color: var(--color-dark);
		cursor: pointer;
		padding: 0;
	}
	.site-header-overlay .wp-block-site-title {
		margin-top: 0.5rem;
		margin-bottom: 0;
	}
	.site-header-overlay .wp-block-site-title,
	.site-header-overlay .wp-block-site-title a {
		color: #000 !important;
	}
	/* Home page: overlay is inside .header-transparent; override its white title */
	.site-header.header-transparent .site-header-overlay .wp-block-site-title,
	.site-header.header-transparent .site-header-overlay .wp-block-site-title a {
		color: #000 !important;
	}
	.site-header-overlay .nav-about,
	.site-header-overlay .nav-testimonials {
		margin: 0;
		font-size: 16px;
	}
	.site-header-overlay .nav-about a,
	.site-header-overlay .nav-testimonials a {
		color: #000 !important;
	}
	.site-header-overlay .dentalbff-header-social,
	.site-header-overlay .dentalbff-header-social a,
	.site-header-overlay .dentalbff-social-link {
		color: #000 !important;
	}
	.site-header-overlay .dentalbff-header-social svg {
		fill: #000 !important;
	}
	.site-header-overlay .dentalbff-header-social {
		margin-top: auto;
		padding-top: 1rem;
	}
}

/* Hide overlay on desktop */
@media (min-width: 782px) {
	.site-header-overlay-backdrop,
	.site-header-overlay {
		display: none !important;
	}
}

/* Main: no top padding when header is absolute; no bottom gap (avoid white space/scroll) */
body.home main.wp-block-group,
body.page-template-front-page main.wp-block-group {
	padding-top: 0;
	padding-bottom: 0;
	min-height: 0;
}

/* Home: hero text not full width, centered */
/* Home hero: wider container so title can stay on one line at larger size */
body.home .wp-block-cover .wp-block-cover__inner-container,
body.page-template-front-page .wp-block-cover .wp-block-cover__inner-container {
	max-width: 56rem;
	margin-left: auto;
	margin-right: auto;
}
/* Paragraph block narrower so text wraps to more lines; still narrower than title */
body.home .wp-block-cover .wp-block-cover__inner-container > p,
body.page-template-front-page .wp-block-cover .wp-block-cover__inner-container > p {
	max-width: 34rem;
	margin-left: auto;
	margin-right: auto;
}

/* Home: clean black overlay (no yellowish tint) */
body.home .wp-block-cover .wp-block-cover__background,
body.page-template-front-page .wp-block-cover .wp-block-cover__background {
	background-color: #342E2E !important;
}

/* Home: prevent extra white space below hero (cover exactly viewport height) */
body.home .wp-block-cover,
body.page-template-front-page .wp-block-cover {
	height: 100vh;
	min-height: 100vh;
}

main.wp-block-group {
	padding-bottom: 2rem;
}

/* About page: no big gap at top; content at top */
.about-page-main,
body.page-template-page-about .about-page-main,
body.page .about-page-main.has-background {
	padding-top: 0 !important;
}
.about-page-main .wp-block-columns {
	margin-top: 0 !important;
}
.about-page-main .wp-block-column:first-child {
	padding-top: 0;
}

/* About page vertical alignment + paragraph spacing: see assets/block-overrides.css
   (enqueued after wp-block-library so those overrides win) */

/* Testimonials page: center form (narrower) and list section */
.testimonials-page-main .testimonial-form {
	max-width: 24rem;
	margin-left: auto;
	margin-right: auto;
}

.testimonials-list-section {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.testimonials-list-section p {
	text-align: center;
}

.testimonials-list-section .testimonials-list {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	margin-top: 2rem;
}

/* Testimonials: form section centered and narrow */
.testimonials-form-section {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}
.testimonials-form-section .wp-block-heading {
	margin-bottom: 0.5rem;
}

/* Testimonial form (shortcode) - card style, compact, polished */
.testimonial-form {
	max-width: 32rem;
	margin: 0.5rem auto 2rem;
	background: var(--color-white);
	border-radius: 12px;
	box-shadow: 0 2px 16px rgba(52, 46, 46, 0.08);
	border: 1px solid rgba(52, 46, 46, 0.06);
	padding: 1.25rem 2rem 2rem;
	text-align: left;
	font-family: 'PT Serif', Georgia, serif;
}

.testimonials-form-section .testimonial-form {
	text-align: left;
}

.testimonial-form .form-row {
	margin-bottom: 0.75rem;
}

.testimonial-form .form-row:last-of-type {
	margin-bottom: 0;
}

.testimonial-form label {
	display: block;
	margin-bottom: 0.2rem;
	font-weight: 600;
	font-size: 0.9375rem;
	font-family: 'PT Serif', Georgia, serif;
	color: var(--color-dark);
}

.testimonial-form textarea {
	width: 100%;
	min-height: 100px;
	padding: 0.65rem 0.875rem;
	font-family: 'PT Serif', serif;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--color-dark);
	background: var(--color-white);
	border: 1px solid var(--color-beige);
	border-radius: 8px;
	resize: vertical;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.testimonial-form textarea:focus {
	outline: none;
	border-color: var(--color-medium-gray);
	box-shadow: 0 0 0 3px rgba(52, 46, 46, 0.06);
}

.testimonial-form textarea::placeholder {
	color: var(--color-medium-gray);
}

.testimonial-form input[type="text"] {
	width: 100%;
	padding: 0.65rem 0.875rem;
	font-family: 'PT Serif', serif;
	font-size: 1rem;
	color: var(--color-dark);
	background: var(--color-white);
	border: 1px solid var(--color-beige);
	border-radius: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.testimonial-form input[type="text"]:focus {
	outline: none;
	border-color: var(--color-medium-gray);
	box-shadow: 0 0 0 3px rgba(52, 46, 46, 0.06);
}

.testimonial-form input[type="text"]::placeholder {
	color: var(--color-medium-gray);
}

.star-rating-input {
	display: flex;
	flex-direction: row-reverse;
	justify-content: space-between;
	width: 100%;
	gap: 0.25rem;
}

.star-rating-input input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 0;
	height: 0;
}

.star-rating-input label {
	cursor: pointer;
	font-size: 1.5rem;
	color: var(--color-medium-gray);
	transition: color 0.2s ease, transform 0.15s ease;
}

.star-rating-input label:hover {
	transform: scale(1.1);
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
	color: var(--star-filled);
}

.testimonial-form .form-row.submit-wrap {
	margin-top: 1.25rem;
	margin-bottom: 0;
}

.testimonial-form .cta-button,
.testimonial-form button[type="submit"] {
	display: inline-block;
	width: 100%;
	background: var(--color-dark);
	color: var(--color-white);
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	border: none;
	font-family: 'PT Serif', serif;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.testimonial-form .cta-button:hover,
.testimonial-form button[type="submit"]:hover {
	background: var(--color-medium-gray);
}

.testimonial-form .cta-button:active,
.testimonial-form button[type="submit"]:active {
	transform: translateY(1px);
}

.testimonial-success,
.testimonial-error {
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border-radius: 4px;
	border-left: 4px solid var(--color-dark);
	background: var(--color-light-gray);
}

.testimonial-error {
	border-left-color: #c00;
}

/* Testimonials list: card grid */
.testimonials-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-top: 2rem;
}

@media (min-width: 600px) {
	.testimonials-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 900px) {
	.testimonials-list {
		grid-template-columns: repeat(3, 1fr);
	}
}

.testimonial-card {
	background: var(--color-white);
	padding: 1.5rem 2rem;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	border: 1px solid var(--color-light-gray);
}

.testimonial-card .stars {
	margin-bottom: 0.75rem;
}

.testimonial-card .star {
	color: var(--color-medium-gray);
	font-size: 1.25rem;
}

.testimonial-card .star.filled {
	color: var(--star-filled);
}

.testimonial-card .testimonial-text {
	font-size: 1rem;
	line-height: 1.65;
	margin-bottom: 0.75rem;
	font-family: 'PT Serif', serif;
}

.testimonial-card .testimonial-meta {
	font-size: 0.9rem;
	color: var(--color-medium-gray);
}

.testimonials-list-empty {
	text-align: center;
	padding: 2rem;
	color: var(--color-medium-gray);
}
