/**
 * Renovación 2026: páginas institucionales y buscador de agencias.
 */

:root {
	--cosami-navy: #004b7c;
	--cosami-blue: #087eb3;
	--cosami-cyan: #079ed6;
	--cosami-green: #3dae2b;
	--cosami-ink: #073b5a;
	--cosami-muted: #607b8d;
	--cosami-soft: #eef7fb;
	--cosami-line: #d9e9f1;
	--cosami-white: #fff;
}

.cosami-institutional-page,
.cosami-agencies-page {
	color: var(--cosami-ink);
	font-family: "Poppins", sans-serif;
	padding-bottom: 72px;
}

.cosami-institutional-page *,
.cosami-agencies-page * {
	box-sizing: border-box;
}

.cosami-page-hero {
	align-items: center;
	display: flex;
	min-height: 330px;
	margin-bottom: 56px;
}

.cosami-page-hero__copy {
	max-width: min(680px, 66%);
	position: relative;
	z-index: 2;
}

.cosami-page-hero__eyebrow,
.cosami-section-heading__eyebrow,
.cosami-purpose-card__label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .13em;
	margin-bottom: 12px;
	text-transform: uppercase;
}

.cosami-page-hero__eyebrow {
	color: #bfeaff;
}

.cosami-page-hero .titulo_banner_principal {
	font-size: clamp(34px, 3.6vw, 50px);
	font-weight: 700;
	line-height: 1.12;
	margin: 0;
	text-align: left;
}

.cosami-page-hero__summary {
	color: rgba(255, 255, 255, .9);
	font-size: 18px;
	line-height: 1.65;
	margin-top: 22px;
}

.cosami-page-hero__summary > :last-child {
	margin-bottom: 0;
}

.cosami-about-intro {
	align-items: stretch;
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
	margin-bottom: 82px;
}

.cosami-about-intro__media {
	border-radius: 28px;
	margin: 0;
	min-height: 520px;
	overflow: hidden;
}

.cosami-about-intro__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.cosami-about-intro__cards {
	display: grid;
	gap: 22px;
}

.cosami-info-card {
	border-radius: 28px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 249px;
	overflow: hidden;
	padding: 38px 42px;
	position: relative;
}

.cosami-info-card--green {
	background: #edf9ea;
	color: #145d27;
}

.cosami-info-card--blue {
	background: var(--cosami-soft);
	color: var(--cosami-ink);
}

.cosami-info-card__number {
	color: rgba(0, 85, 140, .1);
	font-size: 112px;
	font-weight: 700;
	line-height: 1;
	position: absolute;
	right: 24px;
	top: 14px;
}

.cosami-info-card h2,
.cosami-purpose-card h2,
.cosami-section-heading h2,
.cosami-agency-results__heading h2,
.cosami-agency-map-panel h2 {
	color: var(--cosami-ink);
	font-weight: 700;
	line-height: 1.2;
	margin: 0;
}

.cosami-info-card h2 {
	font-size: 28px;
	margin-bottom: 12px;
	position: relative;
}

.cosami-info-card p,
.cosami-purpose-card p,
.cosami-value-card p {
	line-height: 1.7;
	margin-bottom: 0;
}

.cosami-history,
.cosami-values {
	background: var(--cosami-soft);
	border-radius: 32px;
	padding: 64px;
}

.cosami-section-heading {
	margin-bottom: 36px;
	max-width: 720px;
}

.cosami-section-heading--center {
	margin-left: auto;
	margin-right: auto;
	text-align: center;
}

.cosami-section-heading__eyebrow,
.cosami-purpose-card__label {
	color: var(--cosami-green);
}

.cosami-section-heading h2 {
	font-size: clamp(32px, 4vw, 50px);
}

.cosami-section-heading p {
	color: var(--cosami-muted);
	font-size: 17px;
	line-height: 1.65;
	margin: 14px 0 0;
}

.cosami-history__panel {
	background: var(--cosami-white);
	border-radius: 26px;
	box-shadow: 0 16px 50px rgba(0, 75, 124, .08);
	min-height: 250px;
	padding: 44px 48px;
}

.cosami-history__story[hidden] {
	display: none;
}

.cosami-history__story.is-active {
	animation: cosamiFadeUp .28s ease both;
}

.cosami-history__year {
	color: var(--cosami-cyan);
	display: block;
	font-size: 36px;
	font-weight: 700;
	margin-bottom: 16px;
}

.cosami-history__description {
	color: var(--cosami-ink);
	font-size: 17px;
	line-height: 1.75;
}

.cosami-history__navigation {
	align-items: center;
	display: grid;
	gap: 16px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	margin-top: 26px;
}

.cosami-history__years {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 5px;
	scrollbar-width: thin;
}

.cosami-history__tab,
.cosami-history__arrow {
	border: 1px solid #bfdce9;
	font-family: inherit;
	font-weight: 600;
	transition: .18s ease;
}

.cosami-history__tab {
	background: var(--cosami-white);
	border-radius: 999px;
	color: var(--cosami-ink);
	flex: 0 0 auto;
	padding: 11px 18px;
}

.cosami-history__tab.is-active {
	background: var(--cosami-green);
	border-color: var(--cosami-green);
	color: var(--cosami-white);
}

.cosami-history__arrow {
	background: var(--cosami-navy);
	border-color: var(--cosami-navy);
	border-radius: 50%;
	color: #fff;
	font-size: 20px;
	height: 46px;
	width: 46px;
}

.cosami-history__tab:focus-visible,
.cosami-history__arrow:focus-visible,
.cosami-agency-card:focus-visible,
.cosami-agency-filters :is(input, select, button):focus-visible {
	outline: 3px solid #86d4f4;
	outline-offset: 3px;
}

.cosami-purpose-grid {
	display: grid;
	gap: 28px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: 70px;
}

.cosami-purpose-card {
	background: var(--cosami-white);
	border: 1px solid var(--cosami-line);
	border-radius: 28px;
	box-shadow: 0 16px 44px rgba(0, 75, 124, .08);
	overflow: hidden;
}

.cosami-purpose-card__media {
	height: 300px;
	overflow: hidden;
}

.cosami-purpose-card__media img {
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
	width: 100%;
}

.cosami-purpose-card:hover .cosami-purpose-card__media img {
	transform: scale(1.025);
}

.cosami-purpose-card__content {
	padding: 38px 42px 42px;
}

.cosami-purpose-card h2 {
	font-size: 32px;
	margin-bottom: 14px;
}

.cosami-values__grid {
	display: grid;
	gap: 22px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cosami-value-card {
	background: var(--cosami-white);
	border: 1px solid transparent;
	border-radius: 24px;
	min-height: 250px;
	padding: 32px;
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.cosami-value-card:hover {
	border-color: #b8e9ae;
	box-shadow: 0 14px 36px rgba(0, 75, 124, .08);
	transform: translateY(-3px);
}

.cosami-value-card__icon {
	align-items: center;
	background: #edf9ea;
	border-radius: 16px;
	display: flex;
	height: 62px;
	justify-content: center;
	margin-bottom: 22px;
	width: 62px;
}

.cosami-value-card__icon img {
	max-height: 34px;
	max-width: 34px;
}

.cosami-value-card h3 {
	color: var(--cosami-ink);
	font-size: 21px;
	margin: 0 0 10px;
}

.cosami-agency-filters {
	align-items: end;
	background: var(--cosami-soft);
	border-radius: 28px;
	display: grid;
	gap: 18px;
	grid-template-columns: 1fr 1fr 1.2fr auto;
	margin: 0 auto 50px;
	padding: 28px;
}

.cosami-filter-field label {
	color: var(--cosami-ink);
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 9px 5px;
}

.cosami-filter-field :is(select, input) {
	appearance: none;
	background: #fff;
	border: 1.5px solid #85cce8;
	border-radius: 16px;
	color: var(--cosami-ink);
	font-family: inherit;
	font-size: 15px;
	height: 58px;
	padding: 0 18px;
	width: 100%;
}

.cosami-filter-field select {
	background-image: linear-gradient(45deg, transparent 50%, var(--cosami-navy) 50%), linear-gradient(135deg, var(--cosami-navy) 50%, transparent 50%);
	background-position: calc(100% - 22px) 25px, calc(100% - 16px) 25px;
	background-repeat: no-repeat;
	background-size: 6px 6px, 6px 6px;
	padding-right: 42px;
}

.cosami-search-control {
	display: flex;
	position: relative;
}

.cosami-search-control input {
	padding-right: 18px;
}

.cosami-agency-filters__reset {
	background: transparent;
	border: 0;
	color: var(--cosami-navy);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	height: 58px;
	padding: 0 8px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.cosami-agencies-layout {
	display: grid;
	gap: 34px;
	grid-template-columns: minmax(340px, .86fr) minmax(0, 1.14fr);
}

.cosami-agency-results__heading {
	align-items: end;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	margin-bottom: 24px;
}

.cosami-agency-results__heading h2,
.cosami-agency-map-panel h2 {
	font-size: 25px;
}

.cosami-agency-count {
	color: var(--cosami-muted);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.cosami-agency-list {
	display: grid;
	gap: 16px;
	max-height: 650px;
	overflow-y: auto;
	padding: 2px 10px 2px 2px;
	scrollbar-color: #8fb8ca transparent;
	scrollbar-width: thin;
}

.cosami-agency-card {
	align-items: center;
	background: #fff;
	border: 1.5px solid var(--cosami-cyan);
	border-radius: 20px;
	color: var(--cosami-ink);
	cursor: pointer;
	display: grid;
	font-family: inherit;
	grid-template-columns: auto minmax(0, 1fr) auto;
	min-height: 152px;
	padding: 25px 24px;
	text-align: left;
	transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
	width: 100%;
}

.cosami-agency-card:hover {
	box-shadow: 0 12px 30px rgba(0, 75, 124, .1);
	transform: translateY(-2px);
}

.cosami-agency-card.is-active {
	background: #f0faed;
	border-color: var(--cosami-green);
	box-shadow: 0 12px 32px rgba(61, 174, 43, .14);
}

.cosami-agency-card[hidden] {
	display: none;
}

.cosami-agency-card__icon {
	color: var(--cosami-cyan);
	font-size: 34px;
	margin-right: 18px;
}

.cosami-agency-card.is-active .cosami-agency-card__icon {
	color: var(--cosami-green);
}

.cosami-agency-card__content {
	display: block;
	min-width: 0;
}

.cosami-agency-card__title {
	color: var(--cosami-navy);
	display: block;
	font-size: 17px;
	margin-bottom: 5px;
	text-transform: uppercase;
}

.cosami-agency-card__meta {
	color: var(--cosami-muted);
	display: block;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 9px;
}

.cosami-agency-card__description {
	display: block;
	font-size: 13px;
	line-height: 1.48;
}

.cosami-agency-card__description p {
	margin: 0;
}

.cosami-agency-card__arrow {
	align-items: center;
	background: var(--cosami-navy);
	border-radius: 50%;
	color: #fff;
	display: flex;
	font-size: 18px;
	height: 42px;
	justify-content: center;
	margin-left: 16px;
	width: 42px;
}

.cosami-agency-card.is-active .cosami-agency-card__arrow {
	background: var(--cosami-green);
}

.cosami-agency-map-panel {
	position: relative;
}

.cosami-agency-map-panel h2 {
	background: var(--cosami-soft);
	border: 1px solid #89cee8;
	border-radius: 999px;
	display: table;
	font-family: "Poppins", sans-serif;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.25;
	margin: 0 auto 22px;
	padding: 13px 36px;
	text-align: center;
}

.cosami-agency-map {
	background: #e8f2f7;
	border-radius: 26px;
	height: 650px;
	overflow: hidden;
}

.cosami-agency-map .leaflet-control-attribution {
	background: rgba(255, 255, 255, .78);
	border-radius: 8px 0 0;
	color: #557080;
	font-family: "Poppins", sans-serif;
	font-size: 9px;
	line-height: 1.25;
	opacity: .72;
	padding: 3px 6px;
}

.cosami-agency-map .leaflet-control-attribution a {
	color: #315f75;
}

.cosami-agency-empty {
	background: var(--cosami-soft);
	border-radius: 18px;
	padding: 30px;
	text-align: center;
}

.cosami-agency-empty strong,
.cosami-agency-empty span {
	display: block;
}

.cosami-agency-empty span {
	color: var(--cosami-muted);
	margin-top: 5px;
}

.cosami-map-popup h3 {
	color: var(--cosami-ink);
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	margin: 0 0 7px;
}

.cosami-map-popup__info {
	font-size: 12px;
	line-height: 1.45;
}

.cosami-map-popup__waze {
	background: var(--cosami-cyan);
	border-radius: 999px;
	color: #fff !important;
	display: inline-block;
	font-weight: 700;
	margin-top: 10px;
	padding: 7px 12px;
	text-decoration: none;
}

@keyframes cosamiFadeUp {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
	.cosami-agency-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cosami-agency-filters__reset {
		height: auto;
		justify-self: start;
	}

	.cosami-values__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 850px) {
	.cosami-page-hero {
		margin-bottom: 38px;
		min-height: 300px;
	}

	.cosami-page-hero__copy {
		max-width: 82%;
	}

	.cosami-about-intro,
	.cosami-purpose-grid,
	.cosami-agencies-layout {
		grid-template-columns: 1fr;
	}

	.cosami-about-intro__media {
		min-height: 380px;
	}

	.cosami-history,
	.cosami-values {
		padding: 42px 28px;
	}

	.cosami-agency-list {
		max-height: 540px;
	}

	.cosami-agency-map {
		height: 480px;
	}
}

@media (max-width: 620px) {
	.cosami-institutional-page,
	.cosami-agencies-page {
		padding-bottom: 42px;
	}

	.cosami-page-hero {
		align-items: flex-start;
		min-height: 350px;
	}

	.cosami-page-hero__copy {
		max-width: 100%;
	}

	.cosami-page-hero .titulo_banner_principal {
		font-size: 32px;
		line-height: 1.16;
	}

	.cosami-page-hero__summary {
		font-size: 15px;
		line-height: 1.55;
	}

	.cosami-about-intro__media {
		border-radius: 22px;
		min-height: 285px;
	}

	.cosami-info-card {
		border-radius: 22px;
		min-height: 220px;
		padding: 30px 26px;
	}

	.cosami-history,
	.cosami-values {
		border-radius: 24px;
		padding: 34px 18px;
	}

	.cosami-history__panel {
		padding: 30px 24px;
	}

	.cosami-history__year {
		font-size: 30px;
	}

	.cosami-history__arrow {
		height: 40px;
		width: 40px;
	}

	.cosami-purpose-card__media {
		height: 220px;
	}

	.cosami-purpose-card__content {
		padding: 30px 26px 34px;
	}

	.cosami-values__grid,
	.cosami-agency-filters {
		grid-template-columns: 1fr;
	}

	.cosami-agency-filters {
		border-radius: 22px;
		padding: 22px 18px;
	}

	.cosami-agency-results__heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.cosami-agency-card {
		grid-template-columns: auto minmax(0, 1fr);
		padding: 22px 18px;
	}

	.cosami-agency-card__arrow {
		display: none;
	}

	.cosami-agency-card__icon {
		font-size: 28px;
		margin-right: 12px;
	}

	.cosami-agency-map-panel h2 {
		font-size: 18px;
		line-height: 1.3;
		padding: 11px 20px;
	}

	.cosami-agency-map .leaflet-control-attribution {
		font-size: 8px;
		opacity: .58;
		padding: 2px 4px;
	}

	.cosami-agency-map {
		border-radius: 22px;
		height: 430px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cosami-history__story.is-active,
	.cosami-purpose-card__media img,
	.cosami-value-card,
	.cosami-agency-card {
		animation: none;
		transition: none;
	}
}
