/*
 * Divi Child — Dermatology service pages (templates/page-dermatologie-serviciu.php only).
 * BEM prefix: inventderm-service-  (never overrides Divi core selectors).
 *
 * Loaded after orl-pillar.css and inventderm-pillar.css, which provide the
 * shared layout (hero, sections, headings, buttons, feature split, condition
 * cards, service cards, FAQ, articles, booking). Only the components that are
 * new on the service pages live here: hero "Pe scurt" panel, compact doctor
 * card, related-services band variants.
 */

/* =============================================
   HERO A — text left, "Pe scurt" card right
   ============================================= */

@media (min-width: 1024px) {
	.inventderm-service .inventorl-pillar__hero {
		grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
		column-gap: clamp(32px, 4vw, 56px);
		align-items: start;
	}
}

/* Optional background photo (hero_image_id): photo, then the navy overlay, then content. */
.inventderm-service-hero--has-image {
	isolation: isolate;
}

.inventderm-service-hero__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.inventderm-service-hero--has-image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(90deg, rgba(14, 55, 110, 0.96) 0%, rgba(14, 55, 110, 0.93) 48%, rgba(24, 80, 140, 0.80) 72%, rgba(49, 128, 192, 0.55) 100%);
	pointer-events: none;
}

.inventderm-pillar .inventderm-service-hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	margin: var(--im-space-3, 24px) 0 0;
	padding: 0;
}

.inventderm-service-hero__actions .inventorl-cta__button {
	box-sizing: border-box;
	min-height: 48px;
	text-align: center;
}

/* Selector shape mirrors the Divi link rule so these win without relying on load order. */
body #main-content .inventorl-pillar__hero a.inventderm-service-hero__parent:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: #fff !important;
	font-size: 0.9375rem;
	text-decoration: none !important;
}

body #main-content .inventorl-pillar__hero a.inventderm-service-hero__parent:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button):hover {
	text-decoration: underline !important;
}

/* ---- "Pe scurt" card ---- */

.inventderm-service-summary {
	margin-top: 44px;
	padding: 24px 26px 14px;
	border-radius: var(--im-card-radius, 16px);
	background: #fff;
	box-shadow: 0 18px 50px rgba(5, 20, 40, 0.28);
	color: #1a1f2b;
	text-shadow: none;
}

.inventderm-pillar .inventderm-service-summary__label {
	margin: 0 0 10px;
	padding: 0;
	color: #014c93;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.inventderm-pillar .inventderm-service-summary__prices,
.inventderm-pillar .inventderm-service-summary__facts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.inventderm-pillar .inventderm-service-summary__prices {
	border-top: 1px solid #e2e8f0;
}

.inventderm-pillar .inventderm-service-summary__prices li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	margin: 0;
	padding: 11px 0;
	border-bottom: 1px solid #e2e8f0;
	font-size: 0.90625rem;
	line-height: 1.5;
}

.inventderm-service-summary__price {
	color: var(--im-blue, #17457a);
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

.inventderm-service-summary__all {
	font-size: 0.875rem;
	min-height: 40px;
}

.inventderm-pillar .inventderm-service-summary__facts {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 14px 0 6px;
}

.inventderm-pillar .inventderm-service-summary__facts li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 0;
	font-size: 0.90625rem;
	line-height: 1.5;
}

.inventderm-service-summary__icon {
	flex: 0 0 auto;
	margin-top: 3px;
	color: var(--im-blue, #17457a);
}

.inventderm-pillar .inventderm-service-summary__foot {
	margin: 10px 0 0;
	padding: 2px 0 0;
	border-top: 1px solid #e2e8f0;
	font-size: 0.8125rem;
}

body #main-content .inventderm-service-summary a:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: #014c93 !important;
	font-weight: 600;
	text-decoration: none !important;
}

body #main-content .inventderm-service-summary a:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button):hover {
	color: var(--im-navy, #0e2a47) !important;
	text-decoration: underline !important;
}

/* "[de confirmat]" — pending price (`'pending' => true` in inc/data/dermatologie-servicii.php). */
.inventderm-service-confirm {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 4px;
	background: #fff3c4;
	color: #5c4400;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.5;
	vertical-align: 1px;
	white-space: nowrap;
}

/* =============================================
   CONTENT SECTIONS — additions to the pillar feature/prose components
   ============================================= */

.inventderm-pillar .inventderm-service-links {
	margin: 4px 0 0;
	padding: 0;
	font-size: 0.9375rem;
}

.inventderm-feature--media-left .inventderm-feature__media {
	order: -1;
}

/* =============================================
   DOCTORS — compact horizontal card (1, 2 or 3 per row)
   ============================================= */

.inventderm-pillar .inventderm-service-doctors {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inventderm-pillar .inventderm-service-doctors--count-1 {
	grid-template-columns: minmax(0, 620px);
}

.inventderm-pillar .inventderm-service-doctors--count-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventderm-pillar .inventderm-service-doctor {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin: 0;
	padding: 16px;
	border: 1px solid #e2e8f0;
	border-radius: var(--im-card-radius, 16px);
	background: #fff;
	box-shadow: var(--im-card-shadow);
	scroll-margin-top: 96px;
}

.inventderm-pillar .inventderm-service-doctors--count-1 .inventderm-service-doctor {
	grid-template-columns: 168px minmax(0, 1fr);
}

.inventderm-service-doctor__photo {
	overflow: hidden;
	aspect-ratio: 4 / 5;
	border-radius: 12px;
	background: #c3cfdc;
}

.inventderm-service-doctor__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.inventderm-service-doctor__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	padding-top: 4px;
}

.inventorl-pillar__section h3.inventderm-service-doctor__name {
	margin: 0 0 8px;
	padding: 0;
	color: var(--im-navy, #0e2a47);
	font-size: 1.2rem;
}

.inventderm-service-doctor__role {
	display: inline-block;
	margin-bottom: 16px;
	padding: 3px 10px;
	border: 1px solid #b9cbe0;
	border-radius: 999px;
	color: var(--im-blue, #17457a);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.5;
	text-transform: uppercase;
}

.inventderm-service-doctor__cta {
	display: inline-flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 10px 16px;
	font-size: 0.875rem;
	line-height: 1.3;
}

.inventderm-service-doctor__profile {
	font-size: 0.875rem;
}

body #main-content .inventderm-service-doctor a.inventderm-service-doctor__cta:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: #fff !important;
	text-decoration: none !important;
}

body #main-content .inventderm-service-doctor a.inventderm-service-doctor__profile:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: #014c93 !important;
	text-decoration: none !important;
}

/* =============================================
   RELATED SERVICES — 2 or 3 cards; plain link to the pillar page
   Cards reuse .inventderm-services__* from inventderm-pillar.css.
   ============================================= */

.inventderm-pillar .inventderm-services__grid--count-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventderm-pillar .inventderm-services__grid--count-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inventderm-pillar .inventderm-service-other__all {
	margin: 20px 0 0;
	padding: 0;
}

.inventderm-service-parentlink {
	padding: 28px var(--orl-side);
	border-top: 1px solid #e2e8f0;
}

.inventderm-pillar .inventderm-service-parentlink p {
	margin: 0;
	padding: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1180px) {
	.inventderm-pillar .inventderm-service-doctors {
		grid-template-columns: minmax(0, 620px);
	}

	.inventderm-pillar .inventderm-service-doctors--count-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 1023.98px) {
	.inventderm-service-summary {
		margin-top: 32px;
	}

	.inventderm-pillar .inventderm-service-doctors--count-2 {
		grid-template-columns: minmax(0, 620px);
	}

	/* Pillar 2×2 rules must not apply to a 3-card row. */
	.inventderm-services__grid--count-3 .inventderm-services__item:nth-child(3) {
		border-top: 0;
		border-left: 1px solid #e2e8f0;
	}

	/* Single column: image above the text, as in the design. */
	.inventderm-service .inventderm-feature__media {
		order: -1;
	}
}

@media (max-width: 639.98px) {
	.inventderm-pillar .inventderm-services__grid--count-2,
	.inventderm-pillar .inventderm-services__grid--count-3 {
		grid-template-columns: minmax(0, 1fr);
	}

	.inventderm-services__grid--count-3 .inventderm-services__item:nth-child(3) {
		border-top: 1px solid #e2e8f0;
		border-left: 0;
	}

	.inventderm-service-summary {
		padding: 20px 18px 12px;
	}

	.inventderm-service-hero__actions .inventorl-cta__button {
		display: block;
		width: 100%;
	}

	.inventderm-pillar .inventderm-service-doctor,
	.inventderm-pillar .inventderm-service-doctors--count-1 .inventderm-service-doctor {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 14px;
		padding: 14px;
	}
}
