/**
 * Styles for the site's dynamic blocks.
 *
 * Colours, spacing and type come from the theme's theme.json presets so the
 * plugin stays visually neutral if the theme is ever swapped.
 */

/* ---------- Shared ---------- */

.adyb-sections {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--60, 4rem);
}

.adyb-section {
	scroll-margin-top: calc(var(--wp--custom--header-height, 84px) + 1rem);
}

.adyb-section:focus {
	outline: none;
}

.adyb-section:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-strong, #c79f75);
	outline-offset: 8px;
}

.adyb-section__title {
	margin-block-end: var(--wp--preset--spacing--30, 1.5rem);
}

.adyb-section__media {
	margin: 0 0 var(--wp--preset--spacing--30, 1.5rem);
}

.adyb-section__media img {
	width: 100%;
	height: auto;
	border-radius: 14px;
}

.adyb-section__body > :first-child {
	margin-block-start: 0;
}

.adyb-section__body > :last-child {
	margin-block-end: 0;
}

/* ---------- Jump navigation ---------- */

.adyb-jumpnav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.adyb-jumpnav a {
	display: block;
	padding: 0.7rem 1.15rem;
	border: 1px solid var(--wp--preset--color--mist, #d7e3fc);
	border-radius: 999px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--brand, #1d2b4d);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.adyb-jumpnav a:hover,
.adyb-jumpnav a:focus-visible {
	background: var(--wp--preset--color--brand, #1d2b4d);
	border-color: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
}

.adyb-jumpnav--grid ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.adyb-jumpnav--grid a {
	height: 100%;
	display: flex;
	align-items: center;
}

/* ---------- Video facade ---------- */

.adyb-media__videos {
	display: grid;
	gap: 1rem;
	margin-block-end: var(--wp--preset--spacing--30, 1.5rem);
}

.adyb-media__videos--multi {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.adyb-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
	overflow: hidden;
	background: var(--wp--preset--color--brand-deep, #141f39);
}

.adyb-video__poster,
.adyb-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.adyb-video.is-playing .adyb-video__poster,
.adyb-video.is-playing .adyb-video__play {
	display: none;
}

.adyb-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.adyb-video__play {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	padding: 0;
	cursor: pointer;
	background: rgba(20, 31, 57, 0.28);
	transition: background-color 0.2s ease;
}

.adyb-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 74px;
	height: 74px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: var(--wp--preset--color--base, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231d2b4d'%3E%3Cpath d='M8 5.5v13l11-6.5z'/%3E%3C/svg%3E") no-repeat center / 34px;
	box-shadow: 0 10px 30px rgba(20, 31, 57, 0.35);
	transition: transform 0.2s ease;
}

.adyb-video__play:hover::after,
.adyb-video__play:focus-visible::after {
	transform: translate(-50%, -50%) scale(1.08);
}

.adyb-video__play:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #e2c4a3);
	outline-offset: -3px;
}

.adyb-media__source {
	margin-block-start: var(--wp--preset--spacing--30, 1.5rem);
}

/* ---------- Buttons owned by the plugin ---------- */

.adyb-button {
	display: inline-block;
	padding: 0.9rem 2rem;
	border: 2px solid var(--wp--preset--color--brand, #1d2b4d);
	border-radius: 999px;
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.adyb-button:hover,
.adyb-button:focus-visible {
	background: var(--wp--preset--color--accent, #e2c4a3);
	border-color: var(--wp--preset--color--accent, #e2c4a3);
	color: var(--wp--preset--color--brand, #1d2b4d);
	text-decoration: none;
}

.adyb-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--brand, #1d2b4d);
	outline-offset: 3px;
}

.adyb-button--ghost {
	background: transparent;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

/* ---------- Testimonials ---------- */

/*
 * Two presentations of the same card:
 *
 *  grid     — a masonry of columns. Testimonials run from two lines to a
 *             thousand words, so the cards flow at their natural height and
 *             nothing is truncated or pushed out of the page.
 *  carousel — a row of equal-height cards. Here the text has to be clamped,
 *             or one long story would set the height of the whole row, so a
 *             "read more" control reveals the rest in place.
 */

.adyb-testimonials--grid {
	columns: 3 300px;
	column-gap: var(--wp--preset--spacing--30, 1.5rem);
}

.adyb-testimonials--list {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40, 2.25rem);
}

.adyb-testimonials--grid .adyb-testimonial {
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	margin: 0 0 var(--wp--preset--spacing--30, 1.5rem);
	display: inline-block;
	width: 100%;
}

.adyb-testimonial {
	margin: 0;
	list-style: none;
	min-width: 0;
}

.adyb-testimonial__inner {
	position: relative;
	margin: 0;
	padding: 2.4rem 1.9rem 1.7rem;
	border-radius: 18px;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid rgba(29, 43, 77, 0.08);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 6px 18px rgba(18, 28, 51, 0.07);
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
	transition: box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	/* Long unbroken strings must never widen the card. */
	overflow-wrap: anywhere;
}

.adyb-testimonial__inner:hover {
	box-shadow: 0 2px 6px rgba(18, 28, 51, 0.06), 0 18px 46px rgba(18, 28, 51, 0.13);
}

.adyb-testimonial__mark {
	position: absolute;
	top: 0.3rem;
	right: 1.3rem;
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: 4.5rem;
	line-height: 1;
	color: var(--wp--preset--color--accent, #e2c4a3);
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
}

.adyb-testimonial__quote {
	margin: 0;
	border: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.8;
	color: var(--wp--preset--color--ink, #15192a);
	min-width: 0;
}

.adyb-testimonial__quote > :first-child { margin-block-start: 0; }
.adyb-testimonial__quote > :last-child { margin-block-end: 0; }

.adyb-testimonial__quote p + p {
	margin-block-start: 0.85rem;
}

/* Carousel cards share a row, so their text is clamped until opened. */
.adyb-carousel--quotes .adyb-testimonial__inner {
	height: 100%;
}

.adyb-carousel--quotes .adyb-testimonial__quote {
	display: -webkit-box;
	-webkit-line-clamp: 8;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.adyb-testimonial__more {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--accent-strong, #8d6430);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.adyb-testimonial__more:hover {
	color: var(--wp--preset--color--brand, #1d2b4d);
}

/* Only shown where the text is actually clamped. */
.adyb-testimonials--grid .adyb-testimonial__more,
.adyb-testimonials--list .adyb-testimonial__more {
	display: none;
}

.adyb-testimonial__byline {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	margin-block-start: auto;
	padding-block-start: 1rem;
	border-block-start: 1px solid rgba(29, 43, 77, 0.08);
}

.adyb-testimonial__avatar {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: hsl(var(--adyb-avatar-hue, 220) 40% 94%);
	/* Dark enough for the initials to clear 4.5:1 at every generated hue. */
	color: hsl(var(--adyb-avatar-hue, 220) 52% 26%);
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	overflow: hidden;
}

.adyb-testimonial__avatar--photo {
	background: none;
}

.adyb-testimonial__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.adyb-testimonial__who {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	min-width: 0;
}

.adyb-testimonial__author {
	font-weight: 600;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-testimonial__place {
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

@media (max-width: 660px) {
	.adyb-testimonials--grid {
		columns: 1;
	}
}

/* ---------- Article index ---------- */

.adyb-card--article .adyb-card__media {
	aspect-ratio: 16 / 9;
	display: block;
	background: var(--wp--preset--color--mist, #e8ecf3);
}

/* The banners are screenshots of journal pages in every shape from 1:2.8 to
   2.8:1. Anchoring the crop to the top keeps the masthead and paper title
   visible whatever the source proportions are, so the grid reads evenly. */
.adyb-card--article .adyb-card__media img {
	object-position: top center;
}

/* ---------- Counters ---------- */

.adyb-counters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: var(--wp--preset--spacing--30, 1.5rem);
	text-align: center;
}

.adyb-counter__value {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: var(--wp--preset--font-size--display, 3.25rem);
	line-height: 1.05;
	color: var(--wp--preset--color--brand, #1d2b4d);
	/* Reserve the widest digit width so the count-up cannot shift the layout. */
	font-variant-numeric: tabular-nums;
}

.adyb-counter__label {
	margin: 0.35rem 0 0;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* ---------- Map ---------- */

.adyb-map__frame {
	position: relative;
	aspect-ratio: 16 / 10;
	border-radius: 16px;
	overflow: hidden;
	background: var(--wp--preset--color--surface, #f4f6fb);
	border: 1px solid var(--wp--preset--color--mist, #d7e3fc);
}

.adyb-map__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.adyb-map__consent {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 1.5rem;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: center;
	font-family: inherit;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-map__consent:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-strong, #c79f75);
	outline-offset: -4px;
}

.adyb-map__consent-title {
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: var(--wp--preset--font-size--large, 1.25rem);
}

.adyb-map__consent-action {
	padding: 0.55rem 1.4rem;
	border-radius: 999px;
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.adyb-map__consent-note {
	max-width: 32ch;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

.adyb-map__fallback {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
}

/* ---------- Contact form ---------- */

.adyb-form__form {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--20, 1rem);
}

.adyb-form__heading {
	margin: 0 0 0.5rem;
}

.adyb-form__field {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.adyb-form__label {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 700;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-form__required {
	font-weight: 400;
	color: var(--wp--preset--color--muted, #5a6480);
}

.adyb-form__control {
	width: 100%;
	/* Without this the padding is added to the 100%, and on a phone the
	   fields ran 34px past the edge of the screen. */
	box-sizing: border-box;
	padding: 0.8rem 1rem;
	border: 1px solid var(--wp--preset--color--mist, #d7e3fc);
	border-radius: 10px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--ink, #1a1e29);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	line-height: 1.5;
}

.adyb-form__control:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-strong, #c79f75);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-form__field--error .adyb-form__control {
	border-color: #b3261e;
}

.adyb-form__error {
	color: #8c1d18;
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 600;
}

.adyb-form__notice {
	margin: 0 0 var(--wp--preset--spacing--30, 1.5rem);
	padding: 1rem 1.25rem;
	border-radius: 10px;
	border-inline-start: 4px solid currentColor;
	font-weight: 600;
}

.adyb-form__notice:focus {
	outline: none;
}

.adyb-form__notice:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.adyb-form__notice--success {
	background: #e7f4ec;
	color: #14532d;
}

.adyb-form__notice--error {
	background: #fdeceb;
	color: #8c1d18;
}

.adyb-form__consent {
	margin: 0;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
}

.adyb-form__actions {
	margin: 0.5rem 0 0;
}

/* The honeypot must stay reachable to bots but hidden from people, so it is
   moved off-screen rather than display:none. */
.adyb-form__hp {
	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;
}


/* ---------- Carousel ---------- */

.adyb-carousel {
	position: relative;
}

.adyb-carousel__viewport {
	/* Clips the track horizontally while leaving room above and below for the
	   cards' shadow, which the track's hidden vertical axis would cut off. */
	overflow: hidden;
	margin-inline: -0.2rem;
	padding: 1rem 0.2rem;
}

.adyb-carousel__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--adyb-per-view, 4) - 1) * var(--adyb-gap, 1.25rem)) / var(--adyb-per-view, 4));
	gap: var(--adyb-gap, 1.25rem);
	overflow-x: auto;
	/* Declared explicitly: a single `overflow-x: auto` makes the other axis
	   `auto` as well, which gave the track an unwanted vertical scrollbar. */
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.adyb-carousel__track::-webkit-scrollbar {
	display: none;
}

.adyb-carousel__track:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent-strong, #8d6430);
	outline-offset: 4px;
	border-radius: 12px;
}

.adyb-carousel__slide {
	scroll-snap-align: start;
	margin: 0;
	min-width: 0;
}

.adyb-carousel__slide img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--adyb-ratio, 3 / 4);
	object-fit: cover;
	border-radius: 16px;
	background: var(--wp--preset--color--surface, #f5f7fb);
}

.adyb-carousel--quotes .adyb-carousel__track {
	align-items: stretch;
}

.adyb-carousel--quotes .adyb-carousel__slide img {
	aspect-ratio: auto;
	border-radius: 50%;
}

.adyb-carousel__controls {
	position: absolute;
	inset-block-start: 50%;
	inset-inline: -0.5rem;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
	transform: translateY(-50%);
}

.adyb-carousel__btn {
	pointer-events: auto;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(29, 43, 77, 0.1);
	border-radius: 50%;
	background: var(--wp--preset--color--base, #fff);
	box-shadow: 0 6px 20px rgba(18, 28, 51, 0.14);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-carousel__btn::before {
	content: "";
	width: 11px;
	height: 11px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translate(1px, -1px);
}

.adyb-carousel__btn--next::before {
	transform: rotate(-135deg) translate(1px, -1px);
}

.adyb-carousel__btn:hover,
.adyb-carousel__btn:focus-visible {
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
}

.adyb-carousel__btn[disabled] {
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 1340px) {
	.adyb-carousel__controls {
		inset-inline: 0.5rem;
	}
}

@media (max-width: 1024px) {
	.adyb-carousel__track {
		grid-auto-columns: calc((100% - var(--adyb-gap, 1.25rem)) / 2);
	}
}

@media (max-width: 660px) {
	.adyb-carousel__track {
		grid-auto-columns: 82%;
	}

	.adyb-carousel__controls {
		display: none;
	}
}

/* ---------- Rating summary ---------- */

.adyb-rating {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3rem);
}

.adyb-rating__score {
	display: grid;
	justify-items: center;
	gap: 0.35rem;
	padding: 1.5rem 2rem;
	border-radius: 20px;
	background: var(--wp--preset--color--base, #fff);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 10px 30px rgba(18, 28, 51, 0.1);
}

.adyb-rating__value {
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: clamp(3rem, 7vw, 4.5rem);
	line-height: 1;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-rating__outof {
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

.adyb-rating__stars {
	display: flex;
	gap: 0.2rem;
	color: var(--wp--preset--color--accent-strong, #8d6430);
}

.adyb-rating__stars svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.adyb-rating__count {
	margin: 0.15rem 0 0;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

.adyb-rating__tags {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

.adyb-rating__tags li {
	padding: 0.6rem 1.15rem;
	border-radius: 999px;
	background: var(--wp--preset--color--sand-surface, #faf6f1);
	border: 1px solid rgba(141, 100, 48, 0.25);
	color: var(--wp--preset--color--brand, #1d2b4d);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	font-weight: 500;
}

.adyb-rating__source {
	margin: 1rem 0 0;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

@media (max-width: 782px) {
	.adyb-rating {
		grid-template-columns: 1fr;
		justify-items: start;
	}
}


/* ---------- Testimonial modal ---------- */

/*
 * The full text of a clamped testimonial opens in a near full-screen dialog.
 * <dialog> is used for the real thing: the browser traps focus, closes on
 * Escape and marks the rest of the page inert, with no script of our own.
 */
.adyb-quote-modal {
	width: min(860px, 92vw);
	max-width: none;
	max-height: min(88vh, 900px);
	padding: 0;
	border: 0;
	border-radius: 22px;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--ink, #15192a);
	box-shadow: 0 40px 120px rgba(10, 16, 30, 0.45), 0 8px 28px rgba(10, 16, 30, 0.22);
	overflow: hidden;
}

.adyb-quote-modal::backdrop {
	background: rgba(12, 18, 33, 0.68);
	backdrop-filter: blur(6px) saturate(120%);
}

.adyb-quote-modal__inner {
	display: flex;
	flex-direction: column;
	max-height: min(88vh, 900px);
}

.adyb-quote-modal__head {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.6rem clamp(1.4rem, 4vw, 2.6rem);
	border-block-end: 1px solid rgba(29, 43, 77, 0.1);
	background: var(--wp--preset--color--sand-surface, #faf6f1);
}

.adyb-quote-modal__head .adyb-testimonial__avatar {
	width: 54px;
	height: 54px;
	font-size: 1.05rem;
}

.adyb-quote-modal__who {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
	min-width: 0;
}

.adyb-quote-modal__author {
	font-weight: 600;
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-quote-modal__place {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	color: var(--wp--preset--color--muted, #5a6480);
}

.adyb-quote-modal__close {
	margin-inline-start: auto;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex: 0 0 auto;
	border: 1px solid rgba(29, 43, 77, 0.12);
	border-radius: 50%;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--brand, #1d2b4d);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.adyb-quote-modal__close:hover,
.adyb-quote-modal__close:focus-visible {
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
	transform: rotate(90deg);
}

.adyb-quote-modal__close svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
}

.adyb-quote-modal__body {
	position: relative;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(1.6rem, 4vw, 2.6rem);
	font-size: var(--wp--preset--font-size--medium, 1.0625rem);
	line-height: 1.85;
}

.adyb-quote-modal__body::before {
	content: "\201D";
	display: block;
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: 4.5rem;
	line-height: 0.6;
	color: var(--wp--preset--color--accent, #e2c4a3);
	margin-block-end: 0.75rem;
}

.adyb-quote-modal__body p + p {
	margin-block-start: 1.1rem;
}

.adyb-quote-modal__body > :first-child { margin-block-start: 0; }
.adyb-quote-modal__body > :last-child { margin-block-end: 0; }

/* Entrance animation, skipped entirely under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
	.adyb-quote-modal[open] {
		animation: adyb-modal-in 0.42s cubic-bezier(0.22, 1, 0.36, 1);
	}

	.adyb-quote-modal[open]::backdrop {
		animation: adyb-backdrop-in 0.42s ease;
	}

	.adyb-quote-modal.is-closing {
		animation: adyb-modal-out 0.22s ease forwards;
	}

	.adyb-quote-modal.is-closing::backdrop {
		animation: adyb-backdrop-out 0.22s ease forwards;
	}
}

@keyframes adyb-modal-in {
	from { opacity: 0; transform: translateY(26px) scale(0.965); }
	to   { opacity: 1; transform: none; }
}

@keyframes adyb-modal-out {
	to { opacity: 0; transform: translateY(12px) scale(0.985); }
}

@keyframes adyb-backdrop-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes adyb-backdrop-out {
	to { opacity: 0; }
}

@media (max-width: 660px) {
	.adyb-quote-modal {
		width: 96vw;
		max-height: 92vh;
		border-radius: 18px;
	}

	.adyb-quote-modal__inner {
		max-height: 92vh;
	}
}


/* ---------- Article cards ---------- */

/*
 * One card pattern, used by the pathologies list, the article index and the
 * media pages. `--list` puts the image beside the text; the default stacks
 * it above, which is also what every variant does on a narrow screen.
 */
.adyb-cards {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--wp--preset--spacing--30, 1.5rem);
}

/* Exactly two to a row, so the pairs read as a set; one column on phones. */
.adyb-cards--two {
	grid-template-columns: 1fr;
}

@media (min-width: 781px) {
	.adyb-cards--two {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.adyb-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	border-radius: 18px;
	background: var(--wp--preset--color--base, #fff);
	border: 1px solid rgba(29, 43, 77, 0.08);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 6px 18px rgba(18, 28, 51, 0.06);
	overflow: hidden;
	scroll-margin-top: calc(var(--adyb-header-height, 96px) + 1rem);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.adyb-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 2px 6px rgba(18, 28, 51, 0.06), 0 20px 48px rgba(18, 28, 51, 0.13);
}

.adyb-card--wide {
	flex-direction: row;
	align-items: stretch;
}

.adyb-card__media {
	position: relative;
	flex: 0 0 auto;
	background: var(--wp--preset--color--surface, #f5f7fb);
	overflow: hidden;
}

.adyb-card--wide .adyb-card__media {
	width: clamp(200px, 30%, 320px);
	align-self: stretch;
	/* A floor so a short card still shows a usable image. */
	min-height: 220px;
}

/* The image is positioned so it fills whatever height the text sets. */
.adyb-card--wide .adyb-card__media img {
	position: absolute;
	inset: 0;
}

.adyb-card:not(.adyb-card--wide) .adyb-card__media {
	aspect-ratio: 16 / 9;
}

.adyb-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.adyb-card__placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: linear-gradient(140deg, var(--wp--preset--color--mist, #d7e3fc), var(--wp--preset--color--surface, #f5f7fb));
	color: var(--wp--preset--color--brand, #1d2b4d);
	opacity: 0.55;
}

.adyb-card__placeholder svg {
	width: 46px;
	height: 46px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
}

.adyb-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	padding: clamp(1.25rem, 2.2vw, 1.9rem);
	min-width: 0;
}

.adyb-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: var(--wp--preset--font-size--x-large, 1.75rem);
	font-weight: 400;
	line-height: 1.25;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-card__title a {
	color: inherit;
	text-decoration: none;
}

.adyb-card__title a:hover,
.adyb-card__title a:focus-visible {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Paper titles run to fifteen words; a step down from the card default keeps
   two of them side by side without either one swallowing its card. */
.adyb-card__title--sm {
	font-size: var(--wp--preset--font-size--large, 1.375rem);
	line-height: 1.35;
}

.adyb-card__authors {
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.6;
}

.adyb-card__meta {
	margin: 0;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.adyb-card__text {
	margin: 0;
	color: var(--wp--preset--color--muted, #5a6480);
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.75;
}

.adyb-card__cta {
	margin-top: auto;
	align-self: flex-start;
}

.adyb-card__more,
.adyb-card__cta {
	align-self: flex-start;
	margin-block-start: auto;
	padding: 0.6rem 1.4rem;
	border: 1.5px solid var(--wp--preset--color--brand, #1d2b4d);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--brand, #1d2b4d);
	font-family: inherit;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	letter-spacing: 0.03em;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.adyb-card__more:hover,
.adyb-card__more:focus-visible,
.adyb-card__cta:hover,
.adyb-card__cta:focus-visible {
	background: var(--wp--preset--color--brand, #1d2b4d);
	color: var(--wp--preset--color--base, #fff);
}

@media (max-width: 780px) {
	.adyb-card--wide {
		flex-direction: column;
	}

	.adyb-card--wide .adyb-card__media {
		width: 100%;
		aspect-ratio: 16 / 9;
	}
}

/* The dialog, when it carries an article rather than a quotation. */
.adyb-quote-modal--article .adyb-quote-modal__body::before {
	display: none;
}

.adyb-quote-modal--article .adyb-quote-modal__author {
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-weight: 400;
	font-size: var(--wp--preset--font-size--x-large, 1.75rem);
	line-height: 1.25;
}

.adyb-quote-modal__badge[hidden] {
	display: none;
}

.adyb-quote-modal--article .adyb-quote-modal__body :where(h2, h3, h4) {
	margin-block: 1.6rem 0.6rem;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-quote-modal--article .adyb-quote-modal__body :where(h2, h3, h4):first-child {
	margin-block-start: 0;
}

.adyb-quote-modal--article .adyb-quote-modal__body img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
}

/* ---------- Media cards ---------- */

/*
 * The cover is flush with the top of the card and fills its full width, so a
 * television appearance reads as a piece of video rather than as a thumbnail
 * dropped into a box.
 */
.adyb-card__cover {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--brand-deep, #121c33);
	overflow: hidden;
}

.adyb-card__cover > img,
.adyb-card__cover .adyb-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
}

.adyb-card__cover > img {
	object-fit: cover;
}

.adyb-card__cover .adyb-video[hidden] {
	display: none;
}

/* Numbered switcher for an appearance broadcast in several parts. */
.adyb-card__parts {
	position: absolute;
	right: 0.6rem;
	bottom: 0.6rem;
	z-index: 2;
	display: flex;
	gap: 0.3rem;
	padding: 0.25rem;
	border-radius: 999px;
	background: rgba(18, 28, 51, 0.62);
	backdrop-filter: blur(6px);
}

.adyb-card__part {
	min-width: 1.85rem;
	height: 1.85rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.adyb-card__part:hover {
	background: rgba(255, 255, 255, 0.22);
}

.adyb-card__part[aria-pressed="true"] {
	background: #fff;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

/* The publication a written piece came from. */
.adyb-card__badge {
	position: absolute;
	left: 0.75rem;
	top: 0.75rem;
	z-index: 2;
	padding: 0.28rem 0.7rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wp--preset--color--brand, #1d2b4d);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.adyb-media-list__more {
	margin: var(--wp--preset--spacing--40, 2.25rem) 0 0;
	text-align: center;
}

/* ---------- FAQ accordion ---------- */

/*
 * Built on <details>, so it works with JavaScript switched off and is
 * keyboard- and screen-reader-operable for free. The script below adds the
 * height animation; without it the panel simply appears.
 */
.adyb-faq {
	margin-block-start: var(--wp--preset--spacing--40, 2.25rem);
	border-radius: 18px;
	background: var(--wp--preset--color--base, #fff);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 10px 30px rgba(18, 28, 51, 0.07);
	overflow: hidden;
	text-align: start;
}

.adyb-faq__item + .adyb-faq__item {
	border-block-start: 1px solid var(--wp--preset--color--mist, #e8ecf3);
}

.adyb-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.15rem clamp(1.1rem, 3vw, 1.75rem);
	cursor: pointer;
	color: var(--wp--preset--color--brand, #1d2b4d);
	font-size: var(--wp--preset--font-size--small, 1rem);
	font-weight: 600;
	line-height: 1.5;
	list-style: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.adyb-faq__question::-webkit-details-marker {
	display: none;
}

.adyb-faq__question:hover {
	background: var(--wp--preset--color--surface, #f4f6fa);
}

.adyb-faq__question:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-strong, #8d6430);
	outline-offset: -2px;
}

.adyb-faq__icon {
	position: relative;
	flex: 0 0 auto;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface, #f4f6fa);
}

.adyb-faq__icon::before,
.adyb-faq__icon::after {
	content: "";
	position: absolute;
	inset-inline-start: 50%;
	inset-block-start: 50%;
	width: 0.65rem;
	height: 2px;
	border-radius: 2px;
	background: var(--wp--preset--color--accent-strong, #8d6430);
	translate: -50% -50%;
	transition: rotate 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.adyb-faq__icon::after {
	rotate: 90deg;
}

.adyb-faq__item[open] .adyb-faq__icon::after {
	rotate: 0deg;
}

/* The animated panel: a grid row that grows from zero. */
.adyb-faq__answer {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.adyb-faq__item[open] .adyb-faq__answer {
	grid-template-rows: 1fr;
}

/* A <details> drops its content the moment `open` is removed, so closing is
   held back by the script until this collapse has finished. It must follow
   the [open] rule: the two have the same specificity. */
.adyb-faq__item.is-closing .adyb-faq__answer {
	grid-template-rows: 0fr;
}

.adyb-faq__answer-inner {
	min-height: 0;
	overflow: hidden;
}

.adyb-faq__answer-inner > :first-child {
	margin-block-start: 0;
}

.adyb-faq__answer-inner > * {
	padding-inline: clamp(1.1rem, 3vw, 1.75rem);
}

.adyb-faq__answer-inner > :last-child {
	margin-block-end: 0;
	padding-block-end: 1.35rem;
}

@media (prefers-reduced-motion: reduce) {
	.adyb-faq__answer {
		transition: none;
	}
}

/* ---------- Location maps ---------- */

.adyb-map + .adyb-map {
	margin-block-start: var(--wp--preset--spacing--40, 2.25rem);
}

.adyb-map__address {
	margin: 0.85rem 0 0;
	color: var(--wp--preset--color--muted, #5b6478);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.6;
}

.adyb-map__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0.85rem 0 0;
}

.adyb-contact__aside-title {
	margin-block: 0 var(--wp--preset--spacing--30, 1.5rem);
}

/* ---------- Gallery edge fade ---------- */

/*
 * Softens both ends of a photo strip so slides dissolve at the boundary
 * rather than being cut in half by the viewport edge.
 */
.adyb-carousel--fade .adyb-carousel__viewport {
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.adyb-carousel--fade .adyb-carousel__slide img {
	transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Review platform highlights ---------- */

.adyb-reviews__title {
	margin: 0.35rem 0 var(--wp--preset--spacing--40, 2.25rem);
	font-family: var(--wp--preset--font-family--display, Georgia, serif);
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	font-weight: 400;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-reviews__list {
	list-style: none;
	margin: var(--wp--preset--spacing--40, 2.25rem) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--wp--preset--spacing--30, 1.5rem);
}

.adyb-review {
	margin: 0;
	padding: 1.6rem;
	border-radius: 18px;
	background: var(--wp--preset--color--base, #fff);
	box-shadow: 0 1px 2px rgba(18, 28, 51, 0.04), 0 8px 24px rgba(18, 28, 51, 0.07);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-align: start;
}

.adyb-review .adyb-rating__stars {
	gap: 0.15rem;
}

.adyb-review__body {
	font-size: var(--wp--preset--font-size--small, 0.9375rem);
	line-height: 1.75;
	color: var(--wp--preset--color--ink, #15192a);
}

.adyb-review__body > :first-child {
	margin-block-start: 0;
}

.adyb-review__body > :last-child {
	margin-block-end: 0;
}

.adyb-review__who {
	margin: auto 0 0;
	padding-block-start: 0.9rem;
	border-block-start: 1px solid rgba(29, 43, 77, 0.08);
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	font-weight: 600;
	color: var(--wp--preset--color--brand, #1d2b4d);
}

.adyb-review__place {
	font-weight: 400;
	color: var(--wp--preset--color--muted, #5a6480);
}

/* A card whose actions sit side by side: read the story, or go to the source. */
.adyb-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	margin: auto 0 0;
	padding-block-start: 0.35rem;
}

.adyb-card__actions .adyb-card__cta,
.adyb-card__actions .adyb-card__more {
	margin: 0;
}

/* Publication credits on an index card: present in full, shown a few lines
   at a time so two cards still sit side by side. */
.adyb-card__label {
	display: block;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-strong, #8d6430);
}

.adyb-card__authors,
.adyb-card__affiliations {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.adyb-card__authors {
	-webkit-line-clamp: 4;
}

.adyb-card__affiliations {
	-webkit-line-clamp: 3;
	color: var(--wp--preset--color--muted, #5a6480);
}

/* The hospital's own page: a link under the address, not a second button. */
.adyb-map__link {
	margin: 0.55rem 0 0;
	font-size: var(--wp--preset--font-size--x-small, 0.8125rem);
	line-height: 1.6;
}

.adyb-map__link a {
	color: var(--wp--preset--color--accent-strong, #8d6430);
	text-underline-offset: 3px;
}

/* A button that carries an icon beside its label. */
.adyb-button--icon {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
}

.adyb-button__icon {
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	fill: currentColor;
}

/* Two locations side by side, each card filling its column. */
.adyb-locations .wp-block-column {
	display: flex;
	flex-direction: column;
}

.adyb-locations .adyb-map + .adyb-map {
	margin-block-start: 0;
}

.adyb-locations .adyb-booking {
	max-width: 32rem;
	margin-inline: auto;
	margin-block-end: var(--wp--preset--spacing--40, 2.25rem);
	text-align: center;
}
