/* ==========================================================================
   Abastos Peruanos — Página «Nosotros» (page-nosotros.php)
   Banner con foto, historia con foto en hexágono, misión/visión, cifras y
   marcas. Variables --ap-* en ap-site.css.
   ========================================================================== */

body.ap-about-page,
body.ap-about-page .site,
body.ap-about-page .site-main { background: #fff; }
.ap-about-page .site,
.ap-about-page .site-main { max-width: none; margin: 0; padding: 0; }

.ap-about { color: var(--ap-ink); font-family: var(--ap-font); }
.ap-about *,
.ap-about *::before,
.ap-about *::after { box-sizing: border-box; }
.ap-about p { margin: 0; }
/* En DM Sans: avg-site.css pone todos los títulos en New Amsterdam. */
html body .ap-about.site-main :is(h1, h2, h3) {
	margin: 0;
	color: var(--ap-ink);
	font-family: var(--ap-font) !important;
	font-weight: 700;
	letter-spacing: -.02em !important;
	text-transform: none;
}
.ap-red { color: var(--ap-red); }

/* Antetítulo rojo en mayúsculas («→ NUESTRA HISTORIA»). */
html body .ap-about.site-main .ap-kicker {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--ap-red);
	font: 600 .875rem/1.2 var(--ap-font);
	letter-spacing: .02em;
	text-transform: uppercase;
}
.ap-kicker--arrow::before {
	content: '';
	width: 12px;
	height: 12px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c3141b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ── Banner ─────────────────────────────────────────────────────────────── */

.ap-about-hero {
	position: relative;
	overflow: hidden;
	isolation: isolate;
	display: flex;
	align-items: center;
	min-height: clamp(420px, 31vw, 600px);
	background: #2b2f36;
	color: #fff;
}
/* Fondo: la misma foto, ampliada y desenfocada, para el lado del texto. */
.ap-about-hero::before {
	content: '';
	position: absolute;
	inset: -40px;
	z-index: -2;
	/* Solo la franja izquierda de la foto (estructura gris, sin los chalecos). */
	background: url("img/ap-nosotros-hero.jpg") left center / 700% 110% no-repeat;
	filter: blur(22px) saturate(.8);
}
.ap-about-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(12, 14, 18, .78) 0%, rgba(12, 14, 18, .6) 40%, rgba(12, 14, 18, .05) 62%, transparent 100%);
}
.ap-about-hero__photo {
	position: absolute;
	top: 0;
	right: 0;
	z-index: -2;
	width: 50%;
	height: 100% !important;
	object-fit: cover;
	object-position: right center;
	-webkit-mask: linear-gradient(90deg, transparent 0%, #000 22%);
	mask: linear-gradient(90deg, transparent 0%, #000 22%);
}
.ap-about-hero__inner { padding: clamp(48px, 5vw, 80px) 0; }
.ap-about-hero__inner > * { max-width: 640px; }

.ap-about-hero__crumbs { display: flex; gap: 12px; font: 400 .9375rem/1.2 var(--ap-font); }
.ap-about-hero__crumbs a { color: #fff; text-decoration: none; }
.ap-about-hero__crumbs a:hover { text-decoration: underline; }
.ap-about-hero__crumbs [aria-current] { color: var(--ap-red); }

html body .ap-about.site-main .ap-about-hero__title {
	margin: clamp(22px, 2.6vw, 40px) 0 16px;
	color: #fff;
	font-size: clamp(2.75rem, 4.6vw, 4.5rem);
	line-height: 1;
	letter-spacing: -.045em !important;
}
.ap-about-hero__text { display: grid; gap: 1.5em; color: rgba(255, 255, 255, .92); font: 400 clamp(.9375rem, .95vw, 1rem)/1.5 var(--ap-font); }

.ap-about-hero__btn {
	display: inline-flex;
	align-items: center;
	gap: 26px;
	height: 52px;
	margin-top: clamp(24px, 2.4vw, 34px);
	padding: 0 28px;
	border-radius: 6px;
	background: var(--ap-red);
	color: #fff;
	font: 600 .9375rem/1 var(--ap-font);
	text-decoration: none;
	transition: background-color .2s, translate .2s var(--ap-ease);
}
.ap-about-hero__btn:hover { background: var(--ap-red-dark); color: #fff; translate: 0 -1px; }
.ap-about-hero__btn svg { transition: transform .25s var(--ap-ease); }
.ap-about-hero__btn:hover svg { transform: translateX(3px); }

/* ── Historia ───────────────────────────────────────────────────────────── */

.ap-about-story { padding: clamp(56px, 6vw, 100px) 0 clamp(40px, 4vw, 60px); }
.ap-about-story__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(32px, 5vw, 90px);
	align-items: center;
}
html body .ap-about.site-main .ap-about-story__title {
	margin: 12px 0 clamp(24px, 2.6vw, 40px);
	font-size: clamp(2rem, 2.8vw, 2.75rem);
	line-height: 1.1;
}
.ap-about-story__text { display: grid; gap: 1em; max-width: 660px; color: var(--ap-body-color); font: 400 var(--ap-fs-body)/var(--ap-lh-body) var(--ap-font); }

.ap-about-story__media {
	position: relative;
	width: min(100%, 540px);
	margin: 0;
	justify-self: end;
	margin-right: clamp(0px, 4vw, 70px);
}
.ap-about-story__photo {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 538 / 590;
	object-fit: cover;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
/* Sello en hexágono gris que sobresale por la derecha de la foto. */
.ap-about-story__seal {
	position: absolute;
	top: 34%;
	left: 84.5%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 31%;
	aspect-ratio: 164 / 190;
	padding-bottom: 4px;
	background: #f1f1f3;
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	color: var(--ap-ink);
	font: 600 clamp(.875rem, 1vw, 1rem)/1.45 var(--ap-font);
	text-align: center;
}
.ap-about-story__seal::after {
	content: '';
	width: 52%;
	height: 3px;
	margin-top: 6px;
	border-radius: 2px;
	background: var(--ap-red);
}

/* ── Misión y visión ────────────────────────────────────────────────────── */

.ap-about-purpose { padding: clamp(20px, 2vw, 30px) 0 clamp(48px, 4.5vw, 64px); }
.ap-about-purpose__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.ap-purpose {
	display: flex;
	align-items: flex-start;
	gap: clamp(20px, 2.2vw, 34px);
	padding: clamp(24px, 2.4vw, 38px) clamp(22px, 2.6vw, 40px);
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	background: #fff;
	transition: border-color .25s, box-shadow .25s;
}
.ap-purpose:hover { border-color: #f0c4c6; box-shadow: 0 20px 40px -30px rgba(0, 0, 0, .35); }
/* Rombo rojo de esquinas redondeadas con el icono en blanco. */
.ap-purpose__ico {
	position: relative;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	margin-top: 18px;
	color: #fff;
}
.ap-purpose__ico::before {
	content: '';
	position: absolute;
	inset: 10px;
	z-index: 0;
	border-radius: 12px;
	background: var(--ap-red);
	transform: rotate(45deg);
}
.ap-purpose__ico svg { position: relative; }
html body .ap-about.site-main .ap-purpose__title { margin: 10px 0 12px; font-size: clamp(1.375rem, 1.6vw, 1.625rem); font-weight: 600; letter-spacing: -.01em !important; }
.ap-purpose__text { color: var(--ap-body-color); font: 400 var(--ap-fs-body)/var(--ap-lh-body) var(--ap-font); }

/* ── Cifras ─────────────────────────────────────────────────────────────── */

.ap-about-stats { padding: clamp(40px, 4vw, 70px) 0; background: var(--ap-soft); }
.ap-about-stats__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 0;
	list-style: none;
}
.ap-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 8px 16px;
	text-align: center;
}
.ap-stat + .ap-stat { border-left: 1px solid #d4d4d8; }
/* Hexágono de línea roja con el icono dentro. */
.ap-stat__ico {
	--hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
	position: relative;
	display: grid;
	place-items: center;
	width: 66px;
	aspect-ratio: 52 / 58;
	margin-bottom: 18px;
	color: var(--ap-red);
}
.ap-stat__ico::before,
.ap-stat__ico::after { content: ''; position: absolute; clip-path: var(--hex); }
.ap-stat__ico::before { inset: 0; background: var(--ap-red); }
.ap-stat__ico::after { inset: 1.6px; background: var(--ap-soft); }
/* El icono ocupa casi la mitad del hexágono (el SVG trae width/height pequeños). */
html body .ap-stat__ico svg { position: relative; z-index: 1; width: 38px; height: 38px; max-width: none; }
.ap-stat__title { color: var(--ap-ink); font: 600 clamp(1.25rem, 1.6vw, 1.625rem)/1.2 var(--ap-font); letter-spacing: -.01em; }
.ap-stat__sub { margin-top: 10px; color: var(--ap-ink); font: 600 1rem/1.3 var(--ap-font); }
.ap-stat__text { margin-top: 12px; color: var(--ap-muted); font: 400 var(--ap-fs-small)/1.45 var(--ap-font); }

/* ── Marcas ([avg_marcas … estilo="ap"]) ────────────────────────────────── */

.ap-about-brands { padding: clamp(56px, 6vw, 100px) 0 clamp(64px, 7vw, 120px); }
html body .ap-about.site-main .ap-about-brands__title {
	margin-bottom: clamp(24px, 2.4vw, 34px);
	font-size: clamp(1.875rem, 2.8vw, 2.75rem);
	line-height: 1.1;
	letter-spacing: -.035em !important;
	text-align: center;
}
html body .ap-about.site-main .ap-brand-grid {
	--cols: 6;
	--gap: 12px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ap-about .ap-brand-grid > li { flex: 0 0 calc((100% - var(--gap) * (var(--cols) - 1)) / var(--cols)); margin: 0; }
html body .ap-about.site-main .ap-brand-grid .avg-brand-grid__item {
	display: grid;
	place-items: center;
	width: 100%;
	height: clamp(64px, 5.4vw, 104px);
	aspect-ratio: auto;
	padding: 12px 24px;
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	background: #fff;
	transition: border-color .2s, translate .2s var(--ap-ease), box-shadow .2s;
}
html body .ap-about.site-main .ap-brand-grid .avg-brand-grid__item:hover {
	border-color: var(--ap-red);
	translate: 0 -2px;
	box-shadow: 0 12px 24px -20px rgba(0, 0, 0, .5);
}
html body .ap-about.site-main .ap-brand-grid .avg-brand-grid__logo {
	width: auto;
	max-width: 82%;
	height: clamp(26px, 2.4vw, 44px);
	object-fit: contain;
	filter: none;
	opacity: 1;
}
.ap-about .ap-brand-grid .avg-brand-grid__name { color: var(--ap-ink); font: 600 .9375rem/1.2 var(--ap-font); }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
	.ap-about-story__grid { grid-template-columns: 1fr; }
	.ap-about-story__media { justify-self: center; width: min(78%, 460px); margin-right: 12%; }
	.ap-about-purpose__grid { grid-template-columns: 1fr; }
	.ap-about-stats__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
	.ap-stat:nth-child(3) { border-left: 0; }
	html body .ap-about.site-main .ap-brand-grid { --cols: 4; }
}

@media (max-width: 760px) {
	.ap-about-hero { min-height: 0; align-items: flex-end; }
	.ap-about-hero::after { background: linear-gradient(180deg, rgba(12, 14, 18, .35) 0%, rgba(12, 14, 18, .82) 55%, rgba(12, 14, 18, .9) 100%); }
	.ap-about-hero__photo { width: 100%; -webkit-mask: none; mask: none; }
	.ap-about-hero__inner { padding-top: 140px; }
}

@media (max-width: 560px) {
	.ap-purpose { flex-direction: column; gap: 8px; }
	.ap-purpose__ico { margin: 0 0 0 -6px; }
	.ap-about-stats__list { grid-template-columns: 1fr; row-gap: 0; }
	.ap-stat { padding: 24px 0; }
	.ap-stat + .ap-stat,
	.ap-stat:nth-child(3) { border-left: 0; border-top: 1px solid #d4d4d8; }
	html body .ap-about.site-main .ap-brand-grid { --cols: 2; --gap: 10px; }
}
