/*
 * Homepage campaign hero — [inventorl_hero_campanie] (inc/class-inventorl-hero-campanie.php).
 * Enqueued in <head> only on pages holding the shortcode. No JS.
 *
 * Breakpoints: mobile < 768px (no photo), tablet 768–1023px, desktop ≥ 1024px,
 * compact desktop (laptops) ≥ 1024px and height ≤ 960px.
 *
 * Brand colours come from style.css tokens with local fallbacks, so a cached style.css
 * (same ?ver) never leaves the hero without them.
 */

/* Local metric-matched fallback: Montserrat swaps in without reflow (no download). */
@font-face {
	font-family: "Invent Hero Montserrat Fallback";
	src: local("Arial"), local("Helvetica"), local("Roboto");
	size-adjust: 113.4%;
	ascent-override: 85.4%;
	descent-override: 22.1%;
	line-gap-override: 0%;
}

/* Divi header height: 90px fixed above 980px, 80px absolute up to 980px. */
body {
	--ihc-header: 90px;
}

@media (max-width: 980px) {
	body {
		--ihc-header: 80px;
	}
}

/*
 * With et_transparent_nav, Divi (js/custom.js, "Pagebuilder + Fullwidth code") writes an inline
 * padding-top = header height + stylesheet padding on the first Fullwidth Code module after load,
 * which made the hero jump. Pin it to the header height from the first paint.
 */
.et_transparent_nav .et_pb_fullwidth_code:has(> .et_pb_code_inner > .invent-hero-campaign) {
	padding-top: var(--ihc-header) !important;
}

/* -------------------------------------------------------------------------
 * Base
 * ---------------------------------------------------------------------- */

.invent-hero-campaign {
	--ihc-yellow: var(--im-yellow, #ffd51e);
	--ihc-navy: var(--im-navy, #0e2a47);
	--ihc-blue: var(--im-blue, #17457a);
	--ihc-blue-light: var(--im-blue-light, #3180c0);
	--ihc-ease: var(--im-ease, ease);
	--ihc-gutter: clamp(20px, 4vw, 48px);
	--ihc-image-w: min(calc((80px + 8vh) * 1.5), 290px);

	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	min-height: calc(100vh - var(--ihc-header));
	min-height: calc(100svh - var(--ihc-header));
	overflow: hidden;
	isolation: isolate;
	background: linear-gradient(135deg, var(--ihc-navy) 0%, var(--ihc-blue-light) 100%);
	color: #fff;
	font-family: 'Montserrat', "Invent Hero Montserrat Fallback", Helvetica, Arial, Lucida, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.55;
	text-align: left;
}

.invent-hero-campaign *,
.invent-hero-campaign *::before,
.invent-hero-campaign *::after {
	box-sizing: border-box;
}

/* Divi global element rules (.entry-content ul, p, h1–h6) — reset with two-class specificity. */
.invent-hero-campaign.invent-hero-campaign :where(h1, h2, h3, p, ul, ol, li, address) {
	margin: 0;
	padding: 0;
	border: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-style: normal;
	font-weight: inherit;
	letter-spacing: normal;
	line-height: inherit;
	list-style: none;
	text-transform: none;
}

.invent-hero-campaign .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Background --------------------------------------------------------------- */

.invent-hero-campaign__media,
.invent-hero-campaign__overlay {
	position: absolute;
	inset: 0;
}

.invent-hero-campaign__media {
	z-index: -2;
}

.invent-hero-campaign__media picture {
	display: block;
	height: 100%;
}

.invent-hero-campaign .invent-hero-campaign__bg {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: 65% 40%;
}

.invent-hero-campaign__overlay {
	z-index: -1;
}

.invent-hero-campaign .invent-hero-campaign__plus {
	position: absolute;
	top: clamp(24px, 6vh, 72px);
	right: 5%;
	z-index: -1;
	width: clamp(140px, 16vw, 300px);
	height: auto;
	color: #fff;
	opacity: 0.14;
	pointer-events: none;
}

.invent-hero-campaign__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: clamp(16px, 2.4vh, 32px);
	width: 100%;
	max-width: 1428px;
	margin: 0 auto;
	padding: clamp(20px, 3.5vh, 48px) var(--ihc-gutter);
}

/* Intro ------------------------------------------------------------------ */

.invent-hero-campaign__intro {
	display: flex;
	flex-direction: column;
	gap: clamp(8px, 1.2vh, 16px);
	max-width: 760px;
}

.invent-hero-campaign .invent-hero-campaign__eyebrow {
	color: rgba(255, 255, 255, 0.9);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.3;
	text-transform: uppercase;
}

.invent-hero-campaign .invent-hero-campaign__title {
	font-size: clamp(44px, min(4.6vw, 8vh), 88px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 0.98;
	text-transform: uppercase;
	text-shadow: 0 2px 18px rgba(14, 42, 71, 0.35);
}

.invent-hero-campaign__title-line {
	display: block;
}

/* Each line fits from 768px up; nowrap keeps the fallback font from adding a line (CLS). */
@media (min-width: 768px) {
	.invent-hero-campaign__title-line {
		white-space: nowrap;
	}
}

.invent-hero-campaign__title-line--accent {
	color: var(--ihc-yellow);
}

.invent-hero-campaign .invent-hero-campaign__questions {
	font-size: clamp(22px, 2vw, 30px);
	font-weight: 700;
	line-height: 1.25;
}

.invent-hero-campaign__question {
	display: block;
}

.invent-hero-campaign .invent-hero-campaign__text {
	max-width: 56ch;
	color: rgba(255, 255, 255, 0.94);
	font-size: clamp(16px, 1.1vw, 18px);
	line-height: 1.6;
}

/* Offer panel --------------------------------------------------------------- */

.invent-hero-campaign__offer {
	display: flex;
	flex-direction: column;
	gap: clamp(14px, 1.8vh, 28px);
	padding: clamp(18px, 2.4vh, 32px) clamp(20px, 3vw, 40px);
	background: rgba(14, 42, 71, 0.9);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	border: 1px solid var(--ihc-blue-light);
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.invent-hero-campaign .invent-hero-campaign__services {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invent-hero-campaign .invent-hero-campaign__service {
	display: grid;
	grid-template-rows: auto auto 1fr;
	align-content: start;
	gap: 6px;
	padding: 0 clamp(16px, 2.2vw, 32px);
	border-left: 2px solid rgba(255, 255, 255, 0.85);
}

.invent-hero-campaign .invent-hero-campaign__service:first-child {
	padding-left: 0;
	border-left: 0;
}

.invent-hero-campaign .invent-hero-campaign__service:last-child {
	padding-right: 0;
}

.invent-hero-campaign__service-num {
	color: var(--ihc-yellow);
	font-size: clamp(36px, 3.4vw, 56px);
	font-weight: 800;
	line-height: 1;
}

.invent-hero-campaign .invent-hero-campaign__service-title {
	font-size: clamp(16px, 1.45vw, 22px);
	font-weight: 700;
	line-height: 1.15;
	text-transform: uppercase;
}

.invent-hero-campaign .invent-hero-campaign__service-items {
	color: rgba(255, 255, 255, 0.92);
	font-size: clamp(14px, 1.05vw, 16px);
	line-height: 1.45;
}

/* Price + period row, aligned with the three service columns. */
.invent-hero-campaign__pricing {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	align-items: center;
	column-gap: clamp(16px, 2.2vw, 32px);
	padding-top: clamp(10px, 1.4vh, 20px);
	border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.invent-hero-campaign .invent-hero-campaign__price {
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.invent-hero-campaign__price del,
.invent-hero-campaign__price ins {
	position: relative;
	display: inline-block;
	color: inherit;
	background: none;
	text-decoration: none;
}

.invent-hero-campaign .invent-hero-campaign__price--old {
	color: rgba(255, 255, 255, 0.9);
	font-size: clamp(26px, 2.6vw, 40px);
	font-weight: 700;
}

/* Red diagonal strike; the meaning is carried by <del> + the screen-reader label. */
.invent-hero-campaign__price--old del::after {
	content: "";
	position: absolute;
	top: 50%;
	left: -6%;
	right: -6%;
	height: 3px;
	background: #e5383b;
	border-radius: 2px;
	transform: rotate(-12deg);
}

.invent-hero-campaign .invent-hero-campaign__price--new {
	color: var(--ihc-yellow);
	font-size: clamp(48px, 5vw, 80px);
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 0.95;
}

.invent-hero-campaign .invent-hero-campaign__period {
	display: grid;
	gap: 4px;
	font-size: clamp(15px, 1.25vw, 19px);
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
}

.invent-hero-campaign__period abbr {
	border: 0;
	text-decoration: none;
	cursor: help;
}

.invent-hero-campaign__sep {
	margin: 0 0.4em;
}

/* Contact bar ------------------------------------------------------------- */

.invent-hero-campaign__contact {
	display: grid;
	grid-template-areas:
		"address actions actions"
		"address phones more";
	grid-template-columns: repeat(3, max-content);
	justify-content: start;
	align-items: center;
	gap: 4px clamp(20px, 2.4vw, 32px);
}

.invent-hero-campaign--has-image .invent-hero-campaign__contact {
	padding-right: var(--ihc-image-w);
}

.invent-hero-campaign .invent-hero-campaign__address {
	grid-area: address;
	display: flex;
	flex-direction: column;
	padding-right: clamp(20px, 3vw, 40px);
	border-right: 2px solid rgba(255, 255, 255, 0.85);
	font-size: 15px;
	line-height: 1.4;
}

.invent-hero-campaign__clinic {
	font-weight: 700;
}

.invent-hero-campaign__clinic strong {
	display: block;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
}

.invent-hero-campaign__actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.invent-hero-campaign .invent-hero-campaign__phones {
	grid-area: phones;
	font-size: 16px;
	font-weight: 700;
}

.invent-hero-campaign .invent-hero-campaign__more {
	grid-area: more;
}

.invent-hero-campaign__phones a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	white-space: nowrap;
}

.invent-hero-campaign__more a {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	font-size: 15px;
	font-weight: 600;
}

/*
 * Divi/style-custom.css forces every link in #main-content to #004c93 + underline
 * (`body #main-content a:not(…)`, !important, two IDs). Hero links keep their own colours:
 * two IDs + !important, scoped to the hero.
 */
#page-container #main-content .invent-hero-campaign a {
	text-decoration: none !important;
}

#page-container #main-content .invent-hero-campaign .invent-hero-campaign__btn--primary {
	color: var(--ihc-navy) !important;
}

#page-container #main-content .invent-hero-campaign .invent-hero-campaign__btn--secondary,
#page-container #main-content .invent-hero-campaign .invent-hero-campaign__btn--fallback,
#page-container #main-content .invent-hero-campaign .invent-hero-campaign__phones a {
	color: #fff !important;
}

#page-container #main-content .invent-hero-campaign .invent-hero-campaign__more a {
	color: rgba(255, 255, 255, 0.92) !important;
}

#page-container #main-content .invent-hero-campaign .invent-hero-campaign__phones a:hover,
#page-container #main-content .invent-hero-campaign .invent-hero-campaign__more a:hover {
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

/* Same colours outside #main-content (e.g. a page without the Divi wrapper). */
.invent-hero-campaign a {
	color: #fff;
	text-decoration: none;
}

/* Buttons --------------------------------------------------------------- */

.invent-hero-campaign .invent-hero-campaign__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 30px;
	border: 2px solid transparent;
	border-radius: 100px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 1px;
	line-height: 1.2;
	text-align: center;
	transition: background-color 0.2s var(--ihc-ease), color 0.2s var(--ihc-ease), border-color 0.2s var(--ihc-ease);
}

.invent-hero-campaign .invent-hero-campaign__btn--primary {
	background: var(--ihc-yellow);
	color: var(--ihc-navy);
}

.invent-hero-campaign .invent-hero-campaign__btn--primary:hover {
	background: #fff;
}

.invent-hero-campaign .invent-hero-campaign__btn--secondary {
	background: transparent;
	border-color: #fff;
	color: #fff;
}

.invent-hero-campaign .invent-hero-campaign__btn--secondary:hover {
	background: rgba(255, 255, 255, 0.14);
}

.invent-hero-campaign a:focus-visible {
	outline: 3px solid var(--ihc-yellow);
	outline-offset: 3px;
}

.invent-hero-campaign__btn-label-mobile {
	display: none;
}

/* Decorative image ---------------------------------------------------------- */

/*
 * Bottom right, beside the contact bar (which reserves its width as padding-right). Its width
 * follows the viewport height so its top stays below the period text.
 */
.invent-hero-campaign .invent-hero-campaign__image {
	position: absolute;
	right: var(--ihc-gutter);
	bottom: 0;
	z-index: 1;
	width: var(--ihc-image-w);
	max-width: none;
	height: auto;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.3));
	pointer-events: none;
}

/* -------------------------------------------------------------------------
 * Desktop ≥ 1024px
 * ---------------------------------------------------------------------- */

@media (min-width: 1024px) {
	.invent-hero-campaign--campaign .invent-hero-campaign__overlay {
		background:
			linear-gradient(0deg, rgba(14, 42, 71, 0.85) 0%, rgba(14, 42, 71, 0) 32%),
			linear-gradient(90deg, rgba(14, 42, 71, 0.94) 0%, rgba(14, 42, 71, 0.86) 40%, rgba(23, 69, 122, 0.55) 55%, rgba(23, 69, 122, 0) 66%);
	}
}

@media (min-width: 1024px) and (max-width: 1279px) {
	.invent-hero-campaign--campaign .invent-hero-campaign__overlay {
		background:
			linear-gradient(0deg, rgba(14, 42, 71, 0.85) 0%, rgba(14, 42, 71, 0) 32%),
			linear-gradient(90deg, rgba(14, 42, 71, 0.94) 0%, rgba(14, 42, 71, 0.86) 50%, rgba(23, 69, 122, 0.55) 64%, rgba(23, 69, 122, 0) 76%);
	}

	.invent-hero-campaign .invent-hero-campaign__image {
		display: none;
	}

	.invent-hero-campaign--has-image .invent-hero-campaign__contact {
		padding-right: 0;
	}
}

/* Compact desktop (laptops): everything fits in viewport − header. */
@media (min-width: 1024px) and (max-height: 960px) {
	.invent-hero-campaign {
		--ihc-image-w: min(calc((80px + 5vh) * 1.5), 260px);
	}

	.invent-hero-campaign__inner {
		gap: 2vh;
		padding-top: 2.5vh;
		padding-bottom: 2.5vh;
	}

	.invent-hero-campaign .invent-hero-campaign__title {
		font-size: min(4.6vw, 7vh);
	}

	.invent-hero-campaign .invent-hero-campaign__text {
		max-width: 66ch;
	}

	.invent-hero-campaign .invent-hero-campaign__questions {
		display: flex;
		flex-wrap: wrap;
		column-gap: 0.35em;
	}

	/* Number beside the service title instead of above it. */
	.invent-hero-campaign .invent-hero-campaign__service {
		grid-template-columns: auto 1fr;
		grid-template-rows: auto 1fr;
		column-gap: 14px;
		row-gap: 4px;
	}

	.invent-hero-campaign__service-num {
		grid-row: 1 / span 2;
	}

	.invent-hero-campaign .invent-hero-campaign__service-title {
		align-self: end;
	}

	/* "Clinica multidisciplinară Invent Medical" on one line, the address on the next two. */
	.invent-hero-campaign__clinic {
		white-space: nowrap;
	}

	.invent-hero-campaign__clinic strong {
		display: inline;
	}

	.invent-hero-campaign .invent-hero-campaign__btn {
		min-height: 48px;
		padding: 10px 26px;
	}

	.invent-hero-campaign .invent-hero-campaign__price--new {
		font-size: clamp(48px, min(5vw, 7.5vh), 80px);
	}
}

/* -------------------------------------------------------------------------
 * Tablet 768–1023px
 * ---------------------------------------------------------------------- */

@media (min-width: 768px) and (max-width: 1023px) {
	.invent-hero-campaign {
		--ihc-image-w: 160px;
	}

	.invent-hero-campaign--campaign .invent-hero-campaign__overlay {
		background: linear-gradient(180deg, rgba(14, 42, 71, 0.88) 0%, rgba(14, 42, 71, 0.62) 40%, rgba(14, 42, 71, 0.9) 100%);
	}

	.invent-hero-campaign .invent-hero-campaign__title {
		font-size: clamp(44px, 7.4vw, 72px);
	}

	.invent-hero-campaign .invent-hero-campaign__plus {
		display: none;
	}

	.invent-hero-campaign .invent-hero-campaign__service {
		padding: 0 14px;
	}

	/* Buttons on the bottom row, beside the image; the rows above stay clear of it. */
	.invent-hero-campaign__contact {
		grid-template-areas:
			"address address"
			"phones more"
			"actions actions";
		grid-template-columns: max-content max-content;
		row-gap: 10px;
	}

	.invent-hero-campaign .invent-hero-campaign__address {
		padding-right: 0;
		border-right: 0;
	}

	.invent-hero-campaign--has-image .invent-hero-campaign__contact {
		padding-right: 0;
	}

	.invent-hero-campaign--has-image .invent-hero-campaign__actions {
		padding-right: 170px;
	}
}

/* -------------------------------------------------------------------------
 * Mobile < 768px (no photo)
 * ---------------------------------------------------------------------- */

@media (max-width: 767px) {
	.invent-hero-campaign {
		font-size: 16px;
	}

	.invent-hero-campaign--campaign {
		background:
			radial-gradient(120% 55% at 100% 0%, rgba(49, 128, 192, 0.55) 0%, rgba(49, 128, 192, 0) 70%),
			linear-gradient(180deg, var(--ihc-navy) 0%, var(--ihc-blue) 60%, #1d5a99 100%);
	}

	.invent-hero-campaign--campaign .invent-hero-campaign__media,
	.invent-hero-campaign--campaign .invent-hero-campaign__overlay,
	.invent-hero-campaign .invent-hero-campaign__image {
		display: none;
	}

	.invent-hero-campaign .invent-hero-campaign__plus {
		top: 16px;
		right: -28px;
		width: 150px;
		opacity: 0.08;
	}

	.invent-hero-campaign .invent-hero-campaign__title {
		font-size: clamp(36px, 11vw, 48px);
	}

	.invent-hero-campaign .invent-hero-campaign__questions {
		font-size: 21px;
	}

	/* Visually shortened; the full paragraph stays in the HTML. */
	.invent-hero-campaign .invent-hero-campaign__text {
		display: -webkit-box;
		overflow: hidden;
		font-size: 16px;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		line-clamp: 4;
	}

	.invent-hero-campaign__offer {
		padding: 20px;
	}

	.invent-hero-campaign .invent-hero-campaign__services {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.invent-hero-campaign .invent-hero-campaign__service,
	.invent-hero-campaign .invent-hero-campaign__service:first-child,
	.invent-hero-campaign .invent-hero-campaign__service:last-child {
		grid-template-columns: 44px 1fr;
		grid-template-rows: auto;
		column-gap: 12px;
		row-gap: 4px;
		padding: 0;
		border-left: 0;
	}

	.invent-hero-campaign .invent-hero-campaign__service + .invent-hero-campaign__service {
		padding-top: 18px;
		border-top: 1px solid rgba(255, 255, 255, 0.25);
	}

	.invent-hero-campaign__service-num {
		grid-row: 1 / span 2;
		font-size: 36px;
	}

	.invent-hero-campaign .invent-hero-campaign__service-title {
		font-size: 17px;
	}

	.invent-hero-campaign .invent-hero-campaign__service-items {
		font-size: 15px;
	}

	.invent-hero-campaign__pricing {
		grid-template-columns: auto 1fr;
		align-items: baseline;
		gap: 14px 20px;
	}

	.invent-hero-campaign .invent-hero-campaign__price--old {
		font-size: 24px;
	}

	.invent-hero-campaign .invent-hero-campaign__price--new {
		font-size: clamp(34px, 11vw, 44px);
	}

	.invent-hero-campaign .invent-hero-campaign__period {
		grid-column: 1 / -1;
		font-size: 16px;
	}

	/* Order: buttons → address → phones (second number stays a visible link) → ORL link. */
	.invent-hero-campaign__contact {
		grid-template-areas:
			"actions"
			"address"
			"phones"
			"more";
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.invent-hero-campaign--has-image .invent-hero-campaign__contact {
		padding-right: 0;
	}

	.invent-hero-campaign__actions {
		flex-direction: column;
	}

	.invent-hero-campaign .invent-hero-campaign__btn {
		width: 100%;
	}

	.invent-hero-campaign__btn-label {
		display: none;
	}

	.invent-hero-campaign__btn-label-mobile {
		display: inline;
	}

	.invent-hero-campaign .invent-hero-campaign__address {
		padding-right: 0;
		border-right: 0;
	}

	.invent-hero-campaign .invent-hero-campaign__phones {
		font-size: 18px;
	}

	.invent-hero-campaign__phones a,
	.invent-hero-campaign__more a {
		min-height: 44px;
	}
}

/* -------------------------------------------------------------------------
 * Fallback (outside the campaign window): centred, keeps its photo on mobile.
 * ---------------------------------------------------------------------- */

.invent-hero-campaign--fallback {
	text-align: center;
}

.invent-hero-campaign--fallback .invent-hero-campaign__bg {
	object-position: 50% 30%;
}

.invent-hero-campaign--fallback .invent-hero-campaign__overlay {
	background: linear-gradient(180deg, rgba(0, 76, 147, 0.35) 0%, rgba(0, 76, 147, 0.62) 100%);
}

.invent-hero-campaign--fallback .invent-hero-campaign__intro {
	align-items: center;
	max-width: none;
}

.invent-hero-campaign .invent-hero-campaign__fallback-title {
	font-size: clamp(36px, 4.2vw, 60px);
	font-weight: 500;
	line-height: 1.2;
	text-shadow: 0 0 0.3em rgba(0, 0, 0, 0.2);
}

.invent-hero-campaign .invent-hero-campaign__fallback-subtitle {
	font-size: clamp(24px, 2.4vw, 35px);
	line-height: 1.5;
}

.invent-hero-campaign .invent-hero-campaign__fallback-cta {
	margin-top: 24px;
}

.invent-hero-campaign .invent-hero-campaign__btn--fallback {
	background: #45ccbc;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
}

.invent-hero-campaign .invent-hero-campaign__btn--fallback:hover {
	background: #009fe3;
}
