/*
Theme Name: Ystradgynlais Dental
Theme URI: https://ystraddl.com
Author: Ystradgynlais Dental
Description: Custom block theme for Ystradgynlais Dental Practice - photography-led design in the practice's brand colours (grey, cerise, teal, orange), UK English, local SEO structured data built in. Supports WooCommerce.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.3.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ystradgynlais-dental
Tags: block-patterns, full-site-editing, one-column
*/

/* ---- v3 design helpers on top of theme.json ---- */

/* Cards */
.yd-card {
	transition: transform .22s ease, box-shadow .22s ease;
	box-shadow: 0 8px 22px rgba(34, 41, 45, .06);
	border: 1px solid #f1e4ea;
	height: 100%;
}
.yd-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 24px 48px rgba(214, 51, 108, .15);
}

/* Header */
.yd-header {
	box-shadow: 0 1px 0 rgba(31, 41, 46, .07);
	position: relative;
	z-index: 20;
}
.yd-announce a { color: inherit; font-weight: 700; }

/* Buttons */
.wp-block-button__link {
	transition: filter .15s ease, transform .15s ease, background-color .15s ease;
	box-shadow: 0 8px 22px rgba(214, 51, 108, .32);
}
.wp-block-button__link:hover { transform: translateY(-2px); }
.yd-btn-light .wp-block-button__link {
	background: rgba(255, 255, 255, .12);
	border: 1.5px solid rgba(255, 255, 255, .65);
	color: #fff;
	box-shadow: none;
}
.yd-btn-teal .wp-block-button__link {
	background: var(--wp--preset--color--teal);
	box-shadow: 0 8px 20px rgba(14, 124, 134, .3);
}
.yd-btn-teal .wp-block-button__link:hover { background: var(--wp--preset--color--teal-deep); }

/* Kicker (small uppercase label) */
.yd-kicker {
	font-weight: 800 !important;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-size: .78rem !important;
	font-family: var(--wp--preset--font-family--sans) !important;
}
.yd-kicker::before {
	content: "";
	display: inline-block;
	width: 28px;
	height: 3px;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--wp--preset--color--cerise), var(--wp--preset--color--accent));
	margin-right: .6rem;
	vertical-align: middle;
}
.yd-kicker.on-dark::before { background: var(--wp--preset--color--pink-mid); }

/* Price / highlight pill */
.yd-pill {
	display: inline-block;
	background: #fff;
	color: var(--wp--preset--color--cerise);
	font-weight: 800;
	border-radius: 999px;
	padding: .45rem 1.25rem;
}

/* Checklist */
ul.yd-checklist { list-style: none; padding-left: 0; }
ul.yd-checklist li { padding-left: 1.7em; position: relative; margin-bottom: .5em; }
ul.yd-checklist li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--cerise, #d6336c);
	font-weight: 700;
}

/* Rounded photos */
.yd-photo img { border-radius: 24px; box-shadow: 0 30px 60px rgba(34, 41, 45, .16); }
.yd-photo-top img { border-radius: 16px; height: 220px; width: 100%; object-fit: cover; }

/* Cover blocks: give inner content breathing room */
.wp-block-cover .wp-block-cover__inner-container { padding: 1rem 0; }

/* Team role label */
.yd-role {
	color: var(--wp--preset--color--cerise) !important;
	font-weight: 700 !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	font-size: .78rem !important;
}

/* Review cards */
.yd-review {
	border: 1px solid #f6dbe6;
	box-shadow: 0 12px 32px rgba(214, 51, 108, .09);
}

/* Footer */
.yd-footer a { color: inherit; }
.yd-footer a:hover { color: var(--wp--preset--color--pink-mid); }

.wp-block-table td, .wp-block-table th { border-color: rgba(31, 41, 46, .12); }

/* ---- v1.2 polish effects ---- */

/* Slow Ken Burns drift on cover/hero images */
.wp-block-cover__image-background {
	animation: yd-kenburns 26s ease-in-out infinite alternate;
}
@keyframes yd-kenburns {
	from { transform: scale(1); }
	to { transform: scale(1.07); }
}

/* Photo hover zoom */
.yd-photo, .yd-photo-top { overflow: hidden; border-radius: 24px; }
.yd-photo img, .yd-photo-top img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.yd-photo:hover img, .yd-card:hover .yd-photo-top img { transform: scale(1.06); }

/* Scroll-reveal (modern browsers; harmless elsewhere) */
@supports (animation-timeline: view()) {
	.yd-card, .wp-block-post-content .wp-block-image {
		animation: yd-rise both;
		animation-timeline: view();
		animation-range: entry 0% entry 35%;
	}
	@keyframes yd-rise {
		from { opacity: 0; transform: translateY(26px); }
		to { opacity: 1; transform: none; }
	}
}

/* Shimmer sweep on solid buttons */
.wp-block-button:not(.yd-btn-light):not(.yd-btn-teal) .wp-block-button__link {
	position: relative;
	overflow: hidden;
}
.wp-block-button:not(.yd-btn-light):not(.yd-btn-teal) .wp-block-button__link::after {
	content: "";
	position: absolute;
	top: 0;
	left: -80%;
	width: 45%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
	transform: skewX(-20deg);
	animation: yd-shine 6s ease-in-out infinite;
}
@keyframes yd-shine {
	0%, 72% { left: -80%; }
	88%, 100% { left: 130%; }
}

/* Flowing gradient on the announcement bar */
.yd-announce {
	background-size: 200% 100% !important;
	animation: yd-flow 9s linear infinite;
}
@keyframes yd-flow {
	0% { background-position: 0% 0; }
	50% { background-position: 100% 0; }
	100% { background-position: 0% 0; }
}

/* Smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* ---- v1.3 "Editorial x Dark Clinic" blend ---- */

/* Dark cinematic covers everywhere */
.wp-block-cover .wp-block-cover__background {
	background-color: #15161A !important;
	opacity: .62 !important;
}

/* Gradient flourish on hero italics */
.wp-block-cover h1 em {
	font-style: italic;
	background: linear-gradient(92deg, #E6007E, #EA5B0C);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Editorial headline feel */
h1, h2 { font-weight: 400; }
h1 strong, h2 strong { font-weight: 600; }

/* Home: trust strip becomes a floating dark glass card over the hero */
.home .wp-block-post-content > .wp-block-group:nth-child(2) {
	background: rgba(21, 22, 26, .92) !important;
	color: #EDEBE8;
	max-width: 1100px !important;
	margin: -3.4rem auto 0 !important;
	position: relative;
	z-index: 5;
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, .09);
	box-shadow: 0 30px 60px rgba(0, 0, 0, .35);
	backdrop-filter: blur(10px);
}
.home .wp-block-post-content > .wp-block-group:nth-child(2) p { color: #9a9ca2; }
.home .wp-block-post-content > .wp-block-group:nth-child(2) strong { color: #ffffff; }

/* Numbered treatment cards (editorial index) */
.wp-block-columns { counter-reset: ydcard; }
.yd-card:has(a) { counter-increment: ydcard; }
.yd-card:has(a) h3::before {
	content: "0" counter(ydcard);
	display: block;
	font-family: 'Poppins', sans-serif;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .25em;
	color: #E6007E;
	margin-bottom: .5rem;
}

/* Cards: crisp white on cream paper */
.yd-card { border: 1px solid rgba(28, 28, 28, .07); }

/* Buttons: cerise glow */
.wp-block-button:not(.yd-btn-light):not(.yd-btn-teal) .wp-block-button__link {
	box-shadow: 0 12px 34px rgba(230, 0, 126, .35);
}

/* Hairline rules on section kickers, editorial-style */
.yd-kicker::before { width: 34px; }


/* Fix: price pill legibility on dark covers */
.wp-block-cover .yd-pill { color: #E6007E !important; background: #ffffff; }
