/*
 * Divi Child — Dermatologie pillar page styles (page-specific only).
 * BEM prefix: inventderm-  (never overrides Divi core selectors).
 *
 * Loaded after orl-pillar.css, which provides the shared pillar layout
 * (sections, headings, hero, trust band), the doctor panels (.im-docs), the
 * hero orbit, conditions cards, FAQ, articles and the booking section. Only
 * components that don't exist on the ORL page live here.
 */

/* =============================================
   HERO — background override
   TODO imagine: no dermatology cabinet photo in the Media Library yet.
   Until one exists the hero keeps the ORL gradient on a neutral base
   (the ORL cabinet photo is not reused). To add a photo, append it as a
   second background layer after the gradient, as in orl-pillar.css.
   ============================================= */

.inventorl-pillar__hero.inventderm-hero {
	background-color: #5c7895;
	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%);
}

/* =============================================
   TEXT HELPERS
   ============================================= */

.inventderm-pillar .inventderm-prose,
.inventderm-pillar .inventderm-lead {
	max-width: 72ch;
}

.inventderm-pillar .inventderm-lead {
	margin: 0 0 var(--im-space-4, 40px);
	padding: 0;
}

.inventderm-pillar .inventderm-prose p {
	margin: 0 0 var(--im-space-2, 16px);
	padding: 0;
}

.inventderm-pillar .inventderm-actions {
	margin: var(--im-space-3, 24px) 0 0;
	padding: 0;
}

.inventderm-pillar .inventderm-actions .inventorl-cta__button {
	min-height: 48px;
	box-sizing: border-box;
}

/* Secondary / "see also" notes inside cards. */
.inventderm-pillar .inventderm-note {
	margin: var(--im-space-1, 8px) 0 0;
	padding: 12px 0 0;
	border-top: 1px solid #e2e8f0;
	color: #46505f;
	font-size: 0.875rem;
}

/* =============================================
   BUTTONS — outline variant (new) + text link with arrow
   ============================================= */

.inventderm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	box-sizing: border-box;
	padding: 12px 24px;
	border-radius: 6px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.inventderm-btn--outline {
	border: 1.5px solid var(--im-blue, #17457a);
	background: transparent;
}

.inventderm-link-arrow {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 600;
}

.inventderm-btn:focus-visible,
.inventderm-services__card:focus-visible {
	outline: 3px solid var(--im-blue-light, #3180c0);
	outline-offset: 2px;
}

/* Selector shape mirrors the Divi link rule so these win without relying on load order. */
body #main-content.inventderm-pillar a.inventderm-btn--outline:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: var(--im-blue, #17457a) !important;
	text-decoration: none !important;
}

body #main-content.inventderm-pillar a.inventderm-btn--outline:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button):hover {
	background: var(--im-blue, #17457a);
	color: #fff !important;
}

body #main-content.inventderm-pillar .inventderm-actions a.inventorl-cta__button: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;
}

/* White button on the navy feature panel (same treatment as the ORL hero / surgery band). */
.inventderm-feature__panel .inventorl-cta__button {
	background: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.inventderm-feature__panel .inventorl-cta__button:hover,
.inventderm-feature__panel .inventorl-cta__button:focus {
	background: var(--im-cyan, #4dd9f4);
}

body #main-content.inventderm-pillar .inventderm-feature__panel a.inventorl-cta__button:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: var(--im-navy, #0e2a47) !important;
}

/* =============================================
   SERVICE CARDS — 4 priority services under the trust band
   ============================================= */

.inventderm-pillar .inventderm-services__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid #e2e8f0;
	border-radius: var(--im-card-radius, 16px);
	background: #fff;
	list-style: none;
}

.inventderm-pillar .inventderm-services__item {
	margin: 0;
	padding: 0;
}

.inventderm-services__item + .inventderm-services__item {
	border-left: 1px solid #e2e8f0;
}

.inventderm-services__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	padding: 28px 26px 22px;
	transition: background 0.2s ease;
}

.inventderm-services__card:hover {
	background: var(--im-surface-blue, #eef6fb);
}

body #main-content.inventderm-pillar a.inventderm-services__card:not(body #main-content h1 a, body #main-content h2 a, body #main-content h3 a, .et_pb_button) {
	color: #1a1f2b !important;
	text-decoration: none !important;
}

.inventderm-services__num {
	color: #46505f;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	font-variant-numeric: tabular-nums;
}

.inventderm-services .inventderm-services__title {
	align-self: flex-start;
	margin: 14px 0 10px;
	padding: 0 0 14px;
	border-bottom: 2px solid #014c93;
	color: var(--im-navy, #0e2a47);
	font-size: 1.3rem;
}

.inventderm-pillar .inventderm-services__text {
	flex-grow: 1;
	margin: 0 0 20px;
	padding: 0;
	color: #46505f;
	font-size: 0.9375rem;
}

.inventderm-services__more {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #014c93;
	font-size: 0.875rem;
	font-weight: 600;
}

/* =============================================
   CONDITIONS — full-width card (pediatric dermatology)
   Cards themselves reuse .inventorl-afectiuni__card.
   ============================================= */

.inventderm-card--wide {
	grid-column: 1 / -1;
}

/* =============================================
   FEATURE — dermatoscopy / ingrown nail / dermatological surgery
   ============================================= */

.inventderm-feature {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(32px, 4vw, 56px);
	align-items: center;
}

/* No image yet (dermatoscopy): text only. */
.inventderm-feature--single {
	grid-template-columns: minmax(0, 1fr);
}

.inventderm-feature--split {
	grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	align-items: start;
}

.inventderm-feature__media {
	overflow: hidden;
	border-radius: var(--im-card-radius, 16px);
	aspect-ratio: 4 / 3;
}

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

.inventderm-feature__panel {
	padding: 32px;
	border-radius: var(--im-card-radius, 16px);
	background: var(--im-brand-gradient);
	box-shadow: var(--im-card-shadow);
	color: #fff;
}

.inventderm-pillar .inventderm-feature__panel p {
	margin: 0;
	padding: 0;
	color: #fff;
}

.inventderm-pillar .inventderm-feature__panel .inventderm-actions {
	margin-top: var(--im-space-3, 24px);
}

/* =============================================
   CHECKLIST — "Când este recomandată o consultație…"
   ============================================= */

.inventderm-pillar .inventderm-checklist {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 40px;
	max-width: 1040px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inventderm-pillar .inventderm-checklist li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid #d6e2ee;
}

.inventderm-checklist__icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 4px;
	color: var(--im-blue, #17457a);
}

/* =============================================
   TARIFFS — grouped tables (tables come from [inventorl_tarife] / tarife.css)
   ============================================= */

.inventderm-prices {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
	align-items: start;
}

.inventderm-prices__col {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
}

.inventderm-pillar .inventderm-prices__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 1.05rem;
}

.inventderm-prices__group .inventorl-tarife {
	margin: 0;
}

.inventderm-pillar .inventderm-prices__note {
	max-width: 72ch;
	margin: 28px 0 0;
	padding: 0;
	color: #46505f;
	font-size: 0.875rem;
}

/* =============================================
   ARTICLES — "see all" link; BOOKING — review note
   ============================================= */

.inventderm-pillar .inventderm-articles-all {
	margin: var(--im-space-3, 24px) 0 0;
	padding: 0;
}

.inventderm-booking__side {
	min-width: 0;
}

.inventderm-pillar .inventderm-review {
	margin: 20px 0 0;
	padding: 0;
	color: #46505f;
	font-size: 0.8125rem;
}

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

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

	.inventderm-services__item:nth-child(3) {
		border-left: 0;
	}

	.inventderm-services__item:nth-child(n+3) {
		border-top: 1px solid #e2e8f0;
	}

	.inventderm-feature,
	.inventderm-feature--split,
	.inventderm-prices {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
}

@media (max-width: 767.98px) {
	.inventderm-pillar .inventderm-checklist {
		grid-template-columns: minmax(0, 1fr);
	}

	.inventderm-feature__panel {
		padding: 24px;
	}
}

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

	.inventderm-services__item + .inventderm-services__item {
		border-top: 1px solid #e2e8f0;
		border-left: 0;
	}

	.inventderm-pillar .inventderm-actions .inventorl-cta__button,
	.inventderm-pillar .inventderm-btn {
		display: flex;
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.inventderm-btn,
	.inventderm-services__card {
		transition: none;
	}
}
