/* Sostenibilidad: tres ejes en pestañas, políticas con resumen desplegable y canal de ética */

.page-sostenibilidad { --sos-green: var(--green); }

/* Portada */
.sos-hero { padding-top: 72px; gap: 32px 56px; }
.sos-hero__text { flex-basis: 600px; gap: 20px; }
.sos-hero__lead { font-size: 18px; color: var(--muted); max-width: 720px; }
.sos-hero__aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.sos-hero__aside .btn { min-height: 48px; }
.sos-hero__date { font-size: 13px; color: var(--muted); }

/* Pestañas de los ejes */
.sos-ejes { padding-top: 8px; padding-bottom: 80px; }
.sos-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sos-tab {
    min-height: 76px;
    padding: 14px 18px;
    border: 0;
    border-top: 4px solid var(--square-off);
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--white);
    font: inherit;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
    transition: background-color var(--medium) var(--ease), border-color var(--medium) var(--ease), color var(--fast) ease;
}
.sos-tab:hover { color: var(--ink); border-top-color: var(--line-strong); }
.sos-tab__num { font-size: 12px; font-weight: 800; transition: color var(--fast) ease; }
.sos-tab__label { font-weight: 600; font-size: 18px; line-height: 1.3; }
.sos-tab[aria-selected="true"] { background: var(--soft); border-top-color: var(--red); color: var(--ink); }
.sos-tab[aria-selected="true"] .sos-tab__num { color: var(--red); }
.sos-tab[aria-selected="true"] .sos-tab__label { font-weight: 700; }

/* El eje que entra aparece suave */
.sos-panel.is-entering { animation: sos-in var(--medium) var(--ease) both; }
@keyframes sos-in { from { opacity: 0; transform: translateY(10px); } }

/* Caja gris del eje */
.sos-box {
    background: var(--soft);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px 40px;
}
.sos-box__main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.sos-box__head { display: flex; flex-direction: column; gap: 8px; }
.sos-box__head h2 { line-height: 1.15; }
.sos-box__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sos-box__img { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }

.sos-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; border-top: 1px solid var(--square-off); }
.sos-items li {
    position: relative;
    padding: 16px 0 16px 22px;
    border-bottom: 1px solid var(--square-off);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sos-items li::before { content: ""; position: absolute; left: 0; top: 25px; width: 8px; height: 8px; background: var(--red); }
.sos-items b { font-weight: 700; }
.sos-items span { font-size: 15px; color: var(--muted); }

.sos-kpi { background: var(--white); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.sos-kpi__value { font-weight: 800; font-size: 32px; line-height: 1.1; color: var(--red); font-variant-numeric: tabular-nums; }
.sos-kpi__label { font-size: 14px; color: var(--muted); }

/* Ambiental: Agregados R y siembra */
.sos-r {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}
.sos-r__top { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.sos-r__logo { width: min(100%, 420px); height: auto; }
.sos-r__top p { flex: 1 1 380px; min-width: 0; color: var(--muted); }
.sos-r__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    font-size: 14px;
    color: var(--muted);
}
.sos-r__bottom span { flex: 1 1 320px; min-width: 0; }
.sos-r__bottom .btn { font-weight: 700; }

.sos-tree {
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.sos-tree > img { flex: 1 1 460px; min-width: 0; width: 100%; height: 380px; object-fit: cover; object-position: center 62%; }
.sos-tree__text { flex: 1 1 360px; min-width: 0; padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.sos-tree__eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sos-green); }
.sos-tree h3 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.2; }
.sos-tree .btn { align-self: flex-start; font-weight: 700; }

/* Social: galería Manos que Transforman */
.sos-hands { margin-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.sos-hands__head { display: flex; flex-wrap: wrap; gap: 12px 40px; align-items: flex-end; justify-content: space-between; }
.sos-hands__title { display: flex; flex-direction: column; gap: 6px; }
.sos-hands__title h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
.sos-hands__head p { flex: 1 1 360px; min-width: 0; font-size: 15px; }
.sos-gal { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 210px; grid-auto-flow: dense; gap: 10px; }
.sos-gal img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.sos-gal__big { grid-column: span 2; grid-row: span 2; }
.sos-gal__wide { grid-column: span 2; }

/* Gobernanza: políticas y canal de ética */
.sos-gov { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.sos-pols {
    flex: 2 1 520px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px 28px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sos-pols__title { font-size: 22px; line-height: 1.3; }
.sos-pols__intro { font-size: 14px; color: var(--muted); }
.sos-pols__list { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 6px; }
.sos-pols__note { font-size: 13px; color: var(--muted); padding: 12px 0 4px; }

.sos-pol { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.sos-pol__head { display: flex; gap: 14px; align-items: flex-start; }
.sos-pol__head svg { flex: none; margin-top: 2px; color: var(--red); }
.sos-pol__head > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sos-pol__head b { font-weight: 700; font-size: 16px; }
.sos-pol__head > span > span { font-size: 13px; color: var(--muted); }
.sos-pol__actions { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; margin-top: 12px; }

.sos-pbtn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line-strong);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease);
}
.sos-pbtn:hover { border-color: var(--ink); color: var(--ink); }
.sos-pbtn:active { transform: translateY(1px) scale(0.98); }
.sos-pbtn[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.sos-pbtn--red { background: var(--red); border-color: var(--red); color: var(--white); }
.sos-pbtn--red:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }

/* Resumen desplegable: abre y cierra con la altura real del contenido */
.sos-sum { display: grid; grid-template-rows: 1fr; }
.sos-sum__inner { min-height: 0; overflow: hidden; }
.js .sos-sum {
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows var(--medium) var(--ease), visibility 0s linear var(--medium);
}
.js .sos-sum.is-open {
    grid-template-rows: 1fr;
    visibility: visible;
    transition: grid-template-rows var(--medium) var(--ease), visibility 0s;
}
.sos-sum__box {
    margin: 12px 0 0 36px;
    background: var(--soft);
    border-left: 4px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}
.js .sos-sum__box { opacity: 0; transform: translateY(-6px); transition: opacity var(--medium) var(--ease), transform var(--medium) var(--ease); }
.js .sos-sum.is-open .sos-sum__box { opacity: 1; transform: none; }
.sos-sum__box > div { display: flex; flex-direction: column; gap: 2px; }
.sos-sum__box dt { font-weight: 700; color: var(--ink); }
.sos-sum__box dd { margin: 0; color: var(--muted); }

.sos-ethics {
    flex: 1 1 300px;
    min-width: 0;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.sos-ethics > img { width: 100%; height: 180px; object-fit: cover; object-position: 45% 30%; }
.sos-ethics__body { padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.sos-ethics h3 { color: var(--white); font-size: 21px; line-height: 1.25; }
.sos-ethics p { font-size: 15px; color: var(--square-off); }
.sos-ethics .btn { align-self: flex-start; margin-top: 4px; min-height: 48px; }

/* Responsive */
@media (max-width: 720px) {
    .sos-hero { padding-top: 48px; }
    .sos-ejes { padding-bottom: 64px; }
    .sos-tab { min-height: 64px; padding: 10px 12px; }
    .sos-tab__label { font-size: 15px; }
    .sos-box, .sos-r { padding: 24px; }
    .sos-tree > img { height: 240px; }
    .sos-tree__text { padding: 24px; }
    .sos-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 170px; }
    .sos-pols { padding: 24px 20px 12px; }
    .sos-pol__actions { padding-left: 0; }
    .sos-sum__box { margin-left: 0; padding: 16px 18px; }
}
