/*
 * IMA Pharmacy Plus — page content styles (front end and block editor).
 * Sections, cards, buttons and typography used inside page content.
 */

:root {
	--ima-green: #116940;
	--ima-green-dark: #0d5634;
	--ima-orange: #f36716;
	--ima-orange-dark: #dc5a0f;
	--ima-ink: #13251e;
	--ima-muted: #5c7068;
	--ima-mint: #f1f8f5;
	--ima-tint: #f8fbfa;
	--ima-peach: #fff0e6;
	--ima-line: #e3ece8;
	--ima-wa: #25d366;
	--ima-radius: 20px;
	--ima-radius-lg: 28px;
	--ima-shadow-card: 0 1px 2px rgba(19, 37, 30, .04), 0 10px 30px -18px rgba(19, 37, 30, .18);
	--ima-shadow-glow: 0 40px 70px -35px rgba(17, 105, 64, .45);
	--ima-font: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--ima-font-display: "Plus Jakarta Sans", "DM Sans", ui-sans-serif, system-ui, sans-serif;
	--ima-gutter: 24px;
	--ima-max: 1104px;
}

/* ---------- Base inside content / editor ---------- */
.ima-designed,
.editor-styles-wrapper {
	font-family: var(--ima-font);
	color: var(--ima-ink);
}
.editor-styles-wrapper {
	font-size: 16px;
	line-height: 1.6;
}
.ima-designed > * {
	margin-top: 0;
	margin-bottom: 0;
}
.ima-designed h1, .ima-designed h2, .ima-designed h3, .ima-designed h4,
.editor-styles-wrapper h1, .editor-styles-wrapper h2, .editor-styles-wrapper h3, .editor-styles-wrapper h4 {
	font-family: var(--ima-font-display);
	color: var(--ima-ink);
	letter-spacing: -0.025em;
	margin: 0;
}
:where(.ima-section) :where(p, h1, h2, h3, h4, figure, ul, ol) {
	margin-top: 0;
	margin-bottom: 0;
}

/* ---------- Section shell (full width, centred content) ---------- */
.ima-section {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 96px max(var(--ima-gutter), calc((100% - var(--ima-max)) / 2));
	background: #fff;
}
.ima-section.is-tint {
	background: var(--ima-tint);
}
.ima-section.is-compact {
	padding-top: 72px;
	padding-bottom: 72px;
}

/* Eyebrow label and section heading */
.ima-eyebrow {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--ima-font);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--ima-orange);
	margin-bottom: 12px !important;
}
.ima-eyebrow[class*="icon-"]::before {
	content: "";
	width: 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}
.ima-h2,
.ima-section h2.wp-block-heading {
	font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.25rem);
	line-height: 1.15;
	font-weight: 800;
	max-width: 640px;
}
/* Inner pages use slightly smaller section headings than the home page. */
.ima-page-hero ~ .ima-section h2.wp-block-heading {
	font-size: clamp(1.6rem, 1.2rem + 1.3vw, 1.875rem);
	line-height: 1.2;
}
.ima-section-head {
	margin-bottom: 48px !important;
}
.ima-head-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 48px !important;
}
.ima-head-row > .wp-block-group {
	margin: 0;
}
.ima-lead {
	font-size: 18px;
	line-height: 1.6;
	color: var(--ima-muted);
	max-width: 620px;
}

/* Text link with arrow ("View all services →") */
.ima-textlink {
	font-size: 14px;
	font-weight: 700;
}
.ima-textlink a,
.ima-arrow-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ima-green);
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
}
.ima-textlink a::after {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--ima-arrow) center / contain no-repeat;
	mask: var(--ima-arrow) center / contain no-repeat;
	transition: transform .2s ease;
}
.ima-textlink a:hover::after,
.ima-arrow-link:hover svg {
	transform: translateX(3px);
}
.ima-arrow-link svg {
	transition: transform .2s ease;
}
.ima-arrow-link.is-orange {
	color: var(--ima-orange);
}

/* Line with a small leading icon (opening hours etc.) */
.ima-iconline {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
	color: var(--ima-muted);
}
.ima-iconline::before {
	content: "";
	flex: 0 0 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}

/* ---------- Buttons (core Button block styles) ---------- */
.ima-section .wp-block-buttons,
.editor-styles-wrapper .ima-section .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 0;
}
.wp-block-button[class*="is-style-ima-"] .wp-block-button__link,
.ima-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	min-height: 54px;
	padding: 14px 28px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-family: var(--ima-font);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.wp-block-button[class*="is-style-ima-"] .wp-block-button__link:hover,
.ima-btn:hover {
	transform: translateY(-1px);
}
.wp-block-button.is-style-ima-orange .wp-block-button__link,
.ima-btn--orange {
	background: var(--ima-orange);
	color: #fff;
	box-shadow: 0 14px 28px -12px rgba(243, 103, 22, .65);
}
.wp-block-button.is-style-ima-orange .wp-block-button__link:hover,
.ima-btn--orange:hover {
	background: var(--ima-orange-dark);
	color: #fff;
}
.wp-block-button.is-style-ima-green .wp-block-button__link,
.ima-btn--green {
	background: var(--ima-green);
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(17, 105, 64, .6);
}
.wp-block-button.is-style-ima-green .wp-block-button__link:hover,
.ima-btn--green:hover {
	background: var(--ima-green-dark);
	color: #fff;
}
.wp-block-button.is-style-ima-outline .wp-block-button__link,
.ima-btn--outline {
	background: rgba(255, 255, 255, .7);
	color: var(--ima-green);
	border-color: var(--ima-green);
}
.wp-block-button.is-style-ima-outline .wp-block-button__link:hover,
.ima-btn--outline:hover {
	background: var(--ima-green);
	color: #fff;
}
.wp-block-button.is-style-ima-whatsapp .wp-block-button__link,
.ima-btn--whatsapp {
	background: var(--ima-wa);
	color: #fff;
	box-shadow: 0 14px 28px -14px rgba(37, 211, 102, .8);
}
.wp-block-button.is-style-ima-whatsapp .wp-block-button__link:hover,
.ima-btn--whatsapp:hover {
	background: #1fb859;
	color: #fff;
}
.wp-block-button.is-style-ima-link .wp-block-button__link {
	min-height: 0;
	padding: 0;
	background: none;
	color: var(--ima-green);
	font-size: 14px;
	border: 0;
}
.wp-block-button.is-style-ima-green.is-small .wp-block-button__link,
.wp-block-button.is-small .wp-block-button__link,
.ima-btn--sm {
	min-height: 44px;
	padding: 10px 22px;
	font-size: 15px;
}
.ima-btn.is-block {
	display: flex;
	width: 100%;
}
/* Leading icon from an "icon-…" class */
.wp-block-button[class*="icon-"] .wp-block-button__link::before {
	content: "";
	flex: 0 0 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}
/* Trailing arrow */
.wp-block-button.has-arrow .wp-block-button__link::after {
	content: "";
	flex: 0 0 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--ima-arrow) center / contain no-repeat;
	mask: var(--ima-arrow) center / contain no-repeat;
}

/* ---------- Home hero ---------- */
.ima-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 56px;
	padding-top: 80px;
	padding-bottom: 96px;
	overflow: hidden;
	background:
		radial-gradient(560px 420px at -5% 105%, rgba(243, 103, 22, .10), transparent 70%),
		radial-gradient(640px 460px at 105% -5%, rgba(17, 105, 64, .07), transparent 65%),
		linear-gradient(180deg, #f3f9f6 0%, #f8fbfa 55%, #ffffff 100%);
}
.ima-hero > .wp-block-group {
	margin: 0;
}
.ima-pill {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	width: max-content;
	max-width: 100%;
	padding: 6px 16px;
	border: 1px solid #d9e7e0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .85);
	color: var(--ima-green);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin-bottom: 24px !important;
}
.ima-pill[class*="icon-"]::before {
	content: "";
	flex: 0 0 15px;
	height: 15px;
	background: currentColor;
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}
.ima-pill.is-soft {
	text-transform: none;
	letter-spacing: 0;
	font-size: 13px;
	font-weight: 600;
	color: var(--ima-ink);
}
.ima-pill.is-soft::before {
	color: var(--ima-green);
}
.ima-hero h1.wp-block-heading,
.ima-hero-title {
	font-size: clamp(2.4rem, 1.2rem + 3.6vw, 3.4rem);
	line-height: 1.06;
	font-weight: 800;
	letter-spacing: -0.035em;
	margin-bottom: 24px !important;
}
.ima-hero h1 em,
.ima-hero h1 mark {
	font-style: normal;
	color: var(--ima-green);
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10 Q 150 1 297 8' fill='none' stroke='%23F36716' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 100% .2em;
	padding-bottom: .06em;
	white-space: nowrap;
}
.ima-hero .ima-lead {
	max-width: 520px;
	margin-bottom: 32px !important;
}
.ima-hero .wp-block-buttons {
	flex-wrap: nowrap;
	margin-bottom: 24px !important;
}
.ima-hero .wp-block-button {
	flex: 0 1 auto;
	min-width: 0;
}
.ima-hero .wp-block-button__link {
	text-align: left;
}
.ima-hero__media {
	position: relative;
}
.ima-hero__media .wp-block-image,
.ima-hero__media figure {
	margin: 0;
}
.ima-hero__media img {
	display: block;
	width: 100%;
	aspect-ratio: 5 / 4;
	object-fit: cover;
	border-radius: var(--ima-radius-lg);
	box-shadow: var(--ima-shadow-glow);
}
.ima-badge {
	position: absolute;
	left: -20px;
	bottom: -20px;
	display: grid !important;
	grid-template-columns: 44px auto;
	column-gap: 12px;
	align-items: center;
	padding: 12px 18px 12px 14px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 22px 40px -18px rgba(19, 37, 30, .35);
	margin: 0 !important;
}
.ima-badge::before {
	content: "";
	grid-row: 1 / span 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background:
		var(--ima-green);
}
.ima-badge::after {
	content: "";
	position: absolute;
	left: 26px;
	top: 50%;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: #fff;
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}
.ima-badge p {
	grid-column: 2;
	margin: 0 !important;
}
.ima-badge p:first-child {
	font-family: var(--ima-font-display);
	font-size: 15px;
	font-weight: 700;
	color: var(--ima-ink);
	line-height: 1.3;
}
.ima-badge p:last-child {
	font-size: 13px;
	color: var(--ima-muted);
	line-height: 1.3;
}

/* ---------- Scrolling services band ---------- */
.ima-band {
	padding: 0 !important;
	background: var(--ima-green) !important;
	overflow: hidden;
}
.ima-marquee-wrap {
	overflow: hidden;
	-webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
	mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ima-marquee-track {
	display: flex;
	width: max-content;
	animation: ima-marquee 38s linear infinite;
}
.ima-band:hover .ima-marquee-track {
	animation-play-state: paused;
}
ul.ima-marquee,
.ima-band ul.wp-block-list {
	display: flex;
	flex-wrap: nowrap;
	gap: 0;
	margin: 0 !important;
	padding: 13px 0 !important;
	list-style: none;
	white-space: nowrap;
}
ul.ima-marquee li {
	display: flex;
	align-items: center;
	margin: 0;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
}
ul.ima-marquee li::after {
	content: "+";
	margin: 0 30px;
	color: var(--ima-orange);
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}
@keyframes ima-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.ima-marquee-track { animation: none; }
}
.editor-styles-wrapper ul.ima-marquee {
	flex-wrap: wrap;
	padding: 13px 24px !important;
}

/* ---------- Grids and cards ---------- */
.ima-grid {
	display: grid !important;
	gap: 24px;
}
.ima-grid > * {
	margin: 0 !important;
}
.ima-grid.is-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ima-grid.is-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ima-card {
	position: relative;
	box-sizing: border-box;
	padding: 28px;
	border: 1px solid var(--ima-line);
	border-radius: var(--ima-radius);
	background: #fff;
	box-shadow: var(--ima-shadow-card);
	transition: transform .2s ease, box-shadow .2s ease;
}
.ima-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 1px 2px rgba(19, 37, 30, .04), 0 20px 40px -22px rgba(19, 37, 30, .28);
}
/* icon tile + icon */
.ima-card[class*="icon-"]::before {
	content: "";
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--ima-mint);
	box-shadow: inset 0 0 0 1px rgba(17, 105, 64, .08);
	margin-bottom: 20px;
}
.ima-card[class*="icon-"]::after {
	content: "";
	position: absolute;
	top: 40px;
	left: 40px;
	width: 20px;
	height: 20px;
	background: var(--ima-green);
	-webkit-mask: var(--ima-icon) center / contain no-repeat;
	mask: var(--ima-icon) center / contain no-repeat;
}
.ima-card.is-warm[class*="icon-"]::before {
	background: var(--ima-peach);
	box-shadow: none;
}
.ima-card.is-warm[class*="icon-"]::after {
	background: var(--ima-orange);
}
.ima-card h3,
.ima-card h3.wp-block-heading {
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: -0.01em;
	margin-bottom: 10px !important;
}
.ima-card p {
	font-size: 15px;
	line-height: 1.65;
	color: var(--ima-muted);
}
/* Row layout: icon on the left */
.ima-card.is-row[class*="icon-"] {
	padding: 24px 24px 24px 88px;
}
.ima-card.is-row[class*="icon-"]::before {
	position: absolute;
	top: 24px;
	left: 24px;
	margin: 0;
}
.ima-card.is-row[class*="icon-"]::after {
	top: 36px;
	left: 36px;
}
.ima-card.is-row h3 {
	font-size: 17px;
	margin-bottom: 6px !important;
}
.ima-card.is-row p {
	font-size: 14.5px;
	line-height: 1.6;
}
/* "SOON" tag */
.ima-card.has-soon::before {
	margin-bottom: 20px;
}
.ima-card.has-soon h3::after {
	content: "Soon";
	position: absolute;
	top: 22px;
	right: 22px;
	padding: 4px 11px;
	border-radius: 999px;
	background: var(--ima-peach);
	color: var(--ima-orange);
	font-family: var(--ima-font);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

/* ---------- Image + text split ---------- */
.ima-split {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: center;
	gap: 64px;
}
.ima-split > * {
	margin: 0 !important;
}
.ima-split.is-top {
	align-items: start;
}
.ima-split h2 {
	margin-bottom: 20px !important;
}
.ima-split p:not(.ima-eyebrow) {
	font-size: 16.5px;
	line-height: 1.7;
	color: var(--ima-muted);
}
.ima-split p + p {
	margin-top: 16px !important;
}
.ima-split .wp-block-buttons {
	margin-top: 28px !important;
}
.wp-block-image.is-style-ima-rounded,
.ima-split .wp-block-image {
	margin: 0;
}
.wp-block-image.is-style-ima-rounded img,
.ima-split .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 20 / 13;
	object-fit: cover;
	border-radius: var(--ima-radius-lg);
	box-shadow: var(--ima-shadow-glow);
}

/* ---------- Green call-to-action band ---------- */
.ima-cta-band {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 32px 48px;
	padding-top: 80px;
	padding-bottom: 80px;
	background:
		radial-gradient(520px 320px at 100% 0%, rgba(255, 255, 255, .10), transparent 70%),
		linear-gradient(90deg, var(--ima-green) 0%, var(--ima-green) 55%, #17784b 100%) !important;
}
.ima-cta-band > * {
	margin: 0 !important;
}
.ima-cta-band .ima-cta-band__label {
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px !important;
}
.ima-cta-band h2,
.ima-cta-band h2.wp-block-heading {
	color: #fff;
	font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.25rem);
	line-height: 1.15;
	max-width: 640px;
}

/* Rounded green box (services page) */
.ima-cta-box {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 24px 40px;
	margin-top: 48px !important;
	padding: 40px 48px;
	border-radius: var(--ima-radius-lg);
	background:
		radial-gradient(420px 260px at 100% 0%, rgba(255, 255, 255, .10), transparent 70%),
		var(--ima-green);
	color: #fff;
}
.ima-cta-box > * {
	margin: 0 !important;
}
.ima-cta-box h2,
.ima-cta-box h2.wp-block-heading {
	color: #fff;
	font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2rem);
	margin-bottom: 8px !important;
}
.ima-cta-box p {
	color: rgba(255, 255, 255, .85);
	font-size: 16px;
	line-height: 1.6;
	max-width: 560px;
}

/* ---------- Inner page hero ---------- */
.ima-page-hero {
	padding-top: 64px;
	padding-bottom: 64px;
	background: var(--ima-tint);
}
.ima-page-hero h1,
.ima-page-hero h1.wp-block-heading,
.ima-page-title {
	font-family: var(--ima-font-display);
	font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3rem);
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.035em;
	color: var(--ima-ink);
	margin: 0 0 18px !important;
	max-width: 760px;
}
.ima-page-hero h1.is-green {
	color: var(--ima-green);
}
.ima-page-hero .ima-lead {
	font-size: 17px;
	max-width: 640px;
}

/* ---------- Article body (posts and simple pages) ---------- */
.ima-prose {
	font-size: 17px;
	line-height: 1.78;
	color: #42564e;
}
.ima-prose > * + *,
.ima-section .ima-prose > * + * {
	margin-top: 1.1em;
}
.ima-prose h2,
.ima-section .ima-prose h2.wp-block-heading {
	font-family: var(--ima-font-display);
	font-size: 24px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--ima-ink);
	letter-spacing: -0.02em;
	max-width: none;
	margin-top: 1.8em;
	margin-bottom: .2em;
}
.ima-prose h3 {
	font-family: var(--ima-font-display);
	font-size: 19px;
	color: var(--ima-ink);
	margin-top: 1.5em;
}
.ima-prose ul,
.ima-prose ol {
	padding-left: 1.3em;
}
.ima-prose li + li {
	margin-top: .45em;
}
.ima-prose li::marker {
	color: var(--ima-green);
}
.ima-prose a {
	color: var(--ima-green);
	text-underline-offset: 3px;
}
.ima-prose strong {
	color: var(--ima-ink);
}
.ima-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.ima-section {
		padding-top: 72px;
		padding-bottom: 72px;
	}
	.ima-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 56px;
		padding-top: 56px;
	}
	.ima-grid.is-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ima-split {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}
}
@media (max-width: 767px) {
	:root {
		--ima-gutter: 16px;
	}
	.ima-section {
		padding-top: 60px;
		padding-bottom: 60px;
	}
	.ima-page-hero {
		padding-top: 48px;
		padding-bottom: 48px;
	}
	.ima-grid.is-3,
	.ima-grid.is-2 {
		grid-template-columns: minmax(0, 1fr);
	}
	.ima-cta-band,
	.ima-cta-box {
		grid-template-columns: minmax(0, 1fr);
	}
	.ima-cta-box {
		padding: 32px 24px;
	}
	.ima-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}
	.ima-hero .wp-block-button__link {
		width: 100%;
	}
	.ima-badge {
		left: 12px;
		bottom: -24px;
	}
	.ima-card.is-row[class*="icon-"] {
		padding-left: 80px;
	}
}

.ima-section-head.is-tight {
	margin-bottom: 28px !important;
}

/* Older WordPress versions wrap group content in an extra div; let the layouts see through it. */
[class*="ima-"] > .wp-block-group__inner-container {
	display: contents;
}
