/*
 * Ibercook — Sobre nosotros (nodo Figma 243:2960)
 * Reutiliza los tokens definidos en ibercook.css
 */

.abt-page {
    max-width: var(--ib-mw);
    margin: 0 auto;
    padding-bottom: 2rem;
}

/* -- Hero central -- */
.abt-hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.abt-hero__eyebrow, .abt-hero p:first-child  {
    font-family: var(--ib-font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ib-red);
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.abt-hero__title, .abt-hero h1 {
    font-family: var(--ib-font-heading);
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0;
    line-height: 1.05;
}

/* -- Secciones narrativas (marca / origen / futuro / sostenibilidad) -- */
.abt-story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3rem var(--ib-pad);
}

.abt-story--reverse .abt-story__image { order: -1; }

.abt-story__eyebrow {
    font-family: var(--ib-font-heading);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ib-red);
    letter-spacing: 0.06em;
    margin: 0 0 0.5rem;
}

.abt-story__title {
    font-family: var(--ib-font-heading);
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 1.25rem;
    line-height: 1.1;
}

.abt-story__text, .abt-hero p {
    font-family: var(--ib-font-body);
    font-size: 1.125rem;
    color: var(--ib-navy);
    line-height: 1.6;
    margin: 0 0 1rem;
}
.abt-story__text:last-child { margin-bottom: 0; }
/* Bloque 1 pasa el texto como HTML (varios <p> dentro de un único
   div.abt-story__text) en vez de un <p> por párrafo — el margen no es
   heredado por CSS, así que hay que repetirlo en los <p> hijos. */
.abt-story__text p { margin: 0 0 1rem; }
.abt-story__text p:last-child { margin-bottom: 0; }

.abt-story__image {
    border-radius: var(--ib-radius);
    overflow: hidden;
}

/* -- Bloque 1 ("La marca") — caso especial: el título ocupa todo el ancho
   (no la mitad como el resto de bloques narrativos) y debajo va una fila
   imagen-izquierda + texto-derecha. Nodo Figma 243:2960: título 1294px de
   ancho frente a los 628px de "¿De dónde venimos?"/etc. -- */
.abt-lead {
    padding: 3rem var(--ib-pad);
}

.abt-lead__title {
    font-family: var(--ib-font-heading);
    font-size: clamp(1.875rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0 0 2rem;
    line-height: 1.1;
    max-width: none;
}

.abt-lead__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.abt-story__image img {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* -- Bloque de "plantilla" para el campo HTML libre (snippets del CKEditor,
   ver page-html-block en ckeditor_controller.js) — mismo layout que .abt-story
   pero autocontenido, para poder repetirlo tantas veces como convenga dentro
   de un único campo de texto enriquecido. -- */
.abt-story-flex { padding: 1rem var(--ib-pad) 0; }
.abt-story-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 2rem 0;
}
.abt-story-block--reverse .abt-story__image { order: -1; }

/* -- Certificaciones -- */
.abt-badges {
    padding: 1rem var(--ib-pad) 3rem;
    text-align: center;
}

.abt-badges img {
    max-width: 100%;
    height: auto;
}

/* Fila de logos gestionable desde el admin (Slider) */
.abt-badges__row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}
.abt-badges__logo {
    flex: 0 0 auto;
    width: 200px;
    height: 106px;
    border: 1px solid var(--ib-light-gray);
    border-radius: var(--ib-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
.abt-badges__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* -- Hitos (línea de tiempo) -- */
.abt-timeline {
    background: var(--ib-light-gray);
    padding: 3rem 0;
}

.abt-timeline__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--ib-mw);
    margin: 0 auto;
    padding: 0 var(--ib-pad);
    margin-bottom: 1.5rem;
}

.abt-timeline__title {
    font-family: var(--ib-font-heading);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ib-red);
    margin: 0;
    letter-spacing: 0.06em;
}

.abt-timeline__arrows {
    display: flex;
    gap: 0.75rem;
}

.abt-timeline__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--ib-navy);
    background: transparent;
    color: var(--ib-navy);
    cursor: pointer;
    transition: background 0.18s, opacity 0.18s;
}
.abt-timeline__arrow:hover:not(:disabled) { background: rgba(30, 52, 86, 0.08); }
.abt-timeline__arrow.is-inactive,
.abt-timeline__arrow:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.abt-timeline__viewport {
    overflow: hidden;
    padding: 0 var(--ib-pad);
}

.abt-timeline__track {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    padding-top: 2rem;
    transition: transform 0.45s ease;
    will-change: transform;
}

/* Línea + puntos que conectan los hitos (nodo Figma "Línea", #455674 —
   un punto por hito, en el borde izquierdo de cada item). Vive dentro
   del track para desplazarse junto con los items al pasar de hito. */
.abt-timeline__line {
    position: absolute;
    top: 0.75rem;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ib-blue);
}

.abt-timeline__item {
    position: relative;
    flex: 0 0 460px;
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto auto;
    align-items: end;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.35s ease;
}

.abt-timeline__item::before {
    content: '';
    position: absolute;
    /* La línea vive en .abt-timeline__track (top: 0.75rem), pero este punto
       se posiciona relativo al item, cuya caja empieza 2rem (padding-top del
       track) más abajo — hay que restar ese desplazamiento para que coincidan. */
    top: calc(0.75rem - 2rem - 5px);
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ib-blue);
}

.abt-timeline__item.is-dimmed { opacity: 0.2; }

.abt-timeline__year {
    grid-column: 1 / -1;
    font-family: var(--ib-font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ib-navy);
    margin: 0;
}

.abt-timeline__image {
    border-radius: var(--ib-radius);
    overflow: hidden;
    height: 230px;
}

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

/* Logos de certificaciones (fondo blanco + sin recortar, a diferencia de
   las fotos que sí llenan la tarjeta a sangre) */
.abt-timeline__image--logo {
    background: var(--ib-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
}
.abt-timeline__image--logo img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.abt-timeline__text {
    font-family: var(--ib-font-body);
    font-size: 1rem;
    color: var(--ib-navy);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 900px) {
    .abt-story,
    .abt-story-block,
    .abt-lead__row { grid-template-columns: 1fr; gap: 1.5rem; }
    .abt-story--reverse .abt-story__image,
    .abt-story-block--reverse .abt-story__image { order: 0; }
    .abt-story__image img { max-height: 320px; }
}

@media (max-width: 600px) {
    .abt-hero { padding: 2rem var(--ib-pad) 1.5rem; }
    .abt-story { padding: 2rem var(--ib-pad); }
    .abt-timeline__header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
