/**
 * Individual Service Page Styles
 * ==========================================================
 * Loaded only for pages using the "page-service" template.
 * Extends premium.css without overriding approved pages.
 *
 * @package bluemed-dental
 */

/* ═══════════════════════════════════════════════════════════════
   1.  HERO — light, matches approved internal pages exactly
       CSS mirrors about-page.css (.bluemed-about-hero) spec.
   ═══════════════════════════════════════════════════════════════ */

.bluemed-svc-hero {
	position: relative;
	overflow: hidden;
	background: var(--bluemed-white, #ffffff);
	margin-top: 0;
}

/* Decorative orb — top-right (mirrors about-page.css ::before) */
.bluemed-svc-hero::before {
	content: "";
	position: absolute;
	right: -6%;
	top: -40%;
	width: min(44vw, 620px);
	height: min(44vw, 620px);
	border-radius: 50%;
	background: radial-gradient(
		ellipse at 40% 40%,
		var(--bm-sand-deep, #EAF0FA) 0%,
		var(--bluemed-sand, #F8F9FD) 60%,
		transparent 100%
	);
	pointer-events: none;
	z-index: 0;
}

/* Decorative orb — bottom-left (mirrors about-page.css ::after) */
.bluemed-svc-hero::after {
	content: "";
	position: absolute;
	left: -4%;
	bottom: -30%;
	width: min(22vw, 280px);
	height: min(22vw, 280px);
	border-radius: 50%;
	background: radial-gradient(
		ellipse,
		rgba(205, 216, 228, 0.18) 0%,
		transparent 70%
	);
	pointer-events: none;
	z-index: 0;
}

/* Stage — 54/46 grid, identical to .bluemed-about-hero__stage */
.bluemed-svc-hero__stage {
	display: grid !important;
	grid-template-columns: 54fr 46fr;
	align-items: center;
	gap: clamp(2.5rem, 5vw, 5.5rem);
	max-width: 1480px;
	margin-left: auto;
	margin-right: auto;
	padding: 70px clamp(1.5rem, 5vw, 3.5rem) !important;
	position: relative;
	z-index: 1;
	box-sizing: border-box;
}

/* Copy column */
.bluemed-svc-hero__copy {
	display: flex !important;
	flex-direction: column;
	gap: 0;
}

/* Visual column */
.bluemed-svc-hero__visual {
	position: relative;
	align-self: stretch;
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
}

/* Hero image — mirrors .bluemed-about-hero__photo */
.bluemed-svc-hero__photo {
	width: 100%;
	margin: 0 !important;
}

.bluemed-svc-hero__photo img {
	width: 100%;
	max-height: min(74vh, 700px);
	object-fit: cover;
	object-position: center top;
	border-radius: 20px;
	display: block;
	box-shadow: var(--bm-shadow-hero, 0 40px 100px rgba(51, 52, 61, 0.08), 0 8px 32px rgba(21, 61, 138, 0.04));
}

/* Kicker pill — matches .bluemed-about-hero__kicker exactly */
.bluemed-svc-hero__kicker {
	display: inline-flex !important;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.72rem !important;
	letter-spacing: 0.3em !important;
	text-transform: uppercase !important;
	font-weight: 700 !important;
	color: var(--accent-primary, #153D8A) !important;
	border: 1px solid rgba(21, 61, 138, 0.2);
	border-radius: 999px;
	padding: 0.45rem 1rem;
	margin: 0 0 1.75rem !important;
	line-height: 1;
	width: fit-content;
}

/* H1 title (wp:post-title renders this class) — matches .bluemed-about-hero__title */
.bluemed-svc-hero__title,
.bluemed-svc-hero .wp-block-post-title {
	font-size: clamp(2.05rem, 4.15vw, 3.5rem) !important;
	font-weight: 700 !important;
	line-height: 1.07 !important;
	letter-spacing: -0.034em !important;
	max-width: 15ch !important;
	color: var(--text-heading, #33343D) !important;
	text-wrap: balance;
	margin: 0 0 clamp(1rem, 2vw, 1.35rem) !important;
}

/* Lead paragraph — mirrors .bluemed-about-hero__lead */
.bluemed-svc-hero__lead,
.bluemed-svc-hero__lead p,
.bluemed-svc-hero__lead .bluemed-service-lead {
	font-size: clamp(1rem, 1.5vw, 1.125rem) !important;
	line-height: 1.72 !important;
	font-weight: 400 !important;
	max-width: 44ch;
	margin: 0 0 2.25rem !important;
	color: var(--bluemed-ash, #8694A8);
}

/* CTA wrap */
.bluemed-svc-hero__cta-wrap {
	margin-top: 0 !important;
}

/* Primary CTA — graphite pill with shadow, mirrors about-hero */
.bluemed-svc-hero__cta-primary .wp-block-button__link,
.bluemed-svc-hero__cta-primary a.wp-block-button__link {
	background-color: var(--bluemed-graphite, #153D8A) !important;
	color: #fff !important;
	border-radius: 999px !important;
	padding: 1rem 2.25rem !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em !important;
	box-shadow: 0 16px 44px rgba(21, 61, 138, 0.22) !important;
	border: none !important;
	transition: transform 0.3s var(--bluemed-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
	            box-shadow 0.3s var(--bluemed-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) !important;
}

.bluemed-svc-hero__cta-primary .wp-block-button__link:hover {
	transform: translateY(-3px) !important;
	box-shadow: 0 24px 56px rgba(21, 61, 138, 0.28) !important;
}

/* Secondary CTA — outline, mirrors about-hero */
.bluemed-svc-hero__cta-secondary .wp-block-button__link,
.bluemed-svc-hero__cta-secondary a.wp-block-button__link {
	border: 1.5px solid rgba(21, 61, 138, 0.22) !important;
	color: var(--bluemed-graphite, #153D8A) !important;
	background: transparent !important;
	border-radius: 999px !important;
	padding: 0.95rem 2rem !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em !important;
	transition: border-color 0.25s ease, color 0.25s ease,
	            transform 0.25s var(--bluemed-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) !important;
}

.bluemed-svc-hero__cta-secondary .wp-block-button__link:hover {
	border-color: var(--bluemed-graphite, #153D8A) !important;
	background: var(--primary-50, #EEF3FC) !important;
	transform: translateY(-2px) !important;
}

/* CTA note — below buttons */
.bluemed-svc-hero__cta-note {
	margin-top: 1.1rem !important;
	font-size: 0.72rem !important;
	letter-spacing: 0.04em !important;
}

/* ═══════════════════════════════════════════════════════════════
   2.  BENEFITS — equal-height cards + refined icons
   ═══════════════════════════════════════════════════════════════ */

/* ── Explicit CSS Grid for WP columns — precise 3→2→1 control ── */
/* Replaces WP flex column defaults so breakpoints are predictable */
.bluemed-svc-benefits-band .wp-block-columns,
.bluemed-svc-specialist-band .wp-block-columns,
.bluemed-svc-related-band .wp-block-columns,
.bluemed-svc-steps-band .wp-block-columns {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	align-items: stretch;
	gap: var(--wp--preset--spacing--60, 2rem) !important;
}

.bluemed-svc-booking-band .wp-block-columns {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	align-items: stretch;
	gap: var(--wp--preset--spacing--60, 2rem) !important;
}

/* Grid items: reset WP flex-basis so grid controls sizing */
.bluemed-svc-benefits-band .wp-block-column,
.bluemed-svc-specialist-band .wp-block-column,
.bluemed-svc-related-band .wp-block-column,
.bluemed-svc-steps-band .wp-block-column,
.bluemed-svc-booking-band .wp-block-column {
	flex-basis: unset !important;
	min-width: 0;
}

.bluemed-svc-benefits-band .wp-block-columns {
	align-items: stretch;
}

.bluemed-svc-benefit-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	/* Use global card tokens for consistent padding + radius */
	padding: var(--wp--preset--spacing--60, 2rem) !important;
	border-radius: var(--bm-card-radius, 20px) !important;
}

.bluemed-svc-benefit-card .wp-block-paragraph:last-child {
	flex: 1 1 auto;
}

/* Icon visual — canonical 2rem (32px) to match system-wide icon size */
.bluemed-svc-benefit-card .bluemed-benefit-ico {
	width:  2rem;
	height: 2rem;
	color: var(--bluemed-oak, #3E6FCD);
	margin-bottom: var(--wp--preset--spacing--40, 1rem);
	flex-shrink: 0;
}

/* Card heading — tighter margin-top after icon */
.bluemed-svc-benefit-card .wp-block-heading {
	margin-top: 0;
	margin-bottom: 0.5rem;
	font-size: var(--wp--preset--font-size--md, 1.05rem);
	font-weight: 700;
	line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   3.  PROCESS STEPS — numbered accent + better visual hierarchy
   ═══════════════════════════════════════════════════════════════ */
.bluemed-svc-step {
	border-top: 3px solid var(--bluemed-oak, #3E6FCD);
	padding-top: var(--wp--preset--spacing--50, 1.5rem);
}

/* Step number — larger, bold, generous bottom gap */
.bluemed-svc-step > .wp-block-paragraph:first-child {
	font-size: 2.75rem !important;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.04em;
	margin-bottom: 0.75rem;
	color: var(--bluemed-oak, #3E6FCD);
}

/* Step heading — visual weight below the number */
.bluemed-svc-step .wp-block-heading {
	margin-top: 0;
	margin-bottom: 0.45rem;
	font-size: var(--wp--preset--font-size--md, 1.05rem);
	font-weight: 700;
}

/* Step description */
.bluemed-svc-step > .wp-block-paragraph:not(:first-child) {
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--bluemed-text, #33343D);
}

/* ═══════════════════════════════════════════════════════════════
   4.  FAQ — exact same component as registration page
       Styles copied from registration-page.css so the component
       looks identical across all service pages and /rejestracja/.
   ═══════════════════════════════════════════════════════════════ */

/* 2-column grid wrapper — matches registration-page.css exactly */
.bluemed-svc-faq-band .bluemed-faq-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(0.75rem, 1.5vw, 1rem);
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
}

/* Individual accordion card */
.bluemed-svc-faq-band .bluemed-faq-item {
	border: 1px solid var(--border-light, #E2E7F1);
	border-radius: 16px;
	overflow: hidden;
	background: var(--bluemed-white, #ffffff);
	transition: box-shadow 0.2s ease;
}

.bluemed-svc-faq-band .bluemed-faq-item:hover {
	box-shadow: 0 4px 20px rgba(30, 58, 138, 0.07);
}

.bluemed-svc-faq-band .bluemed-faq-item[open] {
	box-shadow: 0 4px 20px rgba(30, 58, 138, 0.08);
}

/* Summary / question row */
.bluemed-svc-faq-band .bluemed-faq-item__q {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1.35rem 1.5rem;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	color: var(--bluemed-navy, #0f2042);
	list-style: none;
	user-select: none;
	line-height: 1.4;
	transition: background 0.15s ease;
}

.bluemed-svc-faq-band .bluemed-faq-item__q::-webkit-details-marker,
.bluemed-svc-faq-band .bluemed-faq-item__q::marker {
	display: none;
}

.bluemed-svc-faq-band .bluemed-faq-item__q:hover {
	background: var(--bluemed-sand, #F8F9FD);
}

.bluemed-svc-faq-band .bluemed-faq-item[open] .bluemed-faq-item__q {
	background: var(--bluemed-sand, #F8F9FD);
	border-bottom: 1px solid var(--border-light, #E2E7F1);
}

/* Lucide icon — rotate on open */
.bluemed-svc-faq-band .bluemed-faq-item__q i.lucide,
.bluemed-svc-faq-band .bluemed-faq-item__q [data-lucide] {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
	color: var(--bluemed-oak, #1E3A8A);
	stroke-width: 1.8;
	transition: transform 0.25s ease;
}

.bluemed-svc-faq-band .bluemed-faq-item[open] .bluemed-faq-item__q i.lucide,
.bluemed-svc-faq-band .bluemed-faq-item[open] .bluemed-faq-item__q [data-lucide] {
	transform: rotate(45deg);
}

/* Answer body */
.bluemed-svc-faq-band .bluemed-faq-item__a {
	padding: 1.25rem 1.5rem;
}

.bluemed-svc-faq-band .bluemed-faq-item__a p {
	font-size: 0.95rem;
	line-height: 1.7;
	color: var(--bluemed-ash, #8694A8);
	margin: 0;
}

/* Mobile: single column */
@media (max-width: 900px) {
	.bluemed-svc-faq-band .bluemed-faq-grid {
		grid-template-columns: 1fr;
	}
}

/* ═══════════════════════════════════════════════════════════════
   5.  SPECIALIST DOCTORS — same component as /rejestracja/
       registration-page.css is not loaded on service pages,
       so we replicate the required rules here.
   ═══════════════════════════════════════════════════════════════ */

/* Pin CTA button to card bottom — mirrors .bluemed-reg-doctor-card rule */
.bluemed-svc-specialist-band .bluemed-reg-doctor-card .wp-block-buttons {
	margin-top: auto;
}

/* Avatar sizing — mirrors team-page.css (not loaded here) */
.bluemed-svc-specialist-band .bluemed-home-team-card__avatar {
	max-width: 160px;
	margin: 0 auto 1.5rem;
}

.bluemed-svc-specialist-band .bluemed-home-team-card__avatar img {
	width:  160px;
	height: 160px;
	object-fit: cover;
	object-position: center top;
	border-radius: 50%;
}

/* ZnanyLekarz widget placeholder — mirrors registration-page.css */
.bluemed-svc-specialist-band .bluemed-znany-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem);
	background: var(--bluemed-sand, #F8F9FD);
	border: 2px dashed var(--border-light, #D1DDED);
	border-radius: 16px;
	text-align: center;
}

.bluemed-svc-specialist-band .bluemed-znany-placeholder--sm {
	padding: 1.25rem 1rem;
	gap: 0.5rem;
	margin-bottom: var(--wp--preset--spacing--50, 1.25rem);
}

.bluemed-svc-specialist-band .bluemed-znany-placeholder__text {
	font-size: 0.8rem;
	color: var(--bluemed-ash, #8694A8);
	line-height: 1.6;
	margin: 0;
}


/* ═══════════════════════════════════════════════════════════════
   6b. BOOKING — buttons match global standard, visual balance
   ═══════════════════════════════════════════════════════════════ */
.bluemed-svc-booking-band .wp-block-columns {
	align-items: stretch;
}

/* Remove dashed-placeholder look once real integrations are set up;
   keep the same card radius and shadow as the rest of the system. */
.bluemed-svc-booking__placeholder {
	height: 100%;
	display: flex;
	flex-direction: column;
	border: 2px dashed rgba(21, 61, 138, 0.14) !important;
	box-shadow: none !important;
}

.bluemed-svc-booking__placeholder:hover {
	transform: none !important;
	box-shadow: none !important;
}

.bluemed-svc-booking__placeholder > .wp-block-paragraph {
	flex: 1 1 auto;
}

.bluemed-svc-booking__placeholder .wp-block-buttons {
	margin-top: auto;
}

/* Booking section headings — visual rhythm */
.bluemed-svc-booking-band .wp-block-heading {
	margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   7b. RELATED SERVICES — equal-height cards
   ═══════════════════════════════════════════════════════════════ */
.bluemed-svc-related-band .wp-block-columns {
	align-items: stretch;
}

.bluemed-svc-rel-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	padding: var(--wp--preset--spacing--60, 2rem) !important;
	border-radius: var(--bm-card-radius, 20px) !important;
}

.bluemed-svc-rel-card .wp-block-paragraph {
	flex: 1 1 auto;
}

.bluemed-svc-rel-card .wp-block-buttons {
	margin-top: auto;
}

/* Related service icon — canonical 2rem (32px) matching system-wide icon size */
.bluemed-svc-rel-card .bluemed-benefit-ico {
	width:  2rem;
	height: 2rem;
	margin-bottom: 0.75rem;
	color: var(--bluemed-oak, #3E6FCD);
}

/* Related card heading */
.bluemed-svc-rel-card .wp-block-heading {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   8a. PRICING CARD — shared .bluemed-pricing-card (see pricing-page.css)
   ═══════════════════════════════════════════════════════════════ */
/* Service pages reuse the /cennik/ white pricing card component.
   No page-specific overrides — keep visual parity with the design system. */

/* ═══════════════════════════════════════════════════════════════
   8b. TESTIMONIAL — quote icon accent
   ═══════════════════════════════════════════════════════════════ */
.bluemed-svc-quote-ico svg {
	opacity: 0.22;
	color: var(--bluemed-oak, #3E6FCD);
}

/* ═══════════════════════════════════════════════════════════════
   SECTION RHYTHM — section headings consistent with approved pages
   ═══════════════════════════════════════════════════════════════ */

/* All main section headings on service page — match approved pages */
.bluemed-svc-benefits-band   > .wp-block-group > .wp-block-heading,
.bluemed-svc-steps-band      > .wp-block-group > .wp-block-heading,
.bluemed-svc-faq-band        > .wp-block-group > .wp-block-heading,
.bluemed-svc-specialist-band > .wp-block-group > .wp-block-heading,
.bluemed-svc-booking-band    > .wp-block-group > .wp-block-heading,
.bluemed-svc-related-band    > .wp-block-group > .wp-block-heading {
	font-size: clamp(1.7rem, 3.2vw, 2.4rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.025em;
	margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════
   9.  RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
/* ── Overflow protection for hero titles ────────────────────────── */
.bluemed-svc-hero__title,
.bluemed-svc-hero .wp-block-post-title {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* ── ≤900px: Hero single-column + Grids 3→2 ────────────────────── */
@media (max-width: 900px) {

	/* Hero */
	.bluemed-svc-hero__stage {
		grid-template-columns: 1fr !important;
		padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 5vw, 2rem) !important;
		gap: 2.5rem;
	}

	.bluemed-svc-hero__visual {
		order: -1;
	}

	.bluemed-svc-hero__photo img {
		height: clamp(240px, 55vw, 420px);
		max-height: none;
		border-radius: 18px;
	}

	.bluemed-svc-hero__title,
	.bluemed-svc-hero .wp-block-post-title {
		max-width: 100% !important;
	}

	/* Section grids: 3 → 2 columns */
	.bluemed-svc-benefits-band .wp-block-columns,
	.bluemed-svc-specialist-band .wp-block-columns,
	.bluemed-svc-related-band .wp-block-columns,
	.bluemed-svc-steps-band .wp-block-columns {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	/* Booking: 2 → 1 column */
	.bluemed-svc-booking-band .wp-block-columns {
		grid-template-columns: 1fr !important;
	}
}

/* ── ≤600px: Hero compact + Grids 2→1 ──────────────────────────── */
@media (max-width: 600px) {
	.bluemed-svc-hero__stage {
		padding: 2.5rem 1.25rem !important;
	}

	.bluemed-svc-hero__title,
	.bluemed-svc-hero .wp-block-post-title {
		font-size: clamp(1.5rem, 8vw, 2rem) !important;
	}

	/* Section grids: 2 → 1 column */
	.bluemed-svc-benefits-band .wp-block-columns,
	.bluemed-svc-specialist-band .wp-block-columns,
	.bluemed-svc-related-band .wp-block-columns,
	.bluemed-svc-steps-band .wp-block-columns {
		grid-template-columns: 1fr !important;
	}

	/* Steps: left accent border more readable when stacked */
	.bluemed-svc-step {
		border-top: none;
		border-left: 3px solid var(--bluemed-oak, #3E6FCD);
		padding-top: 0;
		padding-left: var(--wp--preset--spacing--40, 0.75rem);
	}
}

@media (max-width: 600px) {

	/* Testimonial padding tighter */
	.bluemed-svc-testimonial-wrap .wp-block-group.is-style-bluemed-card {
		padding: var(--wp--preset--spacing--50, 1.25rem) !important;
	}

}
