#amb {
    --amb-white: #FFFEFF;
    --amb-sand-3: #D8CFC7;
    --amb-sand: #FFF5EC;
    --amb-forest: #00402A;
    --amb-green-1: #007F33;
    --amb-green: #00A443;

    --amb-font-title: "IberPangea", Arial, sans-serif;
    --amb-font-body: "IberPangea Text", Arial, sans-serif;

    container-type: inline-size;
    width: 100%;
    max-width: 980px;
    margin: 20px auto;
    box-sizing: border-box;
    text-align: left;
    background-color: var(--amb-white);
    border: 1px solid var(--amb-sand-3);
    border-radius: 20px;
    padding: 24px 0 0;
    overflow: hidden;
}

#amb * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-style: normal;
}

/* Padding horizontal como margen de los hijos (estabilidad de las
   container queries, mismo patrón que referente-mundial) */
#amb > * {
    margin-left: 24px;
    margin-right: 24px;
}

/* ===== Título ===== */
#amb .amb__title {
    color: var(--amb-green-1);
    font-family: var(--amb-font-title);
    font-weight: 400;
    font-size: 32px;
    line-height: 36px;
}

#amb .amb__title strong {
    font-weight: 700;
}

/* ===== Lista de acciones ===== */
#amb .amb__list {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#amb .amb__button {
    display: flex;
    align-items: center;
    width: 100%;
    border: 0;
    background: none;
    cursor: pointer;
    text-align: inherit;
    font: inherit;
    color: inherit;
}

#amb .amb__icon {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
}

#amb .amb__icon img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

#amb .amb__icon img.amb__icon-on { display: none; }
#amb .amb__item.is-open .amb__icon img.amb__icon-off { display: none; }
#amb .amb__item.is-open .amb__icon img.amb__icon-on { display: block; }

#amb .amb__connector {
    flex: 0 0 auto;
    width: 16px;
    height: 1px;
    background-color: var(--amb-green-1);
}

#amb .amb__item.is-open .amb__connector {
    background-color: var(--amb-sand-3);
}

/* Barra */
#amb .amb__bar {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 48px;
    background-color: var(--amb-green-1);
    border: 1px solid var(--amb-green-1);
    border-radius: 8px;
}

#amb .amb__label {
    font-family: var(--amb-font-title);
    font-weight: 500;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    color: var(--amb-white);
}

#amb .amb__chevron {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
}

#amb .amb__chevron img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

#amb .amb__chevron img.amb__chevron-on { display: none; }

/* Estado abierto: barra blanca unida al panel */
#amb .amb__item.is-open .amb__bar {
    background-color: #FFFFFF;
    border-color: var(--amb-sand-3);
    border-radius: 8px 8px 0 0;
    border-bottom-color: transparent;
}

#amb .amb__item.is-open .amb__label {
    color: var(--amb-green-1);
}

#amb .amb__item.is-open .amb__chevron img.amb__chevron-off { display: none; }
#amb .amb__item.is-open .amb__chevron img.amb__chevron-on { display: block; }

/* Panel */
#amb .amb__panel {
    margin-left: 56px;
    background-color: var(--amb-sand);
    border-radius: 0 0 8px 8px;
    padding: 16px;
    min-height: 72px;
}

#amb .amb__panel p {
    font-family: var(--amb-font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: var(--amb-forest);
}

#amb .amb__panel strong {
    font-weight: 700;
}

/* ===== Tierra =====
   El globo va EN FLUJO y es el que da el alto a la banda. Antes la banda tenia un
   alto fijo (201/163) y el globo iba en `absolute`: al crecer el ancho el dibujo
   crecia y la banda no, asi que el globo se salia por arriba y se montaba sobre la
   lista (desde ~375px de hueco, peor a 482). Ahora el alto lo pone el dibujo, asi
   que el solape no puede volver a darse a ningun ancho.
   El dibujo se topa en su tamano de diseno (382) y por debajo se encoge con el
   hueco: un solo bloque para todos los anchos, sin tramo movil. */
#amb .amb__earth {
    position: relative;
    width: 382px;
    max-width: 100%;
    margin: 35px auto 0;
}

#amb .amb__earth-globe {
    display: block;
    width: 100%;
    height: auto;
}

/* La flor se ancla al globo en porcentaje (no en px) para que escale con el:
   20,42% = 78 de 382, y el centro a 56,28% = el centro del globo + los 24px que
   ya tenia la pieza en su ancho de diseno. */
#amb .amb__earth-flower {
    position: absolute;
    bottom: 0;
    left: 56.28%;
    transform: translateX(-50%);
    display: block;
    width: 20.42%;
    height: auto;
}

/* =========================================================================
   MÓVIL (290)
   ========================================================================= */
@container (max-width: 480px) {
    #amb {
        padding: 14px 0 0;
    }

    #amb > * {
        margin-left: 14px;
        margin-right: 14px;
    }

    #amb .amb__title {
        font-size: 30px;
        line-height: 34px;
    }

    #amb .amb__connector {
        width: 5px;
    }

    #amb .amb__bar {
        padding: 4px 40px 4px 16px;
        justify-content: flex-start;
    }

    #amb .amb__label {
        text-align: left;
    }

    #amb .amb__chevron {
        right: 10px;
    }

    /* Abierto en móvil: título centrado y panel a ancho completo */
    #amb .amb__item.is-open .amb__bar {
        justify-content: center;
        padding-left: 40px;
    }

    #amb .amb__item.is-open .amb__label {
        text-align: center;
    }

    #amb .amb__panel {
        margin-left: 0;
        border-top-left-radius: 8px;
        min-height: 0;
    }

    /* La tierra pide más aire en móvil que en desktop (35 arriba). */
    #amb .amb__earth {
        margin: 55px auto 0;
    }
}
