.amigos-page,
.amigos-modal {
	--amigos-green: #145a3c;
	--amigos-green-dark: #0d3d2b;
	--amigos-yellow: #f5ce3e;
	--amigos-paper: #f7f5ee;
	--amigos-ink: #202d27;
}

.amigos-page {
	background: var(--amigos-paper);
}

.amigos-page > .o-bg-title {
	position: relative;
	min-height: 260px;
	padding-top: 56px;
	padding-bottom: 56px;
	background-color: var(--amigos-yellow);
	overflow: hidden;
}

.amigos-page > .o-bg-title:not(.has-bg) {
	background-image:
		radial-gradient(circle at 8% 25%, rgba(255, 255, 255, .34) 0 7px, transparent 8px),
		radial-gradient(circle at 90% 80%, rgba(20, 90, 60, .12) 0 9px, transparent 10px),
		linear-gradient(135deg, #f7d85b 0%, #f1c630 100%);
	background-size: 46px 46px, 62px 62px, auto;
}

.amigos-page > .o-bg-title.has-bg::before {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(8, 52, 35, .88), rgba(8, 52, 35, .48));
	content: '';
}

.amigos-page > .o-bg-title .o-center {
	position: relative;
	z-index: 1;
	display: flex;
	width: min(1180px, calc(100% - 40px));
	min-height: 148px;
	margin: 0 auto;
	flex-direction: column;
	justify-content: center;
}

.amigos-page > .o-bg-title .o-breadcrumb {
	margin-bottom: 18px;
}

.amigos-page > .o-bg-title:not(.has-bg) .o-breadcrumb a,
.amigos-page > .o-bg-title:not(.has-bg) .o-breadcrumb i,
.amigos-page > .o-bg-title:not(.has-bg) .o-title-1 {
	color: var(--amigos-green-dark);
}

.amigos-page > .o-bg-title .o-title-1 {
	max-width: 900px;
	margin: 0;
	font-size: clamp(2.5rem, 7vw, 5.25rem);
	line-height: .96;
	letter-spacing: -.035em;
}

.amigos-page__content.o-center {
	width: min(1240px, calc(100% - 40px));
	max-width: 1240px;
	margin: 0 auto;
	padding-top: clamp(44px, 7vw, 84px);
	padding-bottom: clamp(60px, 9vw, 112px);
}

.amigos-page__intro {
	max-width: 780px;
	margin: 0 auto clamp(36px, 5vw, 58px);
	color: #5d6963;
	font-size: clamp(1rem, 1.7vw, 1.16rem);
	line-height: 1.75;
	text-align: center;
}

.amigos-page__intro > :first-child {
	margin-top: 0;
}

.amigos-page__intro > :last-child {
	margin-bottom: 0;
}

.amigos-page .amigos-gallery {
	display: grid;
	width: 100%;
	margin: 0 auto;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(13px, 1.8vw, 22px);
}

.amigos-photo {
	position: relative;
	display: block;
	min-width: 0;
	aspect-ratio: 1;
	border: 0;
	border-radius: var(--arte-radius-md, 16px);
	background: var(--amigos-green-dark);
	box-shadow: none;
	overflow: hidden;
	transform: translateZ(0);
	transition: transform var(--arte-dur, .22s) var(--arte-ease, ease), box-shadow var(--arte-dur, .22s) var(--arte-ease, ease);
}

.amigos-photo > img {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	object-fit: cover;
	border-radius: 0;
	transition: transform var(--arte-dur-slow, .4s) var(--arte-ease, ease), filter .28s ease;
}

.amigos-photo__overlay {
	position: absolute;
	inset: auto 0 0;
	display: grid;
	min-height: 46%;
	padding: 52px 20px 19px;
	background: linear-gradient(180deg, transparent 0%, rgba(5, 38, 25, .28) 24%, rgba(5, 38, 25, .92) 100%);
	color: #fff;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-template-rows: auto auto;
	align-content: end;
	column-gap: 12px;
	pointer-events: none;
}

.amigos-photo__overlay small {
	grid-column: 1;
	color: var(--amigos-yellow);
	font-size: .65rem;
	font-family: 'Lato-Black', Arial, Helvetica, sans-serif;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.amigos-photo__overlay strong {
	display: -webkit-box;
	margin-top: 5px;
	font-size: clamp(1rem, 1.5vw, 1.22rem);
	font-family: 'Lato-Black', Arial, Helvetica, sans-serif;
	line-height: 1.18;
	grid-column: 1;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.amigos-photo__overlay i {
	display: inline-flex;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: var(--arte-radius-pill, 999px);
	font-size: 1rem;
	font-style: normal;
	grid-column: 2;
	grid-row: 1 / span 2;
	align-self: end;
	align-items: center;
	justify-content: center;
	transition: background .28s ease, color .28s ease, transform .28s ease;
}

.amigos-photo:hover,
.amigos-photo:focus-visible {
	box-shadow: var(--arte-shadow-md, 0 10px 28px rgba(30, 41, 34, .12));
	transform: translateY(-3px);
}

.amigos-photo:hover > img,
.amigos-photo:focus-visible > img {
	filter: saturate(1.06);
	transform: scale(var(--amigo-zoom,1));
}

.amigos-photo:hover .amigos-photo__overlay i,
.amigos-photo:focus-visible .amigos-photo__overlay i {
	background: var(--amigos-yellow);
	color: var(--amigos-green-dark);
	transform: rotate(8deg);
}

.amigos-photo:focus-visible {
	outline: 4px solid var(--amigos-yellow);
	outline-offset: 4px;
}

body.amigos-modal-open {
	overflow: hidden;
}

.amigos-modal[hidden] {
	display: none;
}

.amigos-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	padding: clamp(18px, 4vw, 42px);
	place-items: center;
}

.amigos-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 35, 24, .84);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
}

.amigos-modal__dialog {
	position: relative;
	display: grid;
	width: min(1120px, calc(100vw - 48px));
	height: min(680px, calc(100vh - 64px));
	height: min(680px, calc(100dvh - 64px));
	max-height: 680px;
	grid-template-columns: minmax(0, 1.45fr) minmax(310px, .65fr);
	border: 0;
	border-radius: var(--arte-radius-lg, 24px);
	background: #fff;
	box-shadow: 0 32px 90px rgba(0, 0, 0, .4);
	overflow: hidden;
	animation: amigos-modal-enter .3s cubic-bezier(.2, .8, .2, 1) both;
}

.amigos-modal__close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: inline-flex;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(15, 61, 43, .12);
	border-radius: var(--arte-radius-pill, 999px);
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
	color: var(--amigos-green-dark);
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}

.amigos-modal__media {
	position: relative;
	min-width: 0;
	min-height: 0;
	height: 100%;
	border: 0;
	background: transparent;
	overflow: hidden;
}

.amigos-modal__media img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 0;
	max-height: 100%;
	border: 0 !important;
	outline: 0;
	background: transparent;
	box-shadow: none;
	object-fit: contain;
}

.amigos-modal__info {
	display: grid;
	min-width: 0;
	min-height: 0;
	padding: clamp(58px, 6vw, 82px) clamp(28px, 4vw, 48px) 32px;
	background:
		radial-gradient(circle at 100% 0%, rgba(245, 206, 62, .2), transparent 34%),
		#fff;
	grid-template-rows: 1fr auto;
	overflow-y: auto;
}

.amigos-modal__copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.amigos-modal__eyebrow {
	margin-bottom: 12px;
	color: var(--amigos-green);
	font-size: .72rem;
	font-family: 'Lato-Black', Arial, Helvetica, sans-serif;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.amigos-modal__info h2 {
	margin: 0 0 16px;
	color: var(--amigos-ink);
	font-size: clamp(1.35rem, 3vw, 2rem);
	line-height: 1.15em;
}

.amigos-modal__info p {
	margin: 0;
	color: #687080;
	font-size: .95rem;
	line-height: 1.65em;
}

.amigos-modal__info p[hidden] {
	display: none;
}

.amigos-modal__navigation {
	display: flex;
	margin-top: 34px;
	padding-top: 22px;
	border-top: 1px solid #e7ece8;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.amigos-modal__navigation > span {
	color: #7c8293;
	font-size: .82rem;
}

.amigos-modal__nav {
	display: inline-flex;
	width: 40px;
	height: 40px;
	border: 1px solid #e1e4eb;
	border-radius: var(--arte-radius-pill, 999px);
	background: #fff;
	color: var(--amigos-green);
	cursor: pointer;
	align-items: center;
	justify-content: center;
}

.amigos-modal__nav:hover,
.amigos-modal__nav:focus-visible,
.amigos-modal__close:hover,
.amigos-modal__close:focus-visible {
	border-color: var(--amigos-green);
	background: var(--amigos-green);
	color: #fff;
}

.amigos-modal__close:hover,
.amigos-modal__close:focus-visible {
	transform: rotate(6deg);
}

@keyframes amigos-modal-enter {
	from { opacity: 0; transform: translateY(18px) scale(.975); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media only screen and (max-width: 980px) {
	.amigos-page .amigos-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.amigos-modal__dialog {
		grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr);
	}
}

@media only screen and (max-width: 760px) {
	.amigos-page > .o-bg-title {
		min-height: 220px;
		padding-top: 38px;
		padding-bottom: 38px;
	}

	.amigos-page__content.o-center {
		width: min(1240px, calc(100% - 28px));
	}

	.amigos-page .amigos-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.amigos-photo {
		border-radius: var(--arte-radius-md, 16px);
	}

	.amigos-photo__overlay {
		padding: 40px 14px 14px;
	}

	.amigos-photo__overlay i {
		display: none;
	}

	.amigos-modal {
		padding: 10px;
	}

	.amigos-modal__dialog {
		width: calc(100vw - 20px);
		height: calc(100vh - 20px);
		height: calc(100dvh - 20px);
		max-height: none;
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 56%) minmax(0, 44%);
		border-radius: var(--arte-radius-lg, 24px);
	}

	.amigos-modal__media {
		height: 100%;
		min-height: 0;
	}

	.amigos-modal__media img {
		height: 100%;
		min-height: 0;
	}

	.amigos-modal__info {
		padding: 26px 22px 20px;
	}

	.amigos-modal__info h2 {
		margin-bottom: 10px;
	}

	.amigos-modal__eyebrow {
		margin-bottom: 8px;
	}

	.amigos-modal__navigation {
		margin-top: 20px;
		padding-top: 14px;
	}

	.amigos-modal__close {
		top: 12px;
		right: 12px;
	}
}

@media only screen and (max-width: 390px) {
	.amigos-photo__overlay small {
		display: none;
	}

	.amigos-photo__overlay strong {
		font-size: .9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amigos-photo,
	.amigos-photo > img,
	.amigos-photo__overlay i,
	.amigos-modal__dialog,
	.amigos-modal__close {
		animation: none;
		transition: none;
	}
}

.amigos-gallery-card { min-width: 0; margin: 0; }
.amigos-photo-actions { display: flex; align-items: center; min-height: 48px; padding: 3px 5px; }
.amigos-like { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-width: 64px; min-height: 44px; margin: 0; padding: 7px 9px; color: #263b30; font: inherit; font-size: .96rem; font-weight: 700; line-height: 1; background: transparent; border: 0; border-radius: var(--arte-radius-sm, 10px); cursor: pointer; }
.amigos-like svg { display: block; width: 25px; height: 25px; overflow: visible; fill: transparent; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.amigos-like[aria-pressed="true"] svg { color: #e44756; fill: #e44756; }
.amigos-like:hover:not(:disabled) { background: rgba(20,90,60,.07); }
.amigos-like:disabled { cursor: default; }
.amigos-like[aria-busy="true"] { opacity: .65; }
.amigos-like:focus-visible { outline: 3px solid #b68e00; outline-offset: 3px; }
.amigos-like--modal { align-self: flex-start; margin: 12px 0 18px -9px; }
.amigos-like-status { min-height: 1.5em; margin: 12px 0 0; color: #8c2d2d; font-size: .9rem; text-align: center; }
.amigos-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.amigos-modal__copy p { white-space: pre-line; }
.amigos-modal__info { grid-template-rows: 1fr auto auto; }
.amigos-modal__likes .amigos-like-status { min-height: 0; margin: 0; font-size: .84rem; text-align: left; }
.amigos-modal__likes .amigos-like-status:empty { display: none; }

/* Modal autoajustavel (2026-11-03): a janela acompanha a imagem, sem area vazia. */
.amigos-modal {
	--amigos-modal-info: clamp(300px, 30vw, 380px);
	--amigos-modal-maxw: min(1120px, calc(100vw - 48px));
	--amigos-modal-maxh: min(760px, calc(100vh - 64px));
}

@supports (height: 100dvh) {
	.amigos-modal {
		--amigos-modal-maxh: min(760px, calc(100dvh - 64px));
	}
}

.amigos-modal__dialog {
	width: auto;
	height: auto;
	max-width: var(--amigos-modal-maxw);
	max-height: var(--amigos-modal-maxh);
	min-height: min(420px, var(--amigos-modal-maxh));
	grid-template-columns: auto var(--amigos-modal-info);
	grid-template-rows: auto;
}

.amigos-modal__media {
	display: flex;
	height: auto;
	background: var(--amigos-green-dark);
	align-items: center;
	justify-content: center;
}

.amigos-modal__media img {
	width: auto;
	height: auto;
	max-width: calc(var(--amigos-modal-maxw) - var(--amigos-modal-info));
	max-height: var(--amigos-modal-maxh);
	object-fit: contain;
}

.amigos-modal__info {
	max-height: var(--amigos-modal-maxh);
	box-sizing: border-box;
}

@media only screen and (max-width: 980px) {
	.amigos-modal {
		--amigos-modal-info: 290px;
	}

	.amigos-modal__dialog {
		grid-template-columns: auto var(--amigos-modal-info);
	}
}

@media only screen and (max-width: 760px) {
	.amigos-modal {
		--amigos-modal-maxw: calc(100vw - 20px);
		--amigos-modal-maxh: calc(100vh - 20px);
	}

	@supports (height: 100dvh) {
		.amigos-modal {
			--amigos-modal-maxh: calc(100dvh - 20px);
		}
	}

	.amigos-modal__dialog {
		width: var(--amigos-modal-maxw);
		height: auto;
		min-height: 0;
		max-height: var(--amigos-modal-maxh);
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto;
	}

	.amigos-modal__media {
		height: auto;
	}

	.amigos-modal__media img {
		max-width: 100%;
		max-height: 55vh;
		max-height: 55dvh;
	}

	.amigos-modal__info {
		max-height: calc(var(--amigos-modal-maxh) - 55vh);
		max-height: calc(var(--amigos-modal-maxh) - 55dvh);
		overflow-y: auto;
	}
}

/* ==== Padrao arredondado 2026-11-03 (area institucional) ==== */
/* Modal autoajustavel mantido; botoes de fechar/navegar circulares (contra o reset global). */
.amigos-modal .amigos-modal__close,
.amigos-modal .amigos-modal__nav {
	border-radius: var(--arte-radius-pill, 999px) !important;
}

.amigos-page .amigos-like {
	border-radius: var(--arte-radius-sm, 10px) !important;
}

@media (prefers-reduced-motion: no-preference) {
	.amigos-modal .amigos-modal__nav,
	.amigos-page .amigos-like {
		transition: transform var(--arte-dur, .22s) var(--arte-ease, ease), background-color var(--arte-dur, .22s) var(--arte-ease, ease), border-color var(--arte-dur, .22s) var(--arte-ease, ease), color var(--arte-dur, .22s) var(--arte-ease, ease);
	}

	.amigos-modal .amigos-modal__nav:hover {
		transform: translateY(-1px);
	}

	.amigos-modal .amigos-modal__nav:active,
	.amigos-page .amigos-like:active:not(:disabled) {
		transform: scale(.96);
	}
}

@media (prefers-reduced-motion: reduce) {
	.amigos-photo:hover,
	.amigos-photo:focus-visible {
		transform: none;
	}
}

.amigos-photo > img,.amigos-modal__media img{
  object-position:var(--amigo-pos,50% 50%);
  transform-origin:var(--amigo-pos,50% 50%);
  transform:scale(var(--amigo-zoom,1));
}
.amigos-modal__media{overflow:hidden}

.amigos-photo[data-ajuste="contain"] > img {
  --amigo-pos: 50% 30%;
}
