/*
Theme Name: Medex Child
Description: Child theme for the Medex website
Author: INFI Group
Template: astra
Version: 1.5.11
Text Domain: medex-child
*/

:root {
	--medex-accent: #d99a24;
	--medex-heading: #252a24;
	--medex-body: #4c514b;
	--medex-olive: #596b45;
	--medex-bg: #f7f5ef;
	--medex-white: #ffffff;
	--medex-border: #e4e0d6;
	--medex-max: 1200px;
}

/* Home only */
body.home .entry-header,
body.home .ast-single-post .entry-header {
	display: none;
}

body.home .site-content > .ast-container {
	padding-top: 0;
}

/* FAZA 3J — mobile: kill Astra container side inset so section BGs are edge-to-edge.
   Inner content keeps its own 20–24px padding. Do NOT use -50vw / 100vw here. */
@media (max-width: 767px) {
	body.home .site-content > .ast-container {
		padding-left: 0;
		padding-right: 0;
	}
}

body.home #primary.content-area,
body.home .ast-article-single,
body.home .entry-content {
	margin-top: 0;
	padding-top: 0;
}

/* Full-bleed alignfull on desktop; mobile resets below (do not use overflow hide as fix) */
body.home .entry-content > .medex-hero.alignfull,
body.home .entry-content > .medex-about.alignfull,
body.home .entry-content > .medex-home-programs.alignfull,
body.home .entry-content > .medex-manufacturing.alignfull {
	left: 50%;
	margin-block-end: 0 !important;
	margin-block-start: 0 !important;
	margin-left: -50vw !important;
	margin-right: -50vw !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	max-width: 100vw;
	position: relative;
	right: 50%;
	width: 100vw;
}

/* Kill Gutenberg is-layout-flow stack gaps between homepage sections */
body.home .entry-content.is-layout-flow > .medex-hero,
body.home .entry-content.is-layout-flow > .medex-about,
body.home .entry-content.is-layout-flow > .medex-home-programs,
body.home .entry-content.is-layout-flow > .medex-manufacturing,
body.home .entry-content > .medex-hero,
body.home .entry-content > .medex-about,
body.home .entry-content > .medex-home-programs,
body.home .entry-content > .medex-manufacturing {
	margin-block-end: 0 !important;
	margin-block-start: 0 !important;
	margin-bottom: 0 !important;
	margin-top: 0 !important;
}

/* Also kill flow gap on first/inner wrappers inside sections */
body.home .medex-hero.is-layout-flow > *,
body.home .medex-about.is-layout-flow > *,
body.home .medex-home-programs.is-layout-flow > *,
body.home .medex-manufacturing.is-layout-flow > *,
body.home .medex-about__grid.is-layout-flow > *,
body.home .medex-home-programs__inner.is-layout-flow > * {
	margin-block-start: 0 !important;
}

/* Mobile: kill desktop -50vw full-bleed (it shifts entire page left) */
@media (max-width: 921px) {
	body.home .entry-content > .medex-hero.alignfull,
	body.home .entry-content > .medex-about.alignfull,
	body.home .entry-content > .medex-home-programs.alignfull,
	body.home .entry-content > .medex-manufacturing.alignfull {
		left: auto !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 100% !important;
		right: auto !important;
		width: 100% !important;
	}
}

/* -------------------------------------------------------------------------
   Hero — full-bleed photo blend (FAZA 2E)
------------------------------------------------------------------------- */
.medex-hero {
	background: var(--medex-bg);
	border-bottom: 1px solid var(--medex-border);
	box-sizing: border-box;
	margin: 0;
	overflow: hidden;
	padding: 0 !important;
	position: relative;
	width: 100%;
}

.medex-hero.wp-block-group {
	padding-block: 0 !important;
	padding-inline: 0 !important;
}

.medex-hero__grid.wp-block-group,
.medex-hero__grid {
	box-sizing: border-box;
	display: flex !important;
	flex-direction: column;
	justify-content: center;
	margin: 0 auto;
	max-width: var(--medex-max);
	min-height: 0;
	padding: 36px 20px 40px;
	row-gap: 0;
	width: 100%;
}

/* Beat Gutenberg constrained-layout max-width on hero children */
.medex-hero__grid.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.medex-hero__grid > .medex-hero__intro,
.medex-hero__grid > .medex-hero__visual,
.medex-hero__grid > .medex-hero__programs {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.medex-hero__grid > .medex-hero__intro,
.medex-hero__grid > .medex-hero__programs {
	position: relative;
	width: 100%;
	z-index: 2;
}

.medex-hero__grid > .medex-hero__visual {
	margin: 0;
	max-width: none !important;
	min-width: 0;
	width: 100%;
}

.medex-hero__eyebrow {
	color: var(--medex-olive);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.45;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.medex-hero__title {
	color: var(--medex-heading);
	font-family: Montserrat, sans-serif;
	font-size: clamp(2.25rem, 3vw, 3.125rem);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.08;
	margin: 0 0 18px;
	max-width: none;
}

.medex-hero__title br {
	display: block;
}

.medex-hero__text {
	color: var(--medex-body);
	font-family: Inter, sans-serif;
	font-size: 1.125rem;
	line-height: 1.6;
	margin: 0 0 28px;
	max-width: 570px;
}

.medex-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.medex-hero__actions .wp-block-button {
	margin: 0;
}

.medex-hero__actions .wp-block-button__link {
	border-radius: 2px;
	box-sizing: border-box;
	display: inline-flex;
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 600;
	justify-content: center;
	letter-spacing: 0.04em;
	line-height: 1.2;
	min-height: 50px;
	padding: 15px 24px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.medex-hero__btn--primary .wp-block-button__link,
.medex-hero__actions .wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background-color: var(--medex-accent);
	border: 1px solid var(--medex-accent);
	color: var(--medex-white);
}

.medex-hero__btn--primary .wp-block-button__link:hover,
.medex-hero__btn--primary .wp-block-button__link:focus,
.medex-hero__actions .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.medex-hero__actions .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
	background-color: #c4891d;
	border-color: #c4891d;
	color: var(--medex-white);
}

.medex-hero__btn--secondary .wp-block-button__link,
.medex-hero__actions .wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent;
	border: 1px solid var(--medex-accent);
	color: var(--medex-accent);
}

.medex-hero__btn--secondary .wp-block-button__link:hover,
.medex-hero__btn--secondary .wp-block-button__link:focus,
.medex-hero__actions .wp-block-button.is-style-outline .wp-block-button__link:hover,
.medex-hero__actions .wp-block-button.is-style-outline .wp-block-button__link:focus {
	background-color: var(--medex-accent);
	border-color: var(--medex-accent);
	color: var(--medex-white);
}

.medex-hero__visual-frame {
	background: transparent;
	border: 0;
	box-sizing: border-box;
	height: 100%;
	margin: 0;
	max-width: none !important;
	overflow: hidden;
	padding: 0;
	width: 100%;
}

.medex-hero__visual-frame .wp-block-image {
	height: 100%;
	margin: 0;
	max-width: none !important;
	width: 100%;
}

.medex-hero__visual-frame img,
.medex-hero__visual-frame .wp-block-image img,
.medex-hero__visual img {
	border-radius: 0;
	display: block;
	height: auto;
	max-width: none !important;
	object-fit: cover;
	object-position: 38% center;
	width: 100%;
}

/* Desktop: full-bleed right media + soft beige blend */
@media (min-width: 1100px) {
	.medex-hero {
		min-height: 630px;
	}

	.medex-hero__grid.wp-block-group,
	.medex-hero__grid {
		/* Pack intro top / features bottom — kills centered dead space before next section */
		justify-content: space-between;
		min-height: 630px;
		padding: 28px 20px 12px;
	}

	.medex-hero__grid > .medex-hero__intro,
	.medex-hero__grid > .medex-hero__programs {
		max-width: 820px;
		width: 68%;
	}

	.medex-hero__title {
		font-size: 52px;
		letter-spacing: -0.035em;
		line-height: 1.08;
		margin-bottom: 14px;
	}

	.medex-hero__text {
		margin-bottom: 22px;
	}

	.medex-hero__eyebrow {
		margin-bottom: 12px;
	}

	/* Absolute to .medex-hero (grid stays static) → reaches viewport right edge */
	.medex-hero__grid > .medex-hero__visual {
		bottom: 0;
		height: auto;
		left: auto;
		overflow: hidden;
		pointer-events: none;
		position: absolute;
		right: 0;
		top: 0;
		width: 57%;
		z-index: 1;
	}

	.medex-hero__visual-frame {
		height: 100%;
	}

	.medex-hero__visual-frame img,
	.medex-hero__visual-frame .wp-block-image img,
	.medex-hero__visual img {
		height: 100%;
		object-fit: cover;
		object-position: 42% center;
		width: 100%;
	}

	/* Soft fade: photo dissolves into #F7F5EF around mid-page */
	.medex-hero__visual::after {
		background: linear-gradient(
			to right,
			#f7f5ef 0%,
			rgba(247, 245, 239, 0.97) 10%,
			rgba(247, 245, 239, 0.78) 22%,
			rgba(247, 245, 239, 0.42) 36%,
			rgba(247, 245, 239, 0.12) 50%,
			rgba(247, 245, 239, 0) 64%
		);
		bottom: 0;
		content: "";
		left: 0;
		pointer-events: none;
		position: absolute;
		right: 0;
		top: 0;
		z-index: 2;
	}

	.medex-hero__program-list {
		margin-top: 36px;
		padding-top: 16px;
	}

	.medex-hero__tagline {
		margin-top: 22px;
		margin-bottom: 0 !important;
	}
}

/* Three programs */
.medex-hero__program-list {
	border-top: 1px solid var(--medex-border);
	column-gap: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin: 44px 0 0;
	padding: 20px 0 0;
	row-gap: 0;
}

.medex-hero__program {
	align-items: flex-start;
	box-sizing: border-box;
	display: flex;
	gap: 12px;
	margin: 0;
	min-width: 0;
	padding: 0 16px;
	position: relative;
}

.medex-hero__program:first-child {
	padding-left: 0;
}

.medex-hero__program:last-child {
	padding-right: 0;
}

.medex-hero__program:not(:last-child)::after {
	background: var(--medex-border);
	bottom: 2px;
	content: "";
	position: absolute;
	right: 0;
	top: 2px;
	width: 1px;
}

.medex-hero__program-icon {
	color: var(--medex-olive);
	flex: 0 0 auto;
	height: 28px;
	margin-top: 1px;
	width: 28px;
}

.medex-hero__program-icon svg {
	display: block;
	height: 100%;
	width: 100%;
}

.medex-hero__program-label {
	color: var(--medex-heading);
	font-family: Montserrat, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.25;
	margin: 0;
	text-transform: uppercase;
}

.medex-hero__program-sub {
	color: var(--medex-body);
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	margin: 4px 0 0;
}

.medex-hero__tagline,
.entry-content .medex-hero__tagline,
.medex-hero p.medex-hero__tagline {
	color: var(--medex-olive);
	font-family: Inter, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	margin: 28px 0 0 !important;
	margin-bottom: 0 !important;
	text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   O Medexu
------------------------------------------------------------------------- */
.medex-about {
	background: var(--medex-white);
	box-sizing: border-box;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
	width: 100%;
}

.medex-about.wp-block-group {
	padding-block: 0 !important;
	padding-inline: 0 !important;
}

.medex-about__grid {
	align-items: start;
	box-sizing: border-box;
	display: grid;
	gap: 56px;
	grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
	margin: 0 auto;
	max-width: var(--medex-max);
	/* Visual gap to next section ≈ bottom + next top (avoid double 60+60) */
	padding: 56px 24px 24px;
	width: 100%;
}

.medex-about__media {
	margin: 0;
	min-width: 0;
}

.medex-about__media img {
	aspect-ratio: 4 / 3;
	background: var(--medex-bg);
	border: 1px solid var(--medex-border);
	box-sizing: border-box;
	display: block;
	height: auto;
	max-height: 480px;
	object-fit: cover;
	object-position: center center;
	padding: 0;
	width: 100%;
}

.medex-about__content {
	max-width: 560px;
}

.medex-about__eyebrow {
	color: var(--medex-olive);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.medex-about__title {
	color: var(--medex-heading);
	font-family: Montserrat, sans-serif;
	font-size: clamp(1.75rem, 3vw, 2.375rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 22px;
}

.medex-about__text {
	color: var(--medex-body);
	font-family: Inter, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.7;
	margin: 0 0 16px;
}

.medex-about__text:last-of-type {
	margin-bottom: 28px;
}

.medex-about__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
}

.medex-about__actions .wp-block-button {
	margin: 0;
}

.medex-about__actions .wp-block-button__link {
	background-color: transparent;
	border: 1px solid var(--medex-heading);
	border-radius: 2px;
	box-sizing: border-box;
	color: var(--medex-heading);
	display: inline-flex;
	font-family: Inter, sans-serif;
	font-size: 14px;
	font-weight: 600;
	justify-content: center;
	letter-spacing: 0.04em;
	line-height: 1.2;
	min-height: 48px;
	padding: 14px 22px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.medex-about__actions .wp-block-button__link:hover,
.medex-about__actions .wp-block-button__link:focus {
	background-color: var(--medex-heading);
	border-color: var(--medex-heading);
	color: var(--medex-white);
}

/* Tablet / below full-bleed composition */
@media (max-width: 1099px) {
	.medex-hero__grid.wp-block-group,
	.medex-hero__grid {
		gap: 24px;
		min-height: 0;
		padding: 32px 24px 36px;
	}

	.medex-hero__grid > .medex-hero__intro,
	.medex-hero__grid > .medex-hero__programs {
		max-width: 640px;
		width: 100%;
	}

	.medex-hero__grid > .medex-hero__visual {
		position: relative;
		width: 100%;
		z-index: 1;
	}

	.medex-hero__visual::after {
		display: none;
	}

	.medex-hero__visual-frame img,
	.medex-hero__visual img {
		aspect-ratio: 16 / 10;
		height: auto;
		max-height: 380px;
		object-fit: cover;
		width: 100%;
	}

	.medex-hero__program-list {
		margin-top: 8px;
	}

	.medex-about__grid {
		gap: 40px;
		grid-template-columns: 1fr;
		padding: 44px 24px 28px;
	}

	.medex-about__media img {
		margin: 0 auto;
		max-height: 420px;
		max-width: 100%;
	}
}

/* Mobile */
@media (max-width: 921px) {
	/* Astra header — keep logo compact, hamburger usable */
	.ast-header-break-point .custom-logo-link img,
	.ast-header-break-point .site-logo-img img {
		height: auto;
		max-height: 48px;
		max-width: 140px;
		width: auto;
	}

	.ast-header-break-point .main-header-bar {
		padding-bottom: 10px;
		padding-top: 10px;
	}
}

@media (max-width: 600px) {
	/* Match .wp-block-group specificity so horizontal padding actually applies;
	   leave vertical from the 1099 rule untouched (only set L/R). */
	.medex-hero__grid.wp-block-group,
	.medex-hero__grid {
		gap: 18px;
		padding-left: 24px;
		padding-right: 24px;
	}

	.medex-hero__eyebrow {
		font-size: 11px;
		letter-spacing: 0.08em;
		margin-bottom: 12px;
		overflow-wrap: anywhere;
	}

	.medex-hero__title {
		font-size: 1.875rem;
		letter-spacing: -0.03em;
		line-height: 1.12;
		margin-bottom: 12px;
	}

	.medex-hero__text {
		font-size: 1.0625rem;
		line-height: 1.6;
		margin-bottom: 18px;
		max-width: none;
	}

	.medex-hero__actions {
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}

	.medex-hero__actions .wp-block-button,
	.medex-hero__actions .wp-block-button__link {
		max-width: 100%;
		width: 100%;
	}

	.medex-hero__actions .wp-block-button__link {
		min-height: 48px;
		padding-left: 18px;
		padding-right: 18px;
	}

	.medex-hero__program-list {
		grid-template-columns: 1fr;
		margin-top: 8px;
		padding-top: 14px;
		row-gap: 14px;
	}

	.medex-hero__program {
		padding: 0;
	}

	.medex-hero__program:not(:last-child)::after {
		display: none;
	}

	.medex-hero__program:not(:last-child) {
		border-bottom: 1px solid var(--medex-border);
		padding-bottom: 14px;
	}

	.medex-hero__tagline {
		font-size: 11px;
		letter-spacing: 0.06em;
		margin-top: 18px;
	}

	.medex-hero__visual-frame {
		max-width: 100%;
		padding: 0;
	}

	.medex-hero__visual-frame img,
	.medex-hero__visual img {
		aspect-ratio: 4 / 3;
		height: auto;
		max-height: 260px;
		width: 100%;
	}

	.medex-about__grid {
		gap: 20px;
		padding: 40px 24px 24px;
	}

	.medex-about__title {
		font-size: 2.25rem; /* 36px */
		line-height: 1.15;
	}

	.medex-about__text {
		font-size: 1.0625rem; /* 17px */
		line-height: 1.65;
	}

	.medex-about__actions {
		flex-direction: column;
		width: 100%;
	}

	.medex-about__actions .wp-block-button,
	.medex-about__actions .wp-block-button__link {
		width: 100%;
	}

	.medex-about__media img {
		max-height: 280px;
		max-width: 100%;
		padding: 0;
	}

	.medex-manufacturing__inner {
		padding: 40px 24px 44px;
	}

	.medex-manufacturing__title {
		font-size: 1.75rem;
		line-height: 1.15;
	}

	.medex-manufacturing__text {
		font-size: 1.0625rem;
		line-height: 1.65;
	}

	/* Keep 2×2 principles on typical phones */
	.medex-manufacturing__principles {
		column-gap: 16px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 20px;
	}

	.medex-manufacturing__media img {
		aspect-ratio: 4 / 3;
	}

	.medex-manufacturing__link {
		max-width: 100%;
		width: auto;
	}
}

@media (max-width: 360px) {
	.medex-manufacturing__principles {
		grid-template-columns: 1fr;
	}
}

/* -------------------------------------------------------------------------
   Home — Proizvodni program (FAZA 3A)
------------------------------------------------------------------------- */
.medex-home-programs {
	background: var(--medex-white);
	border-bottom: 1px solid var(--medex-border);
	box-sizing: border-box;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
	width: 100%;
}

.medex-home-programs.wp-block-group {
	padding-block: 0 !important;
	padding-inline: 0 !important;
}

.medex-home-programs__inner {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: var(--medex-max);
	padding: 40px 24px;
	width: 100%;
}

.medex-home-programs__header {
	margin: 0 0 44px;
	max-width: 720px;
}

.medex-home-programs__eyebrow {
	color: var(--medex-olive);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.medex-home-programs__title {
	color: var(--medex-heading);
	font-family: Montserrat, sans-serif;
	font-size: clamp(1.75rem, 2.8vw, 2.375rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 18px;
}

.medex-home-programs__intro {
	color: var(--medex-body);
	font-family: Inter, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.7;
	margin: 0;
	max-width: 640px;
}

.medex-home-programs__grid {
	column-gap: 40px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	row-gap: 48px;
}

.medex-home-programs__item {
	border-top: 1px solid var(--medex-border);
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	margin: 0;
	min-width: 0;
	padding-top: 20px;
}

.medex-home-programs__media {
	margin: 0 0 28px;
	overflow: hidden;
	width: 100%;
}

.medex-home-programs__media img {
	aspect-ratio: 4 / 3;
	border-radius: 0;
	display: block;
	height: auto;
	object-fit: cover;
	object-position: center center;
	width: 100%;
}

.medex-home-programs__media img.wp-image-62 {
	object-position: center 35%;
}

.medex-home-programs__number {
	color: var(--medex-accent);
	font-family: Montserrat, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.2;
	margin: 0 0 12px;
}

.medex-home-programs__name {
	color: var(--medex-heading);
	font-family: Montserrat, sans-serif;
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
	margin: 0 0 14px;
	text-transform: uppercase;
}

.medex-home-programs__text {
	color: var(--medex-body);
	flex: 1 1 auto;
	font-family: Inter, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.65;
	margin: 0 0 22px;
}

.medex-home-programs__link {
	align-items: center;
	color: var(--medex-heading);
	display: inline-flex;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	letter-spacing: 0.06em;
	line-height: 1.2;
	margin-top: auto;
	text-decoration: none;
	text-transform: uppercase;
	transition: color 0.2s ease;
}

.medex-home-programs__link::after {
	content: "→";
	font-size: 1.05em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.medex-home-programs__link:hover,
.medex-home-programs__link:focus {
	color: var(--medex-accent);
}

.medex-home-programs__link:hover::after,
.medex-home-programs__link:focus::after {
	transform: translateX(3px);
}

/* Tablet only: two columns (not phones) */
@media (max-width: 992px) and (min-width: 768px) {
	.medex-home-programs__inner {
		padding: 36px 24px;
	}

	.medex-home-programs__header {
		margin-bottom: 40px;
	}

	.medex-home-programs__grid {
		column-gap: 28px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 40px;
	}

	.medex-home-programs__item:last-child {
		grid-column: 1 / -1;
		max-width: 420px;
	}
}

/* Phones: one full-width program stack */
@media (max-width: 767px) {
	.medex-home-programs__inner {
		padding: 40px 24px;
	}

	.medex-home-programs__header {
		margin-bottom: 28px;
	}

	.medex-home-programs__title {
		font-size: 2.25rem; /* 36px */
		line-height: 1.12;
	}

	.medex-home-programs__intro {
		font-size: 1.0625rem; /* 17px */
		line-height: 1.65;
	}

	.medex-home-programs__grid {
		display: flex !important;
		flex-direction: column;
		gap: 0;
		grid-template-columns: none;
	}

	.medex-home-programs__item {
		margin: 0 0 56px;
		max-width: none;
		padding-top: 20px;
		width: 100%;
	}

	.medex-home-programs__item:last-child {
		grid-column: auto;
		margin-bottom: 0;
		max-width: none;
	}

	.medex-home-programs__media {
		margin-bottom: 20px;
		width: 100%;
	}

	.medex-home-programs__media img {
		aspect-ratio: 4 / 3;
		height: auto;
		object-fit: cover;
		width: 100%;
	}

	.medex-home-programs__name {
		font-size: 1.625rem; /* 26px */
		line-height: 1.25;
	}

	.medex-home-programs__text {
		font-size: 1rem;
		line-height: 1.6;
	}
}

/* -------------------------------------------------------------------------
   Home — Proizvodnja / Zašto MEDEX (FAZA 3B)
------------------------------------------------------------------------- */
.medex-manufacturing {
	background: #252a24;
	box-sizing: border-box;
	color: #ffffff;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
	width: 100%;
}

.medex-manufacturing.wp-block-group {
	padding-block: 0 !important;
	padding-inline: 0 !important;
}

.medex-manufacturing__inner {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: var(--medex-max);
	padding: 48px 24px 52px;
	width: 100%;
}

.medex-manufacturing__grid {
	align-items: start;
	column-gap: 72px;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	grid-template-areas:
		"media intro"
		"media principles"
		"media cta";
	row-gap: 36px;
}

.medex-manufacturing__media {
	grid-area: media;
	margin: 0;
	min-width: 0;
	overflow: hidden;
}

.medex-manufacturing__media img {
	aspect-ratio: 5 / 4;
	border-radius: 0;
	display: block;
	height: auto;
	object-fit: cover;
	object-position: 42% 45%;
	width: 100%;
}

.medex-manufacturing__intro {
	grid-area: intro;
	min-width: 0;
}

.medex-manufacturing__eyebrow {
	color: var(--medex-accent);
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	line-height: 1.4;
	margin: 0 0 16px;
	text-transform: uppercase;
}

.medex-manufacturing__title {
	color: #ffffff;
	font-family: Montserrat, sans-serif;
	font-size: clamp(1.75rem, 2.8vw, 2.375rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	margin: 0 0 20px;
}

.medex-manufacturing__text {
	color: rgba(255, 255, 255, 0.75);
	font-family: Inter, sans-serif;
	font-size: 1.0625rem;
	line-height: 1.7;
	margin: 0 0 16px;
}

.medex-manufacturing__text:last-child {
	margin-bottom: 0;
}

.medex-manufacturing__principles {
	column-gap: 28px;
	display: grid;
	grid-area: principles;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	row-gap: 28px;
}

.medex-manufacturing__principle {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	margin: 0;
	padding-top: 16px;
}

.medex-manufacturing__principle-num {
	color: var(--medex-accent);
	font-family: Montserrat, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1.2;
	margin: 0 0 10px;
}

.medex-manufacturing__principle-title {
	color: #ffffff;
	font-family: Montserrat, sans-serif;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.3;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.medex-manufacturing__principle-text {
	color: rgba(255, 255, 255, 0.7);
	font-family: Inter, sans-serif;
	font-size: 0.875rem;
	line-height: 1.55;
	margin: 0;
}

.medex-manufacturing__cta {
	grid-area: cta;
	margin-top: 8px;
}

.medex-manufacturing__link {
	align-items: center;
	border: 1px solid var(--medex-accent);
	box-sizing: border-box;
	color: var(--medex-accent);
	display: inline-flex;
	font-family: Inter, sans-serif;
	font-size: 13px;
	font-weight: 600;
	gap: 8px;
	letter-spacing: 0.06em;
	line-height: 1.2;
	min-height: 48px;
	padding: 12px 22px;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.medex-manufacturing__link::after {
	content: "→";
	font-size: 1.05em;
	line-height: 1;
	transition: transform 0.2s ease;
}

.medex-manufacturing__link:hover,
.medex-manufacturing__link:focus {
	background-color: var(--medex-accent);
	color: #252a24;
}

.medex-manufacturing__link:hover::after,
.medex-manufacturing__link:focus::after {
	transform: translateX(3px);
}

@media (max-width: 992px) {
	.medex-manufacturing__inner {
		padding: 44px 24px 48px;
	}

	.medex-manufacturing__grid {
		column-gap: 40px;
		grid-template-columns: 1fr;
		grid-template-areas:
			"intro"
			"media"
			"principles"
			"cta";
		row-gap: 28px;
	}

	.medex-manufacturing__media img {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 767px) {
	.medex-manufacturing__inner {
		padding: 40px 24px 44px;
	}
}

/* -------------------------------------------------------------------------
   Footer + scroll-to-top (FAZA 3D)
------------------------------------------------------------------------- */
#ast-scroll-top,
.ast-scroll-to-top-icon,
.ast-scroll-top-icon {
	display: none !important;
}

.site-footer,
.ast-footer-copyright {
	text-align: center;
}

.ast-footer-copyright {
	font-family: Inter, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.ast-footer-copyright a[href*="wpastra.com"],
.ast-footer-copyright a[href*="wordpress.org"] {
	display: none !important;
}